/* =============================================
   KB TREFA — Alpine Editorial Design System
   Corporate colors preserved, modern UX refresh
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=DM+Sans:ital,wght@0,300;0,400;0,500;0,700;1,400&display=swap');

:root {
    /* Corporate Green Palette — unchanged */
    --g-100: #f1f8e9;
    --g-200: #dcedc8;
    --g-300: #aed581;
    --g-400: #87d22f;   /* Primary accent — neon green */
    --g-500: #689f38;
    --g-600: #33691e;
    --g-700: #1b5e20;
    --g-900: #0d2b0e;

    /* Neutrals */
    --sw-white:    #ffffff;
    --sw-offwhite: #f6f7f4;
    --sw-light:    #eeefeb;
    --sw-mid:      #c8ccc0;
    --sw-dark:     #2a2d26;
    --sw-black:    #111411;

    /* Typography */
    --font-display: 'Bebas Neue', 'Impact', sans-serif;
    --font-body:    'DM Sans', 'Helvetica Neue', Arial, sans-serif;

    /* Spacing */
    --space-xs:  8px;
    --space-sm:  16px;
    --space-md:  32px;
    --space-lg:  64px;
    --space-xl:  96px;
    --space-2xl: 128px;

    /* Borders */
    --border-thin:   1px solid rgba(17, 20, 17, 0.12);
    --border-mid:    1px solid rgba(17, 20, 17, 0.25);
    --border-strong: 2px solid var(--sw-black);

    /* Radius */
    --r-sm: 4px;
    --r-md: 8px;

    /* Transitions */
    --t-fast: 0.15s ease;
    --t-mid:  0.3s ease;
    --t-slow: 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    background-color: var(--sw-white);
    color: var(--sw-black);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

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

/* =============================================
   TYPOGRAPHY
   ============================================= */

h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 400; /* Bebas is already bold by nature */
    line-height: 0.95;
    letter-spacing: 0.01em;
    text-transform: uppercase;
}

h1 { font-size: clamp(4rem, 10vw, 8rem); }
h2 { font-size: clamp(2.5rem, 6vw, 5rem); }
h3 { font-size: clamp(1.8rem, 4vw, 3rem); }
h4 { font-size: clamp(1.2rem, 2.5vw, 2rem); }

p {
    font-size: 1rem;
    line-height: 1.7;
    max-width: 65ch;
    color: #4a4d46;
}

.text-center { text-align: center; }
.text-white { color: var(--sw-white) !important; }

/* =============================================
   LAYOUT UTILITIES
   ============================================= */

.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

.container--narrow {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

section {
    position: relative;
}

/* =============================================
   HEADER / NAV
   ============================================= */

.site-header {
    position: sticky;
    top: 0;
    z-index: 900;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: var(--border-thin);
    transition: box-shadow var(--t-mid);
}

.site-header.scrolled {
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    padding: 0 var(--space-md);
    max-width: 1280px;
    margin: 0 auto;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-display);
    font-size: 1.6rem;
    letter-spacing: 0.05em;
    color: var(--sw-black);
    text-decoration: none;
}

.logo-target {
    width: 28px;
    height: 28px;
    border: 3px solid var(--sw-black);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
}

.logo-target::before {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--g-400);
    border-radius: 50%;
}

.logo span { color: var(--g-400); }

/* Navigation */
.site-nav ul {
    display: flex;
    gap: 4px;
    list-style: none;
    align-items: center;
}

.site-nav a {
    display: block;
    padding: 6px 14px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #555;
    border-radius: var(--r-sm);
    transition: color var(--t-fast), background var(--t-fast);
}

.site-nav a:hover {
    color: var(--sw-black);
    background: var(--sw-offwhite);
}

.site-nav a.active {
    color: var(--sw-black);
    background: var(--g-400);
}

/* Mobile nav toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}
.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--sw-black);
    display: block;
    transition: var(--t-fast);
}

/* =============================================
   HERO SECTION
   ============================================= */

.hero {
    min-height: 100svh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: var(--g-900);
    color: white;
    overflow: hidden;
}

.hero-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: var(--space-xl) var(--space-lg);
    position: relative;
    z-index: 2;
}

.hero-eyebrow {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--g-400);
    margin-bottom: var(--space-md);
    display: flex;
    align-items: center;
    gap: 10px;
}

.hero-eyebrow::before {
    content: '';
    width: 32px;
    height: 1px;
    background: var(--g-400);
}

.hero h1 {
    color: var(--sw-white);
    margin-bottom: var(--space-md);
}

.hero h1 em {
    color: var(--g-400);
    font-style: normal;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.65);
    max-width: 42ch;
    margin-bottom: var(--space-lg);
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.hero-image {
    position: relative;
    overflow: hidden;
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(80%) contrast(1.1);
    mix-blend-mode: luminosity;
    opacity: 0.7;
}

.hero-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--g-900) 0%, transparent 60%);
    pointer-events: none;
}

/* Animated target overlay on hero image */
.hero-image::before {
    content: '';
    position: absolute;
    bottom: var(--space-lg);
    right: var(--space-lg);
    width: 120px;
    height: 120px;
    border: 2px solid rgba(135, 210, 47, 0.4);
    border-radius: 50%;
    z-index: 2;
    animation: pulse-ring 3s ease-in-out infinite;
}

@keyframes pulse-ring {
    0%, 100% { transform: scale(1); opacity: 0.4; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

/* =============================================
   BUTTONS
   ============================================= */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-radius: var(--r-sm);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all var(--t-fast);
    font-family: var(--font-body);
    white-space: nowrap;
}

.btn-primary {
    background: var(--g-400);
    color: var(--sw-black);
    border-color: var(--g-400);
}
.btn-primary:hover {
    background: #9de83e;
    border-color: #9de83e;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(135, 210, 47, 0.4);
}

.btn-outline {
    background: transparent;
    color: var(--sw-white);
    border-color: rgba(255,255,255,0.4);
}
.btn-outline:hover {
    border-color: var(--sw-white);
    background: rgba(255,255,255,0.08);
}

.btn-dark {
    background: var(--sw-black);
    color: var(--sw-white);
    border-color: var(--sw-black);
}
.btn-dark:hover {
    background: var(--g-900);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

/* Legacy .btn-swiss compatibility */
.btn-swiss {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-radius: var(--r-sm);
    border: 2px solid var(--g-400);
    cursor: pointer;
    transition: all var(--t-fast);
    font-family: var(--font-body);
    background: var(--g-400);
    color: var(--sw-black);
}
.btn-swiss:hover {
    background: #9de83e;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(135, 210, 47, 0.4);
}

/* =============================================
   SECTION LAYOUTS
   ============================================= */

/* Standard section spacing */
.section {
    padding: var(--space-xl) 0;
}

.section--dark {
    background: var(--g-900);
    color: var(--sw-white);
}

.section--tinted {
    background: var(--sw-offwhite);
}

.section--accent {
    background: var(--g-400);
    color: var(--sw-black);
}

.section-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--g-500);
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: var(--space-sm);
}

.section-label::after {
    content: '';
    flex: 1;
    max-width: 48px;
    height: 1px;
    background: currentColor;
    opacity: 0.5;
}

.section-header {
    margin-bottom: var(--space-lg);
}

/* =============================================
   FEATURE CARDS (Život v klubu)
   ============================================= */

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--border-thin);
    border: var(--border-thin);
    border-radius: var(--r-md);
    overflow: hidden;
}

.feature-card {
    background: var(--sw-white);
    overflow: hidden;
    transition: background var(--t-mid);
    position: relative;
}

.feature-card:hover {
    background: var(--g-100);
}

.feature-img {
    height: 220px;
    overflow: hidden;
}

.feature-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(60%);
    transition: filter var(--t-slow), transform var(--t-slow);
}

.feature-card:hover .feature-img img {
    filter: grayscale(0%);
    transform: scale(1.04);
}

.feature-body {
    padding: var(--space-md);
}

.feature-number {
    font-family: var(--font-display);
    font-size: 4rem;
    line-height: 1;
    color: var(--g-400);
    margin-bottom: var(--space-sm);
    opacity: 0.6;
}

.feature-body h3 {
    font-size: 1.8rem;
    margin-bottom: var(--space-xs);
    color: var(--sw-black);
}

.feature-body p {
    font-size: 0.95rem;
    color: #5a5d56;
}

/* =============================================
   EXCUSE BUILDER
   ============================================= */

.excuse-section {
    padding: var(--space-xl) 0;
    background: var(--sw-offwhite);
}

.excuse-card {
    background: var(--sw-white);
    border: var(--border-thin);
    border-radius: var(--r-md);
    padding: var(--space-lg);
    max-width: 700px;
    margin: 0 auto;
    box-shadow: 0 2px 24px rgba(0,0,0,0.05);
}

.builder-select, .swiss-input {
    display: block;
    width: 100%;
    padding: 12px 16px;
    margin-bottom: 16px;
    border: 1px solid var(--sw-mid);
    border-radius: var(--r-sm);
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 500;
    background: var(--sw-white);
    color: var(--sw-black);
    box-sizing: border-box;
    transition: border-color var(--t-fast), box-shadow var(--t-fast);
    -webkit-appearance: none;
    appearance: none;
}

.builder-select:focus, .swiss-input:focus {
    outline: none;
    border-color: var(--g-400);
    box-shadow: 0 0 0 3px rgba(135, 210, 47, 0.2);
}

textarea.swiss-input { resize: vertical; }

#builder-output {
    padding: var(--space-md);
    background: var(--g-900);
    color: var(--g-400);
    border-radius: var(--r-sm);
    font-family: var(--font-display);
    font-size: 1.6rem;
    letter-spacing: 0.02em;
    text-align: center;
    line-height: 1.2;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* =============================================
   COMIC SECTION
   ============================================= */

.comic-section {
    padding: var(--space-xl) 0;
    background: var(--g-900);
    cursor: pointer;
    overflow: hidden;
}

.comic-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
    align-items: center;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

.comic-text .eyebrow {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--g-400);
    margin-bottom: var(--space-md);
}

.comic-text h2 {
    color: var(--sw-white);
    margin-bottom: var(--space-md);
    font-size: clamp(2rem, 5vw, 4rem);
}

.comic-text p {
    color: rgba(255,255,255,0.6);
    margin-bottom: var(--space-md);
}

.comic-image {
    border-radius: var(--r-md);
    overflow: hidden;
    box-shadow: 0 32px 64px rgba(0,0,0,0.4);
    transition: transform var(--t-slow), box-shadow var(--t-slow);
}

.comic-section:hover .comic-image {
    transform: translateY(-6px) rotate(0.5deg);
    box-shadow: 0 48px 80px rgba(0,0,0,0.5);
}

.comic-image img {
    width: 100%;
    display: block;
}

/* =============================================
   CONTACT / JOIN SECTION
   ============================================= */

.contact-section {
    padding: var(--space-xl) 0;
    background: var(--sw-offwhite);
}

.contact-card {
    background: var(--sw-white);
    border: var(--border-thin);
    border-radius: var(--r-md);
    padding: var(--space-lg);
    max-width: 640px;
    margin: 0 auto;
    box-shadow: 0 2px 24px rgba(0,0,0,0.05);
}

.form-group {
    margin-bottom: var(--space-sm);
}

/* =============================================
   FOOTER
   ============================================= */

.site-footer {
    background: var(--sw-black);
    color: rgba(255,255,255,0.5);
    padding: var(--space-lg) 0;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--space-md);
    gap: var(--space-md);
}

.footer-logo {
    font-family: var(--font-display);
    font-size: 1.8rem;
    color: var(--g-400);
    letter-spacing: 0.05em;
}

.footer-copy {
    font-size: 0.85rem;
}

/* Legacy .swiss-footer compatibility */
.swiss-footer {
    background: var(--sw-black);
    color: rgba(255,255,255,0.5);
    padding: var(--space-lg) var(--space-md);
    text-align: center;
    font-size: 0.85rem;
}

/* =============================================
   PATTERNS (subtle, refined)
   ============================================= */

.bg-pattern-ski {
    background-color: var(--sw-offwhite);
    background-image: repeating-linear-gradient(
        -55deg,
        transparent,
        transparent 12px,
        rgba(135, 210, 47, 0.04) 12px,
        rgba(135, 210, 47, 0.04) 13px
    );
}

.bg-pattern-target {
    background-color: var(--sw-offwhite);
    background-image: radial-gradient(circle, rgba(135, 210, 47, 0.12) 1px, transparent 1px);
    background-size: 24px 24px;
}

.bg-green-mix {
    background: linear-gradient(160deg, var(--g-900) 0%, var(--g-700) 100%);
}

.bg-green-solid-dark { background-color: var(--g-900); color: var(--sw-white); }
.bg-green-solid-light { background-color: var(--g-400); color: var(--sw-black); }
.bg-green-accent { background-color: var(--g-600); color: var(--sw-white); }
.bg-sw-white { background-color: var(--sw-white); }

/* =============================================
   SCROLL ANIMATIONS
   ============================================= */

.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
    opacity: 1;
    transform: none;
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* =============================================
   LIGHTBOX
   ============================================= */

.lightbox-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(13, 43, 14, 0.97);
    z-index: 9999;
    display: none;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.lb-content {
    position: relative;
    max-width: 90%;
    max-height: 85%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#lb-img {
    max-width: 100%;
    max-height: 80vh;
    border-radius: var(--r-sm);
    box-shadow: 0 32px 80px rgba(0,0,0,0.6);
}

#lb-caption {
    margin-top: var(--space-sm);
    font-size: 1rem;
    font-weight: 600;
    color: var(--g-400);
    letter-spacing: 0.05em;
}

.lb-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.1);
    color: white;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: var(--r-sm);
    font-size: 1.5rem;
    padding: 16px 18px;
    cursor: pointer;
    transition: all var(--t-fast);
    z-index: 10001;
    backdrop-filter: blur(8px);
}

.lb-nav:hover {
    background: var(--g-400);
    color: var(--sw-black);
    border-color: var(--g-400);
}

.lb-prev { left: 16px; }
.lb-next { right: 16px; }

.lb-close {
    position: fixed;
    top: 20px; right: 20px;
    font-size: 1.5rem;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: var(--r-sm);
    color: white;
    cursor: pointer;
    width: 44px; height: 44px;
    display: flex; align-items: center; justify-content: center;
    z-index: 10001;
    transition: all var(--t-fast);
    backdrop-filter: blur(8px);
}

.lb-close:hover {
    background: var(--g-400);
    color: var(--sw-black);
}

/* =============================================
   CALCULATOR / OVERLAY
   ============================================= */

.calc-page {
    min-height: calc(100svh - 64px);
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.calc-inputs {
    background: var(--g-900);
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: var(--space-xl) var(--space-lg);
}

.calc-inputs h1 {
    color: var(--sw-white);
    margin-bottom: var(--space-sm);
}

.calc-inputs p {
    color: rgba(255,255,255,0.6);
    margin-bottom: var(--space-lg);
}

.calc-inputs label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255,255,255,0.7);
    margin-bottom: 8px;
}

.time-inputs {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: var(--space-md);
}

.time-inputs .swiss-input {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.2);
    color: white;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    padding: 12px;
}

.time-inputs .swiss-input::placeholder { color: rgba(255,255,255,0.3); }
.time-inputs .swiss-input:focus {
    border-color: var(--g-400);
    background: rgba(135, 210, 47, 0.1);
    box-shadow: 0 0 0 3px rgba(135, 210, 47, 0.2);
}

.time-sep {
    font-family: var(--font-display);
    font-size: 2rem;
    color: rgba(255,255,255,0.5);
    margin-bottom: 2px;
}

.calc-result-panel {
    background: var(--sw-offwhite);
    background-image: radial-gradient(circle, rgba(135, 210, 47, 0.15) 1px, transparent 1px);
    background-size: 24px 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: var(--space-lg);
}

.calc-result-panel h2 {
    font-size: 6rem;
    color: var(--sw-mid);
    line-height: 1;
}

/* Toggle switch */
.swiss-toggle-container {
    display: flex;
    background: rgba(255,255,255,0.1);
    border-radius: var(--r-sm);
    overflow: hidden;
    margin-bottom: var(--space-md);
    border: 1px solid rgba(255,255,255,0.2);
}

.swiss-toggle-container input[type="radio"] { display: none; }

.swiss-toggle-btn {
    flex: 1;
    padding: 10px 12px;
    text-align: center;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    cursor: pointer;
    transition: all var(--t-fast);
    color: rgba(255,255,255,0.6);
    background: transparent;
}

.swiss-toggle-container input[type="radio"]:checked + .swiss-toggle-btn {
    background: var(--g-400);
    color: var(--sw-black);
}

.swiss-toggle-btn:hover { color: var(--sw-white); }

/* Overlay */
.overlay-container {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(13, 43, 14, 0.97);
    backdrop-filter: blur(12px);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease-out;
}

.overlay-content {
    width: 90%;
    max-width: 800px;
    padding: var(--space-lg);
    background: white;
    border-radius: var(--r-md);
    box-shadow: 0 32px 80px rgba(0,0,0,0.4);
    position: relative;
    box-sizing: border-box;
    overflow: hidden;
}

.race-track {
    margin: var(--space-md) 0;
    height: 80px;
    border-bottom: 1px solid var(--sw-mid);
    position: relative;
    background: repeating-linear-gradient(
        90deg,
        transparent,
        transparent 79px,
        rgba(0,0,0,0.06) 79px,
        rgba(0,0,0,0.06) 80px
    );
    border-radius: var(--r-sm);
    background-color: var(--sw-offwhite);
}

.skier {
    position: absolute;
    bottom: 0;
    font-size: 1.2rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: var(--r-sm);
    border: 1px solid rgba(0,0,0,0.15);
    transition: left 2s cubic-bezier(0.25, 0.1, 0.25, 1);
    white-space: nowrap;
    font-family: var(--font-body);
    font-size: 0.85rem;
}

#skier-winner { background: var(--g-400); color: var(--sw-black); z-index: 2; }
#skier-me { background: var(--sw-white); z-index: 1; margin-bottom: 40px; }

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* =============================================
   TEAM PAGE
   ============================================= */

.team-hero {
    background: linear-gradient(160deg, var(--g-900) 0%, var(--g-700) 100%);
    color: white;
    padding: var(--space-xl) var(--space-md);
    text-align: center;
}

.team-hero h1 { color: white; }
.team-hero p { color: rgba(255,255,255,0.65); margin: var(--space-sm) auto 0; text-align: center; }

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-md);
    padding: var(--space-xl) var(--space-md);
    max-width: 1280px;
    margin: 0 auto;
}

.member-card {
    background: var(--sw-white);
    border: var(--border-thin);
    border-radius: var(--r-md);
    overflow: hidden;
    transition: transform var(--t-mid), box-shadow var(--t-mid);
}

.member-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 48px rgba(0,0,0,0.1);
}

.member-header {
    height: 240px;
    overflow: hidden;
    background: var(--sw-dark);
}

.member-avatar {
    width: 100%;
    height: 100%;
}

.member-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    filter: grayscale(20%);
    transition: filter var(--t-slow), transform var(--t-slow);
}

.member-card:hover .member-avatar img {
    filter: grayscale(0%);
    transform: scale(1.03);
}

.member-body {
    padding: var(--space-md);
}

.member-role {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--g-500);
    margin-bottom: 6px;
}

.member-name {
    font-family: var(--font-display);
    font-size: 1.8rem;
    color: var(--sw-black);
    margin-bottom: 10px;
    line-height: 1;
}

.member-bio {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.6;
    font-style: italic;
    margin-bottom: var(--space-sm);
}

/* RPG Stats */
.stat-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.stat-label {
    width: 80px;
    color: #888;
    flex-shrink: 0;
}

.stat-bar-bg {
    flex: 1;
    height: 4px;
    background: var(--sw-light);
    border-radius: 2px;
    overflow: hidden;
}

.stat-bar-fill {
    height: 100%;
    background: var(--g-400);
    border-radius: 2px;
}

/* Youth section */
.youth-section {
    background: var(--sw-offwhite);
    padding: var(--space-xl) var(--space-md);
}

.youth-section h2 {
    text-align: center;
    margin-bottom: var(--space-lg);
}

.youth-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: var(--space-sm);
    max-width: 800px;
    margin: 0 auto;
}

.youth-card {
    background: var(--sw-white);
    border: var(--border-thin);
    border-radius: var(--r-sm);
    padding: var(--space-md) var(--space-sm);
    text-align: center;
    transition: background var(--t-fast);
}

.youth-card:hover { background: var(--g-100); }

.youth-card h3 {
    font-size: 1.1rem;
    color: var(--sw-black);
    margin-bottom: 4px;
}

.youth-card p {
    font-size: 0.8rem;
    color: var(--g-500);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* Excuse output on team page */
#excuse-output {
    font-family: var(--font-display);
    font-size: 2rem;
    background: var(--g-900);
    color: var(--g-400);
    padding: var(--space-md);
    border-radius: var(--r-sm);
    margin: var(--space-md) auto;
    max-width: 600px;
    text-align: center;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 0.02em;
}

/* =============================================
   GAME PAGE
   ============================================= */

.game-hero {
    background: linear-gradient(160deg, var(--g-900) 0%, var(--g-700) 100%);
    color: white;
    padding: var(--space-lg) var(--space-md);
    text-align: center;
}

.game-hero h1 { color: white; }
.game-hero p { color: rgba(255,255,255,0.65); margin: var(--space-sm) auto 0; text-align: center; }

#game-wrapper-box {
    position: relative;
    width: 100%;
    max-width: 900px;
    margin: var(--space-lg) auto;
    border-radius: var(--r-md);
    border: 3px solid rgba(0,0,0,0.15);
    background: #000;
    box-shadow: 0 24px 64px rgba(0,0,0,0.2);
    overflow: hidden;
}

#game-container {
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    cursor: none;
    background: #000;
    position: relative;
}

#game-container canvas {
    display: block;
    max-width: 100%;
    height: auto !important;
}

.game-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none;
    display: flex; flex-direction: column; justify-content: space-between;
}

.hud-top {
    display: flex; justify-content: space-between;
    padding: 16px 20px;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    text-shadow: 0 1px 4px rgba(0,0,0,0.8);
    color: white;
    background: linear-gradient(to bottom, rgba(0,0,0,0.4), transparent);
}

.hud-value { color: var(--g-400); font-size: 1.1rem; }

.hud-bottom-left {
    position: absolute;
    bottom: 16px;
    left: 16px;
    pointer-events: none;
}

.magazine-container {
    display: flex;
    gap: 5px;
    background: rgba(0,0,0,0.5);
    padding: 8px 12px;
    border-radius: var(--r-sm);
    backdrop-filter: blur(4px);
}

.bullet {
    width: 16px; height: 16px;
    border: 2px solid rgba(255,255,255,0.5);
    border-radius: 50%;
    transition: all 0.2s;
}

.game-screen {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(13, 20, 13, 0.95);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    color: white; z-index: 100; pointer-events: auto;
    text-align: center;
    box-sizing: border-box;
    backdrop-filter: blur(4px);
}

#end-screen {
    position: relative;
    height: auto;
    min-height: 200px;
    padding: var(--space-md);
    align-items: stretch;
    justify-content: center;
    text-align: left;
}

#game-wrapper-box:has(#end-screen[style*="block"]) #game-container { display: none; }
#game-wrapper-box:has(#end-screen[style*="block"]) .game-overlay { display: none; }
#game-wrapper-box:has(#end-screen[style*="block"]) #start-screen { display: none !important; }

.start-btn {
    background: var(--g-400);
    color: black;
    border: none;
    padding: 14px 40px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    margin-top: var(--space-sm);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-radius: var(--r-sm);
    transition: all var(--t-fast);
    font-family: var(--font-body);
    width: 100%;
}

.start-btn:hover {
    background: #9de83e;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(135, 210, 47, 0.4);
}

/* Retro start screen */
.arcade-poster {
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('../../img/game.jpg') center/cover no-repeat !important;
    padding: clamp(20px, 4vw, 60px);
}

.retro-title {
    font-family: 'Press Start 2P', cursive;
    color: var(--g-400);
    font-size: clamp(1.2rem, 5vw, 2.5rem) !important;
    text-shadow: 4px 4px 0 #000;
    margin-bottom: clamp(20px, 4vw, 48px) !important;
    line-height: 1.4 !important;
    text-align: center;
}

.retro-subtitle {
    font-family: 'Press Start 2P', cursive;
    color: var(--g-400);
    font-size: clamp(0.5rem, 1.5vw, 0.8rem) !important;
    line-height: 1.8 !important;
    margin-bottom: clamp(20px, 4vw, 50px) !important;
    text-align: center;
}

.retro-btn {
    font-family: 'Press Start 2P', cursive !important;
    background: #ffcc00 !important;
    color: #000 !important;
    border: clamp(3px, 0.5vw, 5px) outset #fff !important;
    padding: clamp(12px, 2vw, 20px) clamp(24px, 4vw, 48px) !important;
    font-size: clamp(0.8rem, 2.5vw, 1.4rem) !important;
    cursor: pointer;
    border-radius: 4px;
    animation: blink 1.2s ease-in-out infinite;
}

.retro-btn:hover {
    background: #fff !important;
    transform: scale(1.04);
    animation: none;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.pixel-frog-container {
    width: clamp(40px, 10vw, 80px);
    height: clamp(30px, 8vw, 60px);
    margin-bottom: clamp(10px, 3vw, 32px);
    position: relative;
    transform: scale(clamp(0.5, 1vw, 1));
}

.pixel-frog-art {
    width: 10px; height: 10px;
    background: transparent;
    box-shadow:
        20px 10px var(--g-400), 50px 10px var(--g-400),
        10px 20px var(--g-400), 20px 20px #fff, 30px 20px var(--g-400), 40px 20px var(--g-400), 50px 20px #fff, 60px 20px var(--g-400),
        10px 30px var(--g-400), 20px 30px var(--g-400), 30px 30px var(--g-400), 40px 30px var(--g-400), 50px 30px var(--g-400), 60px 30px var(--g-400),
        20px 40px var(--g-400), 30px 40px #000, 40px 40px #000, 50px 40px var(--g-400),
        10px 50px var(--g-400), 60px 50px var(--g-400);
    position: absolute;
    left: 50%; top: 50%;
    transform: translate(-50%, -50%);
}

/* Leaderboard */
.leaderboard-wrap {
    max-width: 900px;
    margin: var(--space-xl) auto var(--space-lg);
    background: white;
    border: var(--border-thin);
    border-radius: var(--r-md);
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0,0,0,0.06);
}

.leaderboard-wrap h2 {
    text-align: center;
    padding: var(--space-sm) var(--space-md);
    background: var(--g-900);
    color: var(--g-400);
    font-size: 1.8rem;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-weight: 600;
    font-size: 0.9rem;
}

th {
    background: var(--sw-offwhite);
    color: #666;
    padding: 12px 16px;
    text-align: left;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-bottom: var(--border-mid);
}

td {
    border-bottom: var(--border-thin);
    padding: 14px 16px;
    text-align: left;
}

tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--g-100); }

/* =============================================
   LEGACY SECTION COMPATIBILITY
   (Old swiss-section grid classes still work)
   ============================================= */

.swiss-section {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    border-bottom: var(--border-thin);
}

.col-full { grid-column: 1 / -1; }
.col-half { grid-column: span 6; }
.col-third { grid-column: span 4; }
.col-quarter { grid-column: span 3; }

.p-large { padding: var(--space-lg); }
.p-med { padding: var(--space-md); }
.p-small { padding: var(--space-sm); }

.border-bottom { border-bottom: var(--border-thin); }
.border-right { border-right: var(--border-thin); }

/* =============================================
   RESPONSIVE
   ============================================= */

@media (max-width: 1024px) {
    .hero { grid-template-columns: 1fr; }
    .hero-image { display: none; }
    .hero-content { min-height: 80svh; }

    .calc-page { grid-template-columns: 1fr; }
    .calc-result-panel { display: none; }
    .calc-inputs { min-height: 80svh; }

    .comic-inner { grid-template-columns: 1fr; }
    .comic-image { max-width: 480px; margin: 0 auto; }
}

@media (max-width: 768px) {
    :root {
        --space-lg: 48px;
        --space-xl: 64px;
    }

    .header-inner { padding: 0 var(--space-sm); }

    .site-nav {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: white;
        border-bottom: var(--border-mid);
        padding: var(--space-sm);
        box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    }

    .site-nav.open { display: block; }

    .site-nav ul {
        flex-direction: column;
        gap: 4px;
    }

    .nav-toggle { display: flex; }

    .features-grid { grid-template-columns: 1fr; }
    .team-grid { grid-template-columns: 1fr 1fr; padding: var(--space-md); }

    .swiss-section { display: flex; flex-direction: column; }
    .col-half, .col-third, .col-quarter { width: 100%; }

    h1 { font-size: clamp(3rem, 12vw, 5rem); }

    .p-large { padding: var(--space-md); }
    .p-med { padding: var(--space-sm) var(--space-md); }

    .time-inputs .swiss-input { font-size: 1.2rem; }

    #game-wrapper-box { margin: var(--space-md) auto; border-radius: 0; border-left: none; border-right: none; }
    .leaderboard-wrap { margin: var(--space-md) var(--space-sm); border-radius: var(--r-sm); }
    th, td { padding: 10px 12px; }
}

@media (max-width: 480px) {
    .team-grid { grid-template-columns: 1fr; padding: var(--space-sm); }
    .hero-content { padding: var(--space-lg) var(--space-sm); }
    .hero-actions { flex-direction: column; }
    .btn { width: 100%; justify-content: center; }
    .footer-inner { flex-direction: column; text-align: center; }

    .lb-nav { font-size: 1.2rem; padding: 12px 14px; }
    .lb-prev { left: 8px; }
    .lb-next { right: 8px; }
}

/* =============================================
   MOBILE NAV & SCROLLED STATES
   ============================================= */

/* Scrolled header via JS */
.site-header { transition: box-shadow var(--t-mid); }
