/* AfterLook — getafterlook.app
   Tokens from the app's DesignSystem (design/BRIEF.md): paper, ink, violet, apricot.
   Fonts: Instrument Serif (display) + Hanken Grotesk (UI), both SIL OFL 1.1, bundled in /assets/fonts. */

@font-face { font-family: "Instrument Serif"; src: url("/assets/fonts/InstrumentSerif-Regular.ttf") format("truetype"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("/assets/fonts/InstrumentSerif-Italic.ttf") format("truetype"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Hanken Grotesk"; src: url("/assets/fonts/HankenGrotesk.ttf") format("truetype"); font-weight: 100 900; font-style: normal; font-display: swap; }

:root {
  --paper: #F7F3EE;
  --surface: #FFFFFF;
  --surface-2: #EFE9E1;
  --ink: #17151C;
  --ink-2: #4A4652;
  --ink-3: #6B6674;
  --line: #E2DAD0;
  --violet: #5A3FE0;
  --violet-text: #4B32CC;
  --violet-soft: #ECE8FD;
  --violet-soft-text: #3F27B8;
  --apricot: #F28C4B;
  --apricot-soft: #FDE6D6;
  --apricot-text: #7A2E0B;
  --success: #2F7A4F;
  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --sans: "Hanken Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --r-img: 24px;
  --r-card: 20px;
  --shadow: 0 10px 30px rgba(23, 21, 28, 0.12);
  --wrap: 1160px;
  --gutter: clamp(20px, 5vw, 40px);
}

*, *::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(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, video { display: block; max-width: 100%; height: auto; }
a { color: var(--violet-text); text-underline-offset: 3px; }
a:hover { color: var(--violet-soft-text); }
:focus-visible { outline: 3px solid var(--violet); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 10; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 999px; }
.skip:focus { left: 12px; color: #fff; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 5; background: rgba(247, 243, 238, 0.88); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid transparent; }
.site-header.scrolled { border-bottom-color: var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand img { width: 34px; height: 34px; border-radius: 9px; }
.wordmark { font-family: var(--serif); font-size: 28px; line-height: 1; letter-spacing: -0.01em; }
.wordmark i { font-style: italic; }
.nav { display: flex; align-items: center; gap: 26px; }
.nav a { color: var(--ink-2); text-decoration: none; font-size: 15px; font-weight: 500; }
.nav a:hover { color: var(--ink); }
.nav .pill-link { color: #fff; background: var(--ink); padding: 9px 16px; border-radius: 999px; font-weight: 600; }
.nav .pill-link:hover { color: #fff; background: #2b2833; }
@media (max-width: 760px) { .nav a:not(.pill-link) { display: none; } }

/* ---------- Shared bits ---------- */
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 18px; }
.eyebrow::before { content: ""; width: 14px; height: 14px; border-radius: 50%; background: linear-gradient(90deg, var(--ink) 50%, var(--violet) 50%); }
h1, h2, h3 { font-weight: 400; margin: 0; }
.display { font-family: var(--serif); font-size: clamp(52px, 8.4vw, 104px); line-height: 0.95; letter-spacing: -0.02em; }
.display em, .h2 em { font-style: italic; color: var(--violet); }
.h2 { font-family: var(--serif); font-size: clamp(38px, 5.2vw, 62px); line-height: 1.02; letter-spacing: -0.015em; }
.lead { font-size: clamp(18px, 2vw, 21px); color: var(--ink-2); max-width: 34em; }
.section { padding: clamp(72px, 10vw, 128px) 0; }
.section-head { max-width: 720px; margin-bottom: clamp(40px, 6vw, 64px); }
.section-head p { color: var(--ink-2); font-size: 18px; margin: 18px 0 0; }

.chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 999px; font-size: 13.5px; font-weight: 600; white-space: nowrap; }
.chip svg { width: 14px; height: 14px; flex: none; }
.chip-violet { background: var(--violet-soft); color: var(--violet-soft-text); }
.chip-ink { background: var(--ink); color: #fff; }
.chip-ai { background: var(--violet); color: #fff; }
.chip-real { background: var(--apricot-soft); color: var(--apricot-text); }
.chip-quiet { background: var(--surface-2); color: var(--ink-2); }

.store-badge { display: inline-flex; align-items: center; gap: 12px; height: 60px; padding: 0 22px 0 18px; border-radius: 16px; background: var(--ink); color: #fff; text-decoration: none; }
.store-badge svg { width: 26px; height: 26px; }
.store-badge span { display: flex; flex-direction: column; line-height: 1.1; }
.store-badge small { font-size: 12px; opacity: 0.75; letter-spacing: 0.02em; }
.store-badge strong { font-size: 19px; font-weight: 600; letter-spacing: -0.01em; }
.store-badge[aria-disabled="true"] { cursor: default; }

/* ---------- Hero ---------- */
.hero { padding: clamp(36px, 6vw, 72px) 0 clamp(56px, 8vw, 96px); overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero .lead { margin: 26px 0 32px; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; }
.hero-note { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.film { position: relative; margin: 0; }
.film-frame { position: relative; border-radius: 28px; overflow: hidden; background: var(--surface); box-shadow: 0 30px 80px -20px rgba(23, 21, 28, 0.28), 0 0 0 1px var(--line); aspect-ratio: 1200 / 630; }
.film-frame video, .film-frame img { width: 100%; height: 100%; object-fit: cover; }
.film figcaption { display: flex; justify-content: space-between; gap: 12px; margin-top: 14px; font-size: 13.5px; color: var(--ink-3); }
.film-toggle { position: absolute; right: 14px; bottom: 14px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, 0.92); color: var(--ink); display: grid; place-items: center; cursor: pointer; box-shadow: 0 2px 10px rgba(23, 21, 28, 0.15); }
.film-toggle svg { width: 16px; height: 16px; }
.film::before { content: ""; position: absolute; z-index: -1; right: -8%; top: -14%; width: 62%; aspect-ratio: 1; border-radius: 50%; background: var(--violet-soft); }
@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .film { order: -1; }
  .film::before { display: none; }
}

/* ---------- The split divider (signature motif) ---------- */
.split-rule { position: relative; height: 1px; background: var(--line); margin: 0 auto; max-width: var(--wrap); overflow: visible; }
.split-rule::after { content: ""; position: absolute; left: 50%; top: 50%; width: 36px; height: 36px; transform: translate(-50%, -50%); border-radius: 50%; background: linear-gradient(90deg, var(--ink) 50%, var(--violet) 50%); box-shadow: 0 0 0 8px var(--paper); }

/* ---------- Phone frames ---------- */
.phone { position: relative; width: 100%; max-width: 300px; border-radius: 46px; padding: 9px; background: var(--ink); box-shadow: 0 26px 60px -18px rgba(23, 21, 28, 0.35); margin: 0 auto; }
.phone img { border-radius: 37px; width: 100%; aspect-ratio: 1206 / 2622; object-fit: cover; background: var(--paper); }

/* ---------- How it works ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(20px, 3vw, 36px); }
.step { display: flex; flex-direction: column; gap: 22px; }
.step .phone { max-width: 250px; }
.step-num { font-family: var(--serif); font-style: italic; font-size: 30px; color: var(--violet); line-height: 1; }
.step h3 { font-size: 20px; font-weight: 650; letter-spacing: -0.01em; margin: 6px 0 6px; }
.step p { margin: 0; color: var(--ink-2); font-size: 16px; }
@media (max-width: 1000px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 56px; } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } .step .phone { max-width: 270px; } }

/* ---------- Feature rows ---------- */
.features { display: flex; flex-direction: column; gap: clamp(72px, 10vw, 120px); }
.feature { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.feature:nth-child(even) .feature-media { order: 2; }
.feature-media { position: relative; display: flex; justify-content: center; padding: clamp(28px, 4vw, 48px) 0; }
.feature-media::before { content: ""; position: absolute; inset: 0; border-radius: 36px; background: var(--surface-2); }
.feature-media.tint-violet::before { background: var(--violet-soft); }
.feature-media.tint-apricot::before { background: var(--apricot-soft); }
.feature-media .phone { max-width: 280px; }
.feature-copy h3 { font-family: var(--serif); font-size: clamp(34px, 4.2vw, 48px); line-height: 1.04; letter-spacing: -0.01em; margin: 14px 0 18px; }
.feature-copy p { color: var(--ink-2); margin: 0 0 14px; }
.ticks { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 30px; color: var(--ink); font-size: 16px; }
.ticks li::before { content: ""; position: absolute; left: 0; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--violet-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234B32CC' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4L18 8'/%3E%3C/svg%3E") center / 13px no-repeat; }
@media (max-width: 820px) {
  .feature { grid-template-columns: 1fr; }
  .feature:nth-child(even) .feature-media { order: 0; }
}

/* ---------- Promises ---------- */
.promises { background: var(--ink); color: #F4F1EC; }
.promises .h2 em { color: #9C8BFF; }
.promises .section-head p { color: #BDB7C6; }
.promises .eyebrow { color: #948E9E; }
.promises .eyebrow::before { background: linear-gradient(90deg, #F4F1EC 50%, #9C8BFF 50%); }
.promise-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: #34303C; border: 1px solid #34303C; border-radius: var(--r-card); overflow: hidden; }
.promise { background: #1C1A21; padding: clamp(24px, 3vw, 34px); }
.promise h3 { font-size: 19px; font-weight: 650; margin: 0 0 8px; color: #F4F1EC; }
.promise p { margin: 0; color: #BDB7C6; font-size: 16px; }
.promise .num { display: block; font-family: var(--serif); font-style: italic; font-size: 26px; color: #9C8BFF; margin-bottom: 14px; }
@media (max-width: 900px) { .promise-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .promise-grid { grid-template-columns: 1fr; } }

/* ---------- Credits / pricing ---------- */
.credits { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(24px, 4vw, 48px); align-items: stretch; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: clamp(24px, 3.4vw, 40px); }
.card h3 { font-size: 21px; font-weight: 650; margin: 0 0 6px; }
.card > p { color: var(--ink-2); margin: 0; }
.rules { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 0; }
.rules li { display: grid; grid-template-columns: 36px 1fr; gap: 12px; padding: 16px 0; border-top: 1px solid var(--line); font-size: 16px; }
.rules li:first-child { border-top: 0; }
.rules .mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 13px; color: var(--ink-3); padding-top: 2px; }
.free-card { background: var(--violet-soft); border-color: transparent; display: flex; flex-direction: column; justify-content: space-between; gap: 28px; }
.free-card h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(32px, 3.6vw, 42px); line-height: 1.05; color: var(--ink); }
.free-card p { color: var(--violet-soft-text); }
.free-list { display: flex; flex-wrap: wrap; gap: 8px; }
.free-list .chip { background: #fff; color: var(--ink); }
@media (max-width: 860px) { .credits { grid-template-columns: 1fr; } }

/* ---------- Privacy band ---------- */
.privacy-band { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: clamp(32px, 6vw, 88px); align-items: center; }
.privacy-points { list-style: none; padding: 0; margin: 28px 0 0; counter-reset: p; }
.privacy-points li { display: grid; grid-template-columns: 40px 1fr; gap: 10px; padding: 18px 0; border-top: 1px solid var(--line); }
.privacy-points li:last-child { border-bottom: 1px solid var(--line); }
.privacy-points b { display: block; font-weight: 650; }
.privacy-points span { color: var(--ink-2); font-size: 16px; }
.privacy-points .mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 13px; color: var(--ink-3); padding-top: 3px; }
@media (max-width: 820px) { .privacy-band { grid-template-columns: 1fr; } .privacy-band .feature-media { order: 2; } }

/* ---------- CTA ---------- */
.cta { text-align: center; }
.cta .wrap { display: flex; flex-direction: column; align-items: center; gap: 22px; }
.cta img.cta-icon { width: 96px; height: 96px; border-radius: 22px; box-shadow: var(--shadow); }
.cta p { color: var(--ink-2); margin: 0; max-width: 32em; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 40px 0 48px; font-size: 15px; color: var(--ink-3); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 18px 32px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.site-footer a { color: var(--ink-2); text-decoration: none; }
.site-footer a:hover { color: var(--ink); text-decoration: underline; }
.maker { display: flex; flex-direction: column; gap: 4px; }
.maker a { color: var(--ink); font-weight: 600; }

/* ---------- Document pages (privacy, terms, support) ---------- */
.doc { padding: clamp(40px, 7vw, 88px) 0 clamp(64px, 9vw, 112px); }
.doc .wrap { max-width: 820px; }
.doc h1 { font-family: var(--serif); font-size: clamp(44px, 7vw, 72px); line-height: 1; letter-spacing: -0.015em; margin-bottom: 14px; }
.doc .updated { color: var(--ink-3); font-size: 15px; margin: 0 0 32px; }
.doc .summary { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 22px 26px; margin: 0 0 40px; }
.doc .summary p { margin: 0 0 10px; }
.doc .summary ul { margin: 0; padding-left: 20px; }
.doc h2 { font-size: 23px; font-weight: 650; letter-spacing: -0.01em; margin: 44px 0 12px; scroll-margin-top: 90px; }
.doc h3 { font-size: 18px; font-weight: 650; margin: 26px 0 8px; }
.doc p, .doc li { color: var(--ink-2); }
.doc li { margin: 6px 0; }
.doc strong { color: var(--ink); }
.toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 36px; padding: 0; list-style: none; }
.toc a { display: inline-block; padding: 6px 12px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); text-decoration: none; font-size: 14px; font-weight: 500; }
.toc a:hover { background: var(--violet-soft); color: var(--violet-soft-text); }
.table-wrap { overflow-x: auto; margin: 16px 0; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.doc table { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 520px; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--line); color: var(--ink-2); }
.doc th { color: var(--ink); font-weight: 650; background: #FBF9F6; }
.doc tr:last-child td { border-bottom: 0; }

/* Support */
.contact-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; background: var(--ink); color: #F4F1EC; border-radius: var(--r-card); padding: 26px 28px; margin: 8px 0 44px; }
.contact-card p { margin: 0; color: #BDB7C6; }
.contact-card strong { color: #fff; display: block; font-size: 19px; margin-bottom: 4px; }
.contact-card a.btn { background: #fff; color: var(--ink); text-decoration: none; padding: 12px 20px; border-radius: 999px; font-weight: 650; }
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 20px 40px 20px 0; position: relative; font-weight: 650; color: var(--ink); font-size: 17px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 6px; top: 50%; width: 12px; height: 12px; border-right: 2px solid var(--ink-3); border-bottom: 2px solid var(--ink-3); transform: translateY(-70%) rotate(45deg); transition: transform 0.2s; }
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq details > div { padding: 0 0 20px; }
.faq details > div p:first-child { margin-top: 0; }

/* 404 */
.notfound { min-height: 62vh; display: grid; place-items: center; text-align: center; padding: 64px 0; }
.notfound .mark { width: 120px; height: 120px; border-radius: 50%; margin: 0 auto 28px; background: linear-gradient(90deg, var(--ink) 50%, var(--violet) 50%); }
.notfound p { color: var(--ink-2); }
.btn-primary { display: inline-flex; align-items: center; height: 52px; padding: 0 24px; border-radius: 999px; background: var(--ink); color: #fff; text-decoration: none; font-weight: 600; }
.btn-primary:hover { color: #fff; background: #2b2833; }

@media (max-width: 400px) {
  body { font-size: 16px; }
  .wordmark { font-size: 25px; }
  .store-badge { height: 56px; }
}
