/* ── RocketGoose Games — one-page links hub ──────────────────────────────
   Brand tokens (from RocketGooseBrand.md):
     Feather  #F2BB16  — warm primary
     Trail    #D98841  — warm accent
     Ember    #A63208  — warm deep
     Void     #432D59  — cold backdrop
     Hull     #172540  — cold structure
   Rule: warm on cold. Figure never melts into ground.
───────────────────────────────────────────────────────────────────────── */

:root {
    --feather: #F2BB16;
    --trail:   #D98841;
    --ember:   #A63208;
    --void:    #432D59;
    --hull:    #172540;

    --void-glass: rgba(67, 45, 89, 0.78);
    --trail-soft: rgba(217, 136, 65, 0.45);
    --ember-soft: rgba(166, 50, 8, 0.35);
    --feather-glow: rgba(242, 187, 22, 0.28);

    --font-display: 'Fredoka', system-ui, sans-serif;
    --font-body:    'Inter', system-ui, sans-serif;
}

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

html, body {
    height: 100%;
    overflow-x: hidden;
}

body {
    font-family: var(--font-body);
    color: #E8E4F0;
    /* Radial Hull→Void: Hull (deeper navy) at centre, Void (cosmic purple)
       on the edges. Cards now sit on Void-tinted glass to lift off the
       deeper hull background. Same cold family, no warm blend. */
    background: radial-gradient(ellipse at 50% 40%, var(--hull) 0%, var(--void) 90%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Canvas starfield sits behind everything, ignores input. */
#cosmos {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.stage {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    padding: 12vh 24px 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: clamp(20px, 3vh, 32px);
}

/* ── Hero ───────────────────────────────────────────────────────────── */

.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
}

.logo-frame {
    width: clamp(108px, 16vh, 140px);
    height: clamp(108px, 16vh, 140px);
    border-radius: 50%;
    overflow: hidden;
    position: relative;
    /* Feather stroke + Ember glow — the brand's "warm figure on cold ground"
       rule applied at the literal logo level. */
    border: 3px solid var(--feather);
    box-shadow:
        0 0 0 2px var(--ember) inset,
        0 0 40px var(--feather-glow),
        0 0 80px rgba(217, 136, 65, 0.15);
    margin-bottom: 8px;
    animation: logo-float 6s ease-in-out infinite;
}

.logo-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

@keyframes logo-float {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-6px); }
}

.wordmark {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(36px, 7vw, 60px);
    color: var(--feather);
    letter-spacing: 0.02em;
    line-height: 1;
    margin-top: 4px;
    /* Ember rim: per brand rules, Feather on Void needs a dark edge. */
    text-shadow:
        0 2px 0 var(--ember),
        0 0 32px rgba(242, 187, 22, 0.25);
}

.tagline {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: clamp(16px, 3vw, 20px);
    color: var(--trail);
    letter-spacing: 0.3em;
    text-transform: lowercase;
    margin-top: 2px;
}

.pitch {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 14px;
    color: rgba(232, 228, 240, 0.72);
    margin-top: 8px;
    font-style: italic;
    letter-spacing: 0.01em;
}

/* ── CTA ────────────────────────────────────────────────────────────── */

.cta {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
    max-width: 440px;
    padding: 18px 22px;
    /* Small warm gradient inside the button — allowed because the button is
       a figure, not a background. Never touches Void. */
    background: linear-gradient(135deg, var(--feather) 0%, var(--trail) 100%);
    color: var(--hull);
    text-decoration: none;
    border-radius: 14px;
    border: 2px solid var(--ember);
    font-family: var(--font-display);
    font-weight: 700;
    position: relative;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    box-shadow:
        0 4px 0 var(--ember),
        0 8px 32px rgba(166, 50, 8, 0.35);
}

.cta:hover {
    transform: translateY(-2px);
    box-shadow:
        0 6px 0 var(--ember),
        0 12px 40px rgba(242, 187, 22, 0.45);
}

.cta:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0 var(--ember);
}

.cta-icon {
    font-size: 28px;
    line-height: 1;
    flex-shrink: 0;
}

.cta-label {
    display: flex;
    flex-direction: column;
    flex: 1;
    text-align: left;
    gap: 2px;
}

.cta-title {
    font-size: 18px;
    letter-spacing: 0.01em;
}

.cta-sub {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 12px;
    color: rgba(23, 37, 64, 0.75);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.cta-arrow {
    font-size: 24px;
    font-weight: 700;
    transition: transform 0.18s ease;
}

.cta:hover .cta-arrow { transform: translateX(4px); }

/* ── Links section ──────────────────────────────────────────────────── */

.links {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.links-heading {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 12px;
    color: rgba(232, 228, 240, 0.45);
    text-transform: uppercase;
    letter-spacing: 0.25em;
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    max-width: 440px;
}

.links-heading::before,
.links-heading::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(
        to right,
        transparent 0%,
        rgba(217, 136, 65, 0.3) 50%,
        transparent 100%
    );
}

.link-grid {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    width: 100%;
    max-width: 440px;
}

.card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 14px 16px 12px;
    background: var(--void-glass);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--trail-soft);
    border-radius: 12px;
    color: #E8E4F0;
    text-decoration: none;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    min-height: 80px;
    justify-content: space-between;
}

.card:hover {
    transform: translateY(-3px) scale(1.02);
    border-color: var(--trail);
    box-shadow:
        0 6px 24px rgba(242, 187, 22, 0.22),
        0 0 0 1px var(--trail);
}

.card-icon {
    width: 22px;
    height: 22px;
    color: var(--feather);
    transition: color 0.2s ease, transform 0.2s ease;
}

.card:hover .card-icon {
    color: var(--trail);
    transform: scale(1.1);
}

.card-name {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 15px;
    color: #F5F1FA;
    line-height: 1.15;
}

.card-handle {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 11px;
    color: var(--trail);
    letter-spacing: 0.02em;
}

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

.footer {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 8px 24px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.email {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 14px;
    color: var(--feather);
    text-decoration: none;
    letter-spacing: 0.02em;
    border-bottom: 1px solid transparent;
    transition: border-color 0.18s ease, color 0.18s ease;
}

.email:hover {
    color: var(--trail);
    border-bottom-color: var(--trail);
}

.copyright {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 12px;
    color: rgba(232, 228, 240, 0.35);
    letter-spacing: 0.08em;
}

/* ── Responsive: mobile ─────────────────────────────────────────────── */

@media (max-width: 640px) {
    /* Raise the hero on mobile: stage no longer centres vertically; it
       anchors near the top so the logo lands in the upper third instead
       of floating mid-screen below a big negative space. */
    .stage {
        justify-content: flex-start;
        padding-top: 10vh;
        padding-bottom: 0;
    }
    /* Pull the footer up to the bottom of the cards on mobile. body flexes
       the stage to grow (flex: 1); disabling that lets the footer sit
       right under the last card instead of being pushed to the viewport
       bottom by empty stage space. */
    body { justify-content: flex-start; }
    .stage { flex: 0 0 auto; }
    .footer { padding-top: 20px; padding-bottom: 32px; }
}

@media (max-width: 380px) {
    .link-grid { grid-template-columns: 1fr; }
    .stage    { gap: 24px; }
    .logo-frame { width: 132px; height: 132px; }
}

/* ── Language switcher ──────────────────────────────────────────────── */

.lang-switcher {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10;
    font-family: var(--font-body);
}

.lang-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: var(--void-glass);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--trail-soft);
    border-radius: 10px;
    color: #F5F1FA;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.lang-toggle:hover,
.lang-switcher.is-open .lang-toggle {
    border-color: var(--trail);
    box-shadow: 0 4px 16px rgba(242, 187, 22, 0.18);
}

.lang-toggle-caret {
    font-size: 10px;
    color: var(--trail);
    transition: transform 0.18s ease;
}

.lang-switcher.is-open .lang-toggle-caret {
    transform: rotate(180deg);
}

.lang-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 160px;
    list-style: none;
    padding: 6px;
    margin: 0;
    background: var(--void-glass);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--trail-soft);
    border-radius: 10px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

.lang-menu[hidden] { display: none; }

.lang-menu li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 6px;
    color: #E8E4F0;
    font-size: 13px;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.lang-menu li:hover {
    background: rgba(217, 136, 65, 0.14);
    color: var(--feather);
}

.lang-menu li[aria-selected="true"] {
    color: var(--feather);
}

.lang-menu li[aria-selected="true"] .lang-code {
    background: var(--feather);
    color: var(--hull);
    border-color: var(--feather);
}

.lang-code {
    display: inline-block;
    min-width: 28px;
    padding: 2px 6px;
    text-align: center;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 11px;
    letter-spacing: 0.08em;
    border: 1px solid var(--trail-soft);
    border-radius: 4px;
    color: var(--trail);
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.lang-label {
    font-weight: 500;
}

/* ── Motion preferences ─────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
    .logo-frame,
    .cta,
    .cta-arrow,
    .card,
    .card-icon {
        animation: none !important;
        transition: none !important;
    }
}
