/* BestRizz landing page. Loud, playful, mobile-first. The product is the hero. */
:root {
  --ink: #0b0915;
  --lime: #c6ff3d;
  --pink: #ff4fa3;
  --violet: #8b5cff;
  --cyan: #38e1ff;
  --yellow: #ffd23f;
  --glass: #ffffff0d;
  --glass-line: #ffffff1f;
}
body { background: var(--ink); overflow-x: hidden; }
body:has(#home:not([hidden]))::before {
  /* aurora + grid */
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(40vw 40vw at 12% 8%, #8b5cff40, transparent 60%),
    radial-gradient(36vw 36vw at 92% 18%, #ff4fa333, transparent 60%),
    radial-gradient(50vw 30vw at 50% 105%, #38e1ff22, transparent 60%),
    linear-gradient(#ffffff08 1px, transparent 1px) 0 0 / 56px 56px,
    linear-gradient(90deg, #ffffff08 1px, transparent 1px) 0 0 / 56px 56px,
    var(--ink);
  mask-image: linear-gradient(#000 0 70%, #0008);
}
.top { position: sticky; top: 0; z-index: 20; backdrop-filter: blur(14px); background: #0b0915b3; border-bottom-color: #ffffff12; }
.brand { font-size: 19px; font-weight: 900; letter-spacing: -.5px; }
.brand .dot { background: conic-gradient(var(--lime), var(--pink), var(--violet), var(--lime)); box-shadow: none; border-radius: 8px; }
.top-links { display: flex; gap: 22px; margin-right: auto; margin-left: 36px; }
.top-links a { color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 600; }
.top-links a:hover { color: var(--text); }
body:has(#studio:not([hidden])) .top-links { display: none; }

.landing { display: block; }
.landing em { font-style: normal; background: linear-gradient(100deg, var(--lime), var(--yellow) 30%, var(--pink) 60%, var(--violet)); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shimmer 6s ease-in-out infinite alternate; }
@keyframes shimmer { to { background-position: 100% 0; } }

/* ---------- Buttons ---------- */
.go { border: 0; cursor: pointer; font-weight: 800; color: #120c1f; background: var(--lime); border-radius: 999px; padding: 14px 22px; font-size: 16px; white-space: nowrap; box-shadow: 0 0 0 0 #c6ff3d66, 0 10px 30px #c6ff3d33; transition: transform .12s, box-shadow .2s; }
.go:hover { transform: translateY(-1px); box-shadow: 0 0 0 6px #c6ff3d22, 0 14px 40px #c6ff3d44; }
.go:active { transform: translateY(1px) scale(.98); }
.go.big { font-size: 20px; padding: 20px 34px; }
.link { background: none; border: 0; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-size: 14px; padding: 4px; }
.link:hover { color: var(--text); }

/* ---------- Hero ---------- */
.hero { max-width: 1240px; margin: 0 auto; padding: 56px 24px 40px; display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: 56px; align-items: center; text-align: left; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 22px; padding: 7px 14px 7px 12px; border-radius: 999px; background: var(--glass); border: 1px solid var(--glass-line); font-size: 13px; font-weight: 600; color: #d9d4f5; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 0 #c6ff3d; animation: blip 1.8s infinite; }
@keyframes blip { 0% { box-shadow: 0 0 0 0 #c6ff3daa; } 100% { box-shadow: 0 0 0 10px #c6ff3d00; } }
.hero h1 { font-size: clamp(64px, 9.4vw, 136px); line-height: .86; letter-spacing: -0.055em; font-weight: 900; margin: 0 0 24px; }
.hero .lede { font-size: clamp(17px, 1.5vw, 20px); line-height: 1.5; color: #bdb6dc; max-width: 520px; margin: 0 0 30px; }

.composer-xl { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 999px; background: #16112a; border: 1px solid #ffffff26; max-width: 600px; box-shadow: 0 20px 60px #00000080, inset 0 1px 0 #ffffff14; transition: border-color .2s, box-shadow .2s; }
.composer-xl:focus-within { border-color: var(--violet); box-shadow: 0 0 0 6px #8b5cff26, 0 20px 60px #00000080; }
.composer-xl .mic { width: 52px; height: 52px; background: linear-gradient(135deg, var(--pink), var(--violet)); box-shadow: 0 6px 24px #ff4fa355; }
.composer-xl input { flex: 1; min-width: 0; background: transparent; border: 0; outline: none; font-size: 17px; padding: 10px 4px; color: var(--text); }
.composer-xl input::placeholder { color: #8f88b3; }
.hero .live { text-align: left; font-size: 15px; color: var(--muted); margin: 10px 8px 0; min-height: 1.4em; }
.ideas { justify-content: flex-start; margin-top: 8px; }
.ideas button { border: 1px solid #ffffff1c; color: #cfc8ee; background: #ffffff08; font-weight: 500; }
.ideas button:hover { border-color: var(--lime); color: var(--lime); background: #c6ff3d0d; }
.have-code { margin: 18px 4px 0; }

/* Waitlist + spot */
.wl, .spot { max-width: 600px; margin-top: 18px; padding: 22px; border-radius: 24px; background: linear-gradient(160deg, #1e1638, #130e24); border: 1px solid #ffffff22; box-shadow: 0 30px 80px #0009; animation: pop .35s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes pop { from { transform: scale(.96) translateY(8px); opacity: 0; } }
.wl-title { margin: 0 0 14px; font-weight: 700; font-size: 17px; }
.wl-row { display: flex; gap: 8px; }
.wl-row input { flex: 1; min-width: 0; padding: 14px 18px; border-radius: 999px; border: 1px solid #ffffff26; background: #0b0915; outline: none; font-size: 16px; color: var(--text); }
.wl-row input:focus { border-color: var(--lime); }
.check { display: flex; gap: 10px; align-items: flex-start; margin-top: 12px; font-size: 13.5px; color: var(--muted); cursor: pointer; }
.check input { accent-color: var(--lime); margin-top: 3px; }
.check a { color: #d9d4f5; }
.form-error { color: #ff8a8a; font-size: 14px; margin: 8px 0 0; min-height: 0; }
.form-error:empty { display: none; }
.spot { text-align: left; }
.spot p { margin: 0 0 10px; color: #cfc8ee; }
.spot-k { text-transform: uppercase; letter-spacing: .14em; font-size: 12px; font-weight: 800; color: var(--lime) !important; }
.spot-n { font-size: clamp(64px, 8vw, 96px); font-weight: 900; line-height: .9; letter-spacing: -0.05em; color: var(--text) !important; }
.spot-idea { font-style: italic; color: #a49dc8 !important; }
.spot-idea:empty { display: none; }
.spot-sub { font-size: 13px; color: var(--muted) !important; margin: 12px 0 0 !important; }

/* Demo device */
.demo { position: relative; perspective: 1400px; }
.device { position: relative; border-radius: 28px; padding: 16px; background: linear-gradient(160deg, #221a3f, #120d22); border: 1px solid #ffffff26; box-shadow: 0 40px 120px #000a, 0 0 0 1px #ffffff08 inset, 0 0 120px #8b5cff33; transform: rotateY(-9deg) rotateX(4deg); transition: transform .6s; min-height: 470px; display: flex; flex-direction: column; gap: 12px; }
.demo:hover .device { transform: rotateY(-3deg) rotateX(2deg); }
.device-bar { display: flex; gap: 6px; padding: 2px 4px 4px; }
.device-bar span { width: 10px; height: 10px; border-radius: 50%; background: #ffffff22; }
.device-bar span:first-child { background: #ff5f57; } .device-bar span:nth-child(2) { background: #febc2e; } .device-bar span:nth-child(3) { background: #28c840; }
.bubble { align-self: flex-end; max-width: 88%; padding: 12px 16px; border-radius: 18px 18px 6px 18px; background: linear-gradient(135deg, var(--pink), var(--violet)); color: white; font-weight: 600; font-size: 15px; line-height: 1.35; min-height: 46px; }
.bubble b { margin-right: 4px; }
.demo-steps { list-style: none; margin: 0; padding: 0 4px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); min-height: 86px; }
.demo-steps li { animation: pop .3s ease-out; }
.demo-steps li.ok { color: #9ff0c4; }
.demo-steps li.ok::before { content: "✓  "; color: var(--lime); }
.demo-steps li.run::before { content: "◌  "; }
.demo-screen { position: relative; flex: 1; min-height: 230px; border-radius: 16px; background: #07060c center / cover no-repeat; border: 1px solid #ffffff14; overflow: hidden; }
.demo-screen::after { content: ""; position: absolute; inset: 0; transition: opacity .6s;
  background: linear-gradient(110deg, #0b0915 30%, #1d1636 45%, #2a1f52 50%, #1d1636 55%, #0b0915 70%) 0 0 / 250% 100%, #0b0915; animation: sheen 1.6s linear infinite; }
@keyframes sheen { from { background-position: 100% 0; } to { background-position: -150% 0; } }
.demo-screen.shown::after { opacity: 0; }
.demo-chip { position: absolute; left: 12px; bottom: 12px; z-index: 1; padding: 7px 12px; border-radius: 999px; background: #0b2a1fee; color: #6dffb0; font-weight: 700; font-size: 13px; opacity: 0; transform: translateY(6px); transition: .4s .3s; }
.demo-screen.shown .demo-chip { opacity: 1; transform: none; }
.sticker { position: absolute; padding: 8px 14px; border-radius: 12px; font-weight: 900; font-size: 14px; color: #120c1f; box-shadow: 0 8px 0 #0006, 0 0 0 3px #0b0915; text-transform: lowercase; animation: bob 4s ease-in-out infinite; }
.s1 { background: var(--lime); top: -14px; left: -18px; transform: rotate(-8deg); }
.s2 { background: var(--yellow); top: 42%; right: -22px; transform: rotate(7deg); animation-delay: -1.3s; }
.s3 { background: var(--cyan); bottom: -12px; left: 22%; transform: rotate(-4deg); animation-delay: -2.6s; }
@keyframes bob { 50% { translate: 0 -6px; } }

/* ---------- Marquee ---------- */
.marquee { overflow: hidden; padding: 26px 0; mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee-track { display: flex; gap: 14px; width: max-content; animation: scroll 60s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes scroll { to { transform: translateX(-50%); } }
.mq { position: relative; width: 260px; aspect-ratio: 1200 / 630; border-radius: 16px; background: #07060c center / cover; border: 1px solid #ffffff1a; overflow: hidden; flex: none; }
.mq span { position: absolute; left: 8px; right: 8px; bottom: 8px; padding: 6px 10px; border-radius: 10px; background: #0b0915d9; font-size: 12px; color: #ddd8f7; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; backdrop-filter: blur(4px); }

/* ---------- Sections ---------- */
.section { max-width: 1240px; margin: 0 auto; padding: 72px 24px; }
.section-head { margin-bottom: 32px; }
.section h2, .final h2 { font-size: clamp(34px, 4.6vw, 60px); line-height: 1; letter-spacing: -0.04em; font-weight: 900; margin: 0 0 12px; }
.section-head p { color: var(--muted); margin: 0; font-size: 17px; }

/* Said → played cards */
.said-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(212px, 1fr)); gap: 20px 18px; }
.said { position: relative; display: flex; flex-direction: column; gap: 12px; padding: 0; background: none; border: 0; color: inherit; text-align: left; cursor: pointer; font: inherit; text-decoration: none; }
.said .q { position: relative; align-self: flex-start; max-width: 94%; padding: 11px 15px; border-radius: 18px 18px 18px 6px; background: #f4f1ff; color: #1a1430; font-weight: 600; font-size: 14.5px; line-height: 1.35; box-shadow: 0 8px 24px #0006; transition: transform .2s; }
.said .q::before { content: "🎙 "; }
.said .shot { margin-top: auto; position: relative; aspect-ratio: 1200 / 630; border-radius: 18px; background: #07060c center / cover; border: 1px solid #ffffff1c; overflow: hidden; transition: transform .25s, box-shadow .25s, border-color .25s; }
.said .shot::after { content: "▶"; position: absolute; inset: 0; margin: auto; width: 56px; height: 56px; display: grid; place-items: center; border-radius: 50%; background: var(--lime); color: #120c1f; font-size: 20px; opacity: 0; transform: scale(.8); transition: .2s; }
.said:hover .shot { transform: translateY(-4px) rotate(-.6deg); border-color: var(--lime); box-shadow: 0 24px 60px #0009, 0 0 0 4px #c6ff3d22; }
.said:hover .shot::after { opacity: 1; transform: none; }
.said:hover .q { transform: rotate(-1.2deg); }
.said .meta { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 0 4px; }
.said h3 { margin: 0; font-size: 17px; font-weight: 800; }
.said .meta span { color: var(--muted); font-size: 13px; }

/* How it works */
.steps3 { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.steps3 li { position: relative; padding: 28px; border-radius: 24px; background: var(--glass); border: 1px solid var(--glass-line); overflow: hidden; }
.steps3 .n { display: block; font-size: 64px; font-weight: 900; line-height: 1; letter-spacing: -0.06em; background: linear-gradient(135deg, var(--lime), var(--cyan)); -webkit-background-clip: text; background-clip: text; color: transparent; margin-bottom: 10px; }
.steps3 li:nth-child(2) .n { background-image: linear-gradient(135deg, var(--yellow), var(--pink)); }
.steps3 li:nth-child(3) .n { background-image: linear-gradient(135deg, var(--pink), var(--violet)); }
.steps3 h3 { margin: 0 0 8px; font-size: 22px; font-weight: 800; }
.steps3 p { margin: 0 0 20px; color: #bdb6dc; line-height: 1.5; }
.mini { height: 84px; border-radius: 16px; background: #0b0915; border: 1px solid #ffffff14; display: flex; align-items: center; justify-content: center; gap: 5px; font-size: 13px; }
.mini-say span { width: 6px; border-radius: 3px; background: linear-gradient(var(--pink), var(--violet)); animation: wave 1s ease-in-out infinite; }
.mini-say span:nth-child(odd) { animation-delay: -.4s; } .mini-say span:nth-child(3n) { animation-delay: -.7s; }
@keyframes wave { 0%, 100% { height: 10px; } 50% { height: 46px; } }
.mini-build { flex-direction: column; align-items: flex-start; padding: 0 18px; gap: 3px; }
.mini-build i { font-style: normal; color: #9ff0c4; } .mini-build i.run { color: var(--muted); animation: fade 1.2s ease-in-out infinite alternate; }
@keyframes fade { to { opacity: .35; } }
.mini-share { justify-content: space-between; padding: 0 10px 0 18px; color: #d9d4f5; font-family: ui-monospace, Menlo, monospace; }
.mini-share b { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--lime); color: #120c1f; }

/* Keep talking */
.talk { display: grid; grid-template-columns: .9fr 1.1fr; gap: 56px; align-items: center; }
.talk-copy p { color: #bdb6dc; font-size: 18px; line-height: 1.5; max-width: 440px; }
.chat-demo { display: flex; flex-direction: column; gap: 10px; padding: 26px; border-radius: 28px; background: var(--glass); border: 1px solid var(--glass-line); }
.c { margin: 0; max-width: 80%; padding: 11px 16px; border-radius: 18px; font-size: 15px; line-height: 1.4; opacity: 0; transform: translateY(10px); transition: .45s; }
.c.u { align-self: flex-end; background: linear-gradient(135deg, var(--pink), var(--violet)); color: white; font-weight: 600; border-bottom-right-radius: 6px; }
.c.u::before { content: "🎙 "; }
.c.a { align-self: flex-start; background: #221a3f; border-bottom-left-radius: 6px; color: #e3def9; }
.chat-demo.in .c { opacity: 1; transform: none; }
.chat-demo.in .c:nth-child(2) { transition-delay: .5s; } .chat-demo.in .c:nth-child(3) { transition-delay: 1.1s; }
.chat-demo.in .c:nth-child(4) { transition-delay: 1.6s; } .chat-demo.in .c:nth-child(5) { transition-delay: 2.2s; } .chat-demo.in .c:nth-child(6) { transition-delay: 2.7s; }
.typing { display: flex; gap: 5px; padding: 16px 18px !important; }
.typing span { width: 7px; height: 7px; border-radius: 50%; background: #a49dc8; animation: fade .6s infinite alternate; }
.typing span:nth-child(2) { animation-delay: .2s; } .typing span:nth-child(3) { animation-delay: .4s; }

/* Features */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; border-radius: 28px; overflow: hidden; background: #ffffff1a; border: 1px solid #ffffff1a; }
.feat { padding: 30px; background: #110d1f; transition: background .2s; }
.feat:hover { background: #18122c; }
.feat > span { font-size: 30px; }
.feat h3 { margin: 12px 0 6px; font-size: 19px; font-weight: 800; }
.feat p { margin: 0; color: #a9a2cb; line-height: 1.5; font-size: 15px; }

/* FAQ */
.faq { max-width: 820px; }
.faq details { border-bottom: 1px solid #ffffff1c; padding: 18px 4px; }
.faq summary { cursor: pointer; font-size: 19px; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::after { content: "+"; color: var(--lime); font-size: 24px; line-height: 1; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: #bdb6dc; line-height: 1.6; margin: 12px 0 0; }

/* Final CTA */
.final { text-align: center; padding: 100px 24px 120px; background: radial-gradient(600px 300px at 50% 60%, #8b5cff40, transparent 70%); }
.final h2 { max-width: 900px; margin: 0 auto 32px; }

/* Dialogs */
.join { display: grid; gap: 4px; }
.join h3 { margin: 0 0 12px; font-size: 20px; }
.join #join-code { padding: 14px 16px; border-radius: 14px; border: 1px solid #ffffff26; background: #0b0915; outline: none; text-transform: uppercase; letter-spacing: 2px; font-size: 17px; color: var(--text); }
.join #join-code:focus { border-color: var(--lime); }
.play-dialog { width: min(1100px, 96vw); padding: 0; overflow: hidden; background: #0b0915; }
.play-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid #ffffff1a; }
.play-head h3 { margin: 0; font-size: 18px; }
.play-head p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.play-actions { display: flex; gap: 8px; align-items: center; }
.play-actions .go { padding: 10px 16px; font-size: 14px; }
.play-box { position: relative; background: #000; }
.play-box:fullscreen { width: 100vw; height: 100vh; }
#play-frame { display: block; width: 100%; aspect-ratio: 16 / 9; max-height: 78vh; border: 0; background: #000; touch-action: none; }
.play-box:fullscreen #play-frame { height: 100%; max-height: none; aspect-ratio: auto; }
/* Phones: the game opens full screen, controls in one slim bar on top. */
@media (max-width: 640px), (max-height: 500px) {
  .play-dialog[open] { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; border: 0; border-radius: 0; display: flex; flex-direction: column; padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
  .play-head { padding: 8px 10px; gap: 8px; }
  .play-head p { display: none; }
  .play-head h3 { font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .play-head > div:first-child { min-width: 0; }
  .play-actions { gap: 6px; flex-shrink: 0; }
  .play-actions .go, .play-actions .ghost { padding: 8px 12px; font-size: 13px; }
  .play-box { flex: 1; min-height: 0; }
  #play-frame { height: 100%; max-height: none; aspect-ratio: auto; }
}

/* Sticky mobile CTA */
.sticky-cta { display: none; }

/* Scroll reveal */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s, transform .7s; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Mobile ---------- */
@media (max-width: 960px) {
  .top-links { display: none; }
  .hero { grid-template-columns: 1fr; gap: 40px; padding-top: 32px; }
  .device { transform: none; min-height: 400px; }
  .steps3, .features { grid-template-columns: 1fr; }
  .talk { grid-template-columns: 1fr; gap: 24px; }
  .section { padding: 56px 20px; }
  .sticky-cta { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 30; display: block; transform: translateY(140%); transition: transform .3s; }
  .sticky-cta.show { transform: none; }
  .sticky-cta .go { width: 100%; padding: 16px; font-size: 17px; box-shadow: 0 10px 40px #000c; }
  body:has(#studio:not([hidden])) .sticky-cta { display: none; }
}
@media (max-width: 560px) {
  .composer-xl { border-radius: 26px; flex-wrap: wrap; padding: 10px; }
  .composer-xl input { order: -1; flex-basis: 100%; padding: 8px 10px 4px; }
  .composer-xl .go { flex: 1; }
  .wl-row { flex-direction: column; }
  .s2 { right: -6px; }
  .top-right .toggle span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal, .c { opacity: 1 !important; transform: none !important; }
}
#home-form.composer-xl { margin: 0; }
body:has(#home:not([hidden])) .top-right .toggle { display: none; }
