/* ScreenRehab — screenrehab.app
   Editorial and quiet: warm paper, black type, one coral accent for the
   moment a friend says yes. Photography carries the feeling; until the real
   photos exist, art-directed placeholders hold their place. Plain CSS, no
   external requests, no JavaScript. */

@font-face {
  font-family: "Hanken Grotesk";
  src: url("/fonts/hanken-latin.woff2") format("woff2");
  font-weight: 100 900; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Hanken Grotesk";
  src: url("/fonts/hanken-latin-ext.woff2") format("woff2");
  font-weight: 100 900; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Playfair Display"; font-style: italic;
  src: url("/fonts/playfair-italic-latin.woff2") format("woff2");
  font-weight: 400; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Playfair Display"; font-style: italic;
  src: url("/fonts/playfair-italic-latin-ext.woff2") format("woff2");
  font-weight: 400; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --ink: #141414;
  --body: #3f3d3a;      /* running text, 10:1 on paper */
  --muted: #6d6962;     /* captions, 5.2:1 on paper */
  --paper: #fbfaf7;
  --sand: #f1ece4;      /* alternate ground */
  --slot: #e6dfd4;      /* photo placeholder */
  --coral: #e0633e;     /* app icon's deep end; the one accent */
  --line: rgba(20, 20, 20, 0.12);
  --sans: "Hanken Grotesk", "Helvetica Neue", Arial, system-ui, sans-serif;
  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  --max: 1240px;
  --gutter: clamp(20px, 4vw, 56px);
  color-scheme: light;
}

*, *::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; font: 400 1.125rem/1.6 var(--sans); color: var(--body); background: var(--paper); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: 4px; text-decoration-thickness: 1px; }
:focus-visible { outline: 2px solid var(--coral); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { margin: 0; color: var(--ink); font-weight: 600; letter-spacing: -0.035em; text-wrap: balance; }
p { margin: 0 0 1em; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 20; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px; text-decoration: none; }
.skip:focus { top: 16px; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding-inline: var(--gutter); }
.label, .kicker { display: block; font: 500 .78rem/1.4 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 0 0 20px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- header ---------- */
.site-header { position: relative; z-index: 5; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 20px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand svg { width: 30px; height: 30px; border-radius: 8px; flex: none; }
.wordmark { font-weight: 700; font-size: 1.15rem; letter-spacing: -0.035em; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { text-decoration: none; font-size: .95rem; font-weight: 500; color: var(--ink); padding: 10px 12px; min-height: 44px; display: inline-flex; align-items: center; }
.nav a:hover { text-decoration: underline; }
.nav .hide-sm { display: none; }
@media (min-width: 700px) { .nav .hide-sm { display: inline-flex; } }
.nav .pill { background: var(--ink); color: #fff; border-radius: 999px; padding: 8px 18px; min-height: 40px; margin-left: 8px; }
.nav .pill:hover { text-decoration: none; background: #000; }

/* ---------- store button ---------- */
.store { display: inline-flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 22px 8px 16px; background: var(--ink); color: #fff; border-radius: 12px; text-decoration: none; }
.store svg { width: 24px; height: 24px; flex: none; }
.store span { display: flex; flex-direction: column; line-height: 1.15; }
.store small { font-size: .7rem; font-weight: 500; opacity: .8; letter-spacing: .02em; }
.store strong { font-size: 1.15rem; font-weight: 600; letter-spacing: -0.01em; }
.store:hover { background: #000; }
.textlink { font-weight: 500; color: var(--ink); text-decoration: underline; min-height: 44px; display: inline-flex; align-items: center; }
.actions { display: flex; flex-wrap: wrap; gap: 14px 26px; align-items: center; }

/* ---------- photo slots ---------- */
.slot { position: relative; margin: 0; background: var(--slot); border-radius: 4px; overflow: hidden; aspect-ratio: 4 / 5;
  background-image: repeating-linear-gradient(135deg, transparent 0 13px, rgba(20,20,20,.035) 13px 14px); }
.slot.r45 { aspect-ratio: 4 / 5; }
.slot.r219 { aspect-ratio: 21 / 9; border-radius: 0; }
.slot.r11 { aspect-ratio: 1 / 1; }
.slot.has-photo { background: var(--slot); }
.slot.has-photo img { width: 100%; height: 100%; object-fit: cover; }
.slot-tag, .slot figcaption { position: absolute; left: 18px; font: 500 .72rem/1.5 var(--mono); letter-spacing: .04em; color: #7b746a; }
.slot-tag { top: 16px; text-transform: uppercase; }
.slot figcaption { top: 38px; right: 18px; max-width: 30em; opacity: .85; }

/* ---------- hero ---------- */
.hero { padding-block: clamp(24px, 5vw, 64px) clamp(24px, 4vw, 48px); }
.hero-grid { display: grid; gap: 48px; align-items: end; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.05fr 1fr; gap: clamp(40px, 6vw, 96px); } }
.hero h1 { font-size: clamp(2.7rem, 5.6vw, 5rem); line-height: .98; letter-spacing: -0.045em; max-width: 10em; }
.hero h1 em, .serif { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -0.02em; color: var(--coral); }
.lede { font-size: clamp(1.1rem, 1.5vw, 1.25rem); max-width: 27em; margin: 28px 0 34px; }
.hero-media { position: relative; }
.stage { position: relative; aspect-ratio: 4 / 5; border-radius: 4px; overflow: hidden;
  background: radial-gradient(120% 90% at 70% 10%, #fbd3b4 0%, #f6b08a 38%, #ee7f5d 100%); }
.stage .phone { position: absolute; height: auto; filter: drop-shadow(0 30px 36px rgba(80,26,10,.32)); }
.stage .front { width: 50%; left: 38%; top: 9%; transform: rotate(4deg); }
.stage .back { width: 44%; left: 8%; top: 17%; transform: rotate(-7deg); opacity: .96; }
.stage .notif { left: 6%; bottom: 7%; }
.notif { position: absolute; z-index: 2; width: min(340px, 86%); background: #fff; border-radius: 20px; padding: 14px 18px 16px;
  box-shadow: 0 1px 2px rgba(0,0,0,.06), 0 18px 40px -18px rgba(40,28,10,.35); font-size: .92rem; line-height: 1.4; color: var(--body); }
.notif-top { display: flex; align-items: center; gap: 7px; font-size: .78rem; color: var(--muted); margin-bottom: 6px; }
.notif-top svg { width: 16px; height: 16px; border-radius: 4px; }
.notif strong { display: block; color: var(--ink); font-weight: 600; }
.notif .dot { opacity: .6; }


/* ---------- sections ---------- */
.section { padding-block: clamp(80px, 10vw, 140px); }
.section.sand { background: var(--sand); }
.split { display: grid; gap: 40px; }
@media (min-width: 900px) { .split { grid-template-columns: 5fr 7fr; gap: clamp(48px, 7vw, 120px); } .split .split-head { position: sticky; top: 32px; align-self: start; } }
.split-head { max-width: 30rem; margin-bottom: clamp(40px, 5vw, 64px); }
.split .split-head { margin-bottom: 0; }
.split-head.narrow { max-width: 40rem; }
.section > .wrap > .split-head { max-width: 40rem; }
.split-head h2, .math-note h2 { font-size: clamp(2rem, 4vw, 3.2rem); line-height: 1.02; }
.split-head p:not(.kicker) { margin: 22px 0 0; }

/* the evening log */
.log { list-style: none; margin: 0; padding: 0; border-bottom: 1px solid var(--line); }
.log li { display: grid; grid-template-columns: 3.6rem 1fr; gap: 16px; padding: 13px 0; border-top: 1px solid var(--line); }
.log time { font: 500 .85rem/1.75 var(--mono); color: var(--muted); font-variant-numeric: tabular-nums; }
.log p { margin: 0; font-size: 1.05rem; line-height: 1.5; color: var(--ink); }
.log { max-width: 34rem; align-self: end; }
.log li:nth-child(3) time, .log li:nth-child(3) p { color: var(--coral); }

/* screens */
.screens { list-style: none; margin: 0; padding: 0; display: grid; gap: 56px 40px; }
@media (min-width: 820px) { .screens { grid-template-columns: repeat(3, 1fr); } }
.screens .phone { width: 100%; max-width: 270px; height: auto; margin-bottom: 28px; filter: drop-shadow(0 26px 30px rgba(90,40,20,.18)); }
.screens h3 { font-size: 1.3rem; margin-bottom: 8px; }
.screens p { margin: 0; max-width: 22em; }

/* the number */
.math-grid { display: grid; gap: 56px; align-items: center; }
@media (min-width: 900px) { .math-grid { grid-template-columns: 7fr 5fr; gap: clamp(48px, 7vw, 120px); } }
.math { display: grid; grid-template-columns: auto 1fr; column-gap: .5em; font-size: clamp(2rem, 4.6vw, 4rem); line-height: 1.12; letter-spacing: -0.04em; font-weight: 500; color: var(--ink); }
.math .op { color: #b5ada1; font-weight: 300; text-align: right; }
.math .total { border-top: 2px solid var(--ink); margin-top: .2em; padding-top: .15em; }
.math b { font-weight: 600; color: var(--coral); border-top: 2px solid var(--ink); margin-top: .2em; padding-top: .15em; }
.math-note h2 { font-size: clamp(1.6rem, 2.8vw, 2.3rem); line-height: 1.08; margin-bottom: 20px; }
.math-note p:not(.kicker) { margin: 0; max-width: 30em; }

/* both ways */
.terms3 { display: grid; gap: 0 40px; margin: 0; }
@media (min-width: 820px) { .terms3 { grid-template-columns: repeat(3, 1fr); } }
.terms3 div { border-top: 2px solid var(--ink); padding: 20px 0 36px; }
.terms3 dt { font-size: 1.3rem; font-weight: 600; letter-spacing: -0.02em; color: var(--ink); margin-bottom: 10px; }
.terms3 dd { margin: 0; }

/* privacy ledger */
.ledger { display: grid; gap: 40px 48px; }
@media (min-width: 820px) { .ledger { grid-template-columns: 1fr 1fr; } }
.ledger h3 { font: 500 .78rem/1.4 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding-bottom: 14px; border-bottom: 2px solid var(--ink); }
.ledger ul { list-style: none; margin: 0; padding: 0; }
.ledger li { border-bottom: 1px solid var(--line); padding: 14px 0; color: var(--ink); font-size: 1.1rem; }
.more { margin: 36px 0 0; font-weight: 500; color: var(--ink); }

/* faq */
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 24px; padding: 22px 0; font-size: 1.2rem; font-weight: 600; letter-spacing: -0.015em; color: var(--ink); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-weight: 300; font-size: 1.6rem; line-height: 1; color: var(--muted); }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0 0 24px; max-width: 36em; }

/* closer */
.closer { background: var(--ink); color: #d9d4cc; padding-block: clamp(80px, 10vw, 140px); }
.closer-grid { display: grid; gap: 48px; align-items: center; }
@media (min-width: 900px) { .closer-grid { grid-template-columns: 1fr 1fr; gap: clamp(48px, 7vw, 120px); } }
.closer h2 { color: #fff; font-size: clamp(3rem, 7vw, 6rem); line-height: .95; letter-spacing: -0.05em; }
.closer p { font-size: 1.2rem; margin: 24px 0 34px; max-width: 24em; }
.closer .store { background: #fff; color: var(--ink); }
.closer .store:hover { background: #f1ece4; }
.brand-panel { aspect-ratio: 1 / 1; border-radius: 22%; max-width: 440px; width: 100%; justify-self: end; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #eb5a4a, #f9a86c); }
.brand-panel svg { height: 70%; width: auto; }
@media (max-width: 899px) { .brand-panel { justify-self: start; max-width: 260px; } }

/* ---------- legal pages ---------- */
.page-head { padding-block: clamp(40px, 7vw, 88px) 32px; border-bottom: 1px solid var(--line); }
.page-head h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); line-height: 1; letter-spacing: -0.045em; }
.page-head p { font-size: 1.15rem; color: var(--body); margin: 20px 0 0; max-width: 40em; }
.legal { max-width: 46rem; padding-block: 40px 110px; }
.legal h2 { font-size: 1.55rem; font-weight: 600; letter-spacing: -0.02em; margin: 56px 0 14px; scroll-margin-top: 24px; }
.legal h2:first-child { margin-top: 0; }
.legal ul, .legal ol { padding-left: 1.2em; margin: 0 0 1em; }
.legal li { margin-bottom: .5em; }
.legal li::marker { color: var(--muted); }
.legal strong { color: var(--ink); font-weight: 600; }
.legal a { color: var(--ink); }
.legal table { width: 100%; border-collapse: collapse; margin: 0 0 1.2em; font-size: 1rem; }
.legal th, .legal td { text-align: left; vertical-align: top; padding: 14px 12px 14px 0; border-top: 1px solid var(--line); }
.legal th { color: var(--ink); font-weight: 600; font-size: .85rem; letter-spacing: .06em; text-transform: uppercase; }
.table-scroll { overflow-x: auto; }
.meta { font-size: 1rem; color: var(--muted); }
.callout { background: var(--sand); border-radius: 14px; padding: 20px 22px; margin: 0 0 2em; color: var(--body); }
.confirm { background: #fff0c2; color: #5a4300; border-radius: 4px; padding: 1px 6px; font-weight: 600; font-size: .82em; }
.toc { margin: 0 0 8px; padding: 20px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.toc strong { font-size: .8125rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.toc ol { margin: 12px 0 0; }
@media (min-width: 700px) { .toc ol { columns: 2; column-gap: 40px; } }
.steps-inline { counter-reset: s; list-style: none; padding: 0 !important; }
.steps-inline li { counter-increment: s; position: relative; padding: 12px 0 12px 44px; border-top: 1px solid var(--line); margin: 0; }
.steps-inline li::before { content: counter(s); position: absolute; left: 0; top: 11px; font-weight: 600; color: var(--coral); font-size: 1.1rem; }
.btn { display: inline-flex; align-items: center; min-height: 52px; padding: 12px 22px; border-radius: 12px; background: var(--ink); color: #fff !important; text-decoration: none; font-weight: 600; }
.btn:hover { background: #000; }
.mail-cta { margin: 6px 0 22px; }
@media (max-width: 640px) {
  .legal table.stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .legal table.stack, .legal table.stack tbody, .legal table.stack tr, .legal table.stack td { display: block; width: 100%; }
  .legal table.stack tr { border-top: 1px solid var(--line); padding: 12px 0; }
  .legal table.stack td { border: 0; padding: 3px 0; }
  .legal table.stack td[data-label]::before { content: attr(data-label) ": "; font-weight: 600; color: var(--ink); }
}

/* ---------- footer ---------- */
.site-footer { background: var(--paper); border-top: 1px solid var(--line); font-size: .95rem; }
.site-footer .wrap { display: grid; gap: 28px 48px; padding-block: 48px 56px; }
@media (min-width: 820px) { .site-footer .wrap { grid-template-columns: 1.6fr 1fr 1fr; } }
.site-footer h2 { font-size: .8125rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.site-footer address { font-style: normal; line-height: 1.75; color: var(--body); }
.site-footer address strong { color: var(--ink); font-weight: 600; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li a { display: inline-block; padding: 5px 0; text-decoration: none; }
.site-footer li a:hover { text-decoration: underline; }
.site-footer .fine { grid-column: 1 / -1; font-size: .85rem; color: var(--muted); margin: 0; border-top: 1px solid var(--line); padding-top: 20px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }


/* phones */
@media (max-width: 819px) {
  .screens { grid-auto-flow: column; grid-auto-columns: 72%; overflow-x: auto; scroll-snap-type: x mandatory; gap: 20px;
    margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); scroll-padding-inline: var(--gutter); padding-bottom: 8px; }
  .screens li { scroll-snap-align: start; }
  .slot.r219 { aspect-ratio: 4 / 3; }
}

/* statement */
.statement { padding-block: clamp(72px, 10vw, 140px); border-top: 1px solid var(--line); }
.statement p { margin: 0; max-width: 17em; font-size: clamp(2.4rem, 6.2vw, 5.4rem); line-height: 1; letter-spacing: -0.05em; font-weight: 500; color: var(--ink); text-wrap: balance; }
.statement em { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -0.02em; color: var(--coral); display: block; }
.closer .nudge { font-size: 1.05rem; font-weight: 600; color: #f6a584; margin: -14px 0 22px; }

/* manifesto */
.manifesto { background: var(--ink); color: #cfc9c0; padding-block: clamp(80px, 11vw, 150px); }
.manifesto p { margin: 0 0 .7em; max-width: 24em; font-size: clamp(1.5rem, 3vw, 2.4rem); line-height: 1.2; letter-spacing: -0.03em; font-weight: 500; }
.manifesto p:first-child { color: #fff; }
.manifesto .turn { margin: 1.1em 0 0; font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -0.015em; font-size: clamp(2.4rem, 5.6vw, 4.6rem); line-height: 1; color: var(--coral); }
