/* Remember Nothing: one stylesheet for every page.
   The page sky follows the visitor's local hour (see sky.js), like the app. Colours live in the tokens below. */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/assets/fonts/BricolageGrotesque-Variable.ttf") format("truetype");
  font-weight: 200 800;
  font-display: swap;
}

:root {
  --ink: #1a1a24;
  --muted: #4a4a5c;
  --brand: #8b3fe0;
  --brand-text: #6f2bc4;
  --brand-wash: rgba(139, 63, 224, 0.12);
  --card: #ffffff;
  --card-border: #e3e6eb;
  --page: #f4f1ff;
  --sky-top: #8ccbff;
  --sky-bottom: #eaf6ff;
  --frame: #15151c;
  --panel: #141733;
  --panel-ink: #f3f0ff;
  --panel-muted: #b8b6cc;
  --panel-accent: #b68aff;

  --display: "Bricolage Grotesque", ui-rounded, system-ui, sans-serif;
  --body: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, system-ui, sans-serif;

  --measure: 62ch;
  --gutter: 20px;
}

/* The sky by hour of the visitor's day (light mode). */
html[data-sky="dawn"]    { --sky-top: #ffd9e4; --sky-bottom: #f3ecff; }
html[data-sky="morning"] { --sky-top: #bfe4ff; --sky-bottom: #f0f8ff; }
html[data-sky="noon"]    { --sky-top: #8ccbff; --sky-bottom: #eaf6ff; }
html[data-sky="golden"]  { --sky-top: #ffe3a6; --sky-bottom: #fff6e6; }
html[data-sky="sunset"]  { --sky-top: #ffbfa3; --sky-bottom: #ffeee6; }
html[data-sky="dusk"]    { --sky-top: #cdbdf5; --sky-bottom: #f0eaff; }
html[data-sky="night"]   { --sky-top: #c6c0f2; --sky-bottom: #ece9ff; }

/* Dark mode: always the night sky. */
@media (prefers-color-scheme: dark) {
  :root,
  html[data-sky] {
    --ink: #f3f0ff;
    --muted: #b8b6cc;
    --brand-text: #b68aff;
    --brand-wash: rgba(182, 138, 255, 0.16);
    --card: #1f232b;
    --card-border: #343a46;
    --page: #0d0f24;
    --sky-top: #1b2050;
    --sky-bottom: #0d0f24;
    --frame: #05050a;
    --panel: #1a1e44;
    color-scheme: dark;
  }
}

*,
*::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;
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--body);
  background: var(--page) linear-gradient(180deg, var(--sky-top) 0, var(--sky-bottom) 760px, var(--page) 1200px) no-repeat top / 100% 1200px;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--brand-text); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip {
  position: absolute; left: var(--gutter); top: -4rem;
  background: var(--card); color: var(--ink); padding: 0.6rem 1rem; border-radius: 10px; z-index: 10;
}
.skip:focus { top: 0.75rem; }

.wrap { width: min(1080px, 100% - 2 * var(--gutter)); margin-inline: auto; }

/* Header */
.site-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 1.25rem; }
.brand { display: inline-flex; align-items: center; gap: 0.65rem; color: var(--ink); text-decoration: none; font: 800 1.15rem/1 var(--display); }
.brand img { width: 36px; height: 36px; border-radius: 9px; }
.brand b { color: var(--brand-text); font-weight: 800; }
.site-head nav { display: flex; gap: 1.25rem; font-weight: 600; font-size: 0.97rem; }
.site-head nav a { color: var(--ink); text-decoration: none; padding: 0.4rem 0; }
.site-head nav a:hover { text-decoration: underline; text-underline-offset: 0.25em; }

/* Type */
h1, h2, h3 { font-family: var(--display); line-height: 1.05; letter-spacing: -0.02em; margin: 0; }
h2 { font-size: clamp(2rem, 4.6vw, 3rem); font-weight: 800; }
h3 { font-size: 1.2rem; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0; }
.lead { font-size: clamp(1.15rem, 2.2vw, 1.4rem); line-height: 1.45; color: var(--ink); max-width: 34ch; }
.muted { color: var(--muted); }

/* Hero */
.hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: clamp(1.5rem, 5vw, 4rem); align-items: center; padding-block: clamp(1.5rem, 5vw, 4rem) clamp(2rem, 6vw, 5rem); }
.wordmark { font-weight: 800; font-size: clamp(3.1rem, 9.5vw, 6.6rem); line-height: 0.92; letter-spacing: -0.035em; }
.wordmark span { color: var(--brand-text); display: block; }
.hero .lead { margin-top: 1.5rem; }
.hero .sub { margin-top: 1rem; max-width: 46ch; color: var(--muted); }
.platform {
  display: inline-flex; align-items: baseline; gap: 0.5ch; margin-bottom: 1.25rem;
  background: var(--ink); color: var(--page); border-radius: 999px; padding: 0.6rem 1.35rem;
  font: 800 1.3rem/1.2 var(--display); letter-spacing: -0.005em;
}
.platform span { font-weight: 500; opacity: 0.85; }
.fine { font-size: 0.92rem; color: var(--muted); }

/* Phones */
.phone { margin: 0; }
.phone .screen {
  border-radius: 12% / 5.5%;
  border: 5px solid var(--frame);
  overflow: hidden;
  background: var(--card);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5) inset, 0 28px 50px -22px rgba(30, 20, 80, 0.45), 0 6px 14px rgba(30, 20, 80, 0.12);
}
.phone img { width: 100%; aspect-ratio: 1320 / 2868; object-fit: cover; }
.phone figcaption { margin-top: 0.9rem; font-size: 0.95rem; font-weight: 600; text-align: center; }
.phone figcaption span { display: block; font-weight: 400; color: var(--muted); font-size: 0.88rem; }

/* The hero phone rises out of the page: cropped and faded at the bottom. */
.phone.rise { width: min(320px, 78%); margin-inline: auto; }
.phone.rise .screen {
  aspect-ratio: 1320 / 2250;
  -webkit-mask-image: linear-gradient(#000 82%, transparent);
  mask-image: linear-gradient(#000 82%, transparent);
  border-bottom: 0;
  border-bottom-left-radius: 0; border-bottom-right-radius: 0;
}
.phone.rise img { height: 100%; object-position: top; aspect-ratio: auto; }

/* Feature bands */
.band { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.band .split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.band .split.flip .copy { order: 2; }
.copy h2 { max-width: 14ch; }
.copy .lead { margin-top: 1.1rem; }
.ticks { list-style: none; margin: 1.6rem 0 0; padding: 0; display: grid; gap: 0.7rem; max-width: var(--measure); }
.ticks li { position: relative; padding-left: 1.75rem; }
.ticks li::before {
  /* Centred on the first line: line-height is 1.6em, so (1.6em - 0.85em) / 2 from the top. */
  content: ""; position: absolute; left: 0; top: 0.35em; width: 0.85em; height: 0.85em; border-radius: 50%;
  background: var(--brand-wash); box-shadow: inset 0 0 0 0.24em var(--brand);
}
.phones { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1rem, 3vw, 2rem); align-items: start; max-width: 560px; margin-inline: auto; width: 100%; }
.phones .phone:nth-child(even) { margin-top: 2.5rem; }
.phones.three { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 860px; gap: clamp(0.75rem, 3vw, 2rem); }
.phones.three .phone:nth-child(2) { margin-top: 2.5rem; }
.phones.three .phone:nth-child(even) { margin-top: 2.5rem; }
.phones.three .phone:nth-child(3) { margin-top: 0; }

.remind-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 6vw, 5rem); align-items: end; margin-bottom: clamp(2rem, 5vw, 3.5rem); }
.remind-head .ticks { margin-top: 0; }

/* Night panel: the one dark block on the page. */
.night { background: var(--panel); color: var(--panel-ink); border-radius: clamp(24px, 4vw, 40px); padding: clamp(2rem, 6vw, 4.5rem); }
.night .lead { color: var(--panel-ink); }
.night .muted { color: var(--panel-muted); }
.night h2 em { font-style: normal; color: var(--panel-accent); }
.night .phone figcaption { color: var(--panel-ink); }
.night .phone figcaption span { color: var(--panel-muted); }
.night .phone .screen { border-color: #05050a; }
.night a { color: var(--panel-accent); }

/* Private + plan */
.statement { font-family: var(--display); font-weight: 800; letter-spacing: -0.025em; line-height: 1.02; font-size: clamp(2.1rem, 6vw, 4.2rem); max-width: 18ch; }
.statement em { font-style: normal; color: var(--brand-text); }
.facts { margin: 2.5rem 0 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
.facts li { background: var(--card); border: 1px solid var(--card-border); border-radius: 20px; padding: 1.4rem; }
.facts h3 { margin-bottom: 0.45rem; }
.facts p { color: var(--muted); font-size: 0.98rem; line-height: 1.5; }

.plan { background: var(--card); border: 1px solid var(--card-border); border-radius: 28px; padding: clamp(1.5rem, 5vw, 3rem); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(1.5rem, 5vw, 4rem); }
.plan h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); max-width: 16ch; }
.plan .ticks { margin-top: 0; }
.plan p.muted { margin-top: 1rem; max-width: 40ch; }

/* Footer */
.site-foot { padding-block: 3rem 3.5rem; font-size: 0.95rem; color: var(--muted); }
.site-foot .row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem 2rem; border-top: 1px solid var(--card-border); padding-top: 1.75rem; }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }

/* Text pages (privacy, support) */
.doc { padding-block: clamp(1.5rem, 5vw, 3rem) clamp(3rem, 8vw, 6rem); }
.doc h1 { font-size: clamp(2.4rem, 6vw, 4rem); font-weight: 800; }
.doc .stamp { margin-top: 0.75rem; color: var(--muted); }
.doc .sheet { margin-top: 2rem; background: var(--card); border: 1px solid var(--card-border); border-radius: 28px; padding: clamp(1.5rem, 5vw, 3.25rem); }
.doc .sheet > * + * { margin-top: 1rem; }
.doc h2 { font-size: clamp(1.4rem, 3vw, 1.8rem); margin-top: 2.25rem; letter-spacing: -0.015em; }
.doc h2:first-child { margin-top: 0; }
.doc h3 { margin-top: 1.5rem; }
.doc p, .doc li { max-width: 68ch; }
.doc ul { padding-left: 1.2rem; display: grid; gap: 0.45rem; }
.doc details { border-top: 1px solid var(--card-border); padding-block: 0.25rem; }
.doc details:last-of-type { border-bottom: 1px solid var(--card-border); }
.doc summary { cursor: pointer; font: 700 1.1rem/1.4 var(--display); padding: 0.9rem 0; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.doc summary::-webkit-details-marker { display: none; }
.doc summary::after { content: "+"; color: var(--brand-text); font-size: 1.4rem; line-height: 1; }
.doc details[open] summary::after { content: "\2212"; }
.doc details p, .doc details ul { padding-bottom: 1rem; margin-top: 0; }
.doc details > * + * { margin-top: 0.6rem; }
.callout { background: var(--brand-wash); border-radius: 16px; padding: 1rem 1.25rem; }
.mail { font-weight: 700; word-break: break-word; }

@media (max-width: 860px) {
  .hero, .band .split, .remind-head, .plan { grid-template-columns: minmax(0, 1fr); }
  .band .split.flip .copy { order: 0; }
  .facts { grid-template-columns: minmax(0, 1fr); }
  .hero .phone.rise { width: min(300px, 80%); }
  .copy h2 { max-width: 18ch; }
}
@media (max-width: 520px) {
  .phones.three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .phones.three .phone:nth-child(3) { margin-top: 2.5rem; }
  .phones .phone:nth-child(even), .phones.three .phone:nth-child(even) { margin-top: 1.75rem; }
  .phones.three .phone:nth-child(3) { margin-top: 0; }
  .site-head nav { gap: 1rem; }
}
