/* ═══════════════════════════════════════════════════════════════════
   SCANDINAVIAN MINIMAL CSS VARIABLES
   ═══════════════════════════════════════════════════════════════════ */

:root { color-scheme: light;
    /* Scandinavian Neutrals */
    --primary: #2c3e50; /* Dark slate */
    --secondary: #7f8c8d; /* Warm gray */
    --accent: #B7C4B1; /* Sage */
    --accent-2: #A7BEAE; /* Dusty Blue */
    
    /* Soft Backgrounds */
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #ecf0f1;
    
    /* Text (High readability) */
    --text-primary: #2c3e50;
    --text-secondary: #7f8c8d;
    --text-tertiary: #95a5a6;
    
    /* Borders (Subtle) */
    --border-color: #ecf0f1;
    
    /* Spacing (Generous - 12px base) */
    --space-xs: 12px;
    --space-sm: 24px;
    --space-md: 36px;
    --space-lg: 48px;
    --space-xl: 72px;
    --space-2xl: 96px;
    
    /* Border Radius (Soft) */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    
    /* Shadows (Barely visible) */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
    --shadow-md: 0 2px 6px rgba(0,0,0,0.07);
    --shadow-lg: 0 4px 12px rgba(0,0,0,0.08);
    
    /* Typography */
    --font-sans: 'Inter', 'Helvetica Neue', sans-serif;
}

[data-theme="dark"] { color-scheme: dark;
    --bg-primary: #1a1a1a;
    --bg-secondary: #2a2a2a;
    --bg-tertiary: #333333;
    --text-primary: #ecf0f1;
    --text-secondary: #bdc3c7;
    --text-tertiary: #95a5a6;
    --border-color: #444444;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.2);
    --shadow-md: 0 2px 6px rgba(0,0,0,0.25);
    --shadow-lg: 0 4px 12px rgba(0,0,0,0.3);
}

/* Default Typography */
h1, h2, h3 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }

p {
    font-size: clamp(1rem, 2vw, 1.125rem);
    line-height: 1.6;
    color: var(--text-secondary);
}

/* Default Components */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 24px;
    background: var(--primary);
    color: white;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

/* ═══════════════════════════════════════════════════════════════════
   LAYOUT PATTERNS
   ═══════════════════════════════════════════════════════════════════ */

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Header & Nav */
header {
    position: sticky;
    top: 0;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary);
    border-bottom: 2px solid var(--primary);
}

.mobile-nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--text-primary);
    padding: 8px;
    min-width: 44px;
    min-height: 44px;
}

/* Theme Toggle */
.theme-toggle {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: var(--shadow-md);
    z-index: 1000;
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    transform: scale(1.1);
}

/* Hero */
.hero {
    min-height: 80vh;
    display: flex;
    align-items: center;
    background: var(--bg-secondary);
    padding: var(--space-xl) 0;
}

.hero-content {
    max-width: 600px;
}

/* Sections */
section {
    padding: var(--space-2xl) 0;
}

/* Hours Grid */
.hours-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.hour-card {
    background: var(--bg-primary);
    border-radius: 16px;
    padding: 24px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

/* Membership Cards */
.membership-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.plan {
    border: 2px solid var(--border-color);
    transition: all 0.3s;
}

.plan.popular {
    border-color: var(--accent);
    position: relative;
}

/* Trainers */
.trainer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.trainer-card img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    border-radius: 12px;
}

/* Contact Form */
.contact-section { padding: 4rem 2rem; background: var(--bg-secondary); }
.contact-section h2 { text-align: center; font-size: 2.5rem; margin-bottom: 1rem; color: var(--text-primary); }
.contact-section > div > p { text-align: center; color: var(--text-secondary); margin-bottom: 3rem; }
.contact-form { max-width: 600px; margin: 0 auto; padding: 2rem; background: var(--bg-primary); border-radius: 16px; box-shadow: var(--shadow-md); }
.form-group { margin-bottom: 1.5rem; }
.form-group label { display: block; margin-bottom: 0.5rem; font-weight: 600; color: var(--text-primary); }
.form-group input, .form-group textarea { width: 100%; padding: 14px 16px; border: 1px solid var(--border-color); border-radius: 12px; font-size: 16px; font-family: inherit; background: var(--bg-primary); color: var(--text-primary); transition: all 0.3s; }
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--primary); background: var(--bg-primary); box-shadow: 0 0 0 3px rgba(44, 62, 80, 0.1); }
.submit-btn { width: 100%; padding: 1rem 2rem; background: var(--primary); color: white; border: none; border-radius: 24px; font-size: 1.125rem; font-weight: 600; cursor: pointer; transition: all 0.3s ease; }
.submit-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.submit-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.form-status { margin-top: 1rem; padding: 1rem; border-radius: 8px; text-align: center; display: none; }
.form-status.success { display: block; background: #d1fae5; color: #065f46; }
.form-status.error { display: block; background: #fee2e2; color: #991b1b; }

/* Responsive */
@media (max-width: 1024px) {
    .grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-primary);
        flex-direction: column;
        padding: 1.5rem;
        border-bottom: 1px solid var(--border-color);
        box-shadow: var(--shadow-md);
    }
    .nav-links.active {
        display: flex;
    }
    .mobile-nav-toggle {
        display: block;
    }
    .container {
        padding: 0 1rem;
    }
    section {
        padding: var(--space-lg) 0;
    }
}

/* Default Animations */
@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
}

/* Chart container */
.chart-container {
    max-width: 800px;
    margin: 2rem auto;
    background: var(--bg-primary);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
}

/* Theme application: the palettes above must reach the canvas,
   else the toggle only changes text colors. */
html { background-color: var(--bg-primary); }
body { background-color: var(--bg-primary); color: var(--text-primary); }

/* Logo text (replaces h1 for single-h1 compliance) */
.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
}
