/* Duskhold site · light, after calai.app's layout language (see design/calai-study.md):
 * black ink on an ivory-to-blue wash, one grotesque (Bricolage Grotesque), pill controls, real-looking iPhones,
 * and the app's own dark screens carrying the colour. The wordmark keeps the app's italic serif. */
@import url("./tokens.css");
@import url("./base.css");

.skip { position: absolute; left: var(--space-md); top: -80px; z-index: 100; padding: var(--space-xs) var(--space-md); border-radius: var(--radius-pill); background: var(--color-ink); color: var(--color-white); }
.skip:focus-visible { top: var(--space-md); }

/* Header: frosted, sticky */
.slab { position: sticky; top: 0; z-index: var(--z-sticky); background: rgb(255 255 255 / 0.6); -webkit-backdrop-filter: saturate(1.6) blur(24px); backdrop-filter: saturate(1.6) blur(24px); }
.nav { display: flex; align-items: center; gap: var(--space-lg); min-height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0; }
.brand span { font: italic 400 1.75rem/1 var(--font-wordmark); letter-spacing: -0.01em; }
.nav-links { display: flex; align-items: center; gap: 32px; margin-left: auto; font-weight: 500; }
.nav-links a { text-decoration: none; transition: opacity var(--dur-short) var(--ease-out); }
.nav-links a:not(.pill):hover { opacity: 0.55; }
.nav-get { margin-left: var(--space-md); }
.pill { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 20px; border-radius: var(--radius-pill); background: var(--color-ink); color: var(--color-white); font-weight: 500; white-space: nowrap; transition: background-color var(--dur-short) var(--ease-out); }
.pill:hover { background: #27272a; }
.pill--mobile { display: none; }

/* Store badges: black, two-line, like the official ones */
.badges { display: flex; flex-wrap: wrap; gap: var(--space-sm); }
.badge { display: inline-flex; align-items: center; gap: 10px; min-height: 54px; padding: 0 22px 0 16px; border-radius: 13px; background: var(--color-ink); color: var(--color-white); text-decoration: none; transition: background-color var(--dur-short) var(--ease-out), transform var(--dur-short) var(--ease-out); }
.badge:hover { background: #27272a; transform: translateY(-1px); }
.badge:active { transform: translateY(0); }
.badge svg { width: 24px; height: 24px; flex-shrink: 0; fill: currentColor; }
.badge span { display: flex; flex-direction: column; font-size: 1.1875rem; font-weight: 600; line-height: 1.05; letter-spacing: -0.01em; white-space: nowrap; }
.badge small { font-size: 0.6875rem; font-weight: 500; letter-spacing: 0.01em; opacity: 0.85; }
.badges--sm { gap: var(--space-xs); }
.badges--sm .badge { min-height: 42px; gap: 8px; padding: 0 14px 0 12px; border-radius: 10px; }
.badges--sm .badge svg { width: 18px; height: 18px; }
.badges--sm .badge span { font-size: 0.9375rem; }
.badges--sm .badge small { font-size: 0.5625rem; }

/* Getting the app: badges beside a QR code; a phone never sees the QR */
.get { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-md) 28px; }
.qr-card { display: flex; align-items: center; gap: 14px; }
.qr { width: 76px; height: 76px; flex-shrink: 0; padding: 7px; border-radius: 14px; background: var(--color-white); box-shadow: var(--halo); }
.qr svg { width: 100%; height: 100%; }
.qr-card p { max-width: 17ch; font-size: var(--text-sm); line-height: 1.35; color: var(--color-muted); }
.qr-card strong { display: block; font-weight: 600; color: var(--color-ink); }
.mobile .qr-card { display: none; }

.facts { display: flex; flex-wrap: wrap; gap: var(--space-xs) var(--space-lg); margin: 0; padding: 0; list-style: none; font-size: var(--text-sm); font-weight: 500; color: var(--color-ink-2); }
.facts li { display: inline-flex; align-items: center; gap: 7px; }
.facts li::before { content: ""; width: 16px; height: 16px; border-radius: 50%; background: var(--color-mint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.5 8.2 7 10.5l4.5-5'/%3E%3C/svg%3E") center / 100% no-repeat; }

/* The iPhone: titanium rim, black bezel, Dynamic Island, side buttons. Sized by the .device width. */
.device { container-type: inline-size; margin: 0; transform: rotate(var(--tilt, 0deg)); }
.phone { position: relative; padding: 1.3cqw; border-radius: 17.6cqw; background: linear-gradient(140deg, #ececef 0%, #a4a5aa 18%, #f6f6f8 44%, #9b9ca1 72%, #dcdde1 100%); box-shadow: inset 0 0 0 0.35cqw rgb(255 255 255 / 0.6), var(--shadow-phone); }
.phone::before, .phone::after { content: ""; position: absolute; width: 0.9cqw; background: #b3b4b9; }
.phone::before { left: -0.75cqw; top: 22cqw; height: 38cqw; border-radius: 0.5cqw 0 0 0.5cqw; background: linear-gradient(#b3b4b9 0 18%, transparent 18% 29%, #b3b4b9 29% 61%, transparent 61% 68%, #b3b4b9 68% 100%); }
.phone::after { right: -0.75cqw; top: 36cqw; height: 21cqw; border-radius: 0 0.5cqw 0.5cqw 0; }
.bezel { padding: 3.3cqw; border-radius: 16.3cqw; background: #050505; box-shadow: inset 0 0 0 0.4cqw #1b1b1d; }
.screen { position: relative; overflow: hidden; aspect-ratio: 603 / 1311; border-radius: 13cqw; background: #000; container-type: inline-size; isolation: isolate; }
.screen img { width: 100%; height: 100%; object-fit: cover; }
.screen::before { content: ""; position: absolute; z-index: 3; top: 1.3%; left: 50%; width: 31.8%; aspect-ratio: 125 / 37; transform: translateX(-50%); border-radius: var(--radius-pill); background: #000; }
.screen::after { content: ""; position: absolute; inset: 0; z-index: 4; pointer-events: none; background: linear-gradient(115deg, rgb(255 255 255 / 0.13) 0%, rgb(255 255 255 / 0) 32%); }

/* A screen drawn in HTML: the Screen Time block screen, which the simulator cannot capture */
.os { position: absolute; inset: 0; --u: calc(100cqw / 393); background: radial-gradient(120% 70% at 50% 34%, #2b2b2e, #1c1c1e 72%); color: var(--color-white); font-family: var(--font-ios); }
.os-bar { position: absolute; top: calc(20 * var(--u)); left: calc(54 * var(--u)); right: calc(32 * var(--u)); display: flex; align-items: center; justify-content: space-between; font-size: calc(17 * var(--u)); font-weight: 600; line-height: 1; }
.os-bar svg { width: calc(74 * var(--u)); height: auto; }
.shield { position: absolute; top: calc(236 * var(--u)); left: 0; right: 0; display: grid; justify-items: center; padding-inline: calc(28 * var(--u)); text-align: center; line-height: 1.2; }
.shield svg { width: calc(72 * var(--u)); height: auto; }
.shield-title { margin-top: calc(28 * var(--u)); font-size: calc(21 * var(--u)); font-weight: 700; }
.shield-reason { margin-top: calc(5 * var(--u)); font-size: calc(21 * var(--u)); color: rgb(235 235 245 / 0.62); }
.shield-count { margin-top: calc(34 * var(--u)); font-size: calc(19 * var(--u)); color: rgb(235 235 245 / 0.62); }
.shield-btn { position: absolute; left: 50%; bottom: calc(82 * var(--u)); display: grid; place-items: center; width: calc(186 * var(--u)); height: calc(56 * var(--u)); transform: translateX(-50%); border: calc(1.5 * var(--u)) solid rgb(10 132 255 / 0.9); border-radius: var(--radius-pill); font-size: calc(18 * var(--u)); font-weight: 600; color: rgb(235 235 245 / 0.55); }

/* Labels that float off a phone's edge */
.chip { position: absolute; z-index: 5; display: grid; padding: 2.6cqw 4.6cqw; border-radius: 4.6cqw; background: var(--color-white); box-shadow: 0 8px 24px rgb(16 24 40 / 0.14), 0 0 0 1px rgb(16 24 40 / 0.05); font-size: max(10px, 4.8cqw); font-weight: 700; line-height: 1.2; text-align: center; white-space: nowrap; }
.chip small { font-size: max(9px, 3.9cqw); font-weight: 500; color: var(--color-muted); }

/* Hero: words left, two tilted phones right */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); align-items: center; gap: 48px; min-height: calc(100svh - 72px); padding-block: 40px 88px; }
.kicker { display: inline-flex; align-items: center; gap: 10px; padding: 5px 16px 5px 5px; border: 1px solid var(--color-rule); border-radius: var(--radius-pill); background: rgb(255 255 255 / 0.75); font-size: var(--text-sm); font-weight: 500; }
.tiles { display: flex; }
.tiles span, .apps li span { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: #1c1c1e; color: var(--color-white); font: 600 13px/1 var(--font-ios); }
.tiles span { border: 2px solid var(--color-white); }
.tiles span + span { margin-left: -9px; }
.hero h1 { margin-top: 24px; max-width: 14ch; font-size: var(--text-h1); font-weight: 500; line-height: 1.12; letter-spacing: -0.025em; }
.hero h1 b { display: block; font-weight: 700; }
.hero .lead { margin-top: 20px; max-width: 44ch; font-size: var(--text-lg); line-height: 1.55; color: var(--color-ink-2); }
.hero .get { margin-top: 32px; }
.hero .facts { margin-top: 24px; }
.stage { --dw: clamp(160px, 19vw, 256px); position: relative; height: calc(var(--dw) * 2.4); }
.stage .device { position: absolute; width: var(--dw); }
.stage .device--a { left: 3%; bottom: 0; --tilt: -7deg; }
.stage .device--b { right: 3%; top: 0; --tilt: 6deg; }
.device--a .chip { top: 9%; left: -18cqw; }
.device--b .chip:first-of-type { top: 15%; left: -20cqw; }
.device--b .chip:last-of-type { top: 61%; right: -13cqw; }
.squiggle { position: absolute; z-index: 6; left: 50%; top: 40%; width: clamp(84px, 9vw, 132px); transform: translateX(-50%); }

/* Section heads: centred, generous air above */
.head { display: grid; justify-items: center; text-align: center; }
.head h2 { max-width: 22ch; font-size: var(--text-h2); font-weight: 500; letter-spacing: -0.025em; }
.head p { margin-top: 14px; max-width: 46ch; font-size: var(--text-lg); color: var(--color-ink-2); }

/* Screen Time beside Duskhold */
.versus { padding-top: var(--section); }
.sides { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; max-width: 980px; margin: 56px auto 0; }
.side { margin: 0; padding: 36px; border-radius: var(--radius-card); background: var(--color-white); box-shadow: var(--halo); }
.side-label { font-size: var(--text-sm); font-weight: 600; color: var(--color-muted); }
.side-figure { margin-top: 12px; font-size: clamp(3.25rem, 2.4rem + 3vw, 5rem); font-weight: 600; line-height: 1; letter-spacing: -0.045em; font-variant-numeric: lining-nums; }
.side h3 { margin-top: 28px; font-size: var(--text-xl); }
.side h3 + p { margin-top: 8px; color: var(--color-ink-2); }
.side--us { background: var(--color-ink); color: var(--color-white); box-shadow: 0 30px 60px -30px rgb(0 0 0 / 0.5); }
.side--us .side-label { color: var(--color-mint); }
.side--us h3 + p { color: #c9cdd2; }
.lift { margin-top: 24px; padding-top: 18px; border-top: 1px solid rgb(255 255 255 / 0.14); font-size: var(--text-sm); color: #c9cdd2; }
.lift b { font-weight: 600; color: var(--color-white); font-variant-numeric: tabular-nums; }

/* How it works: one phone, four cards that switch its screen */
.how { padding-top: var(--section); }
.switcher { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 64px; max-width: 1080px; margin: 64px auto 0; }
.switcher-phone { display: grid; justify-items: center; gap: 28px; }
.switcher-phone .device { width: min(320px, 68vw); }
.layer { position: absolute; inset: 0; animation: screen-in var(--dur-long) var(--ease-out); }
@keyframes screen-in { from { opacity: 0; transform: scale(1.03); } }
.dots { display: flex; gap: 8px; }
.dots span { width: 10px; height: 10px; border-radius: var(--radius-pill); background: #d4d4d8; transition: width var(--dur-short) var(--ease-out), background-color var(--dur-short) var(--ease-out); }
.dots span.on { width: 26px; background: var(--color-ink); }
.cards { display: grid; gap: 14px; }
.card { display: block; width: 100%; padding: 22px 24px; border: 1px solid var(--color-rule); border-radius: var(--radius-tile); background: var(--color-white); text-align: left; cursor: pointer; transition: transform var(--dur-short) var(--ease-out), border-color var(--dur-short) var(--ease-out), background-color var(--dur-short) var(--ease-out); }
.card:hover { border-color: #a1a1aa; }
.card[aria-selected="true"] { border-color: var(--color-ink); background: var(--color-chip); transform: scale(1.03); }
.card h3 { font-size: var(--text-xl); }
.card p { margin-top: 6px; color: var(--color-ink-2); }

/* Why: three white cards */
.why { padding-top: var(--section); }
.benefits { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 56px; }
.benefit { padding: 30px; border-radius: var(--radius-card); background: var(--color-white); box-shadow: var(--halo); }
.icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 13px; background: var(--color-chip); }
.icon svg { width: 22px; height: 22px; fill: none; stroke: var(--color-ink); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.benefit h3 { margin-top: 22px; font-size: var(--text-xl); }
.benefit p { margin-top: 10px; font-size: 0.9375rem; line-height: 1.55; color: var(--color-ink-2); }

/* Spotlight: focus mode, one phone at a slant */
.spot { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 48px; padding-block: var(--section); }
.eyebrow { font-size: var(--text-xs); font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-accent); }
.spot h2 { margin-top: 16px; max-width: 13ch; font-size: var(--text-h2); letter-spacing: -0.025em; }
.spot p:not(.eyebrow) { margin-top: 18px; max-width: 38ch; font-size: var(--text-lg); color: var(--color-ink-2); }
.spot-phone { position: relative; display: grid; place-items: center; }
.spot-phone::before { content: ""; position: absolute; width: 90%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(closest-side, rgb(61 220 151 / 0.22), transparent); }
.spot-phone .device { width: min(300px, 64vw); --tilt: -3deg; }

/* Night band: the line that sells it, on the app's own dark */
.night { position: relative; overflow: hidden; isolation: isolate; padding-block: var(--section); background: var(--color-night); color: var(--color-white); }
.night::before { content: ""; position: absolute; z-index: -1; left: 50%; bottom: -40%; width: 120%; height: 100%; transform: translateX(-50%); background: radial-gradient(closest-side, rgb(61 220 151 / 0.16), transparent); }
.statement { max-width: 17ch; margin-inline: auto; font-size: var(--text-statement); font-weight: 600; line-height: 1.04; letter-spacing: -0.035em; text-align: center; text-wrap: balance; }
.statement span { color: var(--color-mint); }
.apps { margin-top: 56px; text-align: center; }
.apps p { font-size: var(--text-sm); font-weight: 500; color: var(--color-night-muted); }
.apps ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; max-width: 780px; margin: 18px auto 0; padding: 0; list-style: none; }
.apps li { display: inline-flex; align-items: center; gap: 10px; padding: 6px 18px 6px 6px; border: 1px solid rgb(255 255 255 / 0.08); border-radius: var(--radius-pill); background: var(--color-night-2); font-weight: 500; }
.apps li span { background: #262b29; }

/* FAQ: white rounded rows */
.faq { padding-top: var(--section); }
.faq-list { display: grid; gap: 12px; max-width: 720px; margin: 48px auto 0; }
details { border-radius: var(--radius-card); background: var(--color-white); box-shadow: var(--halo); }
summary { display: flex; align-items: center; justify-content: space-between; gap: var(--space-md); padding: 22px 24px; font-size: 1.0625rem; font-weight: 600; cursor: pointer; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::after { content: ""; flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%; background: var(--color-chip) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 4.5 6 7.5 9 4.5'/%3E%3C/svg%3E") center / 12px no-repeat; transition: transform var(--dur-short) var(--ease-out); }
details[open] summary::after { transform: rotate(180deg); }
details p { max-width: 62ch; padding: 0 24px 22px; color: var(--color-ink-2); }

/* The close: the download, once more, on a soft glow */
.close { position: relative; isolation: isolate; padding-block: var(--section); text-align: center; }
.close::before { content: ""; position: absolute; z-index: -1; inset: 10% 0; background: radial-gradient(36% 50% at 28% 50%, rgb(253 178 93 / 0.2), transparent 70%), radial-gradient(36% 50% at 72% 50%, rgb(61 220 151 / 0.17), transparent 70%), radial-gradient(50% 60% at 50% 50%, rgb(147 197 253 / 0.18), transparent 70%); }
.app-icon { width: 88px; height: 88px; margin-inline: auto; border-radius: 22px; box-shadow: 0 22px 40px -16px rgb(0 0 0 / 0.45); }
.close h2 { max-width: 16ch; margin: 28px auto 0; font-size: var(--text-h2); letter-spacing: -0.025em; }
.close .sub { margin-top: 14px; font-size: var(--text-lg); color: var(--color-ink-2); }
.close .get, .close .badges, .close .facts { justify-content: center; }
.close .get { margin-top: 36px; }
.close .facts { margin-top: 24px; }

/* Footers */
.site-footer { padding-block: 56px 32px; border-top: 1px solid var(--color-rule); background: rgb(255 255 255 / 0.5); }
.footer-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 40px; }
.footer-grid > div > p { margin-top: 16px; font-size: var(--text-sm); color: var(--color-muted); }
.footer-grid .badges { margin-top: 12px; }
.footer-col { display: grid; align-content: start; gap: 10px; font-size: 0.9375rem; }
.footer-head { margin-bottom: 4px; font-weight: 600; }
.footer-col a, .footer-row a { color: var(--color-ink-2); text-decoration: none; }
.footer-col a:hover, .footer-row a:hover { color: var(--color-ink); text-decoration: underline; }
.footer-base { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--color-rule); font-size: var(--text-sm); color: var(--color-muted); }
.footer { padding-block: 40px; border-top: 1px solid var(--color-rule); }
.footer-row { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--space-md); font-size: var(--text-sm); color: var(--color-muted); }
.footer-row nav { display: flex; gap: var(--space-lg); }
.mast { font: italic 400 1.75rem/1 var(--font-wordmark); color: var(--color-ink); }

/* Privacy and support: a long document */
.doc { padding-block: 64px 120px; }
.doc .container { max-width: calc(760px + 2 * var(--gutter)); }
.doc h1 { font-size: clamp(2.5rem, 2rem + 2vw, 3.25rem); letter-spacing: -0.03em; }
.doc h2 { margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--color-rule); font-size: var(--text-2xl); }
.doc h3 { margin-top: 32px; font-size: var(--text-xl); }
.doc p, .doc li { max-width: 65ch; margin-top: 12px; line-height: 1.7; color: var(--color-ink-2); }
.doc ul { padding-left: var(--space-lg); }
.doc a { color: var(--color-ink); overflow-wrap: anywhere; }
.doc em { font-style: normal; color: var(--color-muted); }
.doc .jump { display: flex; flex-wrap: wrap; gap: 10px; margin-top: var(--space-lg); }
.jump a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 20px; border-radius: var(--radius-pill); background: var(--color-white); box-shadow: var(--halo); font-weight: 500; text-decoration: none; }
.jump a:hover { background: var(--color-chip); }
.tm { text-transform: none; }

@media (max-width: 60rem) {
  .nav-links a:not(.pill), .nav-get { display: none; }
  .pill--mobile { display: inline-flex; }
  .hero { grid-template-columns: minmax(0, 1fr); min-height: 0; gap: 56px; padding-block: 32px 24px; }
  .stage { --dw: min(40vw, 240px); max-width: 560px; width: 100%; margin-inline: auto; }
  .sides, .switcher, .spot { grid-template-columns: minmax(0, 1fr); }
  .benefits { grid-template-columns: minmax(0, 1fr); max-width: 560px; margin-inline: auto; }
  /* Phone and all four cards fit one screen, so a tap visibly changes the phone */
  .switcher { gap: 28px; max-width: 560px; margin-top: 40px; }
  .switcher-phone .device { width: min(220px, 52vw); }
  .dots { display: none; }
  .cards { gap: 10px; }
  .card { padding: 14px 18px; }
  .card[aria-selected="true"] { transform: none; }
  .card:not([aria-selected="true"]) p { display: none; }
  .spot { gap: 56px; text-align: center; }
  .spot > div:first-child { display: grid; justify-items: center; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid > div:first-child { grid-column: 1 / -1; }
}
@media (max-width: 40rem) {
  .brand span { font-size: 1.5rem; }
  .hero h1 { font-size: 2.625rem; }
  .squiggle { display: none; }
  .device--a .chip { left: -5cqw; }
  .side { padding: 28px 24px; }
  .card h3 { font-size: var(--text-lg); }
  .card p { font-size: 0.9375rem; }
  summary { padding: 18px 20px; font-size: 1rem; }
  details p { padding: 0 20px 18px; }
}
