/* captaura.com: tokens, shared shell, and page layouts. Light only. */

@font-face {
  font-family: "Inter Tight";
  font-weight: 600;
  font-display: swap;
  src: url(/fonts/inter-tight-600-latin.woff2) format("woff2");
}

:root {
  --bg: #F6F6F4; --ink: #0B0B0C; --ink-2: #5E6066; --ink-3: #A9ABB0;
  --orange: #FF9100; --yellow: #FBE53B; --red: #F24B4F; --plum: #92348D;
  --blue: #007AFF; --sky: #7ACBED; --green: #38C77A;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --gutter: clamp(16px, 5vw, 64px);
  --display: "Inter Tight", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--ink); font: 16px/1.55 system-ui, -apple-system, sans-serif; overflow-x: hidden; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 6px; }

/* Film grain over everything, and the drifting aura glows behind everything. */
body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; opacity: .07; z-index: 50;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.glows { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; transition: filter .7s ease; }
.glows.flash { filter: brightness(1.2) saturate(1.3); transition: filter .06s ease; }
.glow { position: absolute; border-radius: 50%; filter: blur(80px); }
.glow.warm { width: 560px; height: 560px; left: -200px; top: -220px; opacity: .6; background: radial-gradient(circle, var(--orange), var(--red) 55%, transparent 70%); animation: drift-a 9s ease-in-out infinite; }
.glow.sun { width: 400px; height: 400px; left: 22%; top: -240px; opacity: .4; background: radial-gradient(circle, var(--yellow), var(--orange) 50%, transparent 70%); animation: drift-b 11s ease-in-out infinite; }
.glow.cool { width: 640px; height: 640px; right: -240px; bottom: -300px; opacity: .45; background: radial-gradient(circle, var(--sky), var(--blue) 48%, var(--plum) 64%, transparent 72%); animation: drift-c 10s ease-in-out infinite; }
.glow.plum { width: 440px; height: 440px; right: 8%; top: 28%; opacity: .22; background: radial-gradient(circle, var(--plum), var(--red) 60%, transparent 72%); animation: drift-b 13s ease-in-out infinite reverse; }
@keyframes drift-a { 0%, 100% { transform: translate(0, 0) scale(1) } 50% { transform: translate(260px, 160px) scale(1.25) } }
@keyframes drift-b { 0%, 100% { transform: translate(0, 0) scale(1) } 33% { transform: translate(-200px, 140px) scale(1.15) } 66% { transform: translate(180px, 80px) scale(.88) } }
@keyframes drift-c { 0%, 100% { transform: translate(0, 0) scale(1) } 50% { transform: translate(-260px, -200px) scale(1.2) } }

main, .site-header, .site-footer { position: relative; z-index: 1; }
/* clip, not hidden: hidden would make main a scroll container and break the sticky story stage */
main { overflow-x: clip; }

/* Header */
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 24px var(--gutter); }
.wordmark { height: 32px; width: auto; filter: drop-shadow(0 0 2px rgba(255, 255, 255, .95)) drop-shadow(0 0 10px rgba(255, 255, 255, .85)) drop-shadow(0 0 26px rgba(255, 255, 255, .6)); }
.site-header nav { display: flex; gap: 8px; align-items: center; }
.site-header nav a { text-decoration: none; font-size: 14px; padding: 8px 14px; border-radius: 999px; }
.pill { font-size: 14px; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--ink); white-space: nowrap; }

/* Type and buttons */
h1, h2, .display { font-family: var(--display); font-weight: 600; letter-spacing: -0.035em; line-height: 1.04; }
h1 { font-size: clamp(40px, 6vw, 76px); }
h2 { font-size: clamp(28px, 3.4vw, 44px); }
.sub { color: var(--ink-2); font-size: clamp(16px, 1.4vw, 19px); max-width: 30em; margin-top: 18px; }
.btn { display: inline-flex; align-items: center; padding: 14px 22px; border-radius: 999px; font-weight: 600; font-size: 15px; text-decoration: none; }
.btn.primary { background: var(--ink); color: #fff; }
.btn.ghost { color: var(--ink); }
.chip { position: absolute; z-index: 8; font: 600 13px/1 var(--display); letter-spacing: 0; padding: 9px 13px; border-radius: 999px; background: #fff; box-shadow: 0 6px 24px rgba(0, 0, 0, .10); white-space: nowrap; }

/* Footer */
.site-footer { padding: 48px var(--gutter) 40px; color: var(--ink-2); font-size: 14px; }
.site-footer a { color: var(--ink); }

/* Plain reading pages: support, 404 */
.prose { max-width: 680px; margin: 6vh auto 0; padding: 0 var(--gutter); }
.prose h1 { font-size: clamp(36px, 5vw, 56px); }
.prose .lede { color: var(--ink-2); font-size: 18px; margin-top: 14px; }
.prose h2 { font-size: 24px; letter-spacing: -0.02em; margin-top: 44px; }
.prose p { margin-top: 12px; }
.prose ul { margin-top: 12px; padding-left: 22px; }
.prose li { margin-top: 8px; }
.prose a { color: var(--ink); }
/* Legal pages: tables scroll sideways on a phone instead of widening the page */
.legal .table-wrap { overflow-x: auto; margin-top: 16px; }
.legal table { border-collapse: collapse; min-width: 560px; font-size: 15px; }
.legal th, .legal td { text-align: left; vertical-align: top; padding: 10px 12px 10px 0; border-bottom: 1px solid rgba(0, 0, 0, .1); }
.legal blockquote { margin-top: 16px; padding: 12px 16px; border-left: 3px solid var(--ink); background: rgba(255, 255, 255, .6); }

/* ---------- Home: hero ---------- */
.hero { display: grid; grid-template-columns: 1fr 1.05fr; gap: 40px; align-items: center; max-width: 1220px; margin: 4vh auto 0; padding: 0 var(--gutter); }
.ctas { display: flex; gap: 10px; margin-top: 28px; flex-wrap: wrap; }
.pair { --cw: min(250px, 36vw); position: relative; width: calc(var(--cw) * 2 + 24px); height: calc(var(--cw) * 4 / 3); margin: 64px auto 24px; }
.pc { position: absolute; left: 50%; top: 0; width: var(--cw); aspect-ratio: 3 / 4; margin-left: calc(var(--cw) / -2); transition: transform .75s var(--ease), opacity .45s ease; }
.pc .face { width: 100%; height: 100%; object-fit: cover; border-radius: 22px; background: #ddd; box-shadow: 0 30px 60px -20px rgba(20, 20, 40, .35), 0 0 0 1px rgba(0, 0, 0, .04); }
.pc.before { z-index: 4; transform: translateX(calc(var(--cw) / -2 - 12px)) rotate(-3deg); }
.pc.after { z-index: 3; transform: translateX(calc(var(--cw) / 2 + 12px)) rotate(3deg); }
.pc.fan1, .pc.fan2 { opacity: 0; }
.pc .chip { left: 50%; top: -50px; transform: translateX(-50%); }
.pc .flash, .burst, .corner { opacity: 0; pointer-events: none; }
.after-chip { border: 1.5px solid transparent; background: conic-gradient(var(--orange), var(--red), var(--plum), var(--blue), var(--sky), var(--yellow), var(--orange)) border-box; }
.after-chip::after { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: 999px; background: #fff; }
.check { width: 13px; height: 13px; margin-right: 6px; vertical-align: -2px; }

/* ---------- Home: hero animation (hero.js adds .animated, then loops snap/click/flash/split) ---------- */
@property --sweep { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
.pc .flash { position: absolute; inset: 0; border-radius: 22px; background: #fff; }
.burst { position: absolute; left: 50%; top: 50%; width: 160%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; z-index: 2;
  background: radial-gradient(circle, rgba(255, 255, 255, .95), rgba(255, 236, 170, .45) 30%, transparent 62%); }
.corner { position: absolute; z-index: 6; width: 28px; height: 28px; border: 2.5px solid var(--ink); transition: opacity .2s ease; }
.corner.tl { left: -14px; top: -14px; border-right: 0; border-bottom: 0; border-radius: 9px 0 0 0; --x: 1; --y: 1; }
.corner.tr { right: -14px; top: -14px; border-left: 0; border-bottom: 0; border-radius: 0 9px 0 0; --x: -1; --y: 1; }
.corner.bl { left: -14px; bottom: -14px; border-right: 0; border-top: 0; border-radius: 0 0 0 9px; --x: 1; --y: -1; }
.corner.br { right: -14px; bottom: -14px; border-left: 0; border-top: 0; border-radius: 0 0 9px 0; --x: -1; --y: -1; }

/* One card: both photos centered, the fan behind, the viewfinder on the selfie. */
.pair.animated .pc.before, .pair.animated .pc.after { transform: none; }
.pair.animated .pc.fan1 { opacity: 1; transform: rotate(-7deg) translate(-16px, 10px) scale(.94); }
.pair.animated .pc.fan2 { opacity: 1; transform: rotate(6deg) translate(18px, 12px) scale(.94); }
.pair.animated .corner { opacity: 1; }
.pair.animated .pc .face { transition: transform .12s ease; }
.pair.animated .after-chip { opacity: 0; transform: translateX(-50%) translateY(10px) scale(.85); transition: opacity .3s ease, transform .55s cubic-bezier(.3, 1.5, .5, 1);
  background: conic-gradient(from var(--sweep), var(--orange), var(--red), var(--plum), var(--blue), var(--sky), var(--yellow), var(--orange)) border-box; }
.pair.animated .after-chip::before { content: ""; position: absolute; inset: -10px -14px; z-index: -1; border-radius: 999px; filter: blur(14px); opacity: 0;
  background: conic-gradient(from var(--sweep), var(--orange), var(--red), var(--plum), var(--blue), var(--sky), var(--yellow), var(--orange)); }
.pair.animated .check path { stroke-dasharray: 20; stroke-dashoffset: 20; }

/* The click: corners snap in with a slight overshoot, and the card dips. */
.pair.snap .corner { animation: snap .16s cubic-bezier(.4, 0, .2, 1) forwards; }
@keyframes snap { 0% { transform: none } 65% { transform: translate(calc(var(--x) * 14px), calc(var(--y) * 14px)) } 100% { transform: translate(calc(var(--x) * 11px), calc(var(--y) * 11px)) } }
.pair.click .pc.before .face { transform: scale(.975); }

/* The flash. */
.pair.flash .pc.before .flash { animation: flash .5s ease-out; }
@keyframes flash { 0% { opacity: 0 } 10% { opacity: 1 } 100% { opacity: 0 } }
.pair.flash .burst { animation: burst .9s ease-out; }
@keyframes burst { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.5) } 12% { opacity: 1 } 100% { opacity: 0; transform: translate(-50%, -50%) scale(1.2) } }

/* Two cards: the headshot slides out from behind the selfie; the fan and the viewfinder fade away. */
.pair.animated.split .pc.before { transform: translateX(calc(var(--cw) / -2 - 12px)) rotate(-3deg); }
.pair.animated.split .pc.after { transform: translateX(calc(var(--cw) / 2 + 12px)) rotate(3deg); transition-duration: .7s; }
.pair.animated.split .pc.fan1 { opacity: 0; transform: rotate(-4deg) translate(-8px, 18px) scale(.9); }
.pair.animated.split .pc.fan2 { opacity: 0; transform: rotate(3deg) translate(8px, 20px) scale(.9); }
.pair.animated.split .corner { opacity: 0; }
.pair.animated.split .after-chip { opacity: 1; transform: translateX(-50%); transition-delay: .45s; animation: sweep 1.6s .45s cubic-bezier(.3, .6, .3, 1) forwards; }
.pair.animated.split .after-chip::before { animation: bloom 1.6s .45s ease-out forwards, sweep 1.6s .45s cubic-bezier(.3, .6, .3, 1) forwards; }
.pair.animated.split .check path { animation: tick .35s .85s ease-out forwards; }
@keyframes sweep { from { --sweep: 0deg } to { --sweep: 360deg } }
@keyframes bloom { 0% { opacity: 0 } 30% { opacity: .55 } 100% { opacity: .18 } }
@keyframes tick { to { stroke-dashoffset: 0 } }

/* ---------- Home: how it works (static; story.js adds .animated) ---------- */
.story { position: relative; z-index: 1; padding: 14vh var(--gutter) 10vh; }
.stage { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; max-width: 1220px; margin: 0 auto; }
.eyebrow { font: 600 11px/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }
.steps { list-style: none; padding: 0; margin-top: 22px; }
.steps li { font-family: var(--display); font-weight: 600; letter-spacing: -0.02em; font-size: clamp(24px, 2.8vw, 38px); line-height: 1.12; margin-bottom: 14px; transition: color .3s ease; }
.deck { display: none; position: relative; width: min(290px, 60vw); aspect-ratio: 3 / 4; margin: 0 auto; }
.dc { position: absolute; inset: 0; will-change: transform; }
.dc img { width: 100%; height: 100%; object-fit: cover; border-radius: 22px; background: #ddd; box-shadow: 0 24px 50px -20px rgba(20, 20, 40, .35), 0 0 0 1px rgba(0, 0, 0, .05); }
.stamp { position: absolute; top: 18px; padding: 6px 12px; border-radius: 8px; border: 2.5px solid; font: 700 15px/1 var(--display); letter-spacing: .06em; text-transform: uppercase; opacity: 0; background: rgba(255, 255, 255, .85); }
.stamp.keep { left: 16px; color: var(--green); border-color: var(--green); transform: rotate(-10deg); }
.stamp.skip { right: 16px; color: var(--ink-2); border-color: var(--ink-2); transform: rotate(10deg); }
.picks { display: grid; grid-template-columns: repeat(2, minmax(0, 150px)); gap: 14px; justify-content: center; }
.slot { aspect-ratio: 3 / 4; border-radius: 12px; overflow: hidden; }
.slot img { width: 100%; height: 100%; object-fit: cover; box-shadow: 0 8px 18px -8px rgba(0, 0, 0, .4); }
.picks-label { text-align: center; margin-top: 12px; font-size: 13px; color: var(--ink-2); }
.story-note { text-align: center; margin-top: 18px; font-family: var(--display); font-weight: 600; letter-spacing: -0.01em; font-size: 17px; }

/* Animated story (story.js adds .animated): a tall section pins the stage while the deck is swiped. */
.story.animated { height: 900vh; padding: 0; }
.story.animated .stage { position: sticky; top: 0; height: 100vh; height: 100svh; align-content: safe center; padding: 0 var(--gutter); }
.story.animated .deck { display: block; }
.story.animated .steps li { color: var(--ink-3); }
.story.animated .steps li.on { color: var(--ink); }
.story.animated .picks { grid-template-columns: repeat(4, 58px); gap: 10px; margin-top: 30px; }
.story.animated .slot { border-radius: 10px; border: 1.5px dashed var(--ink-3); background: rgba(255, 255, 255, .4); }
.story.animated .slot img { opacity: 0; transition: opacity .3s ease; }
.story.animated .slot.full { border-color: transparent; }
.story.animated .slot.full img { opacity: 1; }
@media (max-width: 820px) {
  .story.animated .stage { align-content: center; gap: 28px; }
  .story.animated .steps li { font-size: 20px; margin-bottom: 8px; }
  .story.animated .deck { width: min(240px, 60vw); }
}
@media (max-width: 820px) and (max-height: 700px) {
  .story.animated .stage { gap: 18px; }
  .story.animated .steps { margin-top: 12px; }
  .story.animated .steps li { font-size: 17px; margin-bottom: 6px; }
  .story.animated .deck { width: min(240px, 60vw, 34svh); }
  .story.animated .picks { grid-template-columns: repeat(4, 46px); margin-top: 16px; }
  .story.animated .story-note { margin-top: 10px; font-size: 15px; }
}

/* ---------- Home: closing sections ---------- */
.cards { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; max-width: 1080px; margin: 8vh auto 0; padding: 0 var(--gutter); }
.card-block { background: rgba(255, 255, 255, .6); border-radius: 28px; padding: clamp(24px, 3vw, 40px); box-shadow: 0 0 0 1px rgba(0, 0, 0, .04); }
.card-block h2 { font-size: clamp(26px, 2.6vw, 34px); }
.card-block p { margin-top: 12px; color: var(--ink-2); font-size: 17px; }

@media (max-width: 820px) {
  .hero, .stage, .cards { grid-template-columns: 1fr; }
  .hero { gap: 24px; }
}

@media (max-width: 820px) {
  .site-header nav a { display: none; }
}

/* Reduced motion: JS sets html.reduce-motion from the media query. These rules come last and
   win over every animated and looping class, so adding the class alone restores the static layout. */
html.reduce-motion { scroll-behavior: auto; }
html.reduce-motion *, html.reduce-motion *::before, html.reduce-motion *::after { transition: none !important; }
html.reduce-motion .glow { animation: none; }
html.reduce-motion .glows.flash { filter: none; }
html.reduce-motion .pair .pc, html.reduce-motion .pair .face, html.reduce-motion .pair .after-chip { transition: none !important; animation: none !important; }
html.reduce-motion .pair .pc.before { transform: translateX(calc(var(--cw) / -2 - 12px)) rotate(-3deg) !important; }
html.reduce-motion .pair .pc.after { transform: translateX(calc(var(--cw) / 2 + 12px)) rotate(3deg) !important; }
html.reduce-motion .pair .pc.fan1, html.reduce-motion .pair .pc.fan2, html.reduce-motion .pair .corner,
html.reduce-motion .pair .flash, html.reduce-motion .pair .burst, html.reduce-motion .pair .after-chip::before { opacity: 0 !important; animation: none !important; }
html.reduce-motion .pair .after-chip { opacity: 1 !important; transform: translateX(-50%) !important; }
html.reduce-motion .pair .check path { stroke-dashoffset: 0 !important; animation: none !important; }
html.reduce-motion .story.animated { height: auto !important; padding: 14vh var(--gutter) 10vh !important; }
html.reduce-motion .story.animated .stage { position: static !important; height: auto !important; padding: 0 !important; }
html.reduce-motion .story.animated .deck { display: none !important; }
html.reduce-motion .story.animated .steps li { color: var(--ink) !important; }
html.reduce-motion .story.animated .picks { grid-template-columns: repeat(2, minmax(0, 150px)) !important; gap: 14px !important; margin-top: 0 !important; }
html.reduce-motion .story.animated .slot { border: 0 !important; background: none !important; }
html.reduce-motion .story.animated .slot img { opacity: 1 !important; }
