/* ============================================
   Royal Forge — Forged in Darkness
   Medieval / Dark Fantasy Aesthetic
   Fonts: Cinzel (headings) + Crimson Pro (body)
   ============================================ */

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

:root {
    /* Forge surfaces */
    --forge-void:   #060504;
    --forge-black:  #0a0806;
    --forge-iron:   #131109;
    --forge-steel:  #1c1914;
    --forge-pewter: #2a2620;

    /* Gold spectrum */
    --gold:         #C9952C;
    --gold-bright:  #F0C040;
    --gold-pale:    #E8D5A0;
    --gold-dim:     #6B5010;

    /* Ember glow */
    --ember:        #C44A00;

    /* Data / status colors */
    --pvp:          #D04040;
    --pve:          #2E9E6E;
    --craft:        #7048C0;
    --crystal:      #2868D0;

    /* Typography */
    --text:         #E0D4B8;
    --text-muted:   #7A6E5A;
    --text-dim:     #40382E;

    /* Card surfaces */
    --card-bg:            rgba(19, 17, 9, 0.7);
    --card-border:        rgba(180, 140, 40, 0.10);
    --card-border-hover:  rgba(200, 160, 55, 0.30);

    /* Layout */
    --nav-height: 64px;
    --radius:     4px;
    --radius-sm:  3px;
    --radius-lg:  8px;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--nav-height);
    /* `clip` beats `hidden` here: no accidental scroll context is
       created, so fixed descendants (banner, navbar) still pin
       correctly and iOS Safari stops letting wide children peek
       out with a horizontal swipe. */
    overflow-x: clip;
}

body {
    font-family: 'Crimson Pro', Georgia, 'Times New Roman', serif;
    background-color: var(--forge-black);
    color: var(--text);
    line-height: 1.7;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: clip;
}

/* Persistent forge glow — warms the bottom of every page */
body::after {
    content: '';
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 140vw;
    height: 55vh;
    background: radial-gradient(ellipse at bottom center,
        rgba(160, 80, 0, 0.10) 0%,
        transparent 70%);
    pointer-events: none;
    z-index: 0;
}

a   { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul  { list-style: none; }

/* --- Container --- */
.container {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 24px;
}

/* --- Global heading font --- */
h1, h2, h3, h4 {
    font-family: 'Cinzel', 'Palatino Linotype', Georgia, serif;
    font-weight: 700;
    letter-spacing: 0.04em;
}

/* --- Section typography --- */
.section-title {
    font-size: clamp(1.55rem, 4vw, 2.4rem);
    font-weight: 700;
    text-align: center;
    letter-spacing: 0.07em;
    margin-bottom: 10px;
    color: var(--gold-pale);
    text-shadow: 0 0 40px rgba(200, 160, 60, 0.25);
}

.section-subtitle {
    font-size: clamp(0.975rem, 2vw, 1.1rem);
    color: var(--text-muted);
    text-align: center;
    max-width: 500px;
    margin: 0 auto 56px;
    font-style: italic;
    line-height: 1.8;
}

/* Decorative ornament between title and subtitle */
.section-title + .section-subtitle::before {
    content: '\2014\00a0\2726\00a0\2014';
    display: block;
    color: var(--gold-dim);
    font-size: 0.7rem;
    letter-spacing: 0.35em;
    margin-bottom: 14px;
    font-style: normal;
}

/* ============================================
   NAV
   ============================================ */
#navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    z-index: 100;
    transition: background 0.4s, box-shadow 0.4s;
}

#navbar.scrolled {
    background: rgba(6, 5, 4, 0.94);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 1px 0 var(--card-border), 0 4px 32px rgba(0, 0, 0, 0.5);
}

.nav-container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

/* Mobile: give the four-group language selector room to breathe.
   Allow the nav to wrap when the dropdowns + CTA won't fit on one
   line (~420px and below) instead of overflowing horizontally. */
@media (max-width: 520px) {
    .nav-container {
        padding: 0 12px;
        gap: 8px;
    }
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Cinzel', serif;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.09em;
    color: var(--gold-pale);
}

.nav-logo-icon { border-radius: 6px; }

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-lang {
    background: transparent;
    border: 1px solid var(--card-border);
    color: var(--text-muted);
    padding: 6px;
    border-radius: var(--radius);
    cursor: pointer;
    transition: border-color 0.2s;
    display: flex;
    align-items: center;
}

.btn-lang:hover { border-color: var(--gold-dim); }

.lang-segmented {
    position: relative;
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    padding: 3px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
}

/* Mobile: let the dropdown buttons shrink a little on narrow viewports;
   4 dropdowns side-by-side is tight under ~420px. We allow wrap. */
@media (max-width: 520px) {
    .lang-segmented { gap: 2px; padding: 2px; }
    .lang-more.lang-group-btn { padding: 3px 5px; letter-spacing: 0.3px; }
}

/* ──────────────────── Mobile language sheet ──────────────────── */

/* Single-button trigger that replaces the 4-dropdown segmented
   control on narrow viewports. Hidden by default (desktop) and
   surfaced by the breakpoint below. */
.lang-mobile-trigger {
    display: none;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    color: var(--text-muted);
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    cursor: pointer;
    transition: border-color 0.15s ease, color 0.15s ease;
}

.lang-mobile-trigger:hover {
    border-color: var(--gold-dim);
    color: var(--text);
}

.lang-mobile-icon {
    font-size: 0.95rem;
    line-height: 1;
}

.lang-mobile-current {
    font-family: 'JetBrains Mono', monospace;
    color: var(--gold);
}

/* Below 720px, the 4 group dropdowns are too wide to fit the nav
   beside the "Open App" CTA — they wrap to a second line and
   overflow into ugly two-row layouts. Swap to the single trigger
   that opens the sheet. */
@media (max-width: 720px) {
    .lang-segmented { display: none; }
    .lang-mobile-trigger { display: inline-flex; }
}

/* The sheet itself. Always present in the DOM (so initLangSheet()
   can populate it once at startup); display:none above the
   breakpoint so desktop never sees it even if the `hidden`
   attribute is removed by accident. */
.lang-sheet {
    display: none;
}
@media (max-width: 720px) {
    .lang-sheet:not([hidden]) { display: block; }
}

.lang-sheet-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 200;
    animation: langSheetFade 180ms ease-out;
}

.lang-sheet-panel {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 201;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    background:
        linear-gradient(180deg, rgba(245, 158, 11, 0.06) 0%, transparent 24%),
        linear-gradient(180deg, rgba(18, 14, 10, 0.98), rgba(10, 8, 6, 0.98));
    border-top: 1px solid var(--gold-dim);
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -18px 40px rgba(0, 0, 0, 0.55);
    animation: langSheetSlide 220ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

@keyframes langSheetFade {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes langSheetSlide {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
}

.lang-sheet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px 10px;
    border-bottom: 1px solid var(--card-border);
}

.lang-sheet-title {
    margin: 0;
    font-family: 'Cinzel', serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--gold);
    letter-spacing: 0.06em;
}

.lang-sheet-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.6rem;
    line-height: 1;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}
.lang-sheet-close:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
}

.lang-sheet-body {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 6px 12px 24px;
}

.lang-sheet-body section {
    padding: 8px 0 4px;
}

.lang-sheet-section-title {
    margin: 0 0 6px;
    padding: 0 6px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.lang-sheet-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
}

@media (max-width: 420px) {
    .lang-sheet-list { grid-template-columns: 1fr; }
}

.lang-sheet-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 12px 12px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 8px;
    color: var(--text);
    font-family: inherit;
    font-size: 0.9rem;
    text-align: left;
    cursor: pointer;
    transition: background 0.12s ease, border-color 0.12s ease;
}
.lang-sheet-item:hover,
.lang-sheet-item:focus-visible {
    background: rgba(245, 158, 11, 0.08);
    outline: none;
}
.lang-sheet-item-active {
    background: rgba(245, 158, 11, 0.14);
    border-color: var(--gold-dim);
    color: var(--gold);
}

.lang-sheet-item-native { font-weight: 500; }

.lang-sheet-item-meta {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
    flex-shrink: 0;
}

/* Lock body scroll while the sheet is open. */
body.lang-sheet-open { overflow: hidden; }

/* ──────────────────── Language dropdowns ──────────────────── */

.lang-more {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 3px 6px 3px 7px;
    margin-left: 2px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: calc(var(--radius) - 2px);
    cursor: pointer;
    color: var(--text-muted);
    font-family: inherit;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.6px;
    opacity: 0.55;
    transition: opacity 0.15s ease, color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.lang-more:hover { opacity: 0.9; color: var(--text); }
.lang-more.lang-more-active {
    opacity: 1;
    color: var(--gold, #F59E0B);
    background: rgba(245, 158, 11, 0.14);
    border-color: var(--gold-dim);
}
.lang-more-label { line-height: 1; }
.lang-more-caret { font-size: 0.65rem; line-height: 1; opacity: 0.8; }

.lang-more-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 100;
    list-style: none;
    margin: 0;
    padding: 6px;
    min-width: 220px;
    background: linear-gradient(180deg, rgba(245,158,11,0.05) 0%, transparent 24%),
                linear-gradient(180deg, rgba(18,14,10,0.97), rgba(10,8,6,0.97));
    border: 1px solid var(--card-border);
    border-top: 1px solid var(--gold-dim);
    border-radius: calc(var(--radius) + 2px);
    box-shadow: 0 18px 38px rgba(0,0,0,0.55), 0 0 0 1px rgba(245,158,11,0.1) inset;
    backdrop-filter: blur(14px) saturate(130%);
    -webkit-backdrop-filter: blur(14px) saturate(130%);
}
.lang-more-menu[hidden] { display: none; }

.lang-more-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 9px 12px;
    background: transparent;
    border: none;
    border-radius: calc(var(--radius) - 1px);
    cursor: pointer;
    color: var(--text);
    font-family: inherit;
    font-size: 0.85rem;
    text-align: left;
    transition: background 0.12s ease, padding-left 0.12s ease;
}
.lang-more-item:hover {
    background: rgba(245, 158, 11, 0.1);
    padding-left: 14px;
}
.lang-more-native { font-weight: 500; }
.lang-more-meta {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
}

/* Group dropdown button — constrain width so a long native label
   (e.g. "Valencià", "Asturianu") doesn't stretch the nav. */
.lang-more.lang-group-btn {
    max-width: 140px;
}
.lang-more.lang-group-btn .lang-more-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 120px;
}

/* RTL: when document.dir=rtl (Arabic), anchor the dropdown menus to
   the LEFT of their trigger instead of the right, otherwise they
   fly off the screen edge in the nav. */
[dir="rtl"] .lang-more-menu {
    right: auto;
    left: 0;
}
[dir="rtl"] .lang-more-item {
    text-align: right;
}

/* ──────────────────── Site-wide announcement banner ──────────────────── */

/* One-shot announcements with a hardcoded `validUntil`. main.js
   shows / hides it; users can dismiss per-id with localStorage.
   Stacks ABOVE the Beta banner (top:0) so a Beta-locale user with
   an active announcement sees both, announce on top, beta below. */
:root { --announce-h: 0px; }

.announce-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 102;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 10px 48px 10px 16px;
    background:
        linear-gradient(180deg, rgba(245, 158, 11, 0.10), transparent 80%),
        rgba(18, 14, 10, 0.97);
    border-bottom: 1px solid rgba(245, 158, 11, 0.45);
    color: var(--text);
    font-size: 0.85rem;
    line-height: 1.4;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.announce-banner[hidden] { display: none; }

.announce-banner-icon {
    flex-shrink: 0;
    font-size: 1.05rem;
    color: var(--gold, #F59E0B);
}

.announce-banner-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    align-items: flex-start;
    text-align: left;
    max-width: 1080px;
}

.announce-banner-title {
    font-weight: 700;
    color: var(--gold, #F59E0B);
    letter-spacing: 0.02em;
}

.announce-banner-body {
    color: var(--text-muted, #9ca3af);
    font-size: 0.82rem;
}

.announce-banner-close {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--text-muted, #9ca3af);
    font-size: 1.5rem;
    line-height: 1;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}
.announce-banner-close:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
}

@media (max-width: 540px) {
    .announce-banner { font-size: 0.78rem; padding: 8px 40px 8px 12px; }
    .announce-banner-body { font-size: 0.76rem; }
}


/* ──────────────────── Beta translation banner ──────────────────── */

/* The banner is fixed at the very top of the viewport. When visible,
   body.beta-active lifts the nav down by --beta-h and pads the body
   top by the same amount so nothing is overlapped. --beta-h defaults
   to 0 — the banner is a no-op when the user isn't on a Beta locale.
   When the announce banner above is also active, body.announce-active
   pushes the Beta banner down by --announce-h so they stack cleanly. */
:root { --beta-h: 0px; }

.beta-lang-banner {
    position: fixed;
    top: var(--announce-h, 0px);
    left: 0;
    right: 0;
    z-index: 101;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 10px 48px 10px 16px;
    /* Solid base + faint gold accent on top. The previous version
       was two translucent gold layers only (0.14 + 0.06 alpha),
       which let the page content bleed through — caused visual
       noise on scroll, especially against the bright mockup. */
    background:
        linear-gradient(90deg, rgba(245,158,11,0.14), rgba(245,158,11,0.06)),
        rgba(10, 8, 6, 0.96);
    backdrop-filter: blur(14px) saturate(130%);
    -webkit-backdrop-filter: blur(14px) saturate(130%);
    border-bottom: 1px solid var(--gold-dim);
    color: var(--text);
    font-size: 0.85rem;
    /* Hard cap width so a very long locale banner (AR / HI) with a
       tiny viewport doesn't push the page wider than the viewport. */
    max-width: 100vw;
    box-sizing: border-box;
}
.beta-lang-banner[hidden] { display: none; }

/* Mobile: tighter padding + smaller font so the banner doesn't
   wrap into three lines on narrow viewports. */
@media (max-width: 520px) {
    .beta-lang-banner {
        padding: 8px 40px 8px 12px;
        font-size: 0.78rem;
        line-height: 1.3;
        gap: 8px;
    }
}

/* Banner-driven page offsets. Both --beta-h and --announce-h default
   to 0px; main.js sets each one to the actual measured banner height
   when the corresponding banner is visible. The page padding + nav
   top sum the two so stacking both banners "just works". */
body.beta-active,
body.announce-active { padding-top: calc(var(--announce-h, 0px) + var(--beta-h, 0px)); }
body.beta-active #navbar,
body.announce-active #navbar { top: calc(var(--announce-h, 0px) + var(--beta-h, 0px)); }

.beta-lang-banner-text { flex: 1; text-align: center; }

.beta-lang-banner-close {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    padding: 4px 10px;
    border-radius: var(--radius);
    transition: color 0.15s ease, background 0.15s ease;
}
.beta-lang-banner-close:hover {
    color: var(--text);
    background: rgba(255,255,255,0.06);
}

.btn-cta-nav {
    background: var(--gold);
    color: var(--forge-void);
    padding: 8px 20px;
    border-radius: var(--radius);
    font-family: 'Cinzel', serif;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
    /* Grid stack: both translations share the same cell.
       The probe (longest string) sets the width, so switching
       languages never resizes the button. */
    display: inline-grid;
    grid-template-areas: "stack";
    place-items: center;
    box-sizing: border-box;
}

.btn-cta-visible,
.btn-cta-probe {
    grid-area: stack;
    white-space: nowrap;
}

.btn-cta-probe {
    visibility: hidden;
    pointer-events: none;
}

.btn-cta-nav:hover {
    background: var(--gold-bright);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(200, 150, 40, 0.3);
}

/* ============================================
   HERO
   ============================================ */
.hero {
    padding: calc(var(--nav-height) + 80px) 0 100px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    z-index: 1;
}

/* Breathing forge light behind hero */
.hero::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -38%);
    width: 900px;
    height: 600px;
    background: radial-gradient(ellipse at center,
        rgba(180, 90, 0, 0.09) 0%,
        transparent 68%);
    animation: forge-breathe 5s ease-in-out infinite;
    pointer-events: none;
}

@keyframes forge-breathe {
    0%, 100% { opacity: 0.7; transform: translate(-50%, -38%) scale(1);    }
    50%       { opacity: 1.0; transform: translate(-50%, -38%) scale(1.07); }
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
    position: relative;
    z-index: 1;
}

/* Preview Badge */
.preview-badge {
    display: inline-block;
    background: rgba(180, 140, 40, 0.07);
    color: var(--gold);
    padding: 5px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.68rem;
    font-family: 'Cinzel', serif;
    font-weight: 600;
    margin-bottom: 24px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    border: 1px solid rgba(180, 140, 40, 0.22);
    border-left: 3px solid var(--gold);
}

/* Gold gradient hero title */
.hero-title {
    font-family: 'Cinzel', serif;
    font-size: clamp(2rem, 5.5vw, 3.6rem);
    font-weight: 900;
    letter-spacing: 0.04em;
    line-height: 1.1;
    margin-bottom: 24px;
    background: linear-gradient(170deg, #F8ECC0 0%, #D4A540 45%, #8B5E14 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-title br { display: block; }

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.1rem);
    color: var(--text-muted);
    max-width: 420px;
    margin-bottom: 40px;
    line-height: 1.85;
    font-style: italic;
}

.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    align-items: center;
}

/* WIP notice */
.hero-wip-notice {
    margin-top: 24px;
    padding: 10px 16px;
    background: rgba(180, 140, 40, 0.05);
    border: 1px solid rgba(180, 140, 40, 0.11);
    border-left: 2px solid var(--gold-dim);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-style: italic;
    color: var(--text-muted);
    max-width: 420px;
    line-height: 1.6;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn-primary {
    display: inline-block;
    background: linear-gradient(135deg, #C9952C 0%, #9A6A14 100%);
    color: var(--forge-void);
    padding: 13px 32px;
    border-radius: var(--radius);
    font-family: 'Cinzel', serif;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
    box-shadow: 0 2px 0 rgba(0, 0, 0, 0.4), 0 4px 16px rgba(180, 120, 0, 0.18);
}

.btn-primary:hover {
    filter: brightness(1.15);
    transform: translateY(-2px);
    box-shadow: 0 2px 0 rgba(0, 0, 0, 0.4), 0 8px 24px rgba(200, 150, 40, 0.3);
}

.btn-primary-lg {
    padding: 15px 44px;
    font-size: 0.875rem;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    color: var(--text-muted);
    padding: 12px 24px;
    border-radius: var(--radius);
    border: 1px solid var(--card-border);
    font-size: 0.9rem;
    font-weight: 600;
    transition: color 0.2s, border-color 0.2s, transform 0.2s;
}

.btn-secondary:hover {
    color: var(--gold-pale);
    border-color: var(--gold-dim);
    transform: translateY(-1px);
}

.btn-appstore {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    background: rgba(20, 17, 12, 0.9);
    color: var(--text);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    text-decoration: none;
    transition: border-color 0.2s, transform 0.2s;
}

.btn-appstore:hover {
    border-color: var(--gold-dim);
    transform: translateY(-1px);
}

.btn-appstore-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.btn-appstore-text small {
    font-size: 0.65rem;
    font-weight: 400;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.btn-appstore-text strong {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.btn-appstore-lg { padding: 14px 24px; }
.btn-appstore-lg strong { font-size: 1.15rem; }

.cta-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ============================================
   BROWSER MOCKUP
   ============================================ */
.hero-mockup {
    display: flex;
    justify-content: center;
}

.mockup-browser {
    width: 420px;
    background: linear-gradient(160deg, #141109 0%, #0c0a07 100%);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(180, 140, 40, 0.14);
    box-shadow:
        0 32px 80px rgba(0, 0, 0, 0.65),
        0 0  60px rgba(160, 100, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.03);
    overflow: hidden;
}

.mockup-browser-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.018);
    border-bottom: 1px solid rgba(180, 140, 40, 0.08);
}

.mockup-dots {
    display: flex;
    gap: 6px;
}

.mockup-dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.mockup-dots span:first-child  { background: #7a2828; }
.mockup-dots span:nth-child(2) { background: #6a4a00; }
.mockup-dots span:last-child   { background: #1a4a2a; }

.mockup-url {
    flex: 1;
    background: rgba(255, 255, 255, 0.025);
    padding: 5px 12px;
    border-radius: 2px;
    font-size: 0.75rem;
    color: var(--text-dim);
    font-family: monospace;
    border: 1px solid rgba(255, 255, 255, 0.035);
}

.mockup-browser-content {
    aspect-ratio: 16/10;
    overflow: hidden;
    display: flex;
    align-items: flex-start;
}

.mockup-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
}

/* ============================================
   SECTIONS
   ============================================ */
.section {
    padding: 100px 0;
    position: relative;
    z-index: 1;
}

.section-alt {
    background: rgba(8, 6, 4, 0.55);
    position: relative;
}

/* ── Ecosystem (sibling Crintech tools)
   Intentionally small — Royal Forge stays the protagonist; these are
   discoverability links, not co-stars. */
.ecosystem {
    padding: 48px 0;
}

.ecosystem-title {
    font-family: 'Cinzel', serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--gold-dim, #9c7a1c);
    text-align: center;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin: 0 0 6px;
}

.ecosystem-sub {
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-secondary, #b8b1a8);
    font-style: italic;
    margin: 0 0 28px;
}

.ecosystem-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    max-width: 980px;
    margin: 0 auto;
}

.ecosystem-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 18px 20px;
    background: rgba(20, 15, 10, 0.55);
    border: 1px solid rgba(201, 149, 44, 0.2);
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s ease, transform 0.15s ease, background 0.15s ease;
}

.ecosystem-card:hover {
    border-color: rgba(201, 149, 44, 0.55);
    transform: translateY(-2px);
    background: rgba(28, 21, 12, 0.7);
}

.ecosystem-icon {
    font-size: 1.5rem;
    line-height: 1;
    margin-bottom: 2px;
}

.ecosystem-name {
    font-family: 'Cinzel', serif;
    font-size: 1rem;
    font-weight: 600;
    color: #e8d9b0;
    letter-spacing: 0.03em;
}

.ecosystem-desc {
    font-size: 0.8125rem;
    line-height: 1.5;
    color: var(--text-secondary, #b8b1a8);
    margin: 2px 0 6px;
}

.ecosystem-url {
    font-family: 'Cinzel', serif;
    font-size: 0.75rem;
    color: #c9a227;
    letter-spacing: 0.04em;
    font-weight: 600;
    margin-top: auto;
}

@media (max-width: 720px) {
    .ecosystem-grid {
        grid-template-columns: 1fr;
    }
}

/* Ornamental gold rule top and bottom on alt sections */
.section-alt::before,
.section-alt::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(180, 140, 40, 0.18) 25%,
        rgba(200, 160, 55, 0.32) 50%,
        rgba(180, 140, 40, 0.18) 75%,
        transparent 100%);
}

.section-alt::before { top: 0; }
.section-alt::after  { bottom: 0; }

/* ============================================
   FEATURES
   ============================================ */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.feature-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    padding: 32px 24px;
    transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
    position: relative;
    overflow: hidden;
}

/* Gold top glimmer on hover */
.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold-dim), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.feature-card:hover {
    transform: translateY(-4px);
    border-color: var(--card-border-hover);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), 0 0 30px rgba(180, 140, 40, 0.05);
}

.feature-card:hover::before { opacity: 1; }

.feature-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    background: rgba(180, 140, 40, 0.06);
    border: 1px solid rgba(180, 140, 40, 0.10);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: var(--icon-color, var(--gold));
}

.feature-card h3 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 10px;
    letter-spacing: 0.07em;
    color: var(--gold-pale);
}

.feature-card p {
    font-size: 0.975rem;
    color: var(--text-muted);
    line-height: 1.75;
}

/* ============================================
   HOW IT WORKS
   ============================================ */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    position: relative;
}

/* Connecting line between step circles */
.steps-grid::before {
    content: '';
    position: absolute;
    top: 40px;
    left: calc(16.67% + 40px);
    right: calc(16.67% + 40px);
    height: 1px;
    background: linear-gradient(90deg,
        rgba(180, 140, 40, 0.35) 0%,
        rgba(180, 140, 40, 0.12) 50%,
        rgba(180, 140, 40, 0.35) 100%);
    z-index: 0;
}

.step-card {
    text-align: center;
    padding: 40px 24px 32px;
    position: relative;
    z-index: 1;
}

.step-number {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--forge-steel) 0%, var(--forge-iron) 100%);
    border: 2px solid var(--gold-dim);
    color: var(--gold);
    font-family: 'Cinzel', serif;
    font-size: 1.25rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 28px;
    box-shadow: 0 0 24px rgba(180, 140, 40, 0.10), inset 0 1px 0 rgba(255, 255, 255, 0.04);
    position: relative;
    z-index: 1;
}

.step-card h3 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: 0.07em;
    color: var(--gold-pale);
}

.step-card p {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.75;
    font-style: italic;
}

/* ============================================
   PRICING
   ============================================ */
.pricing-card {
    max-width: 420px;
    margin: 0 auto;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    padding: 48px 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Gilded top border */
.pricing-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--gold-dim), var(--gold), var(--gold-dim));
}

.pricing-badge {
    display: inline-block;
    background: rgba(180, 140, 40, 0.07);
    color: var(--gold);
    padding: 5px 16px;
    border-radius: var(--radius-sm);
    font-family: 'Cinzel', serif;
    font-size: 0.68rem;
    font-weight: 600;
    margin-bottom: 24px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    border: 1px solid rgba(180, 140, 40, 0.20);
}

.pricing-price {
    font-family: 'Cinzel', serif;
    font-size: 4rem;
    font-weight: 900;
    margin-bottom: 32px;
    letter-spacing: -0.01em;
    background: linear-gradient(170deg, #F8ECC0 0%, #D4A540 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.pricing-features {
    text-align: left;
    margin-bottom: 36px;
}

.pricing-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    font-size: 1rem;
    color: var(--text-muted);
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.pricing-features li:last-child { border-bottom: none; }

/* ============================================
   DOWNLOAD CTA
   ============================================ */
.download-cta {
    text-align: center;
    padding: 32px 0;
}

.download-cta .section-title    { margin-bottom: 12px; }
.download-cta .section-subtitle { margin-bottom: 40px; }

.android-beta-note {
    font-size: 0.825rem;
    color: var(--text-muted);
    font-style: italic;
    margin-top: 16px;
    margin-bottom: 8px;
}

.cta-platforms-status {
    display: flex;
    gap: 28px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 36px;
}

.platform-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    color: var(--text-muted);
    font-style: italic;
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-beta { background: #2E9E6E; box-shadow: 0 0 6px rgba(46, 158, 110, 0.45); }
.status-wip  { background: var(--gold); box-shadow: 0 0 6px rgba(200, 150, 40, 0.45); }
.status-planned { background: #7048C0; box-shadow: 0 0 6px rgba(112, 72, 192, 0.45); }
.status-dev  { background: #3A3228; }

/* ============================================
   FOOTER
   ============================================ */
.footer {
    padding: 40px 0;
    border-top: 1px solid rgba(180, 140, 40, 0.09);
    position: relative;
    z-index: 1;
}

.footer-content {
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.footer-content a { color: var(--gold); transition: color 0.2s; }
.footer-content a:hover { color: var(--gold-bright); }

.footer-disclaimer {
    margin-top: 12px;
    font-size: 0.775rem;
    color: var(--text-dim);
    font-style: italic;
}

/* ============================================
   ANIMATIONS
   ============================================ */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 56px;
    }

    .hero-subtitle,
    .hero-wip-notice {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-actions { justify-content: center; }

    .features-grid { grid-template-columns: repeat(2, 1fr); }

    .steps-grid {
        grid-template-columns: 1fr;
        max-width: 360px;
        margin: 0 auto;
    }

    .steps-grid::before { display: none; }
}

@media (max-width: 600px) {
    .features-grid { grid-template-columns: 1fr; }

    .section { padding: 72px 0; }

    .hero {
        padding: calc(var(--nav-height) + 48px) 0 56px;
        min-height: auto;
    }

    .mockup-browser {
        width: 100%;
        max-width: 340px;
    }

    .pricing-card { padding: 36px 24px; }

    .nav-logo-text { display: none; }
}
