/* Northline pre-launch site. Tokens mirror the app's dark colour sets (Assets.xcassets) and
   NorthlineBrand.swift: heavy condensed uppercase display, tracked uppercase labels, 4 px ink buttons. */
@font-face {
  font-family: "Archivo Condensed";
  src: url("/assets/fonts/archivo-condensed.woff2") format("woff2");
  font-weight: 600 900;
  font-stretch: 62% 100%;
  font-display: swap;
}

:root {
  --bg: #0d0e0f;          /* Background (dark) */
  --surface: #121314;     /* Surface */
  --raised: #242629;      /* Raised */
  --line: #303236;        /* Divider */
  --ink: #f3f0e8;         /* Ink */
  --muted: #969aa1;       /* Muted */
  --danger: #f49c95;      /* Danger */
  --success: #a9cbb6;     /* Success */
  --paper: #f6f5f2;       /* Background (light) */
  --paper-ink: #202124;   /* Ink (light) */
  --paper-muted: #63656a; /* Muted (light) */
  --display: "Archivo Condensed", "SF Pro Display", system-ui, sans-serif;
  --text: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --gutter: clamp(20px, 5vw, 48px);
  --max: 1180px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.55 var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

.skip { position: absolute; left: 12px; top: -60px; padding: 10px 14px; background: var(--ink); color: var(--bg); border-radius: 4px; z-index: 10; }
.skip:focus { top: 12px; }

.label {
  margin: 0;
  font: 650 12px/1.3 var(--display);
  font-stretch: 100%;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
}
.display {
  margin: 0;
  font-family: var(--display);
  font-weight: 850;
  font-stretch: 70%;
  text-transform: uppercase;
  letter-spacing: -.005em;
  line-height: .9;
  text-wrap: balance;
}
.display-m { font-size: clamp(36px, 8.5vw, 60px); }
.display-l { font-size: clamp(44px, 11vw, 88px); }
.lede { margin: 0; color: var(--muted); font-size: clamp(17px, 2.2vw, 20px); max-width: 34em; }

/* Top bar */
.bar {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between;
  padding: max(12px, env(safe-area-inset-top)) var(--gutter) 12px;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid transparent;
}
.bar-mark img { width: 72px; height: auto; }
.bar-cta {
  font: 750 13px/1 var(--display); font-stretch: 85%; letter-spacing: .12em; text-transform: uppercase;
  text-decoration: none; padding: 11px 14px; border: 1.5px solid var(--ink); border-radius: 4px;
}
.bar-cta:hover { background: var(--ink); color: var(--bg); }

/* Hero */
.hero {
  max-width: var(--max); margin: 0 auto;
  padding: clamp(28px, 7vw, 72px) var(--gutter) clamp(56px, 10vw, 120px);
  display: grid; gap: clamp(44px, 8vw, 72px);
}
.hero-copy { display: grid; gap: 22px; align-content: start; }
.hero h1 { font-size: clamp(54px, 15.5vw, 118px); }
.hero-visual { position: relative; display: flex; justify-content: center; align-items: flex-start; min-height: 0; padding-right: 8vw; }
.phone {
  margin: 0;
  aspect-ratio: 1206 / 2622;
  border-radius: 13.6% / 6.26%;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .8), 0 0 0 6px #050506;
}
.phone img { width: 100%; height: 100%; object-fit: cover; }
.hero .phone-front { width: min(52vw, 300px); position: relative; z-index: 2; }
.hero .phone-back { width: min(44vw, 260px); position: absolute; right: max(0px, calc(50% - 250px)); top: 64px; opacity: .55; z-index: 1; }

/* Waitlist form */
.waitlist { display: grid; gap: 10px; max-width: 560px; }
.field-label { font: 650 12px/1.3 var(--display); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.field-row { display: grid; gap: 10px; }
.waitlist input {
  width: 100%; min-height: 56px; padding: 0 16px;
  font: 400 17px/1.2 var(--text); /* 17 px keeps iOS from zooming on focus */
  color: var(--ink); background: var(--surface);
  border: 1.5px solid var(--line); border-radius: 4px;
  appearance: none; -webkit-appearance: none;
  scroll-margin: 120px;
}
.waitlist input::placeholder { color: #5f6369; }
.waitlist input:hover { border-color: #4a4d52; }
.waitlist input:focus { border-color: var(--ink); outline: none; }
.waitlist input[aria-invalid="true"] { border-color: var(--danger); }
.button {
  min-height: 56px; padding: 0 22px;
  font: 800 15px/1 var(--display); font-stretch: 80%; letter-spacing: .12em; text-transform: uppercase;
  color: var(--bg); background: var(--ink);
  border: 0; border-radius: 4px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: space-between; gap: 18px;
  transition: opacity .15s ease;
}
.button:hover { opacity: .9; }
.button:active { opacity: .7; }
.button[disabled] { opacity: .55; cursor: progress; }
.note { margin: 2px 0 0; font-size: 14px; color: var(--muted); }
.status { margin: 0; font-size: 15px; min-height: 0; }
.status:empty { display: none; }
.status:focus { outline: none; }
.status[data-kind="error"] { color: var(--danger); }
.waitlist.is-done .field-label, .waitlist.is-done .field-row, .waitlist.is-done .note { display: none; }
.waitlist.is-done .status {
  font: 800 clamp(24px, 5vw, 32px)/1.05 var(--display); font-stretch: 72%; text-transform: uppercase; color: var(--ink);
  padding: 20px 0 4px; border-top: 1.5px solid var(--ink);
}
.waitlist.is-done .status small { display: block; margin-top: 10px; font: 400 16px/1.5 var(--text); text-transform: none; color: var(--muted); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Product moments */
.moments { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter) clamp(40px, 8vw, 96px); }
.moments-title { padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.moment {
  display: grid; gap: 36px;
  padding: clamp(48px, 9vw, 104px) 0;
  border-bottom: 1px solid var(--line);
}
.moment-copy { display: grid; gap: 16px; align-content: start; max-width: 30em; }
.moment-copy p:not(.label) { margin: 0; color: var(--muted); font-size: clamp(17px, 2vw, 19px); }
.moment-shots { display: flex; gap: clamp(14px, 3vw, 28px); justify-content: center; }
.moment-shots .phone { width: min(60vw, 290px); }
.moment-shots .phone:nth-child(2) { margin-top: 48px; }
.moment-shots:has(.phone:nth-child(2)) .phone { width: min(44vw, 280px); }

/* Principle (paper) */
.principle {
  background: var(--paper); color: var(--paper-ink);
  padding: clamp(64px, 12vw, 140px) var(--gutter);
  display: grid; gap: 24px; justify-items: start;
}
.principle > * { max-width: var(--max); width: 100%; margin-left: auto; margin-right: auto; }
.principle h2 { max-width: 12em; margin-left: max(0px, calc((100% - var(--max)) / 2)); }
.principle p { margin: 0 auto; font-size: clamp(17px, 2.2vw, 21px); color: var(--paper-muted); }
.principle p, .principle .facts { max-width: min(var(--max), 36em); margin-left: max(0px, calc((100% - var(--max)) / 2)); }
.facts { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 0; border-top: 1.5px solid var(--paper-ink); }
.facts li { padding: 14px 0; border-bottom: 1px solid #d7d7d3; font: 700 15px/1.3 var(--display); font-stretch: 90%; letter-spacing: .06em; text-transform: uppercase; }

/* Early access */
.join { max-width: var(--max); margin: 0 auto; padding: clamp(72px, 12vw, 140px) var(--gutter); display: grid; gap: 22px; scroll-margin-top: 60px; }
.join h2 { max-width: 11em; }

/* Footer */
.foot {
  max-width: var(--max); margin: 0 auto;
  padding: 40px var(--gutter) max(40px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  display: grid; gap: 20px;
}
.foot-mark { width: 104px; opacity: .9; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.foot nav a { font: 700 13px/1 var(--display); font-stretch: 90%; letter-spacing: .14em; text-transform: uppercase; text-decoration: none; color: var(--muted); padding: 8px 0; }
.foot nav a:hover { color: var(--ink); }
.small { margin: 0; font-size: 13px; color: #6d7177; }
.noscript { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter) 40px; color: var(--muted); }

/* Reveal-on-scroll, enabled by JS only and never under reduced motion */
.js [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1); }
.js [data-reveal].is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js [data-reveal] { opacity: 1; transform: none; transition: none; } }

@media (min-width: 560px) {
  .field-row { grid-template-columns: 1fr auto; }
}
@media (min-width: 900px) {
  body { font-size: 18px; }
  .bar-mark img { width: 84px; }
  .hero { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); align-items: center; padding-top: 72px; }
  .hero-visual { padding-right: 0; justify-content: flex-end; }
  .hero .phone-front { margin-right: 120px; }
  .hero .phone-back { right: 0; top: 80px; }
  .moment { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 64px; }
  .moment:nth-of-type(even) .moment-copy { order: 2; }
  .foot { grid-template-columns: auto 1fr auto; align-items: center; }
  .foot nav { justify-content: center; }
}
