/*
 * Cube Twist landing page (layout: cube_twist). HardArtcore casual style, Grape theme like the game (UiTheme hue 262):
 * grape-to-lavender gradient with white text at the top, Nunito, white cards with grape-tinted drops, one yellow highlighter.
 * Same structure as chroma-roll.css. Everything is scoped under .ct.
 */

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

.ct {
    --ct-primary: hsl(262 75% 48%);
    --ct-primary-dark: hsl(262 75% 36%);
    --ct-deep: hsl(262 60% 21%);
    --ct-muted: hsl(275 18% 45%);
    --ct-alt: hsl(262 75% 96%);
    --ct-gold: #FDD93D;
    --ct-shadow: 0 24px 50px hsl(262 60% 21% / .16);
    --ct-grad: linear-gradient(180deg, hsl(262 75% 48%) 0%, hsl(262 70% 58%) 42%, hsl(262 65% 73%) 79%, hsl(262 80% 90%) 100%);
    /* sticker colours of the hero cube (the store-art mark) */
    --ct-s-yellow: #FFD43B; --ct-s-green: #2FCB72; --ct-s-red: #FF5A4E; --ct-s-blue: #3D8BF2; --ct-s-orange: #FF9A2E; --ct-s-white: #F5F3FF;
    --ct-body: #221F38;

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

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

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

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

.ct-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;
}
.ct-btn svg { width: 1.3em; height: 1.3em; }
a.ct-btn:hover, button.ct-btn:hover { transform: translateY(-2px); }
.ct-btn:active { transform: scale(.97); }
.ct-btn:focus-visible { outline: 3px solid var(--ct-gold); outline-offset: 3px; }
.ct-btn-play { background: var(--ct-gold); color: var(--ct-deep); box-shadow: 0 6px 0 #C9A21A, 0 14px 30px hsl(262 60% 21% / .35); }
.ct-btn-play:hover { color: var(--ct-deep); }
.ct-btn-ghost { background: rgba(255, 255, 255, .16); color: #fff; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .55); }
.ct-btn-ghost:hover { color: #fff; background: rgba(255, 255, 255, .26); }
.ct-btn-soft { background: var(--ct-alt); color: var(--ct-primary); padding: .75rem 1.2rem; box-shadow: 0 5px 0 hsl(262 60% 88%); }
.ct-actions { display: flex; flex-wrap: wrap; gap: .8rem; }

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

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

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

/* ---- The 3D cube card -------------------------------------------------- */

.ct-hero-demo { position: relative; max-width: 420px; width: 100%; justify-self: center; }
.ct-demo { color: var(--ct-deep); transform: rotate(1.5deg); user-select: none; -webkit-user-select: none; }
.ct-demo-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.ct-stage { position: relative; height: 340px; cursor: grab; touch-action: none; perspective: 1100px; }
.ct-stage:active { cursor: grabbing; }
.ct-floor { position: absolute; left: 50%; top: 82%; width: 260px; height: 50px; margin-left: -130px; border-radius: 50%;
            background: radial-gradient(closest-side, hsl(262 60% 21% / .28), transparent); }
/* 27 cubies placed by JS (matrix3d); each face is a dark plastic body, the outer ones carry a sticker.
   --l (0..1) is the light on that face for the current view, set by JS every frame. */
.ct-scene { position: absolute; left: 50%; top: 50%; transform-style: preserve-3d; }
.ct-q { position: absolute; transform-style: preserve-3d; }
.ct-qf { position: absolute; width: 72px; height: 72px; margin: -36px 0 0 -36px; padding: 5px; border-radius: 9px;
         background: hsl(250 22% calc(6% + var(--l, .5) * 14%)); backface-visibility: hidden; }
.ct-qf i { display: block; position: relative; height: 100%; border-radius: 22%; background: var(--c); overflow: hidden;
           box-shadow: inset 0 -4px 0 rgb(0 0 0 / .14), inset 0 2px 0 rgb(255 255 255 / .35); }
.ct-qf i::after { content: ""; position: absolute; inset: 0;
                  background: linear-gradient(150deg, rgb(255 255 255 / calc(var(--l, .5) * .45)), transparent 48%),
                              rgb(16 8 40 / calc((1 - var(--l, .5)) * .62)); }
.ct-chip-lose { background: #FF5A4E; color: #fff; }
.ct-chip-lose b { color: #fff; }
.ct-chip-win { background: #2EB872; color: #fff; }
.ct-tools { display: flex; justify-content: center; gap: .7rem; }
.ct-demo-hint { text-align: center; margin-top: 1.4rem !important; font-weight: 700; opacity: .95; }

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

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

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

.ct-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.ct-step { padding: 2rem; text-align: center; }
.ct-step:nth-child(2) { transform: translateY(1.5rem); }
.ct-step-n {
    position: absolute; top: -16px; left: -10px; width: 44px; height: 44px; border-radius: 50%; background: var(--ct-gold);
    display: grid; place-items: center; font-weight: 700; font-size: 1.2rem; transform: rotate(-8deg);
}
.ct-step-ico { width: 104px; height: 104px; margin: .4rem auto 1.4rem; border-radius: 32px; display: grid; place-items: center;
               background: var(--ct-primary); color: #fff; box-shadow: 0 7px 0 var(--ct-primary-dark); transform: rotate(-4deg); }
.ct-step-ico svg { width: 58px; height: 58px; }
.ct-step h3, .ct-perk h3 { font-size: 1.5rem; margin-bottom: .6rem; }
.ct-step p, .ct-perk p { color: var(--ct-muted); font-size: 1.05rem; line-height: 1.5; }

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

.ct-modes { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1.1rem; }
.ct-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 hsl(262 60% 21% / .1); text-align: center; transition: transform .2s ease, box-shadow .2s ease;
}
.ct-mode:hover { transform: translateY(-4px) rotate(-1deg); box-shadow: 0 20px 40px hsl(262 60% 21% / .16); }
.ct-mode-ico { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--ct-primary);
               font-weight: 700; font-size: 1.35rem; box-shadow: 0 5px 0 var(--ct-primary-dark); }
.ct-mode-ico svg { width: 36px; height: 36px; }
.ct-mode b { font-size: 1.2rem; }
.ct-mode > span:last-child { color: var(--ct-muted); font-size: .95rem; line-height: 1.4; }

/* ---- Split section (challenge) ----------------------------------------- */

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

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

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

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

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

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

.ct-cta {
    position: relative; overflow: hidden; text-align: center; color: #fff; background: var(--ct-grad);
    border-radius: 48px; padding: 4rem 1.5rem; box-shadow: var(--ct-shadow);
}
.ct-cta img { width: 96px; height: 96px; border-radius: 26px; box-shadow: 0 14px 30px hsl(262 60% 21% / .35); margin-bottom: 1.5rem; }
.ct-cta > p { font-size: 1.25rem; margin: 1rem 0 2rem !important; }
.ct-cta-links { display: flex; justify-content: center; gap: 1.5rem; margin-top: 1.8rem !important; font-size: .95rem; }
.ct-cta-links a { color: var(--ct-deep); opacity: .85; }
.ct-cta-links a:hover { color: var(--ct-deep); opacity: 1; }

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

.ct-anim .ct-reveal { opacity: 0; translate: 0 28px; transition: opacity .6s ease, translate .6s ease; transition-delay: calc(var(--d, 0) * 80ms); }
.ct-anim .ct-reveal.in { opacity: 1; translate: 0 0; }
@media (prefers-reduced-motion: reduce) {
    .ct *, .ct *::before { animation: none !important; transition: none !important; }
}

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

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