/* SimplyNotes site. Tokens mirror simplyfinance/marketing/web/tokens.css
 * (the family design system); the accent is the only value this page lets
 * the visitor change, through the app-icon picker. */
@font-face {
  font-family: 'Geist';
  src: url('/fonts/Geist-Variable.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --paper: oklch(98.8% 0.002 250);
  --paper-2: oklch(100% 0 0);
  --paper-3: oklch(96.5% 0.002 250);
  --rule: oklch(87.5% 0.003 285);
  --ink: oklch(25.5% 0.004 285);
  --ink-2: oklch(49% 0.005 285);
  --band: oklch(21% 0.006 250);
  --band-2: oklch(26% 0.006 250);
  --band-ink: oklch(96.5% 0.002 250);
  --band-ink-2: oklch(74% 0.006 250);
  --band-rule: color-mix(in srgb, white 14%, transparent);
  --hue: 178;
  --accent: oklch(49% 0.11 var(--hue));
  --accent-hover: oklch(43% 0.1 var(--hue));
  --accent-bright: oklch(80% 0.075 var(--hue));
  --accent-ink: oklch(100% 0 0);
  --nav-bg: color-mix(in srgb, var(--paper) 72%, transparent);
  --mark: oklch(92% 0.09 95);
  --mark-band: oklch(52% 0.09 95);
  --font: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Geist', system-ui, sans-serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --gutter: clamp(1.25rem, 5vw, 3rem);
  --band-pad: clamp(4.5rem, 10vw, 8rem);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: oklch(0% 0 0);
    --paper-2: oklch(21% 0.006 250);
    --paper-3: oklch(16% 0.005 250);
    --rule: oklch(33% 0.004 285);
    --ink: oklch(96.5% 0.002 250);
    --ink-2: oklch(72% 0.006 250);
    --band: oklch(15.5% 0.005 250);
    --band-2: oklch(21% 0.006 250);
    --band-rule: color-mix(in srgb, white 10%, transparent);
    --accent: oklch(80% 0.075 var(--hue));
    --accent-hover: oklch(86% 0.07 var(--hue));
    --accent-ink: oklch(18% 0.02 var(--hue));
    --mark: oklch(52% 0.09 95);
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 4.5rem;
  scrollbar-color: color-mix(in oklab, var(--ink) 35%, transparent) transparent;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  caret-color: var(--accent);
}

::selection { background: color-mix(in oklab, var(--accent) 28%, transparent); }

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

a { color: var(--accent); text-decoration: none; text-underline-offset: 4px; }
a:hover { text-decoration: underline; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.band :focus-visible { outline-color: var(--accent-bright); }

h1, h2, h3 { margin: 0; font-weight: 600; text-wrap: balance; }
h1 { font-size: clamp(2.75rem, 6vw + 1rem, 5.5rem); line-height: 1.02; letter-spacing: -0.03em; }
h2 { font-size: clamp(2rem, 3.2vw + 1rem, 3.5rem); line-height: 1.06; letter-spacing: -0.025em; }
h3 { font-size: 1.25rem; line-height: 1.3; letter-spacing: -0.01em; }
p { margin: 0; text-wrap: pretty; }

.wrap { width: min(100% - 2 * var(--gutter), 68rem); margin-inline: auto; }
.lede { font-size: clamp(1.125rem, 0.6vw + 1rem, 1.375rem); line-height: 1.45; color: var(--ink-2); max-width: 38rem; }
.band .lede { color: var(--band-ink-2); }

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

/* Masthead: thin, translucent, sticky */
.masthead {
  position: sticky; top: 0; z-index: 10;
  background: var(--nav-bg);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid color-mix(in oklab, var(--rule) 60%, transparent);
}
.masthead .wrap { display: flex; align-items: center; gap: 1.5rem; height: 3.25rem; }
.brand { display: flex; align-items: center; gap: 0.6rem; color: var(--ink); font-weight: 600; letter-spacing: -0.01em; }
.brand:hover { text-decoration: none; }
.brand img { width: 1.75rem; height: 1.75rem; border-radius: 0.42rem; }
.masthead nav { display: flex; gap: 1.5rem; margin-left: auto; font-size: 0.875rem; }
.masthead nav a { color: var(--ink-2); }
.masthead nav a:hover { color: var(--ink); text-decoration: none; }

/* Buttons: accent-filled pill, hairline pill */
.pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.85rem 1.6rem; border-radius: 999px; border: 1px solid transparent;
  background: var(--accent); color: var(--accent-ink);
  font: 500 1.0625rem/1 var(--font); letter-spacing: -0.005em;
  transition: background-color 160ms var(--ease-out), translate 160ms var(--ease-out);
}
.pill:hover { background: var(--accent-hover); text-decoration: none; }
.pill:active { translate: 0 1px; }
.pill.small { padding: 0.5rem 1rem; font-size: 0.875rem; }
.band .pill { background: var(--accent-bright); color: oklch(18% 0.02 var(--hue)); }
.band .pill:hover { background: oklch(86% 0.07 var(--hue)); }
.fine { font-size: 0.875rem; color: var(--ink-2); }
.band .fine { color: var(--band-ink-2); }

/* Hero */
.hero { padding-top: clamp(3.5rem, 8vw, 6.5rem); text-align: center; overflow: clip; }
.hero .lede { margin: 1.5rem auto 0; }
.hero .actions { margin-top: 2.25rem; display: grid; justify-items: center; gap: 0.9rem; }
.hero .fine, .close .fine { max-width: 36rem; text-wrap: balance; }
.phones {
  margin-top: clamp(3rem, 6vw, 4.5rem);
  display: flex; justify-content: center; align-items: flex-start; gap: clamp(1rem, 3vw, 2.5rem);
  /* the fold cuts the phones: they continue below it */
  margin-bottom: calc(-1 * clamp(5rem, 14vw, 11rem));
}
.shot {
  width: min(42vw, 19.5rem); border-radius: clamp(1.5rem, 4.6vw, 2.6rem);
  border: 1px solid var(--rule); background: var(--paper-2);
  box-shadow: 0 30px 60px -40px color-mix(in srgb, black 30%, transparent);
}
.phones { position: relative; z-index: 1; }
.phones picture:first-child .shot { margin-top: clamp(1.5rem, 5vw, 3.5rem); }
.hero-floor { height: clamp(5rem, 14vw, 11rem); background: var(--band); }

/* Bands */
.band { background: var(--band); color: var(--band-ink); }
.band a:not(.pill) { color: var(--accent-bright); }
.section { padding-block: var(--band-pad); }
.section.tint { background: var(--paper-3); }
.head { max-width: 44rem; }
.head .lede { margin-top: 1.25rem; }
.head.center { margin-inline: auto; text-align: center; }
.head.center .lede { margin-inline: auto; }

/* The route a note travels */
.route { margin: clamp(3rem, 6vw, 4.5rem) 0 0; padding: 0; list-style: none; display: grid; gap: 0; grid-template-columns: repeat(3, 1fr); }
.route li { padding: 1.75rem 2rem 0 0; border-top: 1px solid var(--band-rule); position: relative; }
.route li::before {
  content: ''; position: absolute; top: -0.3125rem; left: 0; width: 0.5625rem; height: 0.5625rem;
  border-radius: 50%; background: var(--accent-bright);
}
.route li:nth-child(2)::before { background: var(--band); box-shadow: inset 0 0 0 2px var(--accent-bright); }
.route h3 { color: var(--band-ink); }
.route p { margin-top: 0.6rem; color: var(--band-ink-2); font-size: 1rem; max-width: 22rem; }
.route strong { display: block; margin-top: 0.9rem; font-weight: 500; color: var(--band-ink); }

/* Split: copy beside a screenshot */
.split { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: clamp(2rem, 7vw, 6rem); align-items: center; }
.split.flip { grid-template-columns: auto minmax(0, 1fr); }
.split.flip .copy { order: 2; }
.split .shot { width: min(72vw, 19.5rem); }
.band .shot { border-color: var(--band-rule); background: var(--band-2); box-shadow: none; }
.split .copy > .lede { margin-top: 1.25rem; }
.narrow-only { display: none; }
.points { margin: 2.25rem 0 0; padding: 0; list-style: none; display: grid; gap: 1.5rem; max-width: 34rem; }
.points p { margin-top: 0.35rem; color: var(--ink-2); }
.band .points p { color: var(--band-ink-2); }
kbd, .md {
  font: 500 0.9em ui-monospace, SFMono-Regular, Menlo, monospace;
  padding: 0.1em 0.4em; border-radius: 0.35em; background: color-mix(in oklab, var(--ink) 7%, transparent);
}
.band kbd, .band .md { background: color-mix(in srgb, white 10%, transparent); }

/* Proofreading example */
.proof { margin: 2.5rem auto 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--band-rule); border: 1px solid var(--band-rule); border-radius: 1.25rem; overflow: hidden; max-width: 52rem; }
.proof > div { background: var(--band); padding: 1.5rem 1.75rem; }
.proof h3 { font-size: 0.875rem; font-weight: 500; color: var(--band-ink-2); letter-spacing: 0; }
.proof p { margin-top: 0.85rem; font-size: 1.0625rem; line-height: 1.6; }
.proof del { color: var(--band-ink-2); text-decoration-color: color-mix(in srgb, white 45%, transparent); }
.proof ins { text-decoration: none; background: color-mix(in oklab, var(--accent-bright) 22%, transparent); border-radius: 0.2em; padding: 0 0.15em; }
.proof .tag { color: var(--accent-bright); }
figcaption { margin: 0.9rem auto 0; max-width: 52rem; text-align: center; text-wrap: balance; font-size: 0.875rem; color: var(--band-ink-2); }
figure { margin: 0; }

/* Sync choices: a plain table, not cards */
.choices { margin-top: clamp(2.5rem, 5vw, 3.5rem); width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.choices th, .choices td { text-align: left; vertical-align: top; padding: 1.35rem 1.5rem 1.35rem 0; border-top: 1px solid var(--rule); }
.choices tr:last-child > * { border-bottom: 1px solid var(--rule); }
.choices th { width: 28%; font-weight: 600; font-size: 1.125rem; letter-spacing: -0.01em; }
.choices td { color: var(--ink-2); }
.choices td:last-child { width: 9rem; padding-right: 0; color: var(--ink); font-weight: 500; white-space: nowrap; }

.after { margin-top: 1.5rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
fieldset.icons { border: 0; padding: 0 6px; margin-inline: 0; min-width: 0; }
/* A line of note in the chosen accent, so the retint shows where it is picked */
.sample { margin-top: 2rem; display: flex; align-items: center; gap: 0.55rem; font-size: 1.25rem; }
.sample .box { width: 1.15rem; height: 1.15rem; border-radius: 0.32rem; border: 2px solid var(--accent); }
.sample .tag { color: var(--accent); }
.sample .caret { width: 2px; height: 1.5rem; margin-left: -0.3rem; background: var(--accent); border-radius: 1px; }
.section.tint + .band { border-top: 1px solid var(--band-rule); }

/* App-icon picker: retints the page, as the app does */
.icons { margin-top: 2.5rem; display: grid; grid-template-columns: repeat(5, minmax(0, 5.25rem)); gap: clamp(0.5rem, 2.5vw, 1.5rem); }
.icons label { display: grid; justify-items: center; gap: 0.6rem; font-size: 0.875rem; color: var(--ink-2); cursor: pointer; }
.icons input { position: absolute; opacity: 0; pointer-events: none; }
.icons img {
  width: 100%; border-radius: 22.5%;
  outline: 2px solid transparent; outline-offset: 4px;
  transition: outline-color 200ms var(--ease-out), scale 320ms var(--ease-out);
}
.icons label:hover img { scale: 1.04; }
.icons input:checked + img { outline-color: var(--accent); }
.icons input:focus-visible + img { outline-color: var(--ink); }
.icons input:checked ~ span { color: var(--ink); font-weight: 500; }
:root:has(#i-midnight:checked) { --hue: 205; }
:root:has(#i-blue:checked) { --hue: 258; }
:root:has(#i-violet:checked) { --hue: 300; }
:root:has(#i-rose:checked) { --hue: 358; }
:root:has(#i-midnight:checked) { --accent: oklch(36% 0.035 205); --accent-hover: oklch(30% 0.035 205); --accent-bright: oklch(84% 0.03 205); }
@media (prefers-color-scheme: dark) {
  :root:has(#i-midnight:checked) { --accent: oklch(84% 0.03 205); --accent-hover: oklch(90% 0.03 205); }
}
:root { transition: --hue 400ms var(--ease-out); }
@property --hue { syntax: '<number>'; inherits: true; initial-value: 178; }

/* Close */
.close { text-align: center; }
.close .lede { margin: 1.25rem auto 0; }
.close .actions { margin-top: 2.25rem; display: grid; justify-items: center; gap: 0.9rem; }

footer { padding-block: 2.5rem 3rem; font-size: 0.875rem; color: var(--ink-2); border-top: 1px solid var(--rule); }
footer .wrap { display: flex; flex-wrap: wrap; gap: 0.75rem 2rem; justify-content: space-between; }
footer nav { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
footer a { color: var(--ink-2); }
footer a:hover { color: var(--ink); }

/* Long document (privacy) */
.doc { padding-block: clamp(3rem, 7vw, 5.5rem) var(--band-pad); }
.doc .wrap { max-width: 44rem; }
.doc h1 { font-size: clamp(2.25rem, 4vw + 1rem, 3.5rem); }
.doc h2 { font-size: 1.5rem; letter-spacing: -0.015em; margin-top: 3rem; }
.doc p, .doc ul { margin-top: 1rem; color: var(--ink-2); max-width: 68ch; }
.doc ul { padding-left: 1.2rem; }
.doc li + li { margin-top: 0.4rem; }
.doc .lede { color: var(--ink-2); margin-top: 1.25rem; }

/* One reveal primitive: fade and small rise as a band enters */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .reveal { animation: rise linear both; animation-timeline: view(); animation-range: entry 0% entry 38%; }
    @keyframes rise { from { opacity: 0; translate: 0 1.5rem; } to { opacity: 1; translate: 0 0; } }
  }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

@media (max-width: 52rem) {
  .masthead nav { display: none; }
  .masthead .pill { margin-left: auto; }
  .route { grid-template-columns: 1fr; }
  .route li { padding: 1.5rem 0 2rem; }
  .split, .split.flip { grid-template-columns: 1fr; }
  .split .shot { margin-inline: auto; }
  .phones picture:first-child, .wide-only { display: none; }
  .narrow-only { display: block; }
  .phones .shot { width: min(72vw, 19.5rem); }
  .split.flip .copy { order: 0; }
  .proof { grid-template-columns: 1fr; }
  .choices, .choices tbody, .choices tr, .choices th, .choices td { display: block; width: auto; }
  .choices tr { border-top: 1px solid var(--rule); padding-block: 1.35rem; }
  .choices tr:last-child { border-bottom: 1px solid var(--rule); }
  .choices th, .choices td, .choices tr:last-child > * { border: 0; padding: 0; }
  .choices td { margin-top: 0.4rem; }
  .choices td:last-child { width: auto; margin-top: 0.75rem; }
}
