/* Not Your Phone - marketing site
   Tokens mirror DESIGN.md ("the archive": warm near-black, evidence amber).
   Dark theme is locked for the whole site: the app itself is dark-only
   (app.json userInterfaceStyle: "dark") and the brand is built on it.
   Radius system: controls 14px, cards 18px, panels and device frames 28px. */

:root {
  color-scheme: dark;

  --ink: #090a0c;
  --ink-raised: #0f1013;
  --surface: #141519;
  --surface-strong: #1a1918;
  --text: #f4f0e8;
  --muted: #9c9a95;
  /* DESIGN.md's archive-faint is #6D6C68, which lands at 3.9:1 on the archive ink
     and fails WCAG AA for the small meta text this site uses it on. Lightened to
     just clear 4.5:1 while staying the same hue. */
  --faint: #8a8884;
  --border: rgba(255, 255, 255, 0.1);
  --border-strong: rgba(255, 255, 255, 0.18);
  --amber: #dda86b;
  --amber-wash: rgba(221, 168, 107, 0.1);

  --r-control: 14px;
  --r-card: 18px;
  --r-panel: 28px;

  --wrap: 1180px;
  --gutter: clamp(20px, 5vw, 40px);
  --section-y: clamp(72px, 11vw, 132px);

  --sans:
    -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui,
    "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic",
    Meiryo, "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

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

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 450;
  line-height: 1.68;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.14;
}

p {
  margin: 0;
}

::selection {
  background: var(--amber);
  color: var(--ink);
}

:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Clears the 68px sticky header when an in-page anchor is followed. */
section[id],
.legal h2[id] {
  scroll-margin-top: 92px;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--amber);
  color: var(--ink);
  padding: 10px 16px;
  border-radius: var(--r-control);
  font-weight: 700;
}

.skip:focus {
  left: 12px;
  top: 12px;
}

/* ---------- header ---------- */

.site-head {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 68px;
  display: flex;
  align-items: center;
  background: rgba(9, 10, 12, 0.82);
  backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--border);
}

.site-head .wrap {
  display: flex;
  align-items: center;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
}

.brand img {
  width: 26px;
  height: 26px;
  border-radius: 7px;
}

.head-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.4vw, 28px);
  font-size: 14px;
  white-space: nowrap;
}

.head-nav a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.head-nav a:hover {
  color: var(--text);
}

.lang {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-left: clamp(12px, 2vw, 20px);
  border-left: 1px solid var(--border);
  font-size: 13px;
}

.lang a[aria-current="page"] {
  color: var(--amber);
  font-weight: 700;
}

@media (max-width: 720px) {
  .head-nav .opt {
    display: none;
  }
}

/* ---------- hero ---------- */

.hero {
  padding-top: clamp(48px, 8vw, 88px);
  padding-bottom: var(--section-y);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -20% -10% auto -30%;
  height: 620px;
  background: radial-gradient(
    58% 50% at 30% 40%,
    rgba(221, 168, 107, 0.09),
    transparent 70%
  );
  pointer-events: none;
}

.hero .wrap {
  position: relative;
  display: grid;
  gap: clamp(40px, 6vw, 64px);
  align-items: center;
  grid-template-columns: 1fr;
}

@media (min-width: 900px) {
  .hero .wrap {
    grid-template-columns: 1.06fr 0.94fr;
  }
}

/* Capped so the two authored lines stay two lines: the Japanese headline is
   10 characters wide and must fit the hero column without a third wrap. */
.hero h1 {
  font-size: clamp(34px, 4.5vw, 54px);
  letter-spacing: -0.04em;
  line-height: 1.16;
}

.hero p {
  margin-top: 22px;
  max-width: 34em;
  color: var(--muted);
  font-size: clamp(16px, 1.6vw, 18px);
}

.cta-row {
  margin-top: 34px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
}

/* Store buttons are intentionally not links yet: the app is not published.
   TODO at launch - swap each <span class="store"> for an <a href="{store url}">. */
.store {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  min-height: 56px;
  padding: 9px 22px;
  border-radius: var(--r-control);
  border: 1px solid var(--border-strong);
  background: var(--surface-strong);
  color: var(--text);
  text-decoration: none;
  transition:
    transform 0.18s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.2s ease;
}

.store b {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.store span {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--amber);
  letter-spacing: 0.04em;
}

.store:hover {
  border-color: var(--amber);
}

.text-link {
  color: var(--text);
  font-size: 14.5px;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid var(--border-strong);
  padding-bottom: 3px;
  transition:
    color 0.2s ease,
    border-color 0.2s ease;
}

.text-link:hover {
  color: var(--amber);
  border-color: var(--amber);
}

/* ---------- device ---------- */

.device {
  justify-self: center;
  width: min(300px, 78vw);
  border-radius: var(--r-panel);
  box-shadow:
    0 48px 90px -30px rgba(0, 0, 0, 0.85),
    0 0 0 1px rgba(255, 255, 255, 0.06);
}

.device.sm {
  width: min(258px, 68vw);
}

/* ---------- generic section ---------- */

section {
  padding-block: var(--section-y);
}

/* px, not ch: `ch` resolves against the inherited 16px body font, which would
   wrap a 42px heading after three words. */
.sec-head {
  max-width: 660px;
}

.sec-head h2 {
  font-size: clamp(28px, 3.9vw, 42px);
}

.sec-head p {
  margin-top: 16px;
  color: var(--muted);
  max-width: 46ch;
}

/* ---------- statement band ---------- */

.band {
  border-block: 1px solid var(--border);
  background: linear-gradient(180deg, var(--ink-raised), var(--ink));
  text-align: center;
}

.band p {
  margin-inline: auto;
  max-width: 24ch;
  font-size: clamp(24px, 3.6vw, 38px);
  font-weight: 700;
  line-height: 1.34;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.band .after {
  margin-top: 22px;
  max-width: 52ch;
  font-size: 15px;
  font-weight: 450;
  line-height: 1.7;
  letter-spacing: 0;
  color: var(--faint);
}

/* ---------- bento ---------- */

.bento {
  margin-top: clamp(36px, 5vw, 56px);
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}

@media (min-width: 860px) {
  .bento {
    grid-template-columns: 1.35fr 1fr;
    grid-template-rows: auto auto;
  }

  .bento .tall {
    grid-row: span 2;
  }
}

.tile {
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  background: var(--surface);
  padding: clamp(22px, 3vw, 30px);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tile h3 {
  font-size: 20px;
  letter-spacing: -0.02em;
}

.tile p {
  color: var(--muted);
  font-size: 15px;
  max-width: 40ch;
}

/* Both image tiles use the same idiom: the phone rises from the bottom edge of
   the tile and is clipped by it, rather than floating as a complete object. */
.tile.tall {
  background:
    radial-gradient(90% 60% at 50% 0%, rgba(221, 168, 107, 0.07), transparent 70%),
    var(--surface);
  padding-bottom: 0;
  overflow: hidden;
}

.tile.tall .device {
  margin-top: auto;
  width: min(268px, 70vw);
  height: clamp(220px, 30vw, 320px);
  object-fit: cover;
  object-position: top center;
  border-radius: 24px 24px 0 0;
}

.tile.shot {
  padding: 0;
  overflow: hidden;
  display: grid;
  gap: 0;
  grid-template-columns: 1fr;
  align-items: center;
}

@media (min-width: 520px) {
  .tile.shot {
    grid-template-columns: 1fr 172px;
  }
}

.tile.shot .txt {
  padding: clamp(22px, 3vw, 30px);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tile.shot img {
  align-self: end;
  width: 100%;
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
  box-shadow: 0 -20px 50px -24px rgba(0, 0, 0, 0.9);
  margin-inline: auto;
  max-width: 158px;
}

.tile.accent {
  background: var(--amber-wash);
  border-color: rgba(221, 168, 107, 0.34);
}

.tile.accent h3 {
  color: var(--amber);
}

.tile.accent p {
  color: rgba(244, 240, 232, 0.78);
}

/* ---------- answer split ---------- */

.split {
  display: grid;
  gap: clamp(36px, 6vw, 72px);
  align-items: center;
  grid-template-columns: 1fr;
}

@media (min-width: 900px) {
  .split {
    grid-template-columns: 0.85fr 1.15fr;
  }
}

.split .copy p {
  margin-top: 18px;
  color: var(--muted);
  max-width: 44ch;
}

.split .copy .note {
  margin-top: 26px;
  padding-left: 16px;
  border-left: 2px solid var(--amber);
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  max-width: 40ch;
}

/* ---------- stories rail ---------- */

.rail {
  margin-top: clamp(32px, 4vw, 48px);
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(320px, 78vw);
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 18px;
  padding-inline: var(--gutter);
  margin-inline: calc(var(--gutter) * -1);
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
}

.case {
  scroll-snap-align: start;
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  background: var(--surface);
  padding: 26px 24px 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.24s ease;
}

.case:hover {
  border-color: var(--border-strong);
}

.case .rel {
  font-size: 12px;
  font-weight: 700;
  color: var(--faint);
  letter-spacing: 0.02em;
}

.case h3 {
  font-size: 21px;
  letter-spacing: -0.025em;
}

.case p {
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.65;
  flex: 1;
}

.case .meta {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}

.case .tag {
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid rgba(221, 168, 107, 0.4);
  color: var(--amber);
  font-size: 11.5px;
  letter-spacing: 0.02em;
}

.case .tag.pro {
  border-color: var(--border-strong);
  color: var(--muted);
}

.rail-foot {
  margin-top: 8px;
  color: var(--faint);
  font-size: 14px;
}

/* ---------- access ---------- */

.access {
  background: linear-gradient(180deg, var(--ink), var(--ink-raised));
  border-block: 1px solid var(--border);
}

.offer {
  margin-top: clamp(32px, 4vw, 44px);
  display: grid;
  gap: clamp(24px, 4vw, 56px);
  grid-template-columns: 1fr;
}

@media (min-width: 780px) {
  .offer {
    grid-template-columns: 1fr 1fr;
  }

  .offer > div + div {
    padding-left: clamp(24px, 4vw, 56px);
    border-left: 1px solid var(--border);
  }
}

.offer h3 {
  font-size: 19px;
  letter-spacing: -0.02em;
}

.offer p {
  margin-top: 12px;
  color: var(--muted);
  font-size: 15px;
  max-width: 40ch;
}

.offer .amber {
  color: var(--amber);
}

/* ---------- faq ---------- */

.faq {
  margin-top: clamp(28px, 4vw, 40px);
  max-width: 780px;
}

.faq details {
  border-bottom: 1px solid var(--border);
}

.faq summary {
  padding: 20px 44px 20px 0;
  font-size: 16.5px;
  font-weight: 650;
  cursor: pointer;
  list-style: none;
  position: relative;
  transition: color 0.2s ease;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary:hover {
  color: var(--amber);
}

.faq summary::after {
  content: "";
  position: absolute;
  right: 6px;
  top: 50%;
  width: 10px;
  height: 10px;
  margin-top: -6px;
  border-right: 1.6px solid var(--faint);
  border-bottom: 1.6px solid var(--faint);
  transform: rotate(45deg);
  transition: transform 0.24s ease;
}

.faq details[open] summary::after {
  transform: rotate(-135deg);
  margin-top: -3px;
}

.faq .a {
  padding: 0 0 22px;
  color: var(--muted);
  font-size: 15px;
  max-width: 62ch;
}

/* ---------- footer ---------- */

.site-foot {
  border-top: 1px solid var(--border);
  padding-block: 52px 44px;
  font-size: 14px;
  color: var(--faint);
}

.foot-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 28px 48px;
  align-items: flex-start;
  justify-content: space-between;
}

.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
}

.foot-links a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.foot-links a:hover {
  color: var(--amber);
}

.foot-note {
  margin-top: 32px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
  max-width: 62ch;
  line-height: 1.7;
}

/* ---------- legal pages ---------- */

.legal {
  padding-top: clamp(48px, 7vw, 76px);
  padding-bottom: clamp(64px, 9vw, 108px);
}

.legal .wrap {
  max-width: 800px;
}

.legal h1 {
  font-size: clamp(32px, 4.6vw, 46px);
}

.legal .updated {
  margin-top: 16px;
  color: var(--faint);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.legal .lede {
  margin-top: 26px;
  font-size: 17px;
  color: var(--text);
}

.legal h2 {
  margin-top: 52px;
  font-size: 21px;
  letter-spacing: -0.02em;
  padding-top: 26px;
  border-top: 1px solid var(--border);
}

.legal h3 {
  margin-top: 30px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--amber);
}

.legal p,
.legal li {
  color: var(--muted);
  font-size: 15.5px;
}

.legal p {
  margin-top: 16px;
}

.legal ul {
  margin: 16px 0 0;
  padding-left: 20px;
}

.legal li {
  margin-top: 10px;
}

.legal li::marker {
  color: var(--faint);
}

.legal strong {
  color: var(--text);
  font-weight: 650;
}

.legal a {
  color: var(--amber);
  text-decoration-color: rgba(221, 168, 107, 0.4);
  text-underline-offset: 3px;
}

.legal .table {
  margin-top: 22px;
  overflow-x: auto;
}

.legal table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-size: 14.5px;
}

.legal th,
.legal td {
  text-align: left;
  vertical-align: top;
  padding: 14px 16px 14px 0;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
}

.legal th {
  color: var(--text);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.02em;
}

.legal .callout {
  margin-top: 26px;
  padding: 20px 22px;
  border: 1px solid rgba(221, 168, 107, 0.34);
  border-radius: var(--r-card);
  background: var(--amber-wash);
}

.legal .callout p {
  margin-top: 0;
  color: var(--text);
  font-size: 15px;
}

.legal .toc {
  margin-top: 34px;
  padding: 22px 24px;
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  background: var(--surface);
}

.legal .toc ol {
  margin: 0;
  padding-left: 20px;
  columns: 2;
  column-gap: 32px;
}

@media (max-width: 620px) {
  .legal .toc ol {
    columns: 1;
  }
}

.legal .toc li {
  margin-top: 8px;
  break-inside: avoid;
}

.legal .toc a {
  color: var(--muted);
  text-decoration: none;
}

.legal .toc a:hover {
  color: var(--amber);
}

/* ---------- motion ----------
   Scroll-driven reveal. Communicates reading order as sections arrive.
   Progressive enhancement only: without support, or with reduced motion,
   everything renders in its final state. No JS. */

@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .reveal {
      animation: rise linear both;
      animation-timeline: view();
      animation-range: entry 2% cover 20%;
    }
  }

  .hero .copy,
  .hero .device {
    animation: rise 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  .hero .device {
    animation-delay: 0.12s;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
