/* riskyrolls.com — tokens mirror RiskyRolls/DesignSystem/RRColor.swift and RRFont.swift. */
@font-face { font-family: "Baloo 2"; src: url("/assets/fonts/Baloo2.woff2") format("woff2"); font-weight: 400 800; font-display: swap; }
@font-face { font-family: "Manrope"; src: url("/assets/fonts/Manrope.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }

:root {
    --cream: #FDFBF7;
    --cream-deep: #F5EFE4;
    --coral: #FF8A73;
    --coral-deep: #FF6B4A;
    --mint: #96E8C3;
    --mint-deep: #10B981;
    --gold: #CC801A;
    --gold-soft: #FFD694;
    --gold-tint: #FFF7EB;
    --gold-ink: #8A5A12;
    --lav: #DFD0FF;
    --lav-deep: #B9A3EA;
    --lav-tint: #F5F0FF;
    --lav-ink: #6B5BB0;
    --ink: #3D3A37;
    --stone: #7E7975;
    --hair: #E6E3DE;
    --white: #FFFFFF;
    --icon-top: #FFF5E1;
    --icon-bottom: #FFCAA6;
    --display: "Baloo 2", ui-rounded, system-ui, sans-serif;
    --body: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
    --radius: 24px;
    --gutter: 16px;
    color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--cream);
    color: var(--ink);
    font: 500 1rem/1.6 var(--body);
    overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--coral-deep); }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 800; line-height: 1.1; margin: 0; color: var(--ink); }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--lav-ink); outline-offset: 3px; border-radius: 8px; }

.wrap { width: min(1120px, 100% - 2 * var(--gutter)); margin-inline: auto; }
.narrow { width: min(760px, 100% - 2 * var(--gutter)); margin-inline: auto; }

/* Header */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: color-mix(in srgb, var(--cream) 88%, transparent);
    backdrop-filter: saturate(1.4) blur(14px);
    -webkit-backdrop-filter: saturate(1.4) blur(14px);
    border-bottom: 1px solid var(--hair);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand img { width: 40px; height: 40px; border-radius: 10px; box-shadow: 0 2px 0 var(--hair); }
.brand span { font: 800 1.35rem/1 var(--display); padding-top: 4px; }
.brand b { color: var(--coral-deep); font-weight: 800; }
.nav { display: flex; align-items: center; gap: 6px; }
.nav a { color: var(--stone); font-weight: 700; text-decoration: none; padding: 8px 10px; border-radius: 12px; font-size: .95rem; }
.nav a:hover { color: var(--ink); background: var(--cream-deep); }
.nav .nav-cta { white-space: nowrap; color: var(--white); background: var(--coral-deep); box-shadow: 0 4px 0 #D9502F; margin-left: 6px; }
.nav .nav-cta:hover { color: var(--white); background: var(--coral-deep); }
@media (max-width: 720px) { .nav a:not(.nav-cta) { display: none; } }

/* Candy buttons — ports CandyButtonStyle: flat face over a chunky bottom edge. */
.candy {
    --fill: var(--coral-deep); --edge: #D9502F; --label: var(--white);
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    min-height: 56px; padding: 10px 22px;
    background: var(--fill); color: var(--label);
    border: 0; border-radius: 20px;
    box-shadow: 0 6px 0 var(--edge);
    font: 800 1.1rem/1.1 var(--display); text-decoration: none; text-align: left;
    cursor: pointer; transition: transform .08s ease-out, box-shadow .08s ease-out;
}
.candy:hover { filter: brightness(1.03); }
.candy:active { transform: translateY(6px); box-shadow: 0 0 0 var(--edge); }
.candy small { display: block; font: 700 .72rem/1.2 var(--body); opacity: .9; letter-spacing: .02em; }
.candy svg { flex: none; width: 26px; height: 26px; }
.candy.mint { --fill: var(--mint); --edge: var(--mint-deep); --label: var(--ink); }
.candy.lav { --fill: var(--lav); --edge: var(--lav-deep); --label: var(--ink); }
.candy.gold { --fill: var(--gold-soft); --edge: var(--gold); --label: var(--ink); }
.candy.white { --fill: var(--white); --edge: var(--hair); --label: var(--ink); }
.candy[aria-disabled="true"] { --fill: var(--white); --edge: var(--hair); --label: var(--stone); cursor: default; }
.candy[aria-disabled="true"]:active { transform: none; box-shadow: 0 6px 0 var(--edge); }

.store-row { display: flex; flex-wrap: wrap; gap: 14px 16px; }
.store-row .candy { min-width: 220px; }

/* Hero */
.hero {
    position: relative; overflow: hidden;
    background: linear-gradient(180deg, var(--icon-top) 0%, var(--icon-bottom) 100%);
    padding: clamp(40px, 7vw, 88px) 0 clamp(56px, 8vw, 104px);
}
.hero .wrap { display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: clamp(24px, 5vw, 64px); }
.hero-copy { position: relative; z-index: 2; }
.hero-wordmark { width: min(420px, 90%); margin: -24px 0 -8px -18px; filter: drop-shadow(0 8px 0 rgba(138, 90, 18, .12)); }
.hero h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); letter-spacing: -.01em; margin-bottom: 14px; }
.hero h1 .c { color: var(--coral-deep); }
.hero-lede { font-size: clamp(1.05rem, 2vw, 1.25rem); max-width: 34ch; margin-bottom: 28px; color: #5A544F; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.chip { display: inline-flex; align-items: center; gap: 6px; background: rgba(255,255,255,.75); border: 1px solid rgba(255,255,255,.9); border-radius: 999px; padding: 6px 12px; font-weight: 700; font-size: .88rem; color: var(--ink); }
.chip .star { color: var(--gold); }
.hero-art { position: relative; display: grid; place-items: center; min-height: 420px; }
.hero-mascot { width: min(440px, 88%); position: relative; z-index: 2; animation: bob 3.6s ease-in-out infinite; filter: drop-shadow(0 18px 24px rgba(160, 80, 40, .22)); }
.hero-halo { position: absolute; inset: 8% 8%; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.95) 0%, rgba(255,255,255,0) 68%); }
.float { position: absolute; z-index: 3; width: clamp(64px, 9vw, 104px); filter: drop-shadow(0 8px 10px rgba(120, 60, 30, .18)); animation: bob 4.2s ease-in-out infinite; }
.float.f1 { top: 4%; left: 4%; animation-delay: -1s; }
.float.f2 { bottom: 6%; right: 2%; animation-delay: -2.2s; }
.float.f3 { bottom: 10%; left: 0; animation-delay: -3s; width: clamp(56px, 7vw, 84px); }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-12px) rotate(-2deg); } }
@media (prefers-reduced-motion: reduce) { .hero-mascot, .float { animation: none; } html { scroll-behavior: auto; } }
@media (max-width: 860px) {
    .hero .wrap { grid-template-columns: 1fr; text-align: center; }
    .hero-wordmark { margin: -16px auto -4px; }
    .hero-lede { margin-inline: auto; }
    .store-row, .chips { justify-content: center; }
    .hero-art { order: -1; min-height: 0; margin-top: -8px; }
    .hero-mascot { width: min(240px, 58%); }
    .hero-wordmark { width: min(300px, 78%); margin: -36px auto -20px; }
    .float { width: 56px; }
}
@media (max-width: 420px) {
    .site-header .wrap { min-height: 58px; }
    .brand span { font-size: 1.15rem; }
    .brand img { width: 34px; height: 34px; }
    .nav .nav-cta { padding: 7px 12px; font-size: .9rem; }
}
@media (max-width: 480px) { .store-row .candy { width: 100%; } }

/* Sections */
section { scroll-margin-top: 72px; }
.section { padding: clamp(56px, 8vw, 96px) 0; }
.section.alt { background: var(--white); border-block: 1px solid var(--hair); }
.eyebrow { font: 800 .8rem/1 var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--coral-deep); margin-bottom: 12px; }
.section-head { max-width: 640px; margin-bottom: clamp(28px, 4vw, 44px); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head h2 { font-size: clamp(2rem, 4.4vw, 3rem); margin-bottom: 10px; }
.section-head p { color: var(--stone); font-size: 1.08rem; }

/* Screenshots strip */
.shots { display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 8px var(--gutter) 28px; margin: 0 calc(-1 * var(--gutter)); scrollbar-width: thin; }
.shot { flex: none; width: clamp(220px, 24vw, 270px); scroll-snap-align: center; text-align: center; }
.phone { position: relative; border-radius: 40px; padding: 8px; background: var(--ink); box-shadow: 0 10px 0 rgba(61,58,55,.12), 0 24px 40px rgba(61,58,55,.16); }
.phone img { border-radius: 33px; width: 100%; aspect-ratio: 1206 / 2622; object-fit: cover; background: var(--cream-deep); }
.shot figcaption { margin-top: 18px; font: 800 1.1rem/1.2 var(--display); }
.shot figcaption span { display: block; font: 600 .88rem/1.4 var(--body); color: var(--stone); margin-top: 4px; }
@media (min-width: 1180px) { .shots { justify-content: center; flex-wrap: nowrap; } }

/* How to play */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; counter-reset: step; }
.step { background: var(--white); border: 1px solid var(--hair); border-radius: var(--radius); padding: 24px; box-shadow: 0 6px 0 var(--cream-deep); }
.section.alt .step { background: var(--cream); }
.step .num { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--coral); color: var(--white); font: 800 1.3rem/1 var(--display); padding-top: 3px; margin-bottom: 14px; box-shadow: 0 4px 0 var(--coral-deep); }
.step:nth-child(2) .num { background: var(--mint); color: var(--ink); box-shadow: 0 4px 0 var(--mint-deep); }
.step:nth-child(3) .num { background: var(--gold-soft); color: var(--ink); box-shadow: 0 4px 0 var(--gold); }
.step h3 { font-size: 1.45rem; margin-bottom: 6px; }
.step p { color: var(--stone); }
@media (max-width: 820px) { .steps { grid-template-columns: 1fr; } }

.scoring { margin-top: 28px; background: var(--white); border: 1px solid var(--hair); border-radius: var(--radius); overflow: hidden; }
.section.alt .scoring { background: var(--cream); }
.scoring summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 24px; font: 800 1.2rem/1.2 var(--display); }
.scoring summary::-webkit-details-marker { display: none; }
.scoring summary::after { content: "+"; font-size: 1.6rem; color: var(--coral-deep); line-height: 1; }
.scoring[open] summary::after { content: "–"; }
.score-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 0 28px; padding: 0 24px 22px; }
.score-row { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px dashed var(--hair); }
.score-row b { font-family: var(--display); font-weight: 800; color: var(--gold-ink); white-space: nowrap; }

/* Mode cards */
.modes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.mode { --tint: var(--coral); --edge: rgba(255,107,74,.18); background: var(--white); border: 1px solid var(--hair); border-radius: var(--radius); padding: 22px; box-shadow: 0 6px 0 var(--edge); display: flex; flex-direction: column; }
.mode.mint { --tint: var(--mint); --edge: rgba(16,185,129,.18); }
.mode.lav { --tint: var(--lav); --edge: rgba(185,163,234,.4); }
.mode.gold { --tint: var(--gold-soft); --edge: rgba(204,128,26,.18); }
.mode .art { width: 84px; height: 84px; border-radius: 20px; background: color-mix(in srgb, var(--tint) 28%, white); display: grid; place-items: center; margin-bottom: 16px; }
.mode .art img { width: 70px; }
.mode h3 { font-size: 1.5rem; margin-bottom: 4px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mode p { color: var(--stone); font-size: .98rem; }
.tag { font: 800 .66rem/1 var(--body); letter-spacing: .08em; text-transform: uppercase; padding: 5px 8px; border-radius: 999px; background: rgba(150,232,195,.35); color: #0B7F59; }
.tag.premium { background: var(--gold-tint); color: var(--gold-ink); border: 1px solid var(--gold-soft); }
@media (max-width: 980px) { .modes { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .modes { grid-template-columns: 1fr; } }

/* Feature bento */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 18px; }
.tile { position: relative; overflow: hidden; border-radius: var(--radius); padding: 26px; min-height: 240px; display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; border: 1px solid rgba(0,0,0,.04); }
.tile h3 { font-size: clamp(1.4rem, 2.4vw, 1.8rem); position: relative; z-index: 1; }
.tile p { color: #5A544F; position: relative; z-index: 1; max-width: 36ch; }
.tile img.tile-art { position: absolute; top: 14px; right: 14px; width: clamp(110px, 14vw, 150px); filter: drop-shadow(0 8px 10px rgba(0,0,0,.12)); }
.tile .tile-copy { padding-top: 110px; }
.t-span3 { grid-column: span 3; }
.t-span2 { grid-column: span 2; }
.t-span4 { grid-column: span 4; }
.bg-coral { background: linear-gradient(160deg, #FFE4DC, #FFC9BB); }
.bg-mint { background: linear-gradient(160deg, #E4FAF0, #BDF0D8); }
.bg-lav { background: linear-gradient(160deg, var(--lav-tint), var(--lav)); }
.bg-gold { background: linear-gradient(160deg, var(--gold-tint), var(--gold-soft)); }
.bg-cream { background: linear-gradient(160deg, var(--white), var(--cream-deep)); }
.bg-ink { background: linear-gradient(160deg, #4A4541, #2E2B29); }
.bg-ink h3, .bg-ink p { color: var(--cream); }
.worlds { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; position: relative; z-index: 1; }
.worlds span { font: 700 .78rem/1 var(--body); background: rgba(255,255,255,.7); padding: 6px 9px; border-radius: 999px; }
.dice-row { display: flex; gap: 10px; margin-bottom: 8px; position: relative; z-index: 1; }
.pip-die { width: 44px; height: 44px; border-radius: 11px; display: grid; grid-template: repeat(3, 1fr) / repeat(3, 1fr); padding: 7px; box-shadow: inset 0 -4px 0 rgba(0,0,0,.14), 0 3px 6px rgba(0,0,0,.12); }
.pip-die i { width: 8px; height: 8px; border-radius: 50%; place-self: center; }
@media (max-width: 900px) { .t-span2, .t-span3, .t-span4 { grid-column: span 3; } }
@media (max-width: 620px) { .bento { grid-template-columns: 1fr; } .t-span2, .t-span3, .t-span4 { grid-column: auto; } }

/* Invite band */
.invite { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: clamp(20px, 5vw, 56px); background: linear-gradient(135deg, var(--lav-tint), #FFE9E2); border-radius: 32px; padding: clamp(28px, 5vw, 56px); border: 1px solid var(--hair); }
.invite h2 { font-size: clamp(2rem, 4vw, 2.8rem); margin-bottom: 12px; }
.invite p { color: #5A544F; margin-bottom: 10px; }
.invite .fine { font-size: .88rem; color: var(--stone); }
@media (max-width: 820px) { .invite { grid-template-columns: 1fr; text-align: center; } .invite img { max-width: 360px; margin-inline: auto; order: -1; } }

/* Final CTA */
.cta { text-align: center; background: linear-gradient(180deg, var(--coral), var(--coral-deep)); color: var(--white); padding: clamp(56px, 8vw, 96px) 0; position: relative; overflow: hidden; }
.cta h2 { color: var(--white); font-size: clamp(2.2rem, 5vw, 3.4rem); margin-bottom: 10px; }
.cta p { opacity: .95; font-size: 1.1rem; margin-bottom: 30px; }
.cta .app-icon { width: 112px; margin: 0 auto 20px; border-radius: 26px; box-shadow: 0 8px 0 rgba(0,0,0,.12); }
.cta .store-row { justify-content: center; }
.cta .candy.white { --edge: #E0533A; }
.cta .candy[aria-disabled="true"] { --fill: rgba(255,255,255,.2); --edge: rgba(0,0,0,.12); --label: var(--white); }

/* FAQ */
.faq { display: grid; gap: 12px; }
.faq details { background: var(--white); border: 1px solid var(--hair); border-radius: 18px; padding: 0 20px; }
.faq summary { cursor: pointer; list-style: none; padding: 18px 0; font: 800 1.12rem/1.3 var(--display); display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--coral-deep); font-size: 1.4rem; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--stone); padding-bottom: 18px; }

/* Footer */
.site-footer { background: var(--cream-deep); padding: 40px 0 32px; color: var(--stone); font-size: .92rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px; align-items: flex-start; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.site-footer a { color: var(--ink); font-weight: 700; text-decoration: none; }
.site-footer a:hover { color: var(--coral-deep); }
.site-footer .brand img { width: 36px; height: 36px; }
.site-footer .small { margin-top: 10px; }

/* Legal pages */
.legal { padding: clamp(40px, 6vw, 72px) 0 clamp(56px, 8vw, 96px); }
.legal h1 { font-size: clamp(2.3rem, 5vw, 3.2rem); color: var(--coral-deep); }
.legal .last-updated { color: var(--stone); font-size: .95rem; margin: 6px 0 32px; }
.legal-section { margin-bottom: 28px; }
.legal-section h2 { font-size: 1.5rem; padding-bottom: 6px; margin-bottom: 10px; border-bottom: 3px solid var(--coral); display: inline-block; }
.legal-section p, .legal-section li { color: #5A544F; margin-bottom: 10px; }
.legal-section ul { padding-left: 1.3rem; margin: 0 0 12px; }
.contact-info, .faq-item { background: var(--white); border: 1px solid var(--hair); border-radius: 18px; padding: 16px 20px; margin: 12px 0; box-shadow: 0 4px 0 var(--cream-deep); }
.contact-info p, .faq-item p { margin-bottom: 4px; }
.faq-item h4 { font-size: 1.15rem; margin-bottom: 6px; }
.legal-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-top: 28px; }
.legal-card { display: block; text-decoration: none; background: var(--white); border: 1px solid var(--hair); border-radius: 20px; padding: 20px; color: var(--ink); box-shadow: 0 5px 0 var(--cream-deep); }
.legal-card h3 { color: var(--coral-deep); font-size: 1.3rem; margin-bottom: 4px; }
.legal-card p { color: var(--stone); font-size: .95rem; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--white); padding: 8px 12px; border-radius: 10px; }
.skip:focus { left: 8px; }
