/*
 * Blocks Blaster landing page (layout: blocks_blaster). Matches the game and its Play Store art:
 * blue sky gradient, Nunito, glossy block tiles with a darker ledge, gold highlight on the key words.
 * Same structure as words-puzzle.css. Everything is scoped under .bb.
 */

@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-blocks_blaster { overflow-x: hidden; background: #F3F7FF; }

.bb {
    --bb-primary: #2E6BF0;
    --bb-deep: #102A5C;
    --bb-muted: #6F7FA3;
    --bb-alt: #EAF2FF;
    --bb-empty: #E3ECFA;
    --bb-gold: #FFD24D;
    --bb-coin: #FFC233;
    --bb-coral: #FF7657;
    --bb-coral-text: #D9532F;
    --bb-orange: #FF9F43;
    --bb-green: #2EB872;
    --bb-shadow: 0 24px 50px rgba(16, 42, 92, .16);
    --bb-grad: linear-gradient(180deg, #2E6BF0 0%, #4A8DF8 45%, #8DBEFF 100%);

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

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

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

/* Faint tetromino wallpaper, the game's own background pattern */
.bb-pattern { position: absolute; inset: 0; background: var(--bb-pattern) 0 0 / 480px auto repeat; opacity: .12; pointer-events: none; }

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

.bb-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;
}
a.bb-btn:hover, button.bb-btn:hover { transform: translateY(-2px); }
.bb-btn:focus-visible, .bb-piece:focus-visible { outline: 3px solid var(--bb-gold); outline-offset: 3px; }
.bb-btn-play { background: var(--bb-deep); color: #fff; box-shadow: 0 6px 0 #081833, 0 14px 30px rgba(16, 42, 92, .35); }
.bb-btn-play:hover { color: #fff; }
.bb-btn-ghost { background: rgba(255, 255, 255, .9); color: var(--bb-deep); }
.bb-btn-ghost:hover { color: var(--bb-deep); background: #fff; }
.bb-btn-white { background: #fff; color: var(--bb-coral-text); width: 100%; margin-top: 1.4rem; box-shadow: 0 5px 0 rgba(0, 0, 0, .14); }
.bb-actions { display: flex; flex-wrap: wrap; gap: .8rem; }
.bb-pill { display: inline-flex; align-items: center; gap: .4rem; padding: .3rem .8rem; border-radius: 999px; background: rgba(255, 255, 255, .28); }

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

/* A block tile like the game's: a face with a soft gloss over a darker ledge */
.bb-tile, .bb-cell.on, .bb-cell.ghost {
    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);
}
.bb-tile { display: block; border-radius: 22%; font-size: 10px; }

.bb-stars { display: flex; justify-content: center; gap: .3rem; color: var(--bb-coin); }
.bb-stars svg { width: 2.4rem; height: 2.4rem; }

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

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

/* ---- Playable demo ------------------------------------------------------ */

.bb-hero-demo { position: relative; max-width: 440px; width: 100%; justify-self: center; }
.bb-demo { color: var(--bb-deep); transform: rotate(1.5deg); touch-action: none; user-select: none; -webkit-user-select: none; }
.bb-demo-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1rem; position: relative; }
.bb-score { text-align: right; line-height: 1; }
.bb-score small { display: block; font-size: .75rem; font-weight: 700; letter-spacing: .08em; color: var(--bb-muted); }
.bb-score b { font-size: 2rem; }
.bb-score b.punch { animation: bb-punch .25s ease; }
/* "+N" pill: pops tilted beside the score, rises and fades, like the game */
.bb-points {
    position: absolute; right: -.6rem; top: 2.6rem; z-index: 4; padding: .2rem .8rem .35rem; border-radius: 14px;
    background: #FFAC4B; color: #fff; font-size: 1.5rem; font-weight: 700; pointer-events: none;
    rotate: -8deg; box-shadow: 0 8px 18px rgba(16, 42, 92, .2); animation: bb-points 1.3s ease both;
}
.bb-board {
    position: relative; display: grid; grid-template-columns: repeat(8, 1fr); gap: 5px; padding: 10px;
    background: #fff; border-radius: 20px; box-shadow: inset 0 0 0 2px var(--bb-alt);
}
.bb-cell { aspect-ratio: 1; border-radius: 22%; background: var(--bb-empty); font-size: clamp(6px, 1.6vw, 10px); transition: background .12s ease; }
.bb-cell.ghost { opacity: .45; }
.bb-cell.line { filter: brightness(1.12); }
.bb-cell.burst { animation: bb-burst .35s ease both; }
.bb-banner {
    position: absolute; left: 50%; top: 32%; z-index: 3; translate: -50% 0; padding: .55rem 1.4rem .7rem; border-radius: 999px;
    background: var(--bb-deep); color: var(--bb-gold); font-size: 1.7rem; font-weight: 700; white-space: nowrap; pointer-events: none;
    animation: bb-banner 1.1s ease both;
}
.bb-tray { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; margin-top: 1rem; min-height: 6.5rem; background: var(--bb-alt); border-radius: 20px; padding: .6rem; }
.bb-piece { display: grid; place-content: center; border: 0; background: none; cursor: grab; padding: 0; border-radius: 14px; }
.bb-piece .bb-shape { display: grid; gap: 3px; }
.bb-piece .bb-tile { width: 18px; height: 18px; font-size: 6px; }
.bb-piece.used { visibility: hidden; }
.bb-piece.cant { opacity: .35; }
.bb-drag { position: fixed; z-index: 1000; pointer-events: none; display: grid; gap: 5px; filter: drop-shadow(0 10px 14px rgba(16, 42, 92, .3)); }
.bb-demo-hint { text-align: center; margin-top: 1.4rem !important; font-weight: 700; opacity: .95; }
.bb-over { text-align: center; padding: 1rem 0 .5rem; }
.bb-over-title { font-size: 2rem; font-weight: 700; margin-bottom: .3rem !important; }
.bb-over .bb-muted { margin-bottom: 1.2rem !important; line-height: 1.45; }
.bb-over .bb-actions { justify-content: center; }
.bb-over .bb-btn-ghost { background: var(--bb-alt); }

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

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

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

.bb-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.bb-step { padding: 2rem; text-align: center; }
.bb-step:nth-child(2) { transform: translateY(1.5rem); }
.bb-step-n {
    position: absolute; top: -16px; left: -10px; width: 44px; height: 44px; border-radius: 50%; background: var(--bb-gold);
    display: grid; place-items: center; font-weight: 700; font-size: 1.2rem; transform: rotate(-8deg);
}
.bb-step > div { height: 132px; display: grid; place-content: center; margin-bottom: 1.2rem; }
.bb-step h3, .bb-perk h3 { font-size: 1.6rem; margin-bottom: .6rem; }
.bb-step p, .bb-perk p { color: var(--bb-muted); font-size: 1.05rem; line-height: 1.5; }
.bb-mini { display: grid !important; grid-template-columns: repeat(5, 24px); gap: 4px; justify-content: center; }
.bb-mini i { height: 24px; border-radius: 22%; background: var(--bb-empty); font-size: 6px; }
.bb-mini i.on { background: linear-gradient(180deg, color-mix(in srgb, var(--c) 86%, #fff), var(--c) 60%); box-shadow: inset 0 -.32em 0 color-mix(in srgb, var(--c) 78%, #000); }
.bb-mini i.ghost { opacity: .45; }
.bb-mini i.gone { background: var(--bb-gold); opacity: .55; }
.bb-pop { display: inline-block; font-size: 2rem; font-weight: 700; color: var(--bb-gold); background: var(--bb-deep); border-radius: 999px; padding: .5rem 1.3rem .65rem; transform: rotate(-3deg); }

/* ---- Split sections (daily) ------------------------------------------- */

.bb-split { display: grid; grid-template-columns: .9fr 1.1fr; gap: 4rem; align-items: center; }
.bb-flip .bb-copy { order: 2; }
.bb-stack { display: flex; flex-direction: column; gap: 1.4rem; max-width: 480px; width: 100%; justify-self: center; }
.bb-stack > .bb-card { transform: rotate(var(--r, 0)) translateX(var(--x, 0)); }
.bb-daily { background: var(--bb-coral); color: #fff; }
.bb-daily-top { display: flex; justify-content: space-between; align-items: center; font-weight: 700; letter-spacing: .08em; font-size: .9rem; }
.bb-daily-top > span:first-child { display: inline-flex; align-items: center; gap: .45rem; }
.bb-daily-top svg { width: 1.2rem; height: 1.2rem; }
.bb-daily-title { font-size: 2.6rem; font-weight: 700; margin: .8rem 0 .2rem !important; }
.bb-week { display: flex; justify-content: space-between; margin-top: 1.2rem; }
.bb-week i { width: 2.4rem; height: 2.4rem; border-radius: 50%; background: rgba(255, 255, 255, .22); display: grid; place-items: center; font-style: normal; font-weight: 700; }
.bb-week i.on { background: #fff; color: var(--bb-coral); }
.bb-week i.today { background: rgba(255, 255, 255, .45); }
.bb-week svg { width: 1.2rem; height: 1.2rem; }
.bb-msg { display: flex; align-items: center; gap: 1rem; border-radius: 28px 28px 28px 8px; padding: 1.2rem 1.4rem; font-size: 1.05rem; line-height: 1.5; }

/* ---- Modes -------------------------------------------------------------- */

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

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

.bb-gallery { background: var(--bb-grad); margin-top: 7rem; padding: 5rem 0 4rem; border-radius: 48px; }
.bb-gallery .bb-head { position: relative; margin-bottom: 2.5rem; }
.bb-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;
}
.bb-shots a { flex: none; scroll-snap-align: center; }
.bb-shots img {
    display: block; width: 240px; height: auto; border-radius: 26px; box-shadow: 0 20px 40px rgba(16, 42, 92, .3);
    transition: transform .2s ease;
}
.bb-shots a:nth-child(odd) img { transform: rotate(-1.5deg); }
.bb-shots a:nth-child(even) img { transform: rotate(1.5deg) translateY(14px); }
.bb-shots a:hover img { transform: rotate(0) translateY(-6px) scale(1.03); }

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

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

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

.bb-cta {
    position: relative; overflow: hidden; text-align: center; color: #fff; background: var(--bb-grad);
    border-radius: 40px; padding: 4rem 1.5rem; box-shadow: var(--bb-shadow);
}
.bb-cta > *:not(.bb-pattern) { position: relative; }
.bb-cta img { width: 96px; height: 96px; border-radius: 26px; box-shadow: 0 14px 30px rgba(16, 42, 92, .3); margin-bottom: 1.5rem; }
.bb-cta h2 { text-shadow: 0 6px 24px rgba(16, 42, 92, .25); }
.bb-cta > p { font-size: 1.25rem; margin: 1rem 0 2rem !important; }
.bb-cta-links { display: flex; justify-content: center; gap: 1.5rem; margin-top: 1.8rem !important; font-size: .95rem; }
.bb-cta-links a { color: #fff; opacity: .9; }
.bb-cta-links a:hover { color: #fff; opacity: 1; }

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

.bb-anim .bb-reveal { opacity: 0; translate: 0 28px; transition: opacity .6s ease, translate .6s ease; transition-delay: calc(var(--d, 0) * 80ms); }
.bb-anim .bb-reveal.in { opacity: 1; translate: 0 0; }
.bb-demo.bb-in { animation: bb-in .35s ease; }
@keyframes bb-in { from { scale: .92; opacity: .4; } }
@keyframes bb-punch { 50% { scale: 1.18; } }
@keyframes bb-burst { 0% { scale: 1; } 40% { scale: 1.15; filter: brightness(1.4); } 100% { scale: 0; opacity: 0; } }
@keyframes bb-points {
    0% { scale: 0; opacity: 1; translate: 0 0; }
    27% { scale: 1.08; }
    35% { scale: 1; }
    54% { opacity: 1; translate: 0 0; }
    100% { opacity: 0; translate: 0 -40px; }
}
@keyframes bb-banner { 0% { scale: .6; opacity: 0; } 20% { scale: 1.06; opacity: 1; } 30%, 80% { scale: 1; opacity: 1; } 100% { scale: .9; opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
    .bb *, .bb *::before { animation: none !important; transition: none !important; }
    .bb-points, .bb-banner { display: none; }
}

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

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