/* RaveBSD landing page. Tokens and components follow the app's "Reading room" design (RaveBSD public/css). */
:root {
    --base: #0E0C10; --paper: #FBF8FF; --ink: #14123A;
    --text: #FBF8FF; --text2: #C9C5F2; --muted3: #D4D0F5;
    --card: rgba(255,255,255,0.07); --card-line: rgba(255,255,255,0.12); --divider: rgba(255,255,255,0.1);
    --yellow: #FFD54A; --yellow-sh: #C99A00; --mint: #5EEAB4; --pink: #FF9FE8; --hot: #FF4FD8;
    --cyan: #2EE6F6; --lilac: #B7A4FF; --sky: #8FD0FF; --sky2: #A8F0FF; --coral: #FF8A65; --peach: #FFB4A2; --apricot: #FFC070;
    --sans: 'Bricolage Grotesque', system-ui, sans-serif;
    --serif: 'Instrument Serif', Georgia, serif;
    --mono: 'DM Mono', ui-monospace, monospace;
    --settle: cubic-bezier(.22,.9,.24,1);
    --glow: radial-gradient(900px 640px at 0% 0%, rgba(255,79,216,0.26), transparent 62%), radial-gradient(800px 600px at 100% 4%, rgba(46,230,246,0.22), transparent 60%), radial-gradient(700px 520px at 55% 30%, rgba(255,213,74,0.13), transparent 62%), radial-gradient(800px 600px at 0% 58%, rgba(94,234,180,0.17), transparent 62%), radial-gradient(800px 600px at 100% 74%, rgba(255,138,101,0.2), transparent 62%), radial-gradient(900px 640px at 35% 100%, rgba(183,164,255,0.18), transparent 62%), #0E0C10;
    color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--base); -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 90px; }
body { margin: 0; color: var(--text); font-family: var(--sans); overflow-x: hidden; }
#bg { position: fixed; inset: 0; z-index: -1; background: var(--glow); }
a { color: inherit; text-decoration: none; }
.u { text-decoration: underline; text-underline-offset: 3px; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
.mono { font-family: var(--mono); }
.serif { font-family: var(--serif); font-style: italic; font-weight: 400; }
:focus { outline: none; }
:focus-visible { outline: 3px solid var(--paper); outline-offset: 2px; }
.pastel :focus-visible, .banner :focus-visible { outline-color: var(--ink); }
.skip { position: absolute; left: 16px; top: -60px; z-index: 20; padding: 10px 16px; border-radius: 12px; background: var(--paper); color: var(--ink); font-weight: 700; }
.skip:focus { top: 12px; }
code { font: 500 0.92em var(--mono); }

/* Type */
.label { font: 500 12px var(--mono); letter-spacing: 0.1em; text-transform: uppercase; }
.kicker { color: var(--text2); }
.h-hero { margin: 0; font-size: clamp(44px, 8vw, 104px); font-weight: 800; letter-spacing: -0.03em; line-height: 0.95; }
.h-hero .serif { display: block; color: var(--pink); letter-spacing: -0.02em; }
.h-sec { margin: 0; font-size: clamp(34px, 5vw, 56px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.02; }
.h-sec .serif { color: var(--cyan); margin-left: 0.12em; }
.lede { max-width: 680px; margin: 0; font-size: 18px; line-height: 1.55; color: var(--text2); }
.lede.big { font-size: 20px; }
.note { margin: 0; font-size: 15px; line-height: 1.55; color: var(--text2); }

/* Buttons (the app's) */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 48px; padding: 0 24px; border-radius: 24px; border: 0; font: 800 15px var(--sans); white-space: nowrap; cursor: pointer; transition: transform .12s ease, box-shadow .12s ease; }
.btn:active { transform: translateY(2px); }
.btn.yellow { background: var(--yellow); color: var(--ink); box-shadow: 0 4px 0 var(--yellow-sh); }
.btn.dark { background: var(--ink); color: var(--yellow); box-shadow: 0 4px 0 #000; }
.btn.outline { background: transparent; color: var(--paper); border: 2px solid rgba(255,255,255,0.4); font-weight: 700; }
.btn.sm { height: 44px; padding: 0 20px; border-radius: 22px; }
.btn.lg { height: 56px; padding: 0 34px; border-radius: 28px; font-size: 18px; }

/* Nav pill */
.topnav { position: sticky; top: 0; z-index: 10; display: flex; justify-content: center; padding: 18px 16px; }
.topnav nav { display: flex; align-items: center; gap: 2px; padding: 4px; border-radius: 999px; background: rgba(20,18,30,0.72); border: 1px solid rgba(255,255,255,0.14); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.nv { display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px; border-radius: 999px; font-size: 15px; font-weight: 600; color: var(--muted3); white-space: nowrap; transition: background .2s ease, color .2s ease; }
.nv:hover, .nv:focus-visible { background: rgba(255,255,255,0.14); color: var(--paper); }
.nv:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--yellow); }
.nv.lg { padding: 0 14px 0 8px; color: var(--paper); font-size: 17px; font-weight: 800; letter-spacing: -0.02em; }
.nv.lg img { width: 28px; height: 28px; filter: drop-shadow(0 2px 8px rgba(61,90,254,0.6)); }
.nv.gh { background: var(--paper); color: var(--ink); }
.nv.gh:hover, .nv.gh:focus-visible { background: var(--yellow); color: var(--ink); }
.navsep { width: 1px; height: 24px; margin: 0 4px; background: rgba(255,255,255,0.18); }

/* Layout */
main { display: flex; flex-direction: column; gap: 110px; padding-bottom: 80px; }
.hero, .block, .sunset, .shelfwrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 32px; }
.hero { display: flex; flex-direction: column; align-items: flex-start; gap: 26px; padding-top: 64px; }
.block { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }
.ctas { display: flex; flex-wrap: wrap; gap: 14px; }

/* Countdown */
.countdown { width: 100%; max-width: 760px; padding: 24px 26px; border-radius: 28px; background: linear-gradient(135deg, rgba(255,79,216,0.18), rgba(46,230,246,0.14)); border: 1px solid rgba(255,255,255,0.16); display: flex; flex-direction: column; gap: 16px; }
.cd-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; }
.cd-head .label { color: var(--paper); }
.cd-date { font-size: 13px; color: var(--text2); }
.cd-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.cd-tiles div { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 16px 8px; border-radius: 20px; background: var(--paper); color: var(--ink); box-shadow: 0 5px 0 rgba(0,0,0,0.35); }
.cd-tiles div:nth-child(1) { background: var(--yellow); } .cd-tiles div:nth-child(2) { background: var(--pink); }
.cd-tiles div:nth-child(3) { background: var(--mint); } .cd-tiles div:nth-child(4) { background: var(--sky2); }
.cd-tiles b { font: 500 clamp(34px, 6vw, 56px) var(--mono); letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.cd-tiles span { font: 500 11px var(--mono); letter-spacing: 0.1em; text-transform: uppercase; }
.cd-out { margin: 0; font-size: 20px; line-height: 1.4; }
.cd-out b { font-weight: 800; color: var(--yellow); }

/* The shelf of spines */
.shelfwrap { overflow-x: auto; scrollbar-width: none; padding-top: 30px; }
.shelfwrap::-webkit-scrollbar { display: none; }
.shelf-row { display: flex; align-items: flex-end; justify-content: safe center; gap: 7px; min-width: max-content; padding: 0 8px; }
.spine { flex: none; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 10px 0; border-radius: 6px 6px 2px 2px; color: var(--ink); transition: transform .25s var(--settle); }
.spine:hover, .spine:focus-visible { transform: translateY(-12px); }
.spine .sd { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--ink); }
.spine .vt { flex: 1; min-height: 0; writing-mode: vertical-rl; display: flex; align-items: center; gap: 8px; overflow: hidden; }
.spine .vt b { font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap; }
.spine .vt small { font: 500 9px var(--mono); letter-spacing: 0.06em; opacity: 0.8; }
.spine .sf { font: 500 9px var(--mono); }
.board { height: 18px; margin-top: -1px; border-radius: 6px; background: linear-gradient(180deg,rgba(255,255,255,0.22),rgba(255,255,255,0.08)); box-shadow: 0 16px 30px rgba(0,0,0,0.45); min-width: max-content; }

/* Banner (sunset) */
.banner { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; padding: 16px 22px; border-radius: 22px; }
.banner.yellow { background: var(--yellow); color: var(--ink); }
.banner .grow { flex: 1 1 320px; font-size: 17px; font-weight: 700; line-height: 1.45; }
.banner.coral { background: rgba(255,138,101,0.16); border: 1px solid rgba(255,138,101,0.55); }
.heads-up { max-width: 760px; }
.heads-up .grow { font-size: 16px; font-weight: 500; color: var(--text); }
.heads-up b { color: #FFB49B; font-weight: 800; }

/* Feature cards */
.cards { width: 100%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 10px; }
.pastel { border-radius: 26px; color: var(--ink); padding: 26px; display: flex; flex-direction: column; gap: 10px; scroll-margin-top: 110px; transition: transform .25s var(--settle), box-shadow .25s ease; }
.pastel:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(0,0,0,0.35); }
.pastel.mint { background: linear-gradient(160deg,#C4F5E1,#7DDFC0); }
.pastel.lilac { background: linear-gradient(160deg,#E2D8FF,#B7A4FF); }
.pastel.yellow { background: linear-gradient(160deg,#FFE48A,#FFC94A); }
.pastel.sky { background: linear-gradient(160deg,#CDE8FF,#8FD0FF); }
.pastel.peach { background: linear-gradient(160deg,#FFC2D4,#FFD8B0); }
.pastel .label { color: rgba(20,18,58,0.72); }
.pastel h3 { margin: 0; font-size: 24px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
.pastel p { margin: 0; font-size: 15px; line-height: 1.55; color: #2A2650; }
.pastel.flash { animation: flash 1.2s ease; }
@keyframes flash { 30% { box-shadow: 0 0 0 6px var(--paper), 0 18px 40px rgba(0,0,0,0.35); } }

/* Segmented control */
.seg { display: flex; padding: 4px; gap: 2px; border-radius: 999px; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.14); }
.seg button { height: 44px; padding: 0 22px; border: 0; border-radius: 999px; background: transparent; color: var(--text2); font: 600 15px var(--sans); cursor: pointer; }
.seg [aria-selected="true"] { background: var(--paper); color: var(--ink); font-weight: 700; }

/* Gallery */
.gallery { width: 100%; display: grid; align-items: start; gap: 18px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.gallery.phone { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.shot { display: flex; flex-direction: column; gap: 10px; padding: 10px; border: 0; border-radius: 22px; background: var(--card); outline-offset: 3px; cursor: zoom-in; color: var(--text2); text-align: left; transition: transform .25s var(--settle), background .2s ease; }
.shot:hover { transform: translateY(-4px); background: rgba(255,255,255,0.12); }
.shot img { width: 100%; height: auto; border-radius: 14px; }
.shot span { font: 500 12px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; padding: 0 4px 2px; }

/* Viewer */
.viewer { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(8,6,12,0.97); color: var(--paper); }
.viewer::backdrop { background: transparent; }
.viewer figure { margin: 0; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 64px 84px 24px; }
.viewer img { max-width: 100%; max-height: calc(100dvh - 130px); width: auto; height: auto; border-radius: 14px; box-shadow: 0 30px 80px rgba(0,0,0,0.6); }
.viewer figcaption { font: 500 13px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--text2); }
.vbtn { position: absolute; width: 52px; height: 52px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.3); background: rgba(20,18,30,0.7); color: var(--paper); font-size: 22px; cursor: pointer; }
.vbtn:hover { background: var(--paper); color: var(--ink); }
.vbtn.prev { left: 18px; top: 50%; transform: translateY(-50%); }
.vbtn.next { right: 18px; top: 50%; transform: translateY(-50%); }
.vbtn.close { right: 18px; top: 16px; font-size: 26px; }

/* Sources */
.cols { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.card { border-radius: 26px; background: var(--card); border: 1px solid var(--card-line); }
.src { padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.src h3 { margin: 0; font-size: 22px; font-weight: 800; }
.pills { display: flex; flex-wrap: wrap; gap: 10px; }
.pills span { display: inline-flex; align-items: center; height: 40px; padding: 0 18px; border-radius: 20px; color: var(--ink); font-size: 15px; font-weight: 600; }

/* Install */
.code { position: relative; width: 100%; max-width: 760px; padding: 22px 24px; }
.code pre { margin: 0; overflow-x: auto; font: 400 15px/1.75 var(--mono); color: var(--mint); }
.code .btn { position: absolute; right: 16px; top: 16px; }

/* FAQ */
.faq { width: 100%; max-width: 860px; display: flex; flex-direction: column; gap: 12px; }
.faq details { padding: 4px 24px; }
.faq summary { cursor: pointer; padding: 18px 0; font-size: 19px; font-weight: 800; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-weight: 600; color: var(--text2); }
.faq details[open] summary::after { content: "–"; }
.faq p { margin: 0 0 20px; font-size: 16px; line-height: 1.6; color: var(--text2); }

/* Footer (the app's, with the animated lockup) */
footer.site { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 32px 24px 56px; border-top: 1px solid var(--divider); max-width: 960px; margin: 0 auto; }
footer.site span { font: 400 13px var(--mono); color: var(--text2); }
.lockup { position: relative; width: 100%; max-width: 300px; }
.lockup img { width: 100%; height: auto; }
.lockup img + img { position: absolute; left: 0; top: 0; }
.lockup .a { animation: logoA 8s ease-in-out infinite; }
.lockup .b { animation: logoB 8s ease-in-out infinite; }
@keyframes logoA { 0%,38% { opacity: 1 } 50%,88% { opacity: 0 } 100% { opacity: 1 } }
@keyframes logoB { 0%,38% { opacity: 0 } 50%,88% { opacity: 1 } 100% { opacity: 0 } }

/* Arrive as you scroll */
.rise { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s var(--settle); }
.rise.in { opacity: 1; transform: none; }

/* Phone */
@media (max-width: 899px) {
    html { scroll-padding-top: 80px; }
    .topnav { padding: 12px 8px; }
    .nv { padding: 0 11px; font-size: 14px; }
    .nv.lg span { display: none; }
    .nv.lg { padding: 0 8px; }
    main { gap: 80px; }
    .hero, .block, .sunset, .shelfwrap { padding: 0 16px; }
    .hero { padding-top: 32px; gap: 20px; }
    .lede.big { font-size: 17px; }
    .countdown { padding: 18px; border-radius: 24px; }
    .cd-tiles { gap: 8px; }
    .cd-tiles div { padding: 12px 4px; border-radius: 16px; }
    .cards { grid-template-columns: 1fr; }
    .gallery { grid-template-columns: 1fr; }
    .gallery.phone { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cols { grid-template-columns: 1fr; }
    .viewer figure { padding: 64px 12px 90px; }
    .vbtn.prev, .vbtn.next { top: auto; bottom: 22px; transform: none; }
    .vbtn.prev { left: calc(50% - 64px); } .vbtn.next { right: calc(50% - 64px); }
    .ctas .btn { flex: 1 1 auto; }
}
@media (min-width: 900px) and (max-width: 1100px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .rise { opacity: 1; transform: none; transition: none; }
    .lockup .a, .lockup .b { animation: none; } .lockup .b { opacity: 0; }
}
