:root {
    color-scheme: light;
    --ink: #17152b;
    --muted: #68657c;
    --purple: #7455ee;
    --blue: #3e8ef7;
    --cyan: #42d5dd;
    --cream: #fbfaff;
    --line: rgba(61, 48, 106, 0.12);
    --surface: #ffffff;
    --card: #fcfbff;
    --control: rgba(255, 255, 255, .75);
    --board: rgba(255, 255, 255, .62);
    --board-line: rgba(255, 255, 255, .85);
    --chip: rgba(255, 255, 255, .78);
    --chip-ink: #393254;
    --chip-line: rgba(255, 255, 255, .8);
    --store-ink: #ffffff;
    --store-background: #17152b;
}

@media (prefers-color-scheme: dark) {
    :root {
        color-scheme: dark;
        --ink: #f4f1ff;
        --muted: #bbb5ce;
        --purple: #aa91ff;
        --blue: #71adff;
        --cyan: #69e3e8;
        --cream: #12101f;
        --line: rgba(218, 208, 255, .15);
        --surface: #191626;
        --card: #211d31;
        --control: rgba(36, 31, 52, .85);
        --board: rgba(31, 27, 47, .72);
        --board-line: rgba(224, 215, 255, .15);
        --chip: rgba(35, 30, 52, .86);
        --chip-ink: #f0ebff;
        --chip-line: rgba(224, 215, 255, .18);
        --store-ink: #17152b;
        --store-background: #f4f1ff;
    }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    color: var(--ink);
    background:
        radial-gradient(circle at 88% 10%, rgba(86, 202, 239, .20), transparent 24rem),
        radial-gradient(circle at 10% 17%, rgba(159, 105, 245, .17), transparent 28rem),
        var(--cream);
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
.skip-link { position: fixed; top: 12px; left: 12px; z-index: 100; padding: 10px 14px; border-radius: 10px; color: var(--surface); background: var(--ink); font-weight: 700; text-decoration: none; transform: translateY(calc(-100% - 20px)); }
.skip-link:focus { transform: translateY(0); }
:where(a, select):focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.beta-banner { padding: 10px 20px; color: white; background: linear-gradient(90deg, #5e3ed3, #397fe5 55%, #168e9c); }
.beta-banner a { max-width: 1160px; margin: 0 auto; display: flex; align-items: center; justify-content: center; gap: 14px; text-align: center; text-decoration: none; font-size: .9rem; }
.beta-banner-badge { padding: 5px 9px; border: 1px solid rgba(255,255,255,.42); border-radius: 999px; background: rgba(255,255,255,.14); font-size: .7rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.beta-banner strong { white-space: nowrap; }
.beta-banner a:hover strong { text-decoration: underline; }
.site-header {
    width: min(1160px, calc(100% - 40px));
    margin: 0 auto;
    height: 88px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.brand { display: inline-flex; align-items: center; gap: 11px; font-weight: 750; text-decoration: none; font-size: 1.12rem; }
.brand img { display: block; border-radius: 10px; box-shadow: 0 5px 15px rgba(60, 42, 120, .18); }
.language-picker select { max-width: 12rem; padding: 9px 30px 9px 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); background: var(--control); font: inherit; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
[dir="rtl"] .copyright { margin-left: 0; margin-right: auto; }
[dir="rtl"] .puzzle-board { transform: rotate(3deg); }
[dir="rtl"] .skip-link { right: 12px; left: auto; }
[dir="rtl"] .beta-card ul { padding-right: 1.25rem; padding-left: 0; }
nav { display: flex; align-items: center; gap: 30px; }
nav a { color: var(--muted); text-decoration: none; font-size: .95rem; font-weight: 600; }
nav a:hover { color: var(--ink); }
.hero {
    width: min(1160px, calc(100% - 40px));
    min-height: 680px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 70px;
    padding: 60px 0 100px;
}
.eyebrow { margin: 0 0 15px; color: var(--purple); font-size: .78rem; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }
h1 { max-width: 650px; margin: 0; font-size: clamp(3.7rem, 6.5vw, 6.5rem); line-height: .92; letter-spacing: -.068em; }
h1 span { color: var(--purple); }
.lede { max-width: 570px; margin: 28px 0 0; color: var(--muted); font-size: clamp(1.15rem, 2vw, 1.42rem); line-height: 1.55; }
.hero-actions { display: flex; align-items: center; gap: 24px; margin-top: 34px; }
.store-button { display: inline-flex; align-items: center; gap: 10px; min-width: 178px; padding: 10px 17px; border-radius: 13px; color: var(--store-ink); background: var(--store-background); font-size: 1.16rem; font-weight: 600; line-height: 1.05; box-shadow: 0 12px 30px rgba(23, 21, 43, .18); }
.store-button svg { width: 28px; fill: currentColor; }
.store-button small { display: block; font-size: .62rem; font-weight: 500; margin-bottom: 3px; }
.text-link { color: var(--purple); font-weight: 700; text-decoration: none; }

.puzzle-stage { position: relative; min-height: 520px; display: grid; place-items: center; }
.glow { position: absolute; width: 90%; height: 90%; border-radius: 50%; background: linear-gradient(135deg, rgba(103, 196, 250, .33), rgba(159, 96, 241, .28)); filter: blur(25px); }
.puzzle-board { position: relative; width: min(430px, 82vw); aspect-ratio: 1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; padding: 12px; border-radius: 38px; background: var(--board); box-shadow: 0 35px 90px rgba(57, 38, 121, .22), inset 0 0 0 1px var(--board-line); transform: rotate(-3deg); backdrop-filter: blur(16px); }
.tile { border-radius: 21px; background-image: linear-gradient(135deg, rgba(51, 138, 242, .75), rgba(116, 68, 232, .76)), radial-gradient(circle at 70% 28%, white 0 4%, transparent 5%), linear-gradient(25deg, #35d7d0, #8c56ef); box-shadow: inset 0 0 0 1px rgba(255,255,255,.25), 0 5px 10px rgba(40, 34, 92, .12); }
.t1, .t6 { filter: hue-rotate(18deg); }.t2, .t8 { filter: hue-rotate(-20deg); }.t4 { filter: hue-rotate(35deg); }.t9 { transform: translate(23px, 18px) rotate(8deg); box-shadow: 0 18px 28px rgba(40, 34, 92, .26); }
.floating-chip { position: absolute; padding: 12px 17px; border: 1px solid var(--chip-line); border-radius: 999px; color: var(--chip-ink); background: var(--chip); box-shadow: 0 12px 34px rgba(41,31,81,.13); backdrop-filter: blur(14px); font-weight: 700; font-size: .86rem; }
.chip-one { top: 48px; right: -10px; transform: rotate(4deg); }.chip-two { bottom: 47px; left: -20px; transform: rotate(-4deg); }

.intro { padding: 110px max(20px, calc((100vw - 1160px)/2)); background: var(--surface); text-align: center; }
h2 { margin: 0; font-size: clamp(2.4rem, 5vw, 4.4rem); line-height: 1; letter-spacing: -.055em; }
.feature-grid { margin-top: 62px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; text-align: left; }
.feature-grid article { padding: 30px; border: 1px solid var(--line); border-radius: 26px; background: var(--card); }
.feature-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 15px; font-size: 1.5rem; font-weight: 800; }
.photo { color: #2b78dd; background: #e7f2ff; }.sparkle { color: #7e4ddb; background: #f1e9ff; }.grid { color: #007f89; background: #ddf9fa; }.library { color: #d25279; background: #ffe9f0; }
@media (prefers-color-scheme: dark) {
    .photo { color: #8bc0ff; background: #183452; }
    .sparkle { color: #c5a9ff; background: #352753; }
    .grid { color: #7be5eb; background: #173d40; }
    .library { color: #ff9dbc; background: #4a2432; }
}
h3 { margin: 23px 0 10px; font-size: 1.16rem; }
.feature-grid p { margin: 0; color: var(--muted); line-height: 1.62; font-size: .96rem; }

.experiments { width: min(1160px, calc(100% - 40px)); margin: 0 auto; padding: 120px 0 30px; }
.experiment-intro { display: grid; grid-template-columns: minmax(260px, .8fr) 1.2fr; column-gap: 70px; align-items: start; }
.experiment-intro .eyebrow { grid-column: 1 / -1; }
.experiment-intro h2 { max-width: 570px; }
.experiment-intro > p:last-child { margin: 4px 0 0; max-width: 560px; }
.experiment-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; margin-top: 75px; border: 1px solid var(--line); border-radius: 32px; overflow: hidden; background: var(--line); }
.experiment-grid article { padding: 38px; background: var(--card); }
.experiment-grid h3 { margin: 13px 0 11px; font-size: 1.3rem; }
.experiment-grid p { margin: 0; color: var(--muted); line-height: 1.65; }
.experiment-grid ul { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 0; padding: 0; list-style: none; }
.experiment-grid li { padding: 7px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: var(--surface); font-size: .78rem; font-weight: 650; }
.experiment-grid li:has(a) { padding: 0; }
.experiment-grid li a { display: block; padding: 7px 10px; color: var(--purple); text-decoration: none; }
.experiment-grid li a:hover { text-decoration: underline; }
.experiment-number { color: var(--purple); font-size: .75rem; font-weight: 800; letter-spacing: .13em; }

.beta { width: min(1160px, calc(100% - 40px)); margin: 110px auto 0; display: grid; grid-template-columns: 1fr 1fr; gap: 70px; align-items: center; }
.beta-copy h2 { max-width: 650px; font-size: clamp(2.4rem, 4.8vw, 4.2rem); }
.beta-copy > p:not(.eyebrow) { max-width: 600px; color: var(--muted); line-height: 1.7; }
.beta-card { padding: 38px; border: 1px solid var(--line); border-radius: 32px; background: var(--card); box-shadow: 0 24px 60px rgba(57, 38, 121, .10); }
.beta-card h3 { margin-top: 0; font-size: 1.45rem; }
.beta-card > p, .beta-card li { color: var(--muted); line-height: 1.6; }
.beta-card ul { margin: 18px 0 28px; padding-left: 1.25rem; }
.beta-card li + li { margin-top: 9px; }
.beta-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 15px 21px; border-radius: 999px; color: white; background: var(--purple); text-decoration: none; font-weight: 750; box-shadow: 0 12px 28px rgba(80, 55, 175, .22); }
.beta-button:hover { filter: brightness(1.08); }
.beta-card .privacy-note { margin: 18px 0 0; font-size: .8rem; }

.cta { width: min(1160px, calc(100% - 40px)); margin: 110px auto; padding: 65px; border-radius: 38px; background: linear-gradient(135deg, #262040, #4a367b); color: white; display: flex; align-items: center; justify-content: space-between; gap: 40px; overflow: hidden; position: relative; }
.cta::after { content: ""; position: absolute; width: 330px; height: 330px; right: -100px; top: -160px; border-radius: 50%; background: rgba(99, 213, 238, .2); }
.cta .eyebrow { color: #8deaf1; }.cta h2 { max-width: 660px; font-size: clamp(2.2rem, 4.5vw, 4rem); }.cta p:not(.eyebrow) { color: #d9d3e9; line-height: 1.6; }
.socials { min-width: 220px; display: grid; gap: 12px; position: relative; z-index: 1; }
.socials a { padding: 15px 20px; border: 1px solid rgba(255,255,255,.25); border-radius: 999px; text-align: center; text-decoration: none; font-weight: 700; background: rgba(255,255,255,.09); }
.socials a:hover { background: rgba(255,255,255,.17); }
.socials span { margin-right: 5px; }

footer { width: min(1160px, calc(100% - 40px)); margin: 0 auto; min-height: 120px; padding: 28px 0; display: flex; align-items: center; gap: 30px; border-top: 1px solid var(--line); color: var(--muted); font-size: .88rem; }
.footer-links { display: flex; gap: 20px; }
.footer-brand { color: var(--ink); }.copyright { margin-left: auto; } footer a:hover { color: var(--ink); }

.legal { width: min(720px, calc(100% - 40px)); margin: 80px auto 120px; }
.legal h1 { font-size: clamp(3rem, 8vw, 5rem); }.legal h2 { margin-top: 44px; font-size: 1.5rem; letter-spacing: -.025em; }.legal p, .legal li { color: var(--muted); line-height: 1.75; }.legal .updated { margin: 20px 0 50px; }

@media (max-width: 850px) {
    nav { display: none; }
    .hero { grid-template-columns: 1fr; gap: 15px; padding-top: 70px; text-align: center; }
    .hero-copy { display: grid; justify-items: center; }.hero-actions { justify-content: center; }.puzzle-stage { min-height: 500px; }
    .feature-grid { grid-template-columns: repeat(2, 1fr); }
    .experiment-intro { grid-template-columns: 1fr; gap: 24px; }
    .beta { grid-template-columns: 1fr; gap: 36px; }
    .cta { padding: 50px 35px; flex-direction: column; align-items: flex-start; }.socials { width: 100%; grid-template-columns: 1fr 1fr; }
    footer { flex-wrap: wrap; }.copyright { margin-left: 0; }
}
@media (max-width: 540px) {
    .beta-banner a { align-items: flex-start; gap: 7px; flex-direction: column; text-align: left; }
    [dir="rtl"] .beta-banner a { text-align: right; }
    .site-header { height: 74px; }.brand img { width: 36px; height: 36px; }
    .hero { padding-top: 55px; }.hero-actions { flex-direction: column; }.puzzle-stage { min-height: 410px; }.puzzle-board { border-radius: 28px; }.tile { border-radius: 14px; }
    .floating-chip { font-size: .72rem; }.chip-one { right: 0; top: 25px; }.chip-two { left: 0; bottom: 20px; }
    .intro { padding-top: 80px; padding-bottom: 80px; }.feature-grid { grid-template-columns: 1fr; margin-top: 45px; }
    .experiments { padding-top: 85px; }.experiment-grid { grid-template-columns: 1fr; margin-top: 48px; }.experiment-grid article { padding: 30px; }
    .beta { margin-top: 75px; }.beta-card { padding: 28px; }.beta-button { width: 100%; }
    .cta { margin-top: 75px; margin-bottom: 75px; }.socials { grid-template-columns: 1fr; }
    footer { display: grid; gap: 15px; padding: 35px 0; }.footer-links { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
