/* ═══════════════════════════════════════════════════════════════════
   fuusio.org — landing.
   Shares the Kide identity: polar night, warmed by the ember crystal —
   with a steel-blue counterpoint for the Fuusio app.
   ═══════════════════════════════════════════════════════════════════ */

:root {
    --night-0: #0d0805;
    --night-1: #160d07;
    --night-2: #1d120a;

    --ember-1: #ffb26b;
    --ember-2: #f97316;
    --gold: #fbbf24;
    --crimson: #e25c4a;

    /* Fuusio — steel and cobalt, drawn from the logo */
    --steel-1: #9fc6ff;
    --steel-2: #3b82f6;
    --cobalt: #1d4ed8;

    --text-1: #faf3ec;
    --text-2: #b0a294;
    --text-3: #80705f;

    --line: rgba(255, 178, 107, 0.12);
    --line-strong: rgba(255, 178, 107, 0.28);
    --panel: rgba(29, 18, 11, 0.72);

    --font-main: 'Inter', system-ui, sans-serif;
    --font-code: 'JetBrains Mono', monospace;

    --r: 14px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    background: var(--night-0);
    color: var(--text-1);
    font-family: var(--font-main);
    line-height: 1.65;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

::selection { background: rgba(255, 178, 107, 0.25); }

a { color: inherit; }

/* ── Atmosphere ─────────────────────────────────────────────────── */

.aurora {
    position: fixed;
    inset: -20% -10% auto -10%;
    height: 80vh;
    z-index: -2;
    pointer-events: none;
    background:
        radial-gradient(45% 60% at 16% 20%, rgba(251, 191, 36, 0.14), transparent 70%),
        radial-gradient(50% 65% at 55% 10%, rgba(249, 115, 22, 0.16), transparent 70%),
        radial-gradient(42% 58% at 86% 28%, rgba(59, 130, 246, 0.14), transparent 70%);
    filter: blur(40px);
    animation: aurora-drift 24s ease-in-out infinite alternate;
}

@keyframes aurora-drift {
    from { transform: translateX(-3%) skewY(-1.5deg); opacity: 0.9; }
    to   { transform: translateX(3%)  skewY(1.5deg);  opacity: 1; }
}

.grid-lines {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background-image:
        linear-gradient(var(--line) 1px, transparent 1px),
        linear-gradient(90deg, var(--line) 1px, transparent 1px);
    background-size: 72px 72px;
    mask-image: radial-gradient(ellipse 90% 55% at 50% 0%, black 25%, transparent 78%);
    -webkit-mask-image: radial-gradient(ellipse 90% 55% at 50% 0%, black 25%, transparent 78%);
    opacity: 0.5;
}

/* ── Layout ─────────────────────────────────────────────────────── */

main {
    flex: 1 0 auto;
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 7rem 2rem 4rem;
}

/* ── Masthead ───────────────────────────────────────────────────── */

.masthead {
    max-width: 660px;
    margin: 0 auto 4.5rem;
    text-align: center;
}

.kicker {
    display: block;
    font-family: var(--font-code);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 1.1rem;
}

h1 {
    font-size: clamp(2.6rem, 6vw, 4.4rem);
    font-weight: 900;
    line-height: 1.04;
    letter-spacing: -0.03em;
    margin-bottom: 1.3rem;
}

.gradient-text {
    background: linear-gradient(100deg, var(--ember-1) 8%, var(--gold) 45%, var(--steel-1) 95%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    font-size: 1.1rem;
    color: var(--text-2);
    max-width: 34em;
    margin: 0 auto;
}

/* ── Choice tiles ───────────────────────────────────────────────── */

.choices {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.6rem;
    align-items: stretch;
}

.choice {
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.6rem;
    padding: 3rem 2.2rem 2.6rem;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 20px;
    text-decoration: none;
    overflow: hidden;
    transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

/* Hairline highlight along the top edge, as on the Kide cards. */
.choice::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--line-strong), transparent);
}

.choice-glow {
    position: absolute;
    inset: -30% -20% auto -20%;
    height: 70%;
    z-index: -1;
    opacity: 0.55;
    filter: blur(34px);
    transition: opacity 0.45s ease, transform 0.45s ease;
}

.choice-kide  .choice-glow { background: radial-gradient(55% 70% at 50% 0%, rgba(249, 115, 22, 0.34), transparent 72%); }
.choice-fuusio .choice-glow { background: radial-gradient(55% 70% at 50% 0%, rgba(59, 130, 246, 0.32), transparent 72%); }

.choice-fuusio { border-color: rgba(159, 198, 255, 0.14); }

.choice:hover,
.choice:focus-visible {
    transform: translateY(-6px);
    outline: none;
}
.choice-kide:hover,
.choice-kide:focus-visible {
    border-color: var(--line-strong);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 178, 107, 0.12);
}
.choice-fuusio:hover,
.choice-fuusio:focus-visible {
    border-color: rgba(159, 198, 255, 0.34);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(159, 198, 255, 0.14);
}
.choice:hover .choice-glow,
.choice:focus-visible .choice-glow { opacity: 0.95; transform: translateY(6%); }

/* ── Logo ───────────────────────────────────────────────────────── */

.choice-logo {
    width: 156px;
    height: 156px;
    display: block;
    transition: transform 0.4s cubic-bezier(0.2, 0.7, 0.3, 1), filter 0.4s ease;
}
.choice-kide  .choice-logo { filter: drop-shadow(0 10px 28px rgba(255, 120, 40, 0.32)); }
.choice-fuusio .choice-logo { filter: drop-shadow(0 10px 28px rgba(59, 130, 246, 0.34)); }

.choice:hover .choice-logo,
.choice:focus-visible .choice-logo { transform: translateY(-4px) scale(1.05) rotate(-2deg); }
.choice-kide:hover  .choice-logo { filter: drop-shadow(0 14px 36px rgba(255, 120, 40, 0.5)); }
.choice-fuusio:hover .choice-logo { filter: drop-shadow(0 14px 36px rgba(59, 130, 246, 0.55)); }

/* ── Tile copy ──────────────────────────────────────────────────── */

/* Flex column so the two tiles' buttons sit on the same baseline even when
   their descriptions run to different line counts. */
.choice-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.choice-name {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.1;
    color: var(--text-1);
}

.choice-tagline {
    display: block;
    font-family: var(--font-code);
    font-size: 0.82rem;
    letter-spacing: 0.04em;
    margin-top: 0.35rem;
    margin-bottom: 1.1rem;
}
.choice-kide  .choice-tagline { color: var(--ember-1); }
.choice-fuusio .choice-tagline { color: var(--steel-1); }

.choice-desc {
    display: block;
    color: var(--text-2);
    font-size: 0.95rem;
    max-width: 30em;
    margin: 0 auto 1.4rem;
}

.chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    /* auto keeps the chips + CTA block at the foot of the tile; the
       description's own bottom margin guarantees the minimum gap. */
    margin: auto 0 1.6rem;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-family: var(--font-code);
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    padding: 0.24em 0.75em;
    border-radius: 999px;
    border: 1px solid var(--line);
    color: var(--text-3);
    white-space: nowrap;
}
.choice-fuusio .chip { border-color: rgba(159, 198, 255, 0.16); }

.chip-soon { color: var(--steel-1); border-color: rgba(159, 198, 255, 0.35); }
.chip-pulse {
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--steel-1);
    animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

.choice-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.72rem 1.5rem;
    border-radius: 10px;
    transition: background 0.25s ease, box-shadow 0.25s ease, color 0.25s ease;
}
.choice-kide .choice-cta {
    background: linear-gradient(120deg, var(--ember-2), var(--gold));
    color: #2a1305;
    box-shadow: 0 4px 24px rgba(249, 115, 22, 0.24);
}
.choice-kide:hover .choice-cta { box-shadow: 0 8px 32px rgba(251, 191, 36, 0.34); }

.choice-fuusio .choice-cta {
    background: rgba(159, 198, 255, 0.10);
    border: 1px solid rgba(159, 198, 255, 0.32);
    color: var(--text-1);
}
.choice-fuusio:hover .choice-cta { background: rgba(159, 198, 255, 0.2); }

.arrow { transition: transform 0.3s ease; }
.choice:hover .arrow { transform: translateX(4px); }

/* ── Footer ─────────────────────────────────────────────────────── */

footer {
    flex: 0 0 auto;
    text-align: center;
    padding: 2.5rem 2rem;
    border-top: 1px solid var(--line);
    color: var(--text-3);
    font-size: 0.85rem;
}
footer em { color: var(--ember-1); font-style: italic; }
footer a { color: var(--text-2); text-decoration: none; border-bottom: 1px solid transparent; transition: color 0.2s ease, border-color 0.2s ease; }
footer a:hover { color: var(--ember-1); border-bottom-color: var(--ember-1); }

/* ── Reveal on scroll ───────────────────────────────────────────── */

.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease-out, transform 0.7s ease-out; }
.js .reveal.show { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
    .reveal { opacity: 1; transform: none; }
    html { scroll-behavior: auto; }
}

/* ── Responsive ─────────────────────────────────────────────────── */

@media (max-width: 860px) {
    .choices { grid-template-columns: 1fr; gap: 1.3rem; }
    main { padding-top: 4.5rem; }
    .masthead { margin-bottom: 3rem; }
    .choice { padding: 2.4rem 1.6rem 2.2rem; gap: 1.3rem; }
    .choice-logo { width: 120px; height: 120px; }
}
