/* =============================================================
   Vocardulary — Marketing site styles
   Reuses the in-app palette and Fredoka / LuckiestGuy typography.
   Mobile-first. No external CSS framework.
   ============================================================= */

/* ---------- Fonts ---------- */
@font-face {
    font-family: "Fredoka";
    src: url("/assets/fonts/Fredoka-Regular.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Fredoka";
    src: url("/assets/fonts/Fredoka-SemiBold.ttf") format("truetype");
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Fredoka";
    src: url("/assets/fonts/Fredoka-Bold.ttf") format("truetype");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "LuckiestGuy";
    src: url("/assets/fonts/LuckiestGuy-Regular.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

/* ---------- Design tokens (mirrors AppColors.swift) ---------- */
:root {
    --main1: #B8D4E8;
    --main2: #6E95CA;
    --main3: #4A8BC2;
    --main4: #2C6B9E;
    --main5: #1A5582;
    --main6: #1B3E6E;
    --main7: #2A3E52;
    --main8: #090F39;
    --accent-red: #E74C3C;
    --hat-cyan: #5EE7E0;
    --hat-deep: #1F1B2E;

    --gradient-launch: linear-gradient(180deg, #1B3E6E 0%, #090F39 100%);
    --gradient-spell: linear-gradient(135deg, #5EE7E0 0%, #4A8BC2 50%, #1B3E6E 100%);
    --gradient-card: linear-gradient(160deg, rgba(74, 139, 194, 0.22) 0%, rgba(9, 15, 57, 0.55) 100%);

    --radius-sm: 10px;
    --radius-md: 18px;
    --radius-lg: 28px;
    --radius-pill: 999px;

    --shadow-glow: 0 0 30px rgba(94, 231, 224, 0.35);
    --shadow-soft: 0 12px 32px rgba(0, 0, 0, 0.35);

    --font-display: "LuckiestGuy", "Fredoka", system-ui, sans-serif;
    --font-ui: "Fredoka", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

    --container: 1180px;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font-ui);
    font-weight: 400;
    color: #EAF1F8;
    background: var(--gradient-launch);
    background-attachment: fixed;
    line-height: 1.55;
    min-height: 100vh;
    overflow-x: hidden;
}
html { overflow-x: hidden; max-width: 100%; }

img { max-width: 100%; display: block; }
a { color: var(--hat-cyan); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { font-family: var(--font-display); letter-spacing: 0.5px; line-height: 1.1; margin: 0 0 0.5em; color: #fff; }
h1 { font-size: clamp(2.2rem, 6vw, 4rem); }
h2 { font-size: clamp(1.7rem, 4.4vw, 2.6rem); }
h3 { font-size: clamp(1.2rem, 2.8vw, 1.5rem); font-family: var(--font-ui); font-weight: 700; }
p  { margin: 0 0 1em; color: #CFDDEB; }

.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* ---------- Decorative ambient stars ---------- */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        radial-gradient(2px 2px at 20% 30%, rgba(255,255,255,0.7), transparent 50%),
        radial-gradient(1.5px 1.5px at 70% 80%, rgba(184,212,232,0.5), transparent 50%),
        radial-gradient(2px 2px at 85% 20%, rgba(94,231,224,0.6), transparent 50%),
        radial-gradient(1px 1px at 40% 60%, rgba(255,255,255,0.5), transparent 50%),
        radial-gradient(1.5px 1.5px at 10% 85%, rgba(110,149,202,0.5), transparent 50%);
    background-size: 800px 800px;
    z-index: 0;
    opacity: 0.6;
}

/* ---------- Navbar ---------- */
.nav {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    background: rgba(9, 15, 57, 0.72);
    border-bottom: 1px solid rgba(184, 212, 232, 0.08);
}
.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    max-width: var(--container);
    margin: 0 auto;
}
.brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-family: var(--font-display);
    font-size: 1.35rem;
    color: #fff;
    text-decoration: none;
    letter-spacing: 1px;
}
.brand img { width: 52px; height: 52px; border-radius: 12px; }
.brand:hover { text-decoration: none; }

.nav-links {
    display: none;
    gap: 1.5rem;
    align-items: center;
}
.nav-links a {
    color: var(--main1);
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
}
.nav-links a:hover { color: var(--hat-cyan); }
.nav-cta {
    background: var(--gradient-spell);
    color: #061224 !important;
    padding: 0.55rem 1.1rem;
    border-radius: var(--radius-pill);
    box-shadow: var(--shadow-glow);
    font-weight: 700 !important;
}

/* ---------- Language switcher ---------- */
.lang-switch {
    position: relative;
    display: inline-block;
}
.lang-switch > summary {
    list-style: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.7rem;
    border-radius: var(--radius-pill);
    background: rgba(184, 212, 232, 0.08);
    border: 1px solid rgba(184, 212, 232, 0.15);
    color: var(--main1);
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.15s;
}
.lang-switch > summary::-webkit-details-marker { display: none; }
.lang-switch > summary:hover {
    background: rgba(94, 231, 224, 0.12);
    border-color: rgba(94, 231, 224, 0.4);
    color: var(--hat-cyan);
}
.lang-switch[open] > summary {
    background: rgba(94, 231, 224, 0.15);
    border-color: var(--hat-cyan);
    color: var(--hat-cyan);
}
.lang-switch .flag {
    font-size: 1.1rem;
    line-height: 1;
}
.lang-switch .caret {
    font-size: 0.6rem;
    opacity: 0.7;
}
.lang-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 170px;
    background: rgba(15, 27, 78, 0.98);
    border: 1px solid rgba(94, 231, 224, 0.3);
    border-radius: var(--radius-md);
    padding: 0.4rem;
    box-shadow: var(--shadow-soft), 0 0 30px rgba(94, 231, 224, 0.18);
    z-index: 200;
}
.lang-menu a {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 0.75rem;
    border-radius: 8px;
    color: var(--main1);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.92rem;
}
.lang-menu a:hover {
    background: rgba(94, 231, 224, 0.12);
    color: var(--hat-cyan);
}
.lang-menu a.active {
    background: rgba(94, 231, 224, 0.18);
    color: var(--hat-cyan);
}
.mobile-menu .lang-switch {
    margin-top: 0.5rem;
    align-self: flex-start;
}
.mobile-menu .lang-menu {
    position: static;
    margin-top: 0.5rem;
}

.menu-toggle {
    display: inline-flex;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: 0;
    padding: 0.5rem;
    cursor: pointer;
}
.menu-toggle span {
    width: 24px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
}

.mobile-menu {
    display: none;
    flex-direction: column;
    padding: 1rem 1.25rem 1.5rem;
    gap: 1rem;
    background: rgba(9, 15, 57, 0.95);
    border-bottom: 1px solid rgba(184, 212, 232, 0.1);
}
.mobile-menu.open { display: flex; }
.mobile-menu a { color: var(--main1); font-weight: 600; }
.mobile-menu .nav-cta { align-self: flex-start; }

@media (min-width: 880px) {
    .nav-links { display: flex; }
    .menu-toggle { display: none; }
    .mobile-menu { display: none !important; }
    .nav-lang-inline { display: none; }
}

/* ---------- Layout primitives ---------- */
.section { position: relative; padding: 4.5rem 0; z-index: 1; }
.section-tight { padding: 2.5rem 0; }
.section-alt { background: linear-gradient(180deg, rgba(26, 85, 130, 0.35) 0%, rgba(9, 15, 57, 0.0) 100%); }

.eyebrow {
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--hat-cyan);
    background: rgba(94, 231, 224, 0.1);
    padding: 0.35rem 0.8rem;
    border-radius: var(--radius-pill);
    margin-bottom: 1rem;
}

.lead { font-size: clamp(1rem, 2.2vw, 1.2rem); color: #DCE7F2; max-width: 56ch; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    border: 0;
    cursor: pointer;
    font-family: var(--font-ui);
    font-weight: 700;
    padding: 0.9rem 1.6rem;
    border-radius: var(--radius-pill);
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.btn:hover { transform: translateY(-2px); text-decoration: none; }
.btn-primary {
    background: var(--gradient-spell);
    color: #061224;
    box-shadow: var(--shadow-glow);
}
.btn-ghost {
    background: rgba(184, 212, 232, 0.08);
    border: 1px solid rgba(184, 212, 232, 0.25);
    color: #fff;
}
.btn-ghost:hover { background: rgba(184, 212, 232, 0.15); }

/* ---------- Hero ---------- */
.hero {
    position: relative;
    padding: 4rem 0 5rem;
    overflow: hidden;
}
.hero-grid {
    display: grid;
    gap: 2.5rem;
    align-items: center;
    grid-template-columns: 1fr;
}
.hero h1 .grad {
    background: var(--gradient-spell);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.6rem;
}
.hero-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem 2rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(184, 212, 232, 0.12);
}
.hero-stat strong {
    font-family: var(--font-display);
    font-size: 1.8rem;
    color: var(--hat-cyan);
    display: block;
}
.hero-stat span { font-size: 0.85rem; color: var(--main1); text-transform: uppercase; letter-spacing: 1.5px; }

.hero-visual {
    position: relative;
    aspect-ratio: 1 / 1;
    max-width: 480px;
    margin: 0 auto;
}
.hero-mage {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 20px 50px rgba(94, 231, 224, 0.45));
    animation: float 6s ease-in-out infinite;
}
.hero-orb {
    position: absolute;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    filter: blur(2px);
    opacity: 0.85;
}
.hero-orb.crystal { top: 6%; right: 4%; width: 110px; height: 110px; filter: drop-shadow(0 0 20px rgba(94,231,224,0.7)); }
.hero-orb.potion-b { bottom: 8%; left: 0%; width: 90px; height: 90px; }
.hero-orb.potion-r { top: 38%; left: -4%; width: 70px; height: 70px; opacity: 0.85; }

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

@media (min-width: 880px) {
    .hero-grid { grid-template-columns: 1.1fr 1fr; }
    .hero { padding: 6rem 0 7rem; }
}

/* ---------- Feature grid ---------- */
.section-head { text-align: center; margin: 0 auto 3rem; max-width: 720px; }
.section-head p { font-size: 1.05rem; }

.feature-grid {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: 1fr;
}
.feature-card {
    background: var(--gradient-card);
    border: 1px solid rgba(184, 212, 232, 0.1);
    border-radius: var(--radius-md);
    padding: 1.6rem;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    overflow: hidden;
}
.feature-card:hover {
    transform: translateY(-4px);
    border-color: rgba(94, 231, 224, 0.45);
    box-shadow: var(--shadow-glow);
}
.feature-card .icon {
    width: 64px;
    height: 64px;
    margin-bottom: 1rem;
    filter: drop-shadow(0 6px 12px rgba(0,0,0,0.4));
}
.feature-card h3 { color: #fff; margin-bottom: 0.4rem; }
.feature-card p { color: #C9D7E6; font-size: 0.95rem; margin: 0; }

@media (min-width: 640px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .feature-grid { grid-template-columns: repeat(3, 1fr); } }

/* ---------- How it works ---------- */
.steps {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: 1fr;
    counter-reset: step;
}
.step {
    background: rgba(26, 85, 130, 0.25);
    border: 1px solid rgba(184, 212, 232, 0.12);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    position: relative;
}
.step::before {
    counter-increment: step;
    content: counter(step);
    position: absolute;
    top: -18px;
    left: 1.5rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gradient-spell);
    color: #061224;
    font-family: var(--font-display);
    font-size: 1.4rem;
    display: grid;
    place-items: center;
    box-shadow: var(--shadow-glow);
}
.step h3 { margin-top: 0.4rem; color: var(--hat-cyan); }
@media (min-width: 800px) { .steps { grid-template-columns: repeat(4, 1fr); } }

/* ---------- Screenshots ---------- */
.shots {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: 1fr;
}
.shot {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: rgba(9, 15, 57, 0.4);
    border: 1px solid rgba(184, 212, 232, 0.1);
    box-shadow: var(--shadow-soft);
    aspect-ratio: 9 / 16;
    max-width: 340px;
    margin: 0 auto;
    width: 100%;
}
.shot img { width: 100%; height: 100%; object-fit: cover; }
.shot-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.25rem 1rem 1rem;
    background: linear-gradient(180deg, transparent 0%, rgba(9, 15, 57, 0.92) 70%);
    color: #fff;
    font-weight: 600;
    text-align: center;
}
.shot-placeholder {
    width: 100%; height: 100%;
    display: grid;
    place-items: center;
    text-align: center;
    padding: 2rem;
    color: var(--main1);
    background: var(--gradient-card);
}
.shot-placeholder .icon { width: 80px; margin: 0 auto 1rem; opacity: 0.85; }
@media (min-width: 700px) { .shots { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .shots { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Magic moments band ---------- */
.band {
    background: var(--gradient-spell);
    color: #061224;
    text-align: center;
    padding: 3rem 1rem;
    border-radius: var(--radius-lg);
    margin: 0 1rem;
    box-shadow: var(--shadow-glow);
    position: relative;
    overflow: hidden;
}
.band h2 { color: #061224; }
.band p { color: #0A1F33; }

/* ---------- Download CTA blocks ---------- */
.store-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.5rem;
}
.store-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: #0A0F2A;
    color: #fff;
    border: 1px solid rgba(184, 212, 232, 0.25);
    padding: 0.9rem 1.4rem;
    border-radius: var(--radius-md);
    min-width: 220px;
    text-decoration: none;
    transition: transform 0.15s ease, border-color 0.2s ease;
}
.store-btn:hover { transform: translateY(-2px); border-color: var(--hat-cyan); text-decoration: none; }
.store-btn .glyph { font-size: 1.8rem; line-height: 1; }
.store-btn .lbl { display: flex; flex-direction: column; line-height: 1.1; }
.store-btn .lbl small { font-size: 0.7rem; opacity: 0.75; font-weight: 400; }
.store-btn .lbl strong { font-family: var(--font-display); letter-spacing: 0.8px; font-size: 1.1rem; }

/* ---------- Avatars showcase ---------- */
.avatars {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
}
.avatars img {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    border: 2px solid var(--hat-cyan);
    box-shadow: 0 6px 18px rgba(94, 231, 224, 0.3);
    background: #1F1B2E;
}

/* ---------- Share floating button ---------- */
.share-fab {
    position: fixed;
    bottom: 1.25rem;
    right: 1.25rem;
    z-index: 60;
}
.share-fab summary {
    list-style: none;
    cursor: pointer;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--gradient-spell);
    box-shadow: var(--shadow-glow);
    display: grid;
    place-items: center;
    color: #061224;
    font-weight: 700;
    transition: transform 0.15s ease;
}
.share-fab summary::-webkit-details-marker { display: none; }
.share-fab[open] summary { transform: rotate(45deg); }
.share-fab svg { width: 24px; height: 24px; }
.share-menu {
    position: absolute;
    bottom: 72px;
    right: 0;
    background: rgba(9, 15, 57, 0.95);
    border: 1px solid rgba(184, 212, 232, 0.18);
    border-radius: var(--radius-md);
    padding: 0.65rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 200px;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-soft);
}
.share-menu a, .share-menu button {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    background: transparent;
    border: 0;
    color: #fff;
    padding: 0.6rem 0.75rem;
    border-radius: 10px;
    text-align: left;
    cursor: pointer;
    font: inherit;
    text-decoration: none;
}
.share-menu a:hover, .share-menu button:hover { background: rgba(94, 231, 224, 0.15); text-decoration: none; }

/* ---------- Install tutorial (Download page: 2-column iOS / Android) ---------- */
.tut-cols {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
    max-width: 1240px;
    margin: 0 auto;
}
.tut-col {
    background: var(--gradient-card);
    border: 1px solid rgba(184, 212, 232, 0.14);
    border-radius: var(--radius-lg);
    padding: 1.75rem 1.5rem 2rem;
}
.tut-col-head {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    font-family: var(--font-display);
    font-size: 1.5rem;
    letter-spacing: 1px;
    color: #fff;
    margin-bottom: 1.75rem;
}
.tut-os-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: var(--radius-pill);
    background: var(--gradient-spell);
    color: #061224;
    font-size: 1.1rem;
    box-shadow: var(--shadow-glow);
}
.tut-os-android { padding-left: 3px; }
.tut-steps {
    list-style: none;
    margin: 0;
    padding: 0;
    position: relative;
}
/* vertical connector line running top → bottom */
.tut-steps::before {
    content: "";
    position: absolute;
    left: 18px;
    top: 12px;
    bottom: 12px;
    width: 2px;
    background: linear-gradient(180deg, var(--hat-cyan), rgba(94, 231, 224, 0.15));
}
.tut-step {
    position: relative;
    display: grid;
    grid-template-columns: 38px 150px 1fr;
    align-items: center;
    gap: 1.25rem;
    padding: 1.25rem 0;
}
.tut-num {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: var(--radius-pill);
    background: var(--main8);
    border: 2px solid var(--hat-cyan);
    color: var(--hat-cyan);
    font-family: var(--font-display);
    font-size: 1.1rem;
    align-self: start;
}
.tut-media { align-self: center; }
/* Scroll-driven flip card: back (card_back) shown by default, flips to the
   phone-screen "front" when the step is the focused one in its column. */
.tut-flip {
    width: 100%;
    max-width: 220px;
    aspect-ratio: 9 / 16;
    margin: 0 auto;
    perspective: 1200px;
}
.tut-flip-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transform: rotateY(0deg);
    transition: transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.tut-flip.is-flipped .tut-flip-inner {
    transform: rotateY(180deg);
}
.tut-flip-face {
    position: absolute;
    inset: 0;
    border-radius: 18px;
    overflow: hidden;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    box-shadow: var(--shadow-soft);
}
.tut-flip-back img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.tut-flip-front {
    transform: rotateY(180deg);
}
.tut-phone {
    width: 100%;
    height: 100%;
    border-radius: 18px;
    background:
        repeating-linear-gradient(-45deg, rgba(184,212,232,0.06) 0 10px, rgba(184,212,232,0.12) 10px 20px),
        var(--gradient-launch);
    border: 2px solid rgba(184, 212, 232, 0.25);
    position: relative;
}
.tut-phone::after {
    content: "";
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 34px;
    height: 5px;
    border-radius: var(--radius-pill);
    background: rgba(184, 212, 232, 0.35);
}
.tut-body h3 {
    margin: 0.15rem 0 0.35rem;
    font-size: 1.1rem;
    color: #fff;
}
.tut-body { min-width: 0; }
.tut-body h3, .tut-body p { overflow-wrap: anywhere; }
.tut-body p { margin: 0; color: var(--main1); font-size: 0.95rem; }
.tut-step-label {
    font-family: var(--font-ui);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-size: 0.72rem;
    color: var(--hat-cyan);
}
/* Email capture (below step 1, no backend) */
.tut-email {
    list-style: none;
    margin: 0.25rem 0 0.75rem 46px;
    padding: 1rem 1.1rem;
    background: rgba(9, 15, 57, 0.45);
    border: 1px solid rgba(94, 231, 224, 0.25);
    border-radius: var(--radius-md);
}
.tut-email-hint {
    margin: 0 0 0.65rem;
    color: var(--main1);
    font-size: 0.9rem;
}
.tut-email-row {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.tut-email-input {
    flex: 1 1 160px;
    min-width: 0;
    padding: 0.6rem 0.8rem;
    border-radius: var(--radius-pill);
    border: 1px solid rgba(184, 212, 232, 0.3);
    background: rgba(184, 212, 232, 0.08);
    color: #fff;
    font: inherit;
}
.tut-email-input::placeholder { color: rgba(184, 212, 232, 0.55); }
.tut-email-input:focus {
    outline: none;
    border-color: var(--hat-cyan);
    box-shadow: var(--shadow-glow);
}
.tut-email-btn {
    padding: 0.6rem 1.2rem;
    border: 0;
    border-radius: var(--radius-pill);
    background: var(--gradient-spell);
    color: #061224;
    font-weight: 700;
    cursor: pointer;
    font: inherit;
    font-weight: 700;
}
.tut-email-msg {
    margin: 0.75rem 0 0;
    font-size: 0.88rem;
    font-weight: 600;
}
.tut-email-msg.is-ok { color: var(--hat-cyan); }
.tut-email-msg.is-err { color: var(--accent-red); }

/* Invite confirmation toast (bottom-center, auto-dismiss) */
.toast {
    position: fixed;
    left: 50%;
    bottom: 24px;
    transform: translate(-50%, 140%);
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    max-width: min(92vw, 460px);
    padding: 0.9rem 1.25rem;
    border-radius: var(--radius-pill);
    background: rgba(9, 15, 57, 0.97);
    border: 1px solid rgba(94, 231, 224, 0.35);
    color: #fff;
    font-weight: 600;
    font-size: 0.95rem;
    box-shadow: var(--shadow-soft), var(--shadow-glow);
    backdrop-filter: blur(10px);
    opacity: 0;
    transition: transform 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.2), opacity 0.35s ease;
}
.toast.is-visible {
    transform: translate(-50%, 0);
    opacity: 1;
}
.toast-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: var(--radius-pill);
    font-size: 0.9rem;
    flex-shrink: 0;
}
.toast-ok { border-color: rgba(94, 231, 224, 0.5); }
.toast-ok .toast-icon { background: var(--hat-cyan); color: #061224; }
.toast-err { border-color: rgba(231, 76, 60, 0.6); }
.toast-err .toast-icon { background: var(--accent-red); color: #fff; }
@media (min-width: 800px) {
    .tut-cols { grid-template-columns: 1fr 1fr; }
}
/* Narrow phones (≤640px): stack each step vertically so the flip card
   takes the full column width and stays readable. The number sits above
   the card and the timeline line is dropped (it would cross the card). */
@media (max-width: 640px) {
    .tut-steps::before { display: none; }
    .tut-step {
        grid-template-columns: 1fr;
        grid-template-areas:
            "num"
            "media"
            "body";
        justify-items: stretch;
        gap: 0.85rem;
        padding: 1.5rem 0;
    }
    .tut-num { grid-area: num; justify-self: start; }
    .tut-media { grid-area: media; }
    .tut-body { grid-area: body; }
    .tut-flip { max-width: 100%; }
    .tut-col { padding: 1.5rem 1rem 1.75rem; }
}

/* ---------- Footer ---------- */
.footer {
    padding: 3rem 0 2rem;
    border-top: 1px solid rgba(184, 212, 232, 0.1);
    background: rgba(9, 15, 57, 0.6);
    position: relative;
    z-index: 1;
}
.footer-grid {
    display: grid;
    gap: 2rem;
    grid-template-columns: 1fr;
}
.footer h4 {
    font-family: var(--font-ui);
    font-weight: 700;
    color: var(--hat-cyan);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-size: 0.85rem;
    margin: 0 0 1rem;
}
.footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.footer a { color: var(--main1); }
.footer-bottom {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(184, 212, 232, 0.08);
    text-align: center;
    color: var(--main1);
    font-size: 0.85rem;
}
@media (min-width: 700px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }

/* ---------- Legal pages (long-form content) ---------- */
.prose {
    background: rgba(9, 15, 57, 0.55);
    border: 1px solid rgba(184, 212, 232, 0.1);
    border-radius: var(--radius-lg);
    padding: clamp(1.5rem, 4vw, 3rem);
    max-width: 820px;
    margin: 0 auto;
}
.prose h2 { color: var(--hat-cyan); margin-top: 2rem; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { color: #fff; margin-top: 1.5rem; }
.prose ul, .prose ol { padding-left: 1.4rem; color: #CFDDEB; }
.prose li { margin-bottom: 0.4rem; }
.prose code {
    background: rgba(184, 212, 232, 0.12);
    padding: 0.15rem 0.4rem;
    border-radius: 6px;
    font-size: 0.92em;
}
.toc {
    background: rgba(74, 139, 194, 0.12);
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    margin: 0 0 2rem;
}
.toc ul { padding-left: 1.2rem; }

/* ---------- Utilities ---------- */
.text-center { text-align: center; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }

/* ---------- Trailer video (always portrait 9:16) ---------- */
.video-wrap {
    max-width: 360px;
    margin: 0 auto;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-soft), 0 0 60px rgba(94, 231, 224, 0.25);
    background: #000;
    border: 1px solid rgba(94, 231, 224, 0.2);
    position: relative;
    aspect-ratio: 9 / 16;
}
.video-wrap video {
    width: 100%;
    height: 100%;
    display: block;
    aspect-ratio: 9 / 16;
    object-fit: cover;
}
@media (min-width: 768px) {
    .video-wrap { max-width: 420px; }
}

.spinner-coin {
    width: 28px; height: 28px; display: inline-block; vertical-align: middle;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .hero-mage { animation: none; }
    * { transition: none !important; }
}
