/* ============================================================
   MYSTIC ARCANE — Cosmic Premium
   Deep black · gold · nebula glow · 3D
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
    --bg:        #06040d;
    --bg-2:      #0c0a1d;
    --panel:     rgba(22, 18, 42, 0.55);
    --panel-solid: #14102a;
    --line:      rgba(212, 175, 106, 0.18);
    --line-soft: rgba(255, 255, 255, 0.08);

    --gold:      #d4af6a;
    --gold-2:    #f0d79a;
    --gold-deep: #a9803f;
    --violet:    #8b7bd8;
    --violet-2:  #b794f6;

    --text:      #ece8f7;
    --text-dim:  #b6afce;
    --text-muted:#6f6890;

    --grad-gold: linear-gradient(135deg, #f0d79a 0%, #d4af6a 45%, #a9803f 100%);
    --grad-violet: linear-gradient(135deg, #b794f6, #8b7bd8);

    --serif: 'Cormorant Garamond', Georgia, serif;
    --sans:  'Inter', system-ui, sans-serif;

    --shadow:  0 24px 60px -20px rgba(0, 0, 0, 0.8);
    --glow:    0 0 40px -8px rgba(212, 175, 106, 0.45);
    --radius:  18px;
    --radius-lg: 28px;

    --maxw: 1180px;
    --nav-h: 76px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--sans);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
a { cursor: pointer; text-decoration: none; color: inherit; }
input, textarea { font-family: inherit; }
ul { list-style: none; }
::selection { background: rgba(212, 175, 106, 0.3); color: #fff; }

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.12; }
em { font-style: italic; }

/* ---------- Cosmic background ---------- */
#stars-canvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    display: block;
    background:
        radial-gradient(ellipse 120% 80% at 50% -10%, #1a1338 0%, transparent 55%),
        radial-gradient(ellipse 90% 70% at 85% 20%, rgba(90, 60, 140, 0.35) 0%, transparent 50%),
        radial-gradient(ellipse 100% 80% at 10% 80%, rgba(120, 90, 50, 0.18) 0%, transparent 55%),
        var(--bg);
}
.cosmic-veil {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
        radial-gradient(ellipse 70% 50% at 50% 40%, transparent 40%, rgba(6, 4, 13, 0.55) 100%),
        linear-gradient(180deg, transparent 60%, rgba(6, 4, 13, 0.7) 100%);
}

/* Everything sits above the cosmos */
#navbar, .section, .overlay, .modal { position: relative; z-index: 3; }

/* ---------- Loader ---------- */
#loader {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    background: var(--bg);
    transition: opacity 0.8s ease, visibility 0.8s ease;
}
#loader.gone { opacity: 0; visibility: hidden; }
.loader-glyph {
    font-size: 56px;
    color: var(--gold);
    animation: pulse-glyph 1.8s ease-in-out infinite;
    text-shadow: var(--glow);
}
.loader-text {
    font-family: var(--serif);
    font-size: 22px;
    letter-spacing: 0.4em;
    text-transform: uppercase;
    color: var(--text-dim);
}
@keyframes pulse-glyph {
    0%, 100% { transform: scale(1) rotate(0deg); opacity: 0.7; }
    50%      { transform: scale(1.25) rotate(180deg); opacity: 1; }
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 26px;
    border-radius: 100px;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.02em;
    transition: transform 0.25s ease, box-shadow 0.3s ease, background 0.3s ease;
    overflow: hidden;
    white-space: nowrap;
}
.btn-sm  { padding: 9px 18px;  font-size: 13px; }
.btn-lg  { padding: 16px 34px; font-size: 15px; }
.btn-block { width: 100%; }

.btn-primary {
    background: var(--grad-gold);
    color: #2a1c08;
    font-weight: 600;
    box-shadow: 0 10px 30px -10px rgba(212, 175, 106, 0.6);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 40px -10px rgba(212, 175, 106, 0.8); }

.btn-ghost {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text);
    border: 1px solid var(--line);
    backdrop-filter: blur(6px);
}
.btn-ghost:hover { border-color: var(--gold); background: rgba(212, 175, 106, 0.08); transform: translateY(-2px); }

.btn-premium {
    background: rgba(139, 123, 216, 0.12);
    color: var(--violet-2);
    border: 1px solid rgba(139, 123, 216, 0.4);
}
.btn-premium:hover { background: rgba(139, 123, 216, 0.22); transform: translateY(-2px); }

.btn-shine {
    position: absolute;
    top: 0; left: -120%;
    width: 60%; height: 100%;
    background: linear-gradient(110deg, transparent, rgba(255,255,255,0.55), transparent);
    transform: skewX(-20deg);
    animation: shine 3.5s ease-in-out infinite;
}
@keyframes shine { 0%, 60% { left: -120%; } 80%, 100% { left: 130%; } }

/* ============================================================
   Glass utility
   ============================================================ */
.glass {
    background: var(--panel);
    border: 1px solid var(--line-soft);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: var(--shadow);
}

/* ============================================================
   Navbar
   ============================================================ */
#navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--nav-h);
    z-index: 40;
    display: flex;
    align-items: center;
    transition: background 0.4s ease, backdrop-filter 0.4s ease, border-color 0.4s ease;
    border-bottom: 1px solid transparent;
}
#navbar.scrolled {
    background: rgba(8, 6, 18, 0.72);
    backdrop-filter: blur(16px);
    border-bottom-color: var(--line);
}
.nav-container {
    width: 100%;
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.nav-logo { display: flex; align-items: center; gap: 10px; }
.nav-logo-mark { color: var(--gold); font-size: 20px; text-shadow: var(--glow); }
.nav-logo-text { font-family: var(--serif); font-size: 22px; font-weight: 600; letter-spacing: 0.02em; }
.nav-logo-text span { color: var(--gold); }

.nav-menu { display: flex; align-items: center; gap: 30px; }
.nav-menu > a:not(.btn) {
    font-size: 14px;
    color: var(--text-dim);
    letter-spacing: 0.02em;
    transition: color 0.25s ease;
    position: relative;
}
.nav-menu > a:not(.btn):hover { color: var(--gold); }
.user-badge {
    display: none;
    font-size: 13px;
    color: var(--gold-2);
    padding: 5px 14px;
    border: 1px solid var(--line);
    border-radius: 100px;
}
.user-badge.visible { display: inline-block; }

.nav-toggle { display: none; flex-direction: column; gap: 5px; padding: 6px; }
.nav-toggle span {
    width: 24px; height: 2px; background: var(--text); border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}
.nav-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   Section system
   ============================================================ */
.section { display: none; }
.section.active { display: block; }

.section-page { padding: calc(var(--nav-h) + 50px) 28px 100px; min-height: 100vh; }
.page-wrap { max-width: var(--maxw); margin: 0 auto; }
.page-wrap.narrow { max-width: 720px; }
.page-wrap.reading-wrap { max-width: 1080px; }

.page-head { text-align: center; margin-bottom: 50px; }
.page-head h2 { font-size: clamp(2.2rem, 5vw, 3.4rem); margin: 6px 0 14px; }

.kicker {
    font-size: 12px;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: var(--gold);
    font-weight: 500;
}
.block-lead { color: var(--text-dim); max-width: 600px; margin: 0 auto; font-size: 16px; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: var(--nav-h) 28px 60px;
}
.hero-inner { max-width: 820px; position: relative; z-index: 4; }
.hero-eyebrow {
    font-size: 12px;
    letter-spacing: 0.34em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 26px;
}
.hero-title {
    font-size: clamp(3rem, 9vw, 6.5rem);
    font-weight: 600;
    letter-spacing: -0.01em;
    margin-bottom: 28px;
}
.hero-title .line { display: block; }
.hero-title em {
    font-style: italic;
    background: var(--grad-gold);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero-sub {
    font-size: clamp(1rem, 2vw, 1.18rem);
    color: var(--text-dim);
    max-width: 620px;
    margin: 0 auto 40px;
}
.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-bottom: 38px; }
.hero-trust {
    display: flex; gap: 26px; justify-content: center; flex-wrap: wrap;
    font-size: 13px; color: var(--text-muted);
}

/* Floating 3D deck */
.hero-deck {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 1400px;
    opacity: 0.32;
}
.deck-card {
    position: absolute;
    width: clamp(130px, 16vw, 220px);
    aspect-ratio: 0.6;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 30px 60px -20px rgba(0,0,0,0.9);
    border: 1px solid rgba(212, 175, 106, 0.3);
    animation: deck-float 7s ease-in-out infinite;
}
.deck-card img { width: 100%; height: 100%; object-fit: cover; }
.deck-card:nth-child(1) { transform: translateX(-46vw) rotate(-16deg); animation-delay: 0s; }
.deck-card:nth-child(2) { transform: translateX(-24vw) rotate(-8deg) translateY(30px); animation-delay: 0.6s; }
.deck-card-center      { transform: translateY(-10px) scale(1.12); animation-delay: 1.2s; z-index: 3; }
.deck-card:nth-child(4) { transform: translateX(24vw) rotate(8deg) translateY(30px); animation-delay: 1.8s; }
.deck-card:nth-child(5) { transform: translateX(46vw) rotate(16deg); animation-delay: 2.4s; }
@keyframes deck-float { 0%, 100% { margin-top: 0; } 50% { margin-top: -22px; } }

.scroll-cue {
    position: absolute;
    bottom: 30px; left: 50%;
    transform: translateX(-50%);
    display: flex; flex-direction: column; align-items: center; gap: 10px;
    font-size: 11px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--text-muted);
}
.scroll-cue-line {
    width: 1px; height: 46px;
    background: linear-gradient(var(--gold), transparent);
    animation: cue 2s ease-in-out infinite;
}
@keyframes cue { 0%, 100% { transform: scaleY(0.4); opacity: 0.4; transform-origin: top; } 50% { transform: scaleY(1); opacity: 1; } }

/* ============================================================
   Landing blocks
   ============================================================ */
.land-block { max-width: var(--maxw); margin: 0 auto; padding: 110px 28px; }
.block-head { text-align: center; margin-bottom: 56px; }
.block-head h2 { font-size: clamp(2rem, 5vw, 3.2rem); margin-top: 8px; }

/* How / steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.step {
    padding: 38px 30px;
    border-radius: var(--radius-lg);
    background: var(--panel);
    border: 1px solid var(--line-soft);
    backdrop-filter: blur(12px);
    transition: transform 0.4s ease, border-color 0.4s ease;
}
.step:hover { transform: translateY(-8px); border-color: var(--line); }
.step-num {
    font-family: var(--serif);
    font-size: 44px;
    background: var(--grad-gold);
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
    margin-bottom: 14px;
}
.step h3 { font-size: 1.5rem; margin-bottom: 10px; }
.step p { color: var(--text-dim); font-size: 15px; }

/* Featured spreads preview */
.featured-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
    margin-bottom: 46px;
}
.block-cta { text-align: center; }
.feat-card {
    padding: 30px 26px;
    border-radius: var(--radius);
    background: var(--panel);
    border: 1px solid var(--line-soft);
    backdrop-filter: blur(12px);
    transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
    cursor: pointer;
    display: flex; flex-direction: column; gap: 12px;
}
.feat-card:hover { transform: translateY(-6px); border-color: var(--gold); box-shadow: var(--glow); }
.feat-card .spread-icon { width: 46px; height: 46px; color: var(--gold); }
.feat-card h3 { font-size: 1.4rem; }
.feat-card p { color: var(--text-dim); font-size: 14px; flex: 1; }
.feat-meta { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-muted); border-top: 1px solid var(--line-soft); padding-top: 12px; }
.feat-meta .free-tag { color: var(--gold); }

/* Arcana teaser */
.arcana-teaser {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 50px;
    align-items: center;
}
.arcana-teaser-text h2 { font-size: clamp(2rem, 4vw, 3rem); margin: 10px 0 18px; }
.arcana-teaser-text p { color: var(--text-dim); margin-bottom: 26px; }
.arcana-teaser-rail {
    display: flex;
    gap: 16px;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.rail-track { display: flex; gap: 16px; animation: rail 38s linear infinite; }
.rail-card {
    flex: 0 0 auto;
    width: 120px; aspect-ratio: 0.6;
    border-radius: 12px; overflow: hidden;
    border: 1px solid rgba(212,175,106,0.25);
    box-shadow: 0 20px 40px -16px rgba(0,0,0,0.8);
}
.rail-card img { width: 100%; height: 100%; object-fit: cover; }
@keyframes rail { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* Final CTA */
.final-cta { text-align: center; }
.final-cta-inner {
    max-width: 640px; margin: 0 auto;
    padding: 70px 40px;
    border-radius: var(--radius-lg);
    background: radial-gradient(ellipse at top, rgba(212,175,106,0.12), transparent 70%), var(--panel);
    border: 1px solid var(--line);
    backdrop-filter: blur(14px);
}
.final-glyph { font-size: 40px; color: var(--gold); display: block; margin-bottom: 18px; text-shadow: var(--glow); }
.final-cta-inner h2 { font-size: clamp(2rem, 5vw, 3rem); margin-bottom: 14px; }
.final-cta-inner p { color: var(--text-dim); margin-bottom: 30px; }

/* Footer */
.site-footer {
    max-width: var(--maxw);
    margin: 40px auto 0;
    padding: 60px 28px 40px;
    border-top: 1px solid var(--line-soft);
}
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1.4fr; gap: 40px; margin-bottom: 40px; }
.footer-brand { display: flex; flex-direction: column; gap: 6px; }
.footer-brand .nav-logo-text { font-size: 24px; }
.footer-brand p { color: var(--text-muted); font-size: 14px; margin-top: 8px; }
.footer-col h4 { font-family: var(--sans); font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold); margin-bottom: 14px; }
.footer-col a { display: block; color: var(--text-dim); font-size: 14px; margin-bottom: 8px; transition: color 0.2s; }
.footer-col a:hover { color: var(--gold); }
.footer-fine { color: var(--text-muted); font-size: 13px; }
.footer-bottom { display: flex; justify-content: space-between; padding-top: 24px; border-top: 1px solid var(--line-soft); color: var(--text-muted); font-size: 13px; }

/* ============================================================
   Spreads grid (full page)
   ============================================================ */
.spreads-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}
.spread-card {
    position: relative;
    padding: 32px 28px;
    border-radius: var(--radius);
    background: var(--panel);
    border: 1px solid var(--line-soft);
    backdrop-filter: blur(12px);
    transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
    cursor: pointer;
    display: flex; flex-direction: column; gap: 14px;
    overflow: hidden;
}
.spread-card::before {
    content: '';
    position: absolute; inset: 0;
    background: radial-gradient(ellipse at top right, rgba(212,175,106,0.10), transparent 60%);
    opacity: 0; transition: opacity 0.4s ease;
}
.spread-card:hover { transform: translateY(-7px); border-color: var(--gold); box-shadow: var(--glow); }
.spread-card:hover::before { opacity: 1; }
.spread-card.featured { border-color: rgba(212,175,106,0.4); }

.spread-badge {
    position: absolute; top: 18px; right: 18px;
    font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase;
    padding: 4px 11px; border-radius: 100px; font-weight: 600;
}
.free-badge     { background: rgba(212,175,106,0.18); color: var(--gold-2); border: 1px solid var(--line); }
.premium-badge  { background: rgba(139,123,216,0.16); color: var(--violet-2); border: 1px solid rgba(139,123,216,0.35); }
.featured-badge { background: var(--grad-gold); color: #2a1c08; }

.spread-icon { width: 48px; height: 48px; color: var(--gold); }
.spread-icon svg { width: 100%; height: 100%; }
.spread-card h3 { font-size: 1.45rem; }
.spread-card p { color: var(--text-dim); font-size: 14px; flex: 1; }
.spread-info {
    display: flex; gap: 16px; font-size: 12px; color: var(--text-muted);
    border-top: 1px solid var(--line-soft); padding-top: 14px;
}
.spread-card .btn { margin-top: 4px; }

/* ============================================================
   Reading experience
   ============================================================ */
.back-link { color: var(--text-dim); font-size: 14px; margin-bottom: 24px; transition: color 0.2s; }
.back-link:hover { color: var(--gold); }
.reading-head { text-align: center; margin-bottom: 44px; }
.reading-head h2 { font-size: clamp(2rem, 5vw, 3rem); }
.reading-sub { color: var(--text-dim); margin: 8px 0 22px; }
.progress-bar {
    width: min(420px, 80%); height: 5px; margin: 0 auto 10px;
    background: rgba(255,255,255,0.08); border-radius: 100px; overflow: hidden;
}
.progress-fill { height: 100%; width: 0; background: var(--grad-gold); border-radius: 100px; transition: width 0.5s ease; }
.progress-text { font-size: 13px; color: var(--text-muted); }

/* Selected slots */
.selected-cards-area {
    display: flex; flex-wrap: wrap; gap: 18px; justify-content: center;
    margin-bottom: 50px;
    perspective: 1200px;
}
.selected-slot {
    width: 120px; aspect-ratio: 0.6;
    border-radius: 12px;
    border: 1.5px dashed rgba(212,175,106,0.3);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 8px; position: relative;
    transition: border-color 0.3s ease;
}
.selected-slot .slot-number {
    font-family: var(--serif); font-size: 28px; color: var(--text-muted);
}
.selected-slot .slot-label {
    position: absolute; bottom: -26px; left: 50%; transform: translateX(-50%);
    font-size: 11px; color: var(--text-muted); text-align: center; width: 130%; line-height: 1.3;
}
.selected-slot.filled { border: none; }

/* Card pool */
.card-pool-wrapper { text-align: center; }
.pool-hint { color: var(--text-dim); margin-bottom: 26px; font-style: italic; font-family: var(--serif); font-size: 1.15rem; }
.card-pool {
    display: flex; flex-wrap: wrap; gap: 10px; justify-content: center;
    max-width: 900px; margin: 0 auto;
    perspective: 1000px;
}

/* The tarot card (3D flip) */
.tarot-card {
    width: 90px; aspect-ratio: 0.6;
    cursor: pointer;
    perspective: 800px;
    transition: transform 0.3s ease;
}
.card-pool .tarot-card:hover { transform: translateY(-14px) scale(1.06); z-index: 5; }
.tarot-card-inner {
    position: relative; width: 100%; height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.8s cubic-bezier(0.4, 0.2, 0.2, 1);
}
.tarot-card.flipped .tarot-card-inner { transform: rotateY(180deg); }
.tarot-card-face {
    position: absolute; inset: 0;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: 10px; overflow: hidden;
    box-shadow: 0 14px 30px -12px rgba(0,0,0,0.8);
}
.tarot-card-front { transform: rotateY(180deg); border: 1px solid rgba(212,175,106,0.35); }
.tarot-card-front .card-image { width: 100%; height: 100%; object-fit: cover; }
.tarot-card-back {
    background: linear-gradient(150deg, #1a1338, #2a1d4d);
    border: 1px solid rgba(212,175,106,0.4);
}
.card-pattern {
    position: absolute; inset: 6px;
    border: 1px solid rgba(212,175,106,0.35);
    border-radius: 6px;
    background:
        radial-gradient(circle at 50% 50%, rgba(212,175,106,0.25) 0%, transparent 60%),
        repeating-linear-gradient(45deg, rgba(212,175,106,0.06) 0 6px, transparent 6px 12px);
}
.card-pattern::after {
    content: '✦';
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    color: var(--gold); font-size: 26px; text-shadow: var(--glow);
}
.tarot-card.selected { opacity: 0.25; pointer-events: none; transform: scale(0.9); }

/* Slots hold full-size flip cards */
.selected-slot.filled .tarot-card { width: 100%; cursor: default; }
.selected-slot.filled .tarot-card:hover { transform: none; }

/* ============================================================
   Reading result
   ============================================================ */
.reading-result { margin-top: 30px; }
.reading-result.hidden { display: none; }
.result-divider { text-align: center; margin: 50px 0 40px; position: relative; }
.result-divider::before {
    content: ''; position: absolute; top: 50%; left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg, transparent, var(--line), transparent);
}
.result-divider span {
    position: relative; background: var(--bg); padding: 0 20px;
    color: var(--gold); font-size: 22px; text-shadow: var(--glow);
}
.result-cards { display: flex; flex-direction: column; gap: 22px; max-width: 820px; margin: 0 auto; }
.result-card-item {
    display: flex; gap: 24px; align-items: flex-start;
    padding: 24px;
    border-radius: var(--radius);
    background: var(--panel);
    border: 1px solid var(--line-soft);
    backdrop-filter: blur(12px);
}
.result-card-visual {
    flex: 0 0 100px; width: 100px; aspect-ratio: 0.6;
    border-radius: 10px; overflow: hidden;
    border: 1px solid rgba(212,175,106,0.3);
    box-shadow: 0 14px 30px -12px rgba(0,0,0,0.8);
}
.result-card-visual .card-image { width: 100%; height: 100%; object-fit: cover; }
.result-card-info { flex: 1; }
.position-label {
    font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
    color: var(--gold); margin-bottom: 6px;
}
.result-card-info h4 { font-size: 1.4rem; margin-bottom: 8px; }
.result-card-info p { color: var(--text-dim); font-size: 15px; }

.result-summary {
    max-width: 820px; margin: 36px auto 0;
    padding: 36px;
    border-radius: var(--radius-lg);
    background: radial-gradient(ellipse at top, rgba(212,175,106,0.08), transparent 70%), var(--panel);
    border: 1px solid var(--line);
    backdrop-filter: blur(14px);
}
.result-summary h4 { font-size: 1.6rem; color: var(--gold-2); margin-bottom: 14px; }
.result-summary p { color: var(--text-dim); font-size: 16px; line-height: 1.8; }
.result-summary em { color: var(--text); font-style: italic; }
.result-summary strong { color: var(--gold-2); }
.result-actions { display: flex; gap: 14px; justify-content: center; margin-top: 36px; flex-wrap: wrap; }

/* Sí / No special result */
.sino-result { max-width: 520px; margin: 0 auto; text-align: center; }
.sino-verdict {
    font-family: var(--serif); font-size: 5rem; font-weight: 700; line-height: 1;
    margin-bottom: 24px;
}
.verdict-yes  { background: var(--grad-gold); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.verdict-no   { color: #d87a7a; }
.verdict-wait { color: var(--violet-2); }
.sino-card-display { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-bottom: 22px; }
.sino-card-visual { width: 140px; }
.sino-card-display h4 { font-size: 1.5rem; }
.sino-explanation { color: var(--text-dim); font-size: 16px; line-height: 1.8; }

/* ============================================================
   Arcana gallery
   ============================================================ */
.arcana-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 22px;
}
.arcana-card {
    cursor: pointer;
    text-align: center;
    transition: transform 0.35s ease;
}
.arcana-card:hover { transform: translateY(-8px); }
.arcana-card-visual {
    aspect-ratio: 0.6; border-radius: 14px; overflow: hidden;
    border: 1px solid rgba(212,175,106,0.25);
    box-shadow: 0 20px 40px -16px rgba(0,0,0,0.8);
    margin-bottom: 14px;
    transition: border-color 0.35s ease, box-shadow 0.35s ease;
}
.arcana-card:hover .arcana-card-visual { border-color: var(--gold); box-shadow: var(--glow); }
.arcana-card-visual .card-image { width: 100%; height: 100%; object-fit: cover; }
.arcana-card h3 { font-size: 1.1rem; margin-bottom: 4px; }
.arcana-keywords { font-size: 12px; color: var(--text-muted); }

/* Arcana detail overlay */
.overlay {
    position: fixed; inset: 0; z-index: 60;
    display: flex; align-items: center; justify-content: center;
    padding: 24px;
    background: rgba(4, 2, 10, 0.82);
    backdrop-filter: blur(8px);
}
.overlay.hidden { display: none; }
.overlay-inner { position: relative; max-width: 420px; width: 100%; }
.overlay-close {
    position: absolute; top: -44px; right: 0;
    width: 38px; height: 38px; border-radius: 50%;
    background: rgba(255,255,255,0.06); border: 1px solid var(--line-soft);
    color: var(--text); font-size: 16px; z-index: 2;
    transition: background 0.2s, transform 0.2s;
}
.overlay-close:hover { background: rgba(212,175,106,0.2); transform: rotate(90deg); }
.arcana-detail-expanded { text-align: center; }
.arcana-detail-image {
    width: 100%; border-radius: 16px;
    border: 1px solid rgba(212,175,106,0.4);
    box-shadow: 0 30px 70px -20px rgba(0,0,0,0.9), var(--glow);
    margin-bottom: 22px;
}
.arcana-detail-name { font-size: 1.8rem; margin-bottom: 8px; }
.arcana-detail-keywords { color: var(--gold); font-size: 13px; letter-spacing: 0.1em; }

/* ============================================================
   Auth / Dashboard / Plans
   ============================================================ */
.auth-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    align-items: start;
}
.auth-card { padding: 40px; border-radius: var(--radius-lg); }
.auth-card.hidden { display: none; }
.auth-card h3 { font-size: 1.9rem; margin-bottom: 6px; }
.auth-card-sub { color: var(--text-dim); font-size: 14px; margin-bottom: 26px; }

.field { margin-bottom: 18px; }
.field label { display: block; font-size: 13px; color: var(--text-dim); margin-bottom: 7px; }
.field input, .field textarea {
    width: 100%;
    padding: 13px 16px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--line-soft);
    border-radius: 12px;
    color: var(--text);
    font-size: 15px;
    transition: border-color 0.25s ease, background 0.25s ease;
}
.field input:focus, .field textarea:focus {
    outline: none; border-color: var(--gold); background: rgba(212,175,106,0.06);
}
.field textarea { resize: vertical; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.checkbox { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--text-dim); margin-bottom: 20px; cursor: pointer; }
.checkbox input { margin-top: 3px; accent-color: var(--gold); }

.form-msg {
    font-size: 14px; padding: 12px 16px; border-radius: 10px; margin-bottom: 16px;
    background: rgba(216, 122, 122, 0.12); border: 1px solid rgba(216,122,122,0.3); color: #e9a3a3;
}
.form-msg.hidden { display: none; }
.form-msg.success { background: rgba(212,175,106,0.12); border-color: var(--line); color: var(--gold-2); }

.auth-switch { text-align: center; font-size: 14px; color: var(--text-dim); margin-top: 20px; }
.auth-switch a { color: var(--gold); }
.auth-switch a:hover { text-decoration: underline; }

/* Plans */
.plans { display: flex; flex-direction: column; gap: 20px; }
.plan { position: relative; padding: 30px; border-radius: var(--radius-lg); }
.plan-featured { border-color: var(--line); box-shadow: var(--glow); }
.plan-tag {
    position: absolute; top: -12px; left: 30px;
    background: var(--grad-gold); color: #2a1c08;
    font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
    padding: 5px 14px; border-radius: 100px;
}
.plan-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 18px; }
.plan-head h4 { font-size: 1.5rem; }
.plan-price { color: var(--text-dim); font-size: 14px; }
.plan-price strong { font-family: var(--serif); font-size: 1.9rem; color: var(--gold-2); font-weight: 600; }
.plan-feats { margin-bottom: 24px; }
.plan-feats li { color: var(--text-dim); font-size: 14px; padding: 7px 0; border-bottom: 1px solid var(--line-soft); }
.plan-feats li:last-child { border-bottom: none; }

/* Cuando el usuario tiene la cuenta abierta: planes a pantalla completa, lado a lado */
#section-suscripcion.account-active .auth-layout { grid-template-columns: 1fr; }
#section-suscripcion.account-active .plans { display: grid; grid-template-columns: 1fr 1fr; align-items: start; }
@media (max-width: 720px) {
    #section-suscripcion.account-active .plans { grid-template-columns: 1fr; }
}

/* Dashboard */
.dashboard { max-width: 860px; margin: 0 auto; }
.dashboard.hidden { display: none; }
.dash-top { display: flex; justify-content: space-between; align-items: center; padding: 28px 32px; border-radius: var(--radius-lg); margin-bottom: 22px; }
.dash-greet { font-size: 13px; color: var(--text-muted); }
.dash-top h3 { font-size: 1.8rem; }

.sub-banner { display: flex; align-items: center; gap: 18px; padding: 20px 26px; border-radius: var(--radius); margin-bottom: 22px; border-color: var(--line); }
.sub-banner.hidden { display: none; }
.sub-banner-glyph { font-size: 26px; color: var(--gold); text-shadow: var(--glow); }
.sub-banner strong { color: var(--gold-2); }
.sub-banner p { font-size: 13px; color: var(--text-dim); }
.sub-banner .btn { margin-left: auto; }

.dash-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 36px; }
.dash-stat { padding: 24px; border-radius: var(--radius); display: flex; flex-direction: column; gap: 8px; }
.dash-stat-label { font-size: 12px; color: var(--text-muted); letter-spacing: 0.04em; }
.dash-stat-value { font-family: var(--serif); font-size: 1.7rem; color: var(--text); }
.dash-stat-value.gold { color: var(--gold); }
.dash-stat-cta { cursor: pointer; transition: border-color 0.3s, transform 0.3s; }
.dash-stat-cta:hover { border-color: var(--gold); transform: translateY(-4px); }

/* Tiradas disponibles (compradas y no consumidas) */
.dash-available { padding: 28px 30px; border-radius: var(--radius-lg); margin-bottom: 36px; }
.dash-available h3 { font-size: 1.5rem; margin-bottom: 18px; }
.available-list { display: flex; flex-direction: column; gap: 12px; }
.available-item {
    display: flex; align-items: center; gap: 16px;
    padding: 14px 18px; border-radius: var(--radius);
    background: rgba(255,255,255,0.03); border: 1px solid var(--line-soft);
    transition: border-color 0.3s;
}
.available-item:hover { border-color: var(--gold); }
.available-item .history-item-icon { width: 32px; height: 32px; color: var(--gold); flex: 0 0 auto; }
.available-info { flex: 1; }
.available-name { font-family: var(--serif); font-size: 1.2rem; }
.available-count { font-size: 12px; color: var(--gold); letter-spacing: 0.04em; }
.available-item .btn { flex: 0 0 auto; }
.available-empty { color: var(--text-muted); font-size: 14px; }
.available-sub {
    display: flex; align-items: center; gap: 16px;
    padding: 8px 4px;
}
.available-sub .final-glyph { font-size: 30px; margin: 0; }
.available-sub div { flex: 1; }
.available-sub strong { color: var(--gold-2); font-size: 1.05rem; }
.available-sub p { font-size: 13px; color: var(--text-dim); }

.dash-history h3 { font-size: 1.6rem; margin-bottom: 20px; }
.history-list { display: flex; flex-direction: column; gap: 12px; }
.history-item {
    display: flex; align-items: center; gap: 18px;
    padding: 16px 20px;
    border-radius: var(--radius);
    background: var(--panel);
    border: 1px solid var(--line-soft);
    backdrop-filter: blur(10px);
    cursor: pointer;
    transition: border-color 0.3s, transform 0.3s;
}
.history-item:hover { border-color: var(--gold); transform: translateX(4px); }
.history-item-icon { width: 34px; height: 34px; color: var(--gold); flex: 0 0 auto; }
.history-item-icon svg { width: 100%; height: 100%; }
.history-item-info { flex: 1; }
.history-item-name { font-family: var(--serif); font-size: 1.15rem; }
.history-item-date { font-size: 12px; color: var(--text-muted); }
.history-item-cards { display: flex; gap: 4px; }
.history-mini-card { width: 26px; aspect-ratio: 0.6; border-radius: 4px; overflow: hidden; border: 1px solid rgba(212,175,106,0.25); }
.history-mini-card img { width: 100%; height: 100%; object-fit: cover; }
.history-item-arrow { font-size: 22px; color: var(--text-muted); }

.history-empty { text-align: center; padding: 50px 20px; color: var(--text-dim); }
.history-empty.hidden { display: none; }
.history-empty p { margin: 12px 0 22px; }

/* ============================================================
   Modals
   ============================================================ */
.modal {
    position: fixed; inset: 0; z-index: 70;
    display: flex; align-items: center; justify-content: center;
    padding: 24px;
    background: rgba(4, 2, 10, 0.84);
    backdrop-filter: blur(8px);
}
.modal.hidden { display: none; }
.modal-box {
    position: relative;
    width: 100%; max-width: 440px;
    padding: 44px 40px;
    border-radius: var(--radius-lg);
    border-color: var(--line);
    max-height: 90vh; overflow-y: auto;
}
.modal-step { text-align: center; }
.modal-step.modal-state { display: none; }
.modal-step.modal-state.active { display: block; }
.modal-glyph { font-size: 36px; color: var(--gold); display: block; margin-bottom: 16px; text-shadow: var(--glow); }
.modal-box h3 { font-size: 1.7rem; margin-bottom: 12px; }
.modal-box p { color: var(--text-dim); font-size: 15px; margin-bottom: 20px; }
.modal-mini { font-size: 13px; color: var(--gold); margin-bottom: 22px; }
.modal-fine { font-size: 12px; color: var(--text-muted); margin-top: 14px; margin-bottom: 0; }
.modal-price-big {
    font-family: var(--serif); font-size: 3rem; font-weight: 700;
    background: var(--grad-gold); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
    margin-bottom: 24px;
}
.modal-price-big span { font-size: 1.1rem; -webkit-text-fill-color: var(--text-muted); }
.modal-feats { text-align: left; margin-bottom: 26px; }
.modal-feats li { color: var(--text-dim); font-size: 14px; padding: 8px 0; border-bottom: 1px solid var(--line-soft); }
.modal-feats li:last-child { border-bottom: none; }
.modal-box .field { text-align: left; }
.modal-box .btn { margin-bottom: 10px; }

/* States */
.spinner {
    width: 46px; height: 46px; margin: 0 auto 20px;
    border: 3px solid rgba(212,175,106,0.2);
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.success-check {
    width: 64px; height: 64px; margin: 0 auto 18px;
    border-radius: 50%;
    background: var(--grad-gold);
    color: #2a1c08; font-size: 32px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    animation: pop 0.5s cubic-bezier(0.2, 1.4, 0.4, 1);
}
@keyframes pop { from { transform: scale(0); } to { transform: scale(1); } }

/* ============================================================
   Scroll reveal
   ============================================================ */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity 0.9s ease, transform 0.9s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ============================================================
   Utilities
   ============================================================ */
.hidden { display: none !important; }
.gold { color: var(--gold); }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 900px) {
    .steps, .dash-stats { grid-template-columns: 1fr; }
    .featured-grid { grid-template-columns: 1fr 1fr; }
    .arcana-teaser { grid-template-columns: 1fr; }
    .auth-layout { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; gap: 28px; }
}

@media (max-width: 720px) {
    .nav-toggle { display: flex; }
    .nav-menu {
        position: fixed; top: var(--nav-h); right: 0;
        width: min(280px, 80vw); height: calc(100vh - var(--nav-h));
        flex-direction: column; align-items: flex-start; gap: 22px;
        padding: 32px 28px;
        background: rgba(10, 7, 22, 0.96);
        backdrop-filter: blur(20px);
        border-left: 1px solid var(--line);
        transform: translateX(110%);
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }
    .nav-menu.open { transform: translateX(0); }
    .featured-grid { grid-template-columns: 1fr; }
    .field-row { grid-template-columns: 1fr; }
    .result-card-item { flex-direction: column; align-items: center; text-align: center; }
    .result-card-visual { flex-basis: auto; }
    .deck-card:nth-child(1), .deck-card:nth-child(5) { display: none; }
    .hero-deck { opacity: 0.2; }
    .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
    .land-block { padding: 70px 22px; }
    .section-page { padding-left: 20px; padding-right: 20px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
    .reveal { opacity: 1; transform: none; }
}
