/* ==========================================================================
   Netwow · waitlist page
   Colours, type sizes and motion values come from design/README.md.
   Light and dark follow the device setting, like the app.
   ========================================================================== */

/* Fonts live in fonts/ (Inter and Space Grotesk, SIL Open Font License, Latin subset).
   Served from this site so the page makes no request to Google. */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/inter-400.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/inter-500.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/inter-600.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/inter-700.woff2") format("woff2");
}
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/space-grotesk-700.woff2") format("woff2");
}

:root {
  color-scheme: light dark;

  --bg: #FFFFFF;
  --text: #0A0A0A;
  --sub: #5E5E63;
  --line: #C9C9CE;
  --line-soft: #E3E3E6;
  --node-inner: #FFFFFF;
  --node-outer: #E3E3E6;
  --solid-bg: #0A0A0A;     /* "Me" circle and main button */
  --solid-text: #FFFFFF;
  --glow: #F2F2F4;         /* wave centre glow */
  --panel: #111111;        /* bottom menu surface */
  --panel-glow: #1C1C1E;

  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-logo: "Space Grotesk", "Inter", system-ui, sans-serif;

  --ease-pop: cubic-bezier(0.3, 0.7, 0.2, 1);   /* Flow.dc.html */
  --ease-wave: cubic-bezier(0.2, 0.6, 0.3, 1);  /* Add.dc.html */

  --gutter: 20px;
  --wrap: 560px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --text: #F5F5F5;
    --sub: #AEAEB2;
    --line: #48484A;
    --line-soft: #2C2C2E;
    --node-inner: #1C1C1E;
    --node-outer: #3A3A3C;
    --solid-bg: #F5F5F5;
    --solid-text: #000000;
    --glow: #1C1C1E;
    --panel: #1C1C1E;
    --panel-glow: #2C2C2E;
  }
}

/* ---------- Base ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, p, ol {
  margin: 0;
}

[hidden] {
  display: none !important;
}

::selection {
  background: var(--text);
  color: var(--bg);
}

:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: max(var(--gutter), env(safe-area-inset-left)) max(var(--gutter), env(safe-area-inset-right));
}

/* ---------- Pills (buttons) and the email field ---------- */

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 52px;
  padding: 0 26px;
  border: 1px solid transparent;
  border-radius: 26px;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: opacity 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
}

.pill--solid {
  background: var(--solid-bg);
  color: var(--solid-text);
}

.pill--ghost {
  border-color: var(--line);
  background: transparent;
  color: var(--text);
}

.pill--small {
  height: 44px;
  padding: 0 18px;
  border-radius: 22px;
  font-size: 14px;
}

.pill:active {
  transform: scale(0.98);
}

.pill[disabled] {
  opacity: 0.55;
  cursor: progress;
}

@media (hover: hover) {
  .pill--solid:hover:not([disabled]) {
    opacity: 0.86;
  }

  .pill--ghost:hover {
    border-color: var(--text);
  }
}

.field {
  width: 100%;
  min-width: 0;
  height: 52px;
  padding: 0 22px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 16px; /* 16px or more, so iOS does not zoom the page on focus */
  appearance: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field::placeholder {
  color: var(--sub);
  opacity: 1;
}

.field:focus-visible,
.field[aria-invalid="true"] {
  outline: none;
  border-color: var(--text);
  box-shadow: 0 0 0 1px var(--text);
}

/* Browser autofill: keep the field's own colours instead of a blue/yellow fill. */
.field:-webkit-autofill {
  -webkit-text-fill-color: var(--text);
  caret-color: var(--text);
  transition: background-color 100000s ease-out 0s;
}

/* ---------- Top bar ---------- */

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: max(20px, env(safe-area-inset-top));
}

.wordmark {
  font-family: var(--font-logo);
  font-size: 26px;
  font-weight: 700;
  line-height: 44px;
  letter-spacing: -0.5px;
  color: inherit;
  text-decoration: none;
}

.top__cta {
  display: none;
}

/* ---------- Hero ---------- */

.hero {
  display: grid;
  gap: 44px;
  padding-top: 32px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 32px;
  margin-bottom: 20px;
  padding: 4px 14px 4px 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--sub);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
}

.eyebrow__dot {
  position: relative;
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text);
}

.eyebrow__dot::after {
  content: "";
  position: absolute;
  inset: -6px;
  border: 1.5px solid var(--text);
  border-radius: 50%;
  opacity: 0;
  animation: wave 3.2s var(--ease-wave) infinite;
}

.hero__title {
  font-size: clamp(2.5rem, 10.4vw, 4rem);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.hero__lede {
  max-width: 33em;
  margin-top: 20px;
  color: var(--sub);
  font-size: 1.0625rem;
  line-height: 1.5;
  text-wrap: pretty;
}

.hero__copy > .waitlist,
.hero__copy > .joined {
  margin-top: 28px;
}

.hero__visual {
  display: flex;
  justify-content: center;
}

/* ---------- Waitlist form ---------- */

.waitlist {
  scroll-margin-top: 28px;
}

.waitlist__row {
  display: grid;
  gap: 10px;
}

.waitlist__msg {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 12px 4px 0;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.35;
  text-align: left;
}

.waitlist__msg svg {
  flex: none;
}

.waitlist__note {
  margin: 12px 4px 0;
  color: var(--sub);
  font-size: 13px;
  line-height: 1.4;
}

.waitlist__note a,
.privacy a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.joined {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 64px;
  padding: 11px 22px 11px 11px;
  border: 1px solid var(--line);
  border-radius: 32px;
  color: var(--sub);
  font-size: 15px;
  line-height: 1.4;
  text-align: left;
  /* The top bar link points here after joining (main.js). */
  scroll-margin-top: 28px;
}

.joined:focus {
  outline: none;
}

.joined strong {
  display: block;
  color: var(--text);
  font-size: 16px;
  font-weight: 600;
}

.joined__check {
  display: grid;
  flex: none;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--solid-bg);
  color: var(--solid-text);
  animation: pop 0.55s var(--ease-pop) both;
}

@media (min-width: 520px) {
  .waitlist__row {
    grid-template-columns: minmax(0, 1fr) auto;
  }
}

/* ---------- Network graph (home screen of the app) ---------- */

.graph {
  display: block;
  width: 100%;
  max-width: 380px;
  height: auto;
  overflow: visible;
}

.graph path {
  fill: none;
  stroke-dasharray: 1;
}

.graph .cross path,
.graph .soft {
  stroke: var(--line-soft);
  stroke-width: 1;
}

.graph .spoke {
  stroke: var(--line);
  stroke-width: 1.5;
}

.graph .outer {
  fill: var(--node-outer);
}

.graph .inner circle {
  fill: var(--node-inner);
  stroke: var(--text);
  stroke-width: 1.5;
}

.graph text {
  fill: var(--text);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  text-anchor: middle;
}

.graph .me__halo {
  fill: var(--bg);
  stroke: var(--line);
  stroke-width: 1;
}

.graph .me__disc {
  fill: var(--solid-bg);
}

.graph .me__icon {
  fill: none;
  stroke: var(--solid-text);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: none;
}

.graph .me__icon path {
  stroke-dasharray: none;
}

.graph .me-label rect {
  fill: var(--bg);
}

/* The network builds itself once: you, then the people you met, then theirs. */
.graph .me,
.graph .inner,
.graph .outer {
  transform-box: fill-box;
  transform-origin: center;
}

.graph .me {
  animation: pop 0.55s var(--ease-pop) 0.05s both;
}

.graph .me-label {
  animation: fade 0.4s ease-out 0.4s both;
}

.graph .spoke {
  animation: draw 0.45s ease-out calc(0.3s + var(--k) * 0.09s) both;
}

.graph .inner {
  animation: pop 0.5s var(--ease-pop) calc(0.55s + var(--k) * 0.09s) both;
}

.graph .soft {
  animation: draw 0.45s ease-out calc(1.1s + var(--k) * 0.09s) both;
}

.graph .outer {
  animation: pop 0.45s var(--ease-pop) calc(1.35s + var(--k) * 0.09s) both;
}

.graph .cross path {
  animation: draw 0.6s ease-out 2s both;
}

@keyframes pop {
  from {
    opacity: 0;
    transform: scale(0.6);
  }
}

@keyframes fade {
  from {
    opacity: 0;
  }
}

@keyframes draw {
  from {
    stroke-dashoffset: 1;
  }

  to {
    stroke-dashoffset: 0;
  }
}

/* ---------- How it works ---------- */

.how {
  padding-top: 72px;
}

.section-title {
  margin-bottom: 36px;
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.025em;
}

.steps {
  display: grid;
  padding: 0;
  list-style: none;
}

/* Steps are drawn like the graph: nodes joined by a line. */
.step {
  position: relative;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  column-gap: 20px;
  padding-bottom: 36px;
}

.step:last-child {
  padding-bottom: 0;
}

.step::before {
  content: "";
  position: absolute;
  top: 48px;
  bottom: 0;
  left: 23.25px;
  width: 1.5px;
  background: var(--line);
}

.step:last-child::before {
  display: none;
}

.step__node {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1.5px solid var(--text);
  border-radius: 50%;
  background: var(--node-inner);
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
}

.step:last-child .step__node {
  border-color: var(--solid-bg);
  background: var(--solid-bg);
  color: var(--solid-text);
}

.step__body {
  padding-top: 10px;
}

.step__title {
  font-size: 1.1875rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.015em;
}

.step__text {
  margin-top: 8px;
  color: var(--sub);
  font-size: 1rem;
  line-height: 1.5;
  text-wrap: pretty;
}

/* ---------- Closing panel ("Add someone" wave screen) ---------- */

.closing-wrap {
  padding-top: 72px;
}

.closing {
  /* A dark surface in both modes, like the app's bottom menu. */
  --bg: var(--panel);
  --text: #F5F5F5;
  --sub: #AEAEB2;
  --line: #48484A;
  --solid-bg: #F5F5F5;
  --solid-text: #000000;
  --glow: var(--panel-glow);
  --ring: 340px;

  color-scheme: dark;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 44px 20px 28px;
  border-radius: 34px;
  background: var(--bg);
  color: var(--text);
  text-align: center;
}

/* Same proportions as the app's "Add someone" screen: 104 photo, 160 glow,
   340 rings. The gap below keeps the brightest part of each wave off the title. */
.pulse {
  position: relative;
  width: 104px;
  height: 104px;
  margin: 0 auto 64px;
}

.pulse__ring,
.pulse__glow {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: -1;
  border-radius: 50%;
  pointer-events: none;
}

.pulse__ring {
  width: var(--ring);
  height: var(--ring);
  margin: calc(var(--ring) / -2) 0 0 calc(var(--ring) / -2);
  border: 1.5px solid var(--text);
  opacity: 0;
  animation: wave 3.2s var(--ease-wave) infinite;
  animation-delay: calc(var(--n) * 0.8s);
}

.pulse__glow {
  width: 160px;
  height: 160px;
  margin: -80px 0 0 -80px;
  background: var(--glow);
}

.pulse__me {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--solid-bg);
  color: var(--solid-text);
}

@keyframes wave {
  0% {
    transform: scale(0.3);
    opacity: 0.85;
  }

  100% {
    transform: scale(1);
    opacity: 0;
  }
}

.closing__title {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.closing__text {
  max-width: 26em;
  margin: 12px auto 0;
  color: var(--sub);
  font-size: 1rem;
  line-height: 1.5;
  text-wrap: pretty;
}

.closing .waitlist,
.closing .joined {
  max-width: 480px;
  margin: 28px auto 0;
}

.closing .waitlist__note {
  text-align: center;
}

.closing .field {
  background: var(--bg);
}

/* ---------- Footer ---------- */

.foot {
  padding-top: 40px;
  padding-bottom: max(32px, env(safe-area-inset-bottom));
  color: var(--sub);
  font-size: 13px;
  line-height: 1.5;
}

.foot p {
  margin: 0;
}

.foot a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.foot__row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 24px;
}

.privacy {
  max-width: 640px;
  margin-bottom: 28px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line-soft);
  display: grid;
  gap: 10px;
  scroll-margin-top: 24px;
  border-radius: 4px;
}

.privacy:focus {
  outline: none; /* focused by script so it is read out; the flash shows where it is */
}

/* Brief highlight after a "How we handle your email" link (main.js). A
   colour fade only, nothing moves, so it stays on with reduced motion. */
.privacy.is-flash {
  animation: privacy-flash 1.8s ease-out;
}

@keyframes privacy-flash {
  0%, 35% {
    background: var(--line-soft);
    box-shadow: 0 0 0 14px var(--line-soft);
  }
  100% {
    background: transparent;
    box-shadow: 0 0 0 14px transparent;
  }
}

.privacy__title {
  margin: 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
}

/* ---------- Privacy policy and terms (privacy.html) ---------- */

.legal-page {
  --wrap: 720px; /* a reading width for header, text and footer alike */
}

.legal {
  padding-top: 32px;
  padding-bottom: 8px;
  font-size: 16px;
  line-height: 1.6;
}

.legal a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal p + p,
.legal p + ul,
.legal ul + p,
.legal__table + p {
  margin-top: 12px;
}

.legal ul,
.legal ol {
  margin: 0;
  padding-left: 1.25em;
}

.legal li + li {
  margin-top: 4px;
}

.legal__draft {
  margin-bottom: 28px;
  padding: 12px 18px;
  border: 1px dashed var(--line);
  border-radius: 16px;
  color: var(--sub);
  font-size: 14px;
  line-height: 1.45;
}

.legal__title {
  font-size: clamp(2rem, 8vw, 2.75rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.legal__meta {
  margin-top: 12px;
  color: var(--sub);
  font-size: 14px;
}

.legal__lede {
  margin-top: 20px;
  color: var(--sub);
  font-size: 1.0625rem;
}

.legal__toc {
  margin-top: 28px;
  padding: 18px 22px;
  border: 1px solid var(--line-soft);
  border-radius: 24px;
  font-size: 15px;
}

.legal__toc-title {
  margin-bottom: 8px;
  font-weight: 600;
}

.legal__toc ol ol {
  margin-top: 4px;
  margin-bottom: 8px;
  color: var(--sub);
}

.legal__part {
  margin-top: 56px;
  scroll-margin-top: 24px;
}

.legal__part-title {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.025em;
}

.legal section section {
  margin-top: 32px;
  scroll-margin-top: 24px;
}

.legal h3 {
  margin: 0 0 10px;
  font-size: 1.1875rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.legal h4 {
  margin: 20px 0 6px;
  font-size: 1rem;
  font-weight: 600;
}

.legal__table {
  overflow-x: auto;
  border: 1px solid var(--line-soft);
  border-radius: 20px;
}

.legal table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  line-height: 1.5;
}

.legal th,
.legal td {
  padding: 12px 16px;
  text-align: left;
  vertical-align: top;
}

.legal thead th {
  color: var(--sub);
  font-size: 13px;
  font-weight: 600;
}

.legal tbody th {
  width: 34%;
  min-width: 120px;
  font-weight: 600;
}

.legal tbody tr {
  border-top: 1px solid var(--line-soft);
}

.legal__back {
  margin-top: 48px;
  font-weight: 600;
}

/* ---------- Wider screens ---------- */

@media (min-width: 900px) {
  :root {
    --gutter: 40px;
    --wrap: 1120px;
  }

  .top {
    padding-top: 28px;
  }

  .top__cta {
    display: inline-flex;
  }

  .hero {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    align-items: center;
    gap: 56px;
    padding-top: 40px;
  }

  .hero__lede {
    font-size: 1.1875rem;
  }

  .hero__copy > .waitlist,
  .hero__copy > .joined {
    max-width: 500px;
    margin-top: 32px;
  }

  .graph {
    max-width: 440px;
  }

  .how,
  .closing-wrap {
    padding-top: 112px;
  }

  .section-title,
  .closing__title {
    font-size: 2.5rem;
  }

  .section-title {
    margin-bottom: 48px;
  }

  .steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: 40px;
  }

  .step {
    display: block;
    padding-bottom: 0;
  }

  .step::before {
    top: 23.25px;
    right: -40px;
    bottom: auto;
    left: 48px;
    width: auto;
    height: 1.5px;
  }

  .step__body {
    padding-top: 24px;
  }

  .closing {
    padding: 72px 40px 56px;
    border-radius: 44px;
  }

  .closing__text {
    font-size: 1.125rem;
  }

  .foot {
    padding-top: 48px;
    padding-bottom: 40px;
  }
}

/* ---------- Reduced motion: nothing moves, the waves stay as still rings ---------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .graph *,
  .joined__check,
  .eyebrow__dot::after {
    animation: none !important;
  }

  /* Still rings between the glow and the title. */
  .pulse__ring {
    animation: none;
    opacity: 0.25;
    transform: scale(calc(0.5 + var(--n) * 0.065));
  }

  .pill {
    transition: none;
  }
}
