/**
 * Lifspel Homepage Styles
 */

/* Page Layout - override main app's overflow:hidden for scrollable pages */
html.home-page,
.home-page,
html:has(.settings-page),
.settings-page {
    height: auto;
    min-height: 100vh;
    overflow: auto;
}

.home-page,
.settings-page {
    background: var(--bg-primary);
    display: flex;
    flex-direction: column;
}

.home-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--spacing-xl) var(--spacing-lg);
    flex: 1;
}

/* Header - default horizontal layout (logo left, nav right) */
.home-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-sm) var(--spacing-lg);
    border-bottom: 1px solid var(--border);
    margin-bottom: var(--spacing-lg);
}
/* On the homepage, the hero butts flush against the header line for cinematic edge */
body.home-page .home-header { margin-bottom: 0; }

.home-header-top {
    display: flex;
    justify-content: flex-end;
    order: 2;
}

.home-header > a {
    order: 1;
}

/* All pages now use horizontal header layout */

/* Header actions - matches play.php style */
.header-actions {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.user-name {
    font-family: var(--font-ui);
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-right: var(--spacing-xs);
}

/* Header Button - uses button system variables */
/* For new code, prefer: .btn .btn--ghost .btn--sm */
.header-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--btn-sm-padding-y) var(--btn-sm-padding-x);
    min-height: var(--btn-sm-min-height);
    font-size: var(--btn-sm-font-size);
    font-family: var(--btn-font-family);
    font-weight: 500;
    background: var(--btn-ghost-bg);
    border: 1px solid var(--border);
    border-radius: var(--btn-border-radius);
    color: var(--btn-ghost-text);
    cursor: pointer;
    transition: var(--btn-transition);
    text-decoration: none;
}

.header-btn:hover {
    background: var(--btn-ghost-bg-hover);
    border-color: var(--accent-dim);
    color: var(--btn-ghost-text-hover);
}

/* Primary variant for header */
.header-btn.primary {
    background: var(--btn-primary-bg);
    border-color: transparent;
    color: var(--btn-primary-text);
}

.header-btn.primary:hover {
    background: var(--btn-primary-bg-hover);
}

.home-logo {
    height: 36px;
    width: auto;
    margin: 0;
}

/* Logo size is consistent across all pages */

.home-tagline {
    display: none;
}

/* Tagline hidden on all pages (shown in welcome section instead) */

/* Welcome Section */
.welcome-section {
    max-width: 720px;
    margin: 0 auto var(--spacing-xl) auto;
    text-align: center;
}

.welcome-content p {
    font-family: var(--font-prose);
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
}

.welcome-tagline {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--text-primary);
    letter-spacing: 0.02em;
    margin-bottom: var(--spacing-lg) !important;
}

.welcome-lead {
    font-size: 1.2rem;
}

.welcome-highlight {
    color: var(--accent) !important;
    font-style: italic;
    font-size: 1.15rem;
    padding: var(--spacing-md) 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    margin: var(--spacing-lg) 0 !important;
}

.welcome-text {
    color: var(--text-muted) !important;
}

/* Section Titles */
.section-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: var(--spacing-xs);
    letter-spacing: 0.05em;
}

.section-subtitle {
    font-family: var(--font-prose);
    font-size: 1rem;
    color: var(--text-muted);
    text-align: center;
    font-style: italic;
    margin-bottom: var(--spacing-lg);
}

/* Collapsible Section */
.collapsible .section-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-md);
    width: 100%;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--spacing-md);
    margin: 0 0 var(--spacing-md) 0;
    border-radius: 8px;
    transition: background 0.2s;
}

.collapsible .section-header:hover {
    background: var(--bg-secondary);
}

.collapsible .section-header-text {
    text-align: center;
}

.collapsible .section-header .section-title {
    margin-bottom: var(--spacing-xs);
}

.collapsible .section-header .section-subtitle {
    margin-bottom: 0;
}

.collapsible .section-toggle-icon {
    font-size: 1.2rem;
    color: var(--text-muted);
    transition: transform 0.3s ease;
}

.collapsible.collapsed .section-toggle-icon {
    transform: rotate(-90deg);
}

.collapsible .section-content {
    max-height: 2000px;
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.3s ease;
    opacity: 1;
}

.collapsible.collapsed .section-content {
    max-height: 0;
    opacity: 0;
}

/* Scenario Section */
.scenario-section {
    margin-bottom: var(--spacing-xl);
}

.scenario-search {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    max-width: 400px;
    margin: 0 auto var(--spacing-lg) auto;
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 6px;
    transition: border-color 0.2s;
}

.scenario-search:focus-within {
    border-color: var(--accent);
}

.scenario-search i {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.scenario-search input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    font-family: var(--font-ui);
    font-size: 0.95rem;
    color: var(--text-primary);
}

.scenario-search input::placeholder {
    color: var(--text-muted);
}

.scenario-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--spacing-md);
}

.scenario-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: var(--spacing-lg);
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: block;
    position: relative;
    overflow: hidden;
}

/* Hover overlay with action text */
.scenario-card::after {
    content: "Begin";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: var(--spacing-sm) var(--spacing-lg);
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, transparent 100%);
    color: var(--accent);
    font-family: var(--font-ui);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    opacity: 0;
    transform: translateY(100%);
    transition: all 0.2s ease;
}

.scenario-card:hover::after {
    opacity: 1;
    transform: translateY(0);
}

/* Different text for special cards */
.scenario-card.random-card::after {
    content: "Surprise me";
}

.scenario-card.create-card::after {
    content: "Create";
    color: #818cf8;
}

.scenario-card.browse-all-card::after {
    content: "Browse all";
}

.scenario-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.scenario-card.random-card {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, rgba(201, 168, 124, 0.1) 100%);
    border-style: dashed;
}

.scenario-card.create-card {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--accent-creative-glow) 100%);
    border-style: dashed;
    border-color: var(--accent-creative-glow);
}

.scenario-card.create-card:hover {
    border-color: var(--accent-creative);
    background: linear-gradient(135deg, var(--bg-secondary) 0%, rgba(99, 102, 241, 0.2) 100%);
}

.scenario-card.create-card .scenario-genre {
    color: #a5b4fc;
}

.scenario-card.create-card .scenario-title {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.scenario-card.create-card .scenario-title i {
    color: var(--accent-creative);
}

.scenario-genre {
    font-family: var(--font-ui);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent);
    margin-bottom: var(--spacing-xs);
    overflow: hidden; /* clearfix for floated cast-count */
}

.scenario-genre .scenario-author {
    text-transform: none !important;
    letter-spacing: normal;
    font-style: italic;
    color: var(--text-muted);
    font-size: 0.7rem;
}

.scenario-cast-count {
    float: right;
    text-transform: none;
    letter-spacing: normal;
    font-weight: normal;
    color: var(--text-muted);
    font-size: 0.7rem;
}

/* Co-Op Badge for multiplayer scenarios - matches .multiplayer-badge style */
.scenario-coop-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 8px;
    padding: 2px 8px;
    font-size: 0.7rem;
    font-family: var(--font-ui);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    border-radius: 3px;
    vertical-align: middle;
    background: rgba(201, 168, 124, 0.15);
    color: var(--accent);
    border: 1px solid rgba(201, 168, 124, 0.3);
}

.scenario-coop-badge i {
    font-size: 0.65rem;
}

.scenario-title {
    font-family: var(--font-display);
    font-size: 1.2rem;
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
}

.scenario-premise {
    font-family: var(--font-prose);
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: var(--spacing-sm);
}

.scenario-meta {
    font-family: var(--font-ui);
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* How It Works Section */
.how-section {
    margin-bottom: var(--spacing-xl);
    padding-top: var(--spacing-lg);
    border-top: 1px solid var(--border);
}

.how-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-lg);
    max-width: 900px;
    margin: 0 auto;
}

.how-card {
    text-align: center;
    padding: var(--spacing-lg);
}

.how-icon {
    font-size: 2.5rem;
    color: var(--accent);
    margin-bottom: var(--spacing-md);
    opacity: 0.8;
}

.how-card h3 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
    letter-spacing: 0.05em;
}

.how-card p {
    font-family: var(--font-prose);
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
}


/* Skald door: the second way in (brand §5-§7). Lifspel palette only; the
   accent left rule and small-caps mark are the nod to Skald's own site. */
.skald-door {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: var(--spacing-lg) var(--spacing-xl);
    max-width: 780px;
    margin: calc(var(--spacing-xl) * 2) auto var(--spacing-xl);
    padding: var(--spacing-xl);
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    border-radius: 6px;
}

/* Skald's own logo (master: skald-book public/brand/, dark version since this page is
   dark), with the endorsement as live text beside it. */
.skald-door-mark {
    display: flex;
    align-items: flex-end;
    gap: 0.5rem;
    margin: 0 0 var(--spacing-sm);
}
.skald-door-logo {
    display: block;
    height: 56px;
    width: auto;
}
.skald-door-mark span {
    font-size: 0.9rem;
    color: var(--text-secondary);
    padding-bottom: 2px;
}

.skald-door .skald-door-title {
    text-align: left;
    text-wrap: balance;
    margin: 0 0 var(--spacing-sm);
}

.skald-door-body {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-secondary);
    max-width: 34rem;
    margin: 0;
}

.skald-door-cta {
    justify-self: end;
}

/* Trademark credit for the games the card names: fine print, full width
   under the panel's text and button. */
.skald-door-legal {
    grid-column: 1 / -1;
    font-family: var(--font-ui);
    font-size: 0.75rem;
    line-height: 1.6;
    color: var(--text-muted);
    margin: 0;
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--border);
}

.skald-door-cta i {
    transition: transform 0.2s ease;
}

.skald-door-cta:hover i,
.skald-door-cta:focus-visible i {
    transform: translateX(3px);
}

@media (prefers-reduced-motion: reduce) {
    .skald-door-cta i { transition: none; }
    .skald-door-cta:hover i,
    .skald-door-cta:focus-visible i { transform: none; }
}

@media (max-width: 768px) {
    .skald-door {
        grid-template-columns: 1fr;
        margin-top: var(--spacing-xl);
        padding: var(--spacing-lg);
    }
    .skald-door .skald-door-title { font-size: 1.3rem; }
    .skald-door-cta {
        justify-self: stretch;
        width: 100%;
    }
}

/* Toast notification */
.toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-family: var(--font-ui);
    font-size: 0.9rem;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    border: 1px solid var(--border);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    z-index: 1000;
    animation: toast-in 0.3s ease;
}

.toast.hidden {
    display: none;
}

@keyframes toast-in {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Responsive - Tablet (900px and below) */
@media (max-width: 900px) {
    /* Icon-only nav buttons on mobile */
    .home-header .header-btn span {
        display: none;
    }

    .home-header .header-btn {
        min-width: 44px;
        min-height: 44px;
        padding: var(--spacing-sm);
        justify-content: center;
    }

    .home-header .header-actions {
        gap: var(--spacing-sm);
    }

    .home-tagline {
        display: none;
    }
}

/* Responsive - Phone (768px and below) */
@media (max-width: 768px) {
    .home-container {
        padding: var(--spacing-lg) var(--spacing-md);
    }

    .home-logo {
        height: 40px;
    }

    .welcome-content p {
        font-size: 1rem;
    }

    .scenario-grid {
        grid-template-columns: 1fr;
    }

    .how-grid {
        grid-template-columns: 1fr;
    }

    .home-header .header-actions {
        gap: var(--spacing-xs);
    }
}

/* =============================================
   Scenarios Page Styles
   ============================================= */

/* Page Header */
.scenarios-header {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.page-title {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 400;
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
    letter-spacing: 0.05em;
}

.page-subtitle {
    font-family: var(--font-prose);
    font-size: 1rem;
    color: var(--text-muted);
    font-style: italic;
}

/* Filter Bar */
.scenarios-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-md);
    align-items: flex-end;
    margin-bottom: var(--spacing-md);
    padding: var(--spacing-md);
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.filter-search {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    flex: 1;
    min-width: 200px;
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 6px;
    transition: border-color 0.2s;
}

.filter-search:focus-within {
    border-color: var(--accent);
}

.filter-search i {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.filter-search input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    font-family: var(--font-ui);
    font-size: 0.9rem;
    color: var(--text-primary);
}

.filter-search input::placeholder {
    color: var(--text-muted);
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.filter-group label {
    font-family: var(--font-ui);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.filter-select {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 8px 12px;
    color: var(--text-primary);
    font-family: var(--font-ui);
    font-size: 0.85rem;
    min-width: 140px;
    cursor: pointer;
    transition: border-color 0.2s;
}

.filter-select:focus {
    border-color: var(--accent);
    outline: none;
}

.filter-select option {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.filter-reset {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
}

.filter-reset:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* Results Info */
.scenarios-results-info {
    font-family: var(--font-ui);
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: var(--spacing-md);
}

.scenarios-results-info span {
    color: var(--accent);
    font-weight: 500;
}

/* Empty State */
.scenarios-empty {
    text-align: center;
    padding: var(--spacing-xl) var(--spacing-lg);
    color: var(--text-muted);
}

.scenarios-empty i {
    font-size: 3rem;
    opacity: 0.5;
    margin-bottom: var(--spacing-md);
    display: block;
}

.scenarios-empty p {
    font-family: var(--font-prose);
    font-size: 1rem;
    margin-bottom: var(--spacing-md);
}

.filter-reset-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text-secondary);
    font-family: var(--font-ui);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-reset-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* Browse All Card */
.browse-all-card {
    background: var(--bg-tertiary);
    border-style: dashed;
}

.browse-all-card .scenario-genre {
    color: var(--text-muted);
}

.browse-all-card .scenario-title i {
    color: var(--accent);
}

/* Scenarios Page Mobile */
@media (max-width: 768px) {
    .scenarios-filter-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-search {
        min-width: 100%;
    }

    .filter-group {
        width: 100%;
    }

    .filter-select {
        width: 100%;
    }

    .filter-reset {
        width: 100%;
    }
}

/* =============================================
   Legal Pages Styles
   ============================================= */

/* Legal page body - no fixed footer */
body.legal-page .site-footer {
    display: none;
}

/* Legal header adjustments */
.legal-header {
    text-align: left;
    max-width: 800px;
}

.legal-updated {
    font-family: var(--font-ui);
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: var(--spacing-sm);
}

/* Legal content */
.legal-content {
    max-width: 800px;
    margin-bottom: var(--spacing-xxl);
}

.legal-content h2 {
    font-family: var(--font-display);
    font-size: 1.4rem;
    color: var(--text-primary);
    margin: var(--spacing-xl) 0 var(--spacing-md) 0;
    padding-bottom: var(--spacing-sm);
    border-bottom: 1px solid var(--border);
}

.legal-content h3 {
    font-family: var(--font-ui);
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-primary);
    margin: var(--spacing-lg) 0 var(--spacing-sm) 0;
}

.legal-content p {
    font-family: var(--font-prose);
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
}

.legal-content ul,
.legal-content ol {
    font-family: var(--font-prose);
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
    padding-left: var(--spacing-lg);
}

.legal-content li {
    margin-bottom: var(--spacing-sm);
}

.legal-content a {
    color: var(--accent);
    text-decoration: none;
}

.legal-content a:hover {
    text-decoration: underline;
}

.legal-content strong {
    color: var(--text-primary);
    font-weight: 600;
}

.legal-content em {
    font-style: italic;
}

.legal-content blockquote {
    border-left: 3px solid var(--accent);
    padding-left: var(--spacing-md);
    margin: var(--spacing-md) 0;
    color: var(--text-muted);
    font-style: italic;
}

/* =============================================
   Expanded Footer (for Legal Pages)
   ============================================= */

.expanded-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: var(--spacing-xl) 0 var(--spacing-lg);
    margin-top: auto;
}

.footer-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

.footer-nav {
    display: grid;
    grid-template-columns: repeat(5, 1fr);   /* Products, Legal, Trust & Safety, Support, Updates */
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
}

.footer-section-title {
    font-family: var(--font-ui);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 var(--spacing-sm) 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: var(--spacing-xs);
}

.footer-links a {
    font-family: var(--font-ui);
    font-size: 0.85rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--accent);
}

.footer-bottom {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--spacing-sm);
    padding-top: var(--spacing-lg);
    border-top: 1px solid var(--border);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.footer-bottom .footer-tagline {
    font-style: italic;
    color: var(--text-secondary);
}

.footer-bottom .footer-separator {
    color: var(--text-muted);
}

.footer-bottom a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-bottom a:hover {
    color: var(--accent);
}

/* Expanded Footer Mobile */
@media (max-width: 768px) {
    .footer-nav {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .footer-nav {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-bottom {
        flex-wrap: wrap;
        gap: var(--spacing-xs);
    }
}

/* === Hero vista (atmospheric front door — added 2026-04-27) === */
.hero-vista {
    position: relative;
    min-height: calc(100vh - 4rem);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
}
.hero-vista::before {
    content: "";
    position: absolute;
    inset: 0;
    background: url('../img/hero-bg.webp') center/cover no-repeat;
    animation: heroVistaPan 28s ease-in-out infinite alternate;
    z-index: 0;
    will-change: transform;
}
.hero-vista::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(26, 26, 31, 0.40) 0%, rgba(26, 26, 31, 0.78) 70%, var(--bg-primary) 100%);
    z-index: 1;
}
.hero-vista > * { position: relative; z-index: 2; }
.hero-vista .welcome-section {
    margin: 0 auto;
    text-shadow: 0 1px 12px rgba(0, 0, 0, 0.55);
}

@keyframes heroVistaPan {
    from { transform: scale(1.0); }
    to   { transform: scale(1.06); }
}

@media (prefers-reduced-motion: reduce) {
    .hero-vista::before { animation: none; }
}

@media (max-width: 768px) {
    .hero-vista {
        min-height: calc(100vh - 3rem);
        padding: var(--spacing-lg);
    }
}

/* Hero scroll cue: chevron in circle, gentle bounce, RF-style.
   Sits inline within welcome-section so its distance from welcome-highlight
   matches the inter-paragraph rhythm above. */
/* Hero call to action: the native game's front door (brand §5). Its colours
   come from btn--primary, which meets AA since 2026-09-25 -- no override. */
.hero-vista .hero-cta {
    margin-top: var(--spacing-md);
    font-weight: 600;
    text-shadow: none; /* .hero-vista .welcome-section shadows its text; no button carries one */
}
@media (max-width: 768px) {
    .hero-vista .hero-cta { width: 100%; max-width: 20rem; }
}

.hero-vista-scroll {
    display: inline-flex;
    margin: var(--spacing-lg) auto 0;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    border: 1px solid var(--accent);
    background: rgba(26, 26, 31, 0.35);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    z-index: 2;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
    animation: heroVistaBounce 1.8s ease-in-out infinite;
}
.hero-vista-scroll:hover {
    background: var(--accent);
    border-color: var(--accent);
}
.hero-vista-scroll-chevron {
    width: 0.7rem;
    height: 0.7rem;
    border-right: 2px solid var(--accent);
    border-bottom: 2px solid var(--accent);
    transform: rotate(45deg);
    margin-top: -0.25rem;
    transition: border-color 0.2s ease;
}
.hero-vista-scroll:hover .hero-vista-scroll-chevron {
    border-right-color: var(--bg-primary);
    border-bottom-color: var(--bg-primary);
}
@keyframes heroVistaBounce {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(6px); }
}
@media (prefers-reduced-motion: reduce) {
    .hero-vista-scroll { animation: none; }
}

/* Smooth-scroll for in-page anchors (cheaply enables click-to-scroll for the chevron) */
html { scroll-behavior: smooth; scroll-padding-top: 4rem; }

/* Hero typography overrides: heavier tagline anchor, lighter lead, narrower column, drop highlight rules */
.hero-vista .welcome-section { max-width: 580px; }
.hero-vista .welcome-tagline {
    font-size: 2.8rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1.2;
    margin-bottom: var(--spacing-xl) !important;
}
.hero-vista .welcome-lead {
    font-size: 1.25rem;
    font-weight: 400;
    color: var(--text-primary);
    line-height: 1.6;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85), 0 2px 16px rgba(0, 0, 0, 0.6);
}
.hero-vista .welcome-highlight {
    border-top: none;
    border-bottom: none;
    padding: var(--spacing-md) 0;
}

/* Bridge section between hero and scenario picker -- narrower than the picker grid */
.welcome-bridge {
    max-width: 620px;
    margin-top: var(--spacing-xl);
}

@media (max-width: 768px) {
    .hero-vista .welcome-tagline { font-size: 1.7rem; }
    .hero-vista .welcome-lead { font-size: 1.05rem; }
}
