/*
 * Chroma Roll landing page (layout: chroma_roll). HardArtcore casual style, Apricot theme like the game: apricot-to-cream
 * gradient + icon wallpaper with slate text on it (the backdrop is light),
 * Nunito, white cards with slate-tinted drops, one saffron highlighter. Same structure as blocks-blaster.css.
 * Everything is scoped under .cr.
 */

@font-face { font-family: Nunito; font-weight: 400; font-display: swap; src: url(../fonts/Nunito-Regular.ttf) format("truetype"); }
@font-face { font-family: Nunito; font-weight: 700; font-display: swap; src: url(../fonts/Nunito-Bold.ttf) format("truetype"); }

.layout-chroma_roll { overflow-x: hidden; background: #FFFAF4; }

.cr {
    --cr-primary: #E76F51;
    --cr-deep: #264653;
    --cr-muted: #6B7F86;
    --cr-alt: #FBEFE3;
    --cr-empty: #F3E4D6;
    --cr-gold: #E9C46A;
    --cr-coin: #FFC233;
    --cr-shadow: 0 24px 50px rgba(38, 70, 83, .16);
    --cr-grad: linear-gradient(180deg, #F4A261 0%, #F7B98A 45%, #FBDCC0 100%);

    font-family: Nunito, system-ui, sans-serif;
    color: var(--cr-deep);
    padding-bottom: 6rem; /* room for the fixed navigation bar */
}

.cr *, .cr *::before, .cr *::after { box-sizing: border-box; }
.cr ::selection { color: #fff; background: var(--cr-primary); }
.cr h1, .cr h2, .cr h3 { font-family: inherit; font-weight: 700; color: inherit; letter-spacing: -.02em; text-transform: none; margin: 0; }
.cr p { margin: 0; }
.cr ul { list-style: none; margin: 0; padding: 0; }
.cr svg { width: 1em; height: 1em; flex: none; }

.cr-wrap { max-width: 1160px; margin: 0 auto; padding: 0 1.25rem; }
.cr-bleed { position: relative; width: 100vw; margin-left: calc(50% - 50vw); overflow: hidden; }
.cr-section { padding-top: 6rem; }

/* Faint paint-icon wallpaper, the same tile as the store art */
.cr-pattern { position: absolute; inset: 0; background: var(--cr-pattern) 0 0 / 420px auto repeat; opacity: .12; pointer-events: none; }

/* Highlight, chips, buttons */
.cr-hl {
    display: inline-block; color: var(--cr-deep); background: var(--cr-gold); padding: 0 .28em .06em;
    border-radius: .22em; transform: rotate(-2deg); text-shadow: none;
}
.cr-chip {
    display: inline-flex; align-items: center; gap: .45rem; padding: .35rem .85rem; border-radius: 999px;
    background: var(--cr-alt); color: var(--cr-primary); font-weight: 700; font-size: .9rem; white-space: nowrap;
}
.cr-muted { color: var(--cr-muted); font-weight: 700; font-size: .9rem; }

.cr-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .6rem; padding: .95rem 1.6rem; border-radius: 999px;
    font: 700 1.05rem/1 Nunito, sans-serif; text-decoration: none; border: 0; cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.cr-btn svg { width: 1.3em; height: 1.3em; }
a.cr-btn:hover, button.cr-btn:hover { transform: translateY(-2px); }
.cr-btn:active { transform: scale(.97); }
.cr-btn:focus-visible, .cr-demo:focus-visible { outline: 3px solid var(--cr-gold); outline-offset: 3px; }
.cr-btn-play { background: var(--cr-primary); color: #fff; box-shadow: 0 6px 0 #C4553A, 0 14px 30px rgba(38, 70, 83, .35); }
.cr-btn-play:hover { color: #fff; }
.cr-btn-ghost { background: rgba(255, 255, 255, .92); color: var(--cr-deep); box-shadow: 0 6px 0 rgba(0, 0, 0, .15); }
.cr-btn-ghost:hover { color: var(--cr-deep); background: #fff; }
.cr-btn-soft { background: var(--cr-alt); color: var(--cr-primary); padding: .75rem 1.2rem; box-shadow: 0 5px 0 #F6DCC4; }
.cr-actions { display: flex; flex-wrap: wrap; gap: .8rem; }

.cr-card { background: #fff; border-radius: 32px; box-shadow: var(--cr-shadow); padding: 1.75rem; position: relative; }

/* A painted tile: a face with a soft gloss over a darker ledge */
.cr-cell.on, .cr-mini i.on {
    background: linear-gradient(180deg, color-mix(in srgb, var(--c) 86%, #fff) 0%, var(--c) 60%);
    box-shadow: inset 0 -.32em 0 color-mix(in srgb, var(--c) 78%, #000);
}

.cr-stars { display: flex; justify-content: center; gap: .3rem; }
.cr-stars svg { width: 2.6rem; height: 2.6rem; }

/* ---- Hero ------------------------------------------------------------- */

.cr-hero { background: var(--cr-grad); border-radius: 0 0 48px 48px; padding: 2rem 0 5rem; color: var(--cr-deep); }
.cr-hero-grid { position: relative; display: grid; grid-template-columns: 1.05fr .95fr; gap: 3rem; align-items: center; }
.cr-crumbs { font-size: .85rem; opacity: .85; margin-bottom: 2.2rem; }
.cr-crumbs a { color: inherit; text-decoration: none; }
.cr-crumbs a:hover { text-decoration: underline; color: inherit; }
.cr-crumbs span { margin: 0 .45rem; opacity: .7; }
.cr-brand { display: flex; align-items: center; gap: .9rem; font-size: 1.6rem; font-weight: 700; margin-bottom: 1.5rem; }
.cr-brand span { opacity: .85; font-weight: 400; }
.cr-brand img { width: 88px; height: 88px; border-radius: 24px; box-shadow: 0 10px 24px rgba(38, 70, 83, .3); transform: rotate(-4deg); }
.cr-hero h1 { font-size: clamp(2.8rem, 6.4vw, 5rem); line-height: 1.05; }
.cr-lead { font-size: 1.3rem; line-height: 1.45; max-width: 32rem; margin: 1.5rem 0 2rem !important; opacity: .95; }
.cr-chips { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.8rem !important; }
.cr-chips li {
    display: inline-flex; align-items: center; gap: .45rem; padding: .45rem .95rem; border-radius: 999px;
    background: rgba(255, 255, 255, .94); color: var(--cr-deep); font-weight: 700; font-size: .92rem;
}
.cr-chips svg { width: 1.2rem; height: 1.2rem; color: var(--cr-primary); }

/* ---- Playable level ----------------------------------------------------- */

.cr-hero-demo { position: relative; max-width: 420px; width: 100%; justify-self: center; }
.cr-demo { color: var(--cr-deep); transform: rotate(1.5deg); user-select: none; -webkit-user-select: none; }
.cr-demo-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.cr-target {
    display: grid; grid-template-columns: repeat(4, 14px); gap: 3px; padding: 8px; border-radius: 16px;
    background: var(--cr-alt); transform: rotate(-3deg);
}
.cr-target i { height: 14px; border-radius: 4px; background: #fff; }
.cr-score { text-align: right; line-height: 1; }
.cr-score small { display: block; font-size: .75rem; font-weight: 700; letter-spacing: .08em; color: var(--cr-muted); }
.cr-score b { font-size: 2.2rem; }
.cr-score span { display: block; font-size: .85rem; font-weight: 700; color: var(--cr-muted); margin-top: .2rem; }
.cr-board {
    position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 10px; aspect-ratio: 1;
    background: var(--cr-alt); border-radius: 24px; touch-action: none;
}
.cr-cell { border-radius: 22%; background: #fff; font-size: 11px; cursor: pointer; position: relative; transition: background .12s ease; }
.cr-cell.wrong { animation: cr-shake .4s ease; }
.cr-cell.wrong::after { content: ""; position: absolute; inset: 30%; border-radius: 50%; border: 4px solid #E5484D; }
/* A paint bucket: a round blob of paint on the square */
.cr-cell.bucket::before {
    content: ""; position: absolute; inset: 24%; border-radius: 50%; background: var(--c);
    box-shadow: inset 0 -.5em 0 color-mix(in srgb, var(--c) 75%, #000);
}
/* The cube: a rounded block with a ledge and a thin rounded line inside its edge, like the game; cream until it picks up paint */
.cr-cube {
    position: absolute; z-index: 2; pointer-events: none;
    width: calc((100% - 38px) / 4); height: calc((100% - 38px) / 4);
    left: calc(10px + var(--col) * (100% - 14px) / 4); top: calc(10px + var(--r) * (100% - 14px) / 4);
    border-radius: 30%; background: linear-gradient(180deg, color-mix(in srgb, var(--c) 80%, #fff), var(--c) 70%);
    box-shadow: 0 8px 0 color-mix(in srgb, var(--c) 72%, #000), 0 16px 18px rgba(38, 70, 83, .3);
    translate: 0 -8px; transition: left .16s ease, top .16s ease, background .2s ease;
}
.cr-cube::before { content: ""; position: absolute; inset: 9%; border-radius: 24%; border: 2px solid rgba(0, 0, 0, .14); }
.cr-cube.blank { --c: #FBE9D6; }
.cr-cube.roll { animation: cr-roll .2s ease; }
.cr-banner {
    position: absolute; left: 50%; bottom: 12%; z-index: 3; translate: -50% 0; padding: .5rem 1.1rem .6rem; border-radius: 999px;
    background: var(--cr-deep); color: var(--cr-gold); font-size: 1rem; font-weight: 700; white-space: nowrap; pointer-events: none;
    animation: cr-banner 1.8s ease both;
}
.cr-tools { display: flex; justify-content: center; gap: .7rem; margin-top: 1.2rem; }
.cr-demo-hint { text-align: center; margin-top: 1.4rem !important; font-weight: 700; opacity: .95; }
.cr-over { text-align: center; padding: 1rem 0 .5rem; }
.cr-over-title { font-size: 2rem; font-weight: 700; margin: .4rem 0 .3rem !important; }
.cr-over .cr-muted { margin-bottom: 1.2rem !important; line-height: 1.45; }
.cr-over .cr-actions { justify-content: center; }

/* ---- Section headers ---------------------------------------------------- */

.cr-head { text-align: center; max-width: 46rem; margin: 0 auto 3rem; }
.cr-head h2, .cr-copy h2, .cr-cta h2 { font-size: clamp(2.2rem, 4.6vw, 3.4rem); line-height: 1.1; }
.cr-head p, .cr-copy p { font-size: 1.2rem; line-height: 1.5; margin-top: 1rem !important; color: var(--cr-muted); }
.cr-head-light { color: var(--cr-deep); }
.cr-head-light p { color: var(--cr-deep); opacity: .85; }

/* ---- How it works ------------------------------------------------------- */

.cr-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.cr-step { padding: 2rem; text-align: center; }
.cr-step:nth-child(2) { transform: translateY(1.5rem); }
.cr-step-n {
    position: absolute; top: -16px; left: -10px; width: 44px; height: 44px; border-radius: 50%; background: var(--cr-gold);
    display: grid; place-items: center; font-weight: 700; font-size: 1.2rem; transform: rotate(-8deg);
}
.cr-step > div { height: 132px; display: grid; place-content: center; margin-bottom: 1.2rem; }
.cr-step h3, .cr-perk h3 { font-size: 1.5rem; margin-bottom: .6rem; }
.cr-step p, .cr-perk p { color: var(--cr-muted); font-size: 1.05rem; line-height: 1.5; }
.cr-mini { display: grid !important; grid-template-columns: repeat(5, 26px); gap: 5px; justify-content: center; padding: 8px; background: var(--cr-alt); border-radius: 16px; }
.cr-mini i { height: 26px; border-radius: 22%; background: #fff; font-size: 6px; position: relative; }
.cr-mini i.bucket::before { content: ""; position: absolute; inset: 22%; border-radius: 50%; background: var(--c); }
.cr-mini i.cube { background: var(--c); border-radius: 30%; translate: 0 -4px; box-shadow: 0 4px 0 color-mix(in srgb, var(--c) 72%, #000); }

/* ---- Chapters ----------------------------------------------------------- */

.cr-modes { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1.1rem; }
.cr-mode {
    display: flex; flex-direction: column; align-items: center; gap: .7rem; padding: 1.6rem 1rem; background: #fff; border-radius: 28px;
    box-shadow: 0 14px 30px rgba(38, 70, 83, .1); text-align: center; transition: transform .2s ease, box-shadow .2s ease;
}
.cr-mode:hover { transform: translateY(-4px) rotate(-1deg); box-shadow: 0 20px 40px rgba(38, 70, 83, .16); }
.cr-mode-ico { width: 64px; height: 64px; border-radius: 22px; display: grid; place-items: center; color: #fff; background: var(--c); box-shadow: 0 5px 0 color-mix(in srgb, var(--c) 75%, #000); }
.cr-mode-ico svg { width: 34px; height: 34px; }
.cr-mode b { font-size: 1.2rem; }
.cr-mode > span:last-child { color: var(--cr-muted); font-size: .95rem; line-height: 1.4; }

/* ---- Split sections (zen / survival) ----------------------------------- */

.cr-split { display: grid; grid-template-columns: .9fr 1.1fr; gap: 4rem; align-items: center; }
.cr-stack { display: flex; flex-direction: column; gap: 1.4rem; max-width: 480px; width: 100%; justify-self: center; }
.cr-stack > .cr-card { transform: rotate(var(--r, 0)) translateX(var(--x, 0)); }
.cr-mode-card { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: .4rem 1.1rem; }
.cr-mode-card .cr-perk-ico { margin: 0; grid-row: span 2; }
.cr-mode-card b { font-size: 1.5rem; }
.cr-mode-card p { color: var(--cr-muted); line-height: 1.4; }
.cr-mode-card .cr-chip { justify-self: start; }
.cr-survival { background: var(--cr-primary); color: #fff; }
.cr-survival p { color: #fff; opacity: .92; }
.cr-survival .cr-perk-ico { background: rgba(255, 255, 255, .22); color: #fff; }
.cr-survival .cr-chip { background: #fff; color: var(--cr-primary); }

/* ---- Screenshots -------------------------------------------------------- */

.cr-gallery { background: var(--cr-grad); margin-top: 7rem; padding: 5rem 0 4rem; border-radius: 48px; }
.cr-gallery .cr-head { position: relative; margin-bottom: 2.5rem; }
.cr-shots {
    position: relative; display: flex; gap: 1.4rem; overflow-x: auto; scroll-snap-type: x mandatory;
    padding: 1rem max(1.25rem, calc((100vw - 1160px) / 2 + 1.25rem)) 2rem; scrollbar-width: thin;
}
.cr-shots a { flex: none; scroll-snap-align: center; }
.cr-shots img { display: block; width: 240px; height: auto; border-radius: 26px; box-shadow: 0 20px 40px rgba(38, 70, 83, .3); transition: transform .2s ease; }
.cr-shots a:nth-child(odd) img { transform: rotate(-1.5deg); }
.cr-shots a:nth-child(even) img { transform: rotate(1.5deg) translateY(14px); }
.cr-shots a:hover img { transform: rotate(0) translateY(-6px) scale(1.03); }

/* ---- Perks -------------------------------------------------------------- */

.cr-perks { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.3rem; }
.cr-perk { padding: 1.7rem; }
.cr-perk-ico { width: 60px; height: 60px; border-radius: 50%; background: var(--cr-alt); color: var(--cr-primary); display: grid; place-items: center; margin-bottom: 1.1rem; }
.cr-perk-ico svg { width: 32px; height: 32px; }

/* ---- Final call to action ---------------------------------------------- */

.cr-cta {
    position: relative; overflow: hidden; text-align: center; color: var(--cr-deep); background: var(--cr-grad);
    border-radius: 48px; padding: 4rem 1.5rem; box-shadow: var(--cr-shadow);
}
.cr-cta > *:not(.cr-pattern) { position: relative; }
.cr-cta img { width: 96px; height: 96px; border-radius: 26px; box-shadow: 0 14px 30px rgba(38, 70, 83, .3); margin-bottom: 1.5rem; }
.cr-cta > p { font-size: 1.25rem; margin: 1rem 0 2rem !important; }
.cr-cta-links { display: flex; justify-content: center; gap: 1.5rem; margin-top: 1.8rem !important; font-size: .95rem; }
.cr-cta-links a { color: var(--cr-deep); opacity: .85; }
.cr-cta-links a:hover { color: var(--cr-deep); opacity: 1; }

/* ---- Motion ------------------------------------------------------------- */

.cr-anim .cr-reveal { opacity: 0; translate: 0 28px; transition: opacity .6s ease, translate .6s ease; transition-delay: calc(var(--d, 0) * 80ms); }
.cr-anim .cr-reveal.in { opacity: 1; translate: 0 0; }
.cr-demo.cr-in { animation: cr-in .35s cubic-bezier(.34, 1.56, .64, 1); }
@keyframes cr-in { from { scale: .92; opacity: .4; } }
@keyframes cr-roll { 50% { scale: 1.08 .9; } }
@keyframes cr-shake { 25% { translate: -4px 0; } 75% { translate: 4px 0; } }
@keyframes cr-banner { 0% { scale: .6; opacity: 0; } 12% { scale: 1.06; opacity: 1; } 20%, 85% { scale: 1; opacity: 1; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
    .cr *, .cr *::before { animation: none !important; transition: none !important; }
}

/* ---- Small screens ------------------------------------------------------ */

@media (max-width: 991px) {
    .cr-hero-grid, .cr-split { grid-template-columns: 1fr; gap: 3rem; }
    .cr-copy { text-align: center; }
    .cr-modes { grid-template-columns: repeat(3, 1fr); }
    .cr-steps { grid-template-columns: 1fr; gap: 2rem; max-width: 480px; margin: 0 auto; }
    .cr-step:nth-child(2) { transform: none; }
    .cr-perks { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
    .cr-section { padding-top: 4.5rem; }
    .cr-hero { border-radius: 0 0 32px 32px; }
    .cr-demo, .cr-stack > .cr-card { transform: none; }
    .cr-card { padding: 1.3rem; }
    .cr-modes { grid-template-columns: repeat(2, 1fr); gap: .8rem; }
    .cr-perks { grid-template-columns: 1fr; }
    .cr-shots img { width: 200px; }
    .cr-gallery, .cr-cta { border-radius: 32px; }
}
