/* Sketchphase website: the app's own language (stagesketch-web skill). */

:root {
  --ground: #E8E7E4;
  --surface: #F7F7F5;
  --raised: #FFFFFF;
  --ink: #141414;
  --muted: #5E5E5B;
  --faint: #9A9A96;
  --line: rgb(20 20 20 / .07);
  --wash: rgb(20 20 20 / .07);
  --mark: rgb(20 20 20 / .45);
  --danger: #C4242A;
  --amber: #F28C21;
  --on-ink: #F7F7F5;
  --shadow: 0 2px 8px rgb(0 0 0 / .10), 0 0 1px rgb(0 0 0 / .06);

  --font: -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", Roboto, sans-serif;
  --gutter: clamp(16px, 4.5vw, 64px);
  --max: 1312px;
  --r-panel: 20px;
  --r-control: 12px;
  --r-chip: 6px;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground: #0B0B0B;
    --surface: #161616;
    --raised: #222222;
    --ink: #F2F2F2;
    --muted: #A6A6A6;
    --faint: #6E6E6E;
    --line: rgb(242 242 242 / .08);
    --wash: rgb(242 242 242 / .12);
    --mark: rgb(242 242 242 / .45);
    --danger: #E5566F;
    --on-ink: #141414;
    --shadow: 0 2px 10px rgb(0 0 0 / .40);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 24px; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 400 17px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  text-rendering: optimizeLegibility;
}
img, video, svg { display: block; max-width: 100%; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
h1, h2, h3 { font-weight: 600; text-wrap: balance; }
p, li, dd { text-wrap: pretty; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .2em; }
a:hover { text-decoration-thickness: 2px; }
::selection { background: color-mix(in srgb, var(--ink) 16%, transparent); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 4px; }
.num { font-variant-numeric: tabular-nums; }

.skip {
  position: absolute; left: var(--gutter); top: 12px; z-index: 10;
  padding: 10px 16px; border-radius: 999px;
  background: var(--ink); color: var(--on-ink); font-weight: 600; text-decoration: none;
  transform: translateY(-200%);
}
.skip:focus-visible { transform: none; }

.wrap { width: 100%; max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }

/* Header */
.site-head { position: relative; z-index: 5; }
.site-head .wrap { display: flex; align-items: center; gap: 32px; min-height: 96px; }
.brand { display: inline-flex; align-items: center; padding: 12px 0; color: var(--ink); }

.nav { display: flex; gap: 28px; margin-left: auto; font-size: 15px; }
.nav a { color: var(--muted); text-decoration: none; padding: 12px 0; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }

/* The one primary action: an ink pill */
.pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 22px; border-radius: 999px;
  background: var(--ink); color: var(--on-ink);
  font: 600 15px/1 var(--font); text-decoration: none; white-space: nowrap;
  transition: transform .2s var(--ease-out), background-color .2s;
}
.pill:hover { text-decoration: none; }
.pill:active { transform: scale(.97); }
@media (hover: hover) { .pill:hover { background: color-mix(in srgb, var(--ink) 86%, var(--ground)); } }

/* Apple's badge, unmodified: black on light, white on dark */
.badge { display: inline-block; border-radius: 9px; transition: transform .2s var(--ease-out); }
.badge:active { transform: scale(.97); }
.badge img { height: 52px; width: auto; }
.badge .on-dark { display: none; }
@media (prefers-color-scheme: dark) {
  .badge .on-light { display: none; }
  .badge .on-dark { display: block; }
}

.price-line { font-size: 15px; line-height: 1.45; color: var(--muted); }
.price-line strong { color: var(--ink); font-weight: 600; }

/* Footer */
.site-foot { margin-top: 128px; padding: 48px 0 56px; background: var(--surface); font-size: 15px; color: var(--muted); }
.site-foot .wrap { display: grid; gap: 32px; grid-template-columns: 1fr auto; align-items: start; }

.foot-links { display: flex; flex-wrap: wrap; gap: 8px 28px; justify-content: flex-end; }
.foot-links a { color: var(--ink); text-decoration: none; padding: 12px 0; }
.foot-links a:hover { text-decoration: underline; }
.legal { grid-column: 1 / -1; font-size: 13px; color: var(--muted); max-width: 72ch; }
.legal p + p { margin-top: 8px; }

/* Reading pages: support, privacy, press */
.page-head { padding: 64px 0 48px; }
.page-head h1 { font-size: clamp(40px, 6vw, 64px); line-height: 1.04; letter-spacing: -.02em; }
.page-head p { margin-top: 20px; font-size: 21px; line-height: 1.45; color: var(--muted); max-width: 40ch; }
.prose { max-width: 55ch; }
.prose h2 { font-size: 24px; line-height: 1.25; margin: 56px 0 12px; letter-spacing: -.01em; }
.prose h3 { font-size: 17px; margin: 32px 0 8px; }
.prose p, .prose ul { margin-top: 12px; }
.prose ul { padding-left: 1.2em; }
.prose li + li { margin-top: 6px; }
.prose .meta { color: var(--muted); font-size: 15px; }
.path { font-weight: 600; white-space: nowrap; }

.faq { max-width: 56ch; }
.faq details { border-bottom: .5px solid var(--line); }
.faq details:first-of-type { border-top: .5px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 24px; align-items: center;
  padding: 20px 0; font-size: 19px; font-weight: 600; line-height: 1.3;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 10px; height: 10px; margin-right: 4px;
  border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted);
  transform: translateY(-3px) rotate(45deg); transition: transform .25s var(--ease-out);
}
.faq details[open] summary::after { transform: translateY(2px) rotate(-135deg); }
.faq .answer { padding: 0 0 24px; color: var(--muted); }
.faq .answer p + p, .faq .answer ul { margin-top: 10px; }
.faq .answer strong, .faq .answer .path { color: var(--ink); }
.faq .answer ul { padding-left: 1.2em; }

.contact {
  margin-top: 56px; max-width: 68ch; padding: 32px; border-radius: var(--r-panel); background: var(--surface);
}
.contact h2 { font-size: 24px; letter-spacing: -.01em; }
.contact p { margin-top: 8px; color: var(--muted); }
.contact .pill { margin-top: 20px; }

/* Press kit */
.kit-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); margin-top: 32px; }
.kit-item { display: block; text-decoration: none; }
.kit-item .thumb {
  aspect-ratio: 4 / 3; border-radius: var(--r-control); background: var(--surface);
  display: grid; place-items: center; overflow: hidden;
}
.kit-item .thumb img { width: 100%; height: 100%; object-fit: cover; }
.kit-item .thumb img.contain { object-fit: contain; width: 56%; height: 56%; }
.kit-item span { display: block; margin-top: 10px; font-size: 15px; font-weight: 600; }
.kit-item small { display: block; color: var(--muted); font-size: 13px; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 10px 32px; margin-top: 24px; }
.facts dt { color: var(--muted); }

/* 404 */
.lost { min-height: 60vh; display: grid; align-content: center; gap: 24px; }

@media (max-width: 760px) {
  .nav { display: none; }
  .site-head .pill { margin-left: auto; }
  .site-head .wrap { min-height: 72px; }
  .site-foot .wrap { grid-template-columns: 1fr; }
  .foot-links { justify-content: flex-start; }
  .badge img { height: 48px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* The wordmark, drawn from the owner's SVG in the current text colour */
.wordmark {
  display: block; height: 20px; aspect-ratio: 73.8 / 11.05; background: currentColor;
  -webkit-mask: url("/assets/brand/wordmark.svg") center / contain no-repeat;
  mask: url("/assets/brand/wordmark.svg") center / contain no-repeat;
}
.site-foot .wordmark { height: 18px; }

.section-title { font-size: 24px; line-height: 1.25; letter-spacing: -.01em; margin-top: 72px; }
.section-note { margin-top: 12px; color: var(--muted); max-width: 68ch; }
.kit-item .thumb img.symbol { width: 30%; height: 44%; object-fit: contain; }
@media (prefers-color-scheme: dark) { .kit-item .thumb img.contain[src$=".svg"] { filter: invert(1); } }
.lost-title { font-size: clamp(36px, 5vw, 56px); line-height: 1.05; letter-spacing: -.02em; max-width: 16ch; }
.lost-note { font-size: 19px; color: var(--muted); max-width: 46ch; }

/* ───────── Home ───────── */
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

.screen {
  display: block; width: 100%; height: auto; aspect-ratio: 4 / 3;
  border-radius: clamp(10px, 1.5vw, 20px); background: #0B0B0B; box-shadow: var(--shadow);
}
@media (prefers-color-scheme: dark) { .screen { box-shadow: var(--shadow), 0 0 0 .5px var(--line); } }

.hero { padding-top: clamp(16px, 4vw, 48px); }
.hero-head { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: 32px 64px; align-items: end; }
.hero h1 { font-size: clamp(48px, 7.4vw, 104px); line-height: .98; letter-spacing: -.03em; }
.hero-side > p:first-child { font-size: 19px; line-height: 1.45; color: var(--muted); }
.hero .cta { display: flex; align-items: center; gap: 20px; margin-top: 24px; flex-wrap: wrap; }
.hero-page { margin-top: clamp(32px, 5vw, 64px); }

/* The page row: the app's carousel of pages, one per section */
.pages { height: 132px; margin-top: 24px; }
.pages ol {
  list-style: none; margin: 0; padding: 0;
  display: flex; justify-content: center; gap: 12px;
}
.pages a { display: grid; justify-items: center; gap: 8px; width: 112px; text-decoration: none; color: var(--muted); font-size: 13px; line-height: 1.25; text-align: center; }
.pages a:hover, .pages a[aria-current="true"] { color: var(--ink); }
.pages img, .price-tile {
  width: 112px; height: 84px; border-radius: 10px; object-fit: cover; background: var(--surface);
  box-shadow: 0 0 0 .5px var(--line); transition: box-shadow .25s var(--ease-out), transform .2s var(--ease-out);
}
.price-tile { display: grid; place-items: center; font-size: 17px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.pages a[aria-current="true"] img, .pages a[aria-current="true"] .price-tile { box-shadow: 0 0 0 2px var(--ground), 0 0 0 4px var(--ink); }
.pages a:active img, .pages a:active .price-tile { transform: scale(.97); }

/* Floating: the row leaves the flow and rests at the bottom of the screen, pages only */
.pages.is-floating ol {
  position: fixed; left: 50%; bottom: max(16px, env(safe-area-inset-bottom)); z-index: 20;
  transform: translateX(-50%); gap: 8px;
}
.pages.is-floating a { width: 72px; }
.pages.is-floating a span:not(.price-tile) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.pages.is-floating img, .pages.is-floating .price-tile { width: 72px; height: 54px; border-radius: 8px; box-shadow: var(--shadow); font-size: 13px; }
.pages.is-floating a[aria-current="true"] img, .pages.is-floating a[aria-current="true"] .price-tile { box-shadow: 0 0 0 2px var(--ground), 0 0 0 4px var(--ink), var(--shadow); }
.pages.is-hidden ol { opacity: 0; pointer-events: none; }
.pages ol { transition: opacity .3s var(--ease-out); }

/* Chapters: one page of the book each */
.chapter { padding: clamp(80px, 12vw, 160px) 0 0; scroll-margin-top: 24px; }
.chapter-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 48px 72px; align-items: center; }
.chapter.flip .chapter-text { order: 2; }
.chapter-text h2 { font-size: clamp(34px, 4.2vw, 52px); line-height: 1.05; letter-spacing: -.025em; }
.chapter-text p { margin-top: 20px; font-size: 19px; line-height: 1.5; color: var(--muted); max-width: 46ch; }
.chapter-text h2 + p { margin-top: 24px; }
.facts-list { list-style: none; padding: 0; margin-top: 32px; max-width: 46ch; }
.facts-list li { padding: 12px 0; border-top: .5px solid var(--line); font-size: 15px; }
.facts-list li:last-child { border-bottom: .5px solid var(--line); }

/* Price */
.price { padding-top: clamp(96px, 13vw, 176px); scroll-margin-top: 24px; }
.price h2 { font-size: clamp(34px, 4.2vw, 52px); line-height: 1.05; letter-spacing: -.025em; max-width: 18ch; }
.price-panel {
  margin-top: 40px; display: grid; grid-template-columns: 1fr 1fr; border-radius: var(--r-panel); background: var(--surface);
}
.plan { padding: 32px 40px 40px; }
.plan + .plan { border-left: .5px solid var(--line); }
.plan h3 { font-size: 17px; }
.plan .amount { margin-top: 8px; font-size: 44px; line-height: 1.1; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.plan .amount span { font-size: 17px; font-weight: 400; letter-spacing: 0; color: var(--muted); }
.plan ul { list-style: none; padding: 0; margin-top: 24px; }
.plan li { padding: 10px 0; border-top: .5px solid var(--line); font-size: 15px; }
.price-note { margin-top: 20px; color: var(--muted); font-size: 15px; max-width: 64ch; }

/* Close */
.close { padding-top: clamp(96px, 13vw, 176px); }
.close h2 { font-size: clamp(40px, 6vw, 80px); line-height: 1; letter-spacing: -.03em; max-width: 14ch; }
.close .badge, .close .pill-large { margin-top: 32px; }
.close .price-line { margin-top: 16px; }

@media (max-width: 900px) {
  .hero-head { grid-template-columns: 1fr; }
  .chapter-grid { grid-template-columns: 1fr; }
  .chapter.flip .chapter-text { order: 0; }
  .price-panel { grid-template-columns: 1fr; }
  .plan + .plan { border-left: 0; border-top: .5px solid var(--line); }
}
@media (max-width: 760px) {
  .pages { height: auto; }
  .pages ol { justify-content: flex-start; overflow-x: auto; padding: 6px var(--gutter) 8px; scroll-padding-inline: var(--gutter); scroll-snap-type: x mandatory; scrollbar-width: none; }
  .pages ol::-webkit-scrollbar { display: none; }
  .pages li { scroll-snap-align: start; flex: none; }
  .pages.is-floating ol { position: static; transform: none; }
  .plan { padding: 24px; }
}

/* Before the entrance plays (JS only): content is visible by default */
html.js [data-enter] { opacity: 0; transform: translateY(16px); }
@media (prefers-reduced-motion: reduce) { html.js [data-enter] { opacity: 1; transform: none; } }

/* Measure: three steps on one page. Without the scroll moment, the result shows. */
.step-media { display: grid; }
.step-media > picture { grid-area: 1 / 1; }
.step-list { list-style: none; padding: 0; margin-top: 32px; max-width: 46ch; counter-reset: step; }
.step-list li { padding: 14px 0; border-top: .5px solid var(--line); font-size: 15px; color: var(--muted); transition: color .3s var(--ease-out); }
.step-list li:last-child { border-bottom: .5px solid var(--line); }
.step-list strong { display: block; font-size: 17px; font-weight: 600; color: var(--ink); }
.step-list li.is-current { color: var(--ink); }
html.stepping .step-list li:not(.is-current) strong { color: var(--muted); }

/* The bigger ink pill for the main action */
.pill-large { min-height: 52px; padding: 0 26px; font-size: 17px; }

