/* ========================================
   GLOBAL RESET & VARIABLES
   ======================================== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: #f8fafc;
    --card-bg: #ffffff;
    --text: #1e293b;
    --text-light: #64748b;
    --accent-text: #10b981;
    --accent-bg: #ecfdf5;
    --accent-border: #10b981;
    --border: #e2e8f0;
    --shadow: rgba(0, 0, 0, 0.1);
    --radius: 16px;
}

html[data-theme="dark"] {
    --bg: #0f172a;
    --card-bg: #1e293b;
    --text: #f1f5f9;
    --text-light: #94a3b8;
    --accent-text: #fa8072;
    --accent-bg: #2d1b1b;
    --accent-border: #fa8072;
    --border: #334155;
    --shadow: rgba(0, 0, 0, 0.3);
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    transition: background 0.3s ease;
}

/* ========================================
   LAYOUT
   ======================================== */
.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ========================================
   NAVIGATION
   ======================================== */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(248, 250, 252, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    transition: all 0.3s ease;
}

html[data-theme="dark"] .nav {
    background: rgba(15, 23, 42, 0.9);
}

.nav-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    max-width: 1400px;
    margin: 0 auto;
}

.logo-link {
    display: flex;
    align-items: center;
}

.logo {
    height: 50px;
    transition: filter 0.3s ease;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: color 0.3s ease;
    position: relative;
}

.nav-links a:hover {
    color: var(--accent-text);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-text);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

/* THEME TOGGLE */
.theme-toggle {
    display: flex;
    align-items: center;
}

#themeSwitch {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-label {
    width: 50px;
    height: 26px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 13px;
    position: relative;
    cursor: pointer;
    transition: background 0.3s ease;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.toggle-label::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

#themeSwitch:checked + .toggle-label {
    background: var(--accent-text);
    border-color: var(--accent-text);
}

#themeSwitch:checked + .toggle-label::after {
    transform: translateX(24px);
}

/* ========================================
   HERO
   ======================================== */
.hero {
    padding: 8rem 0 4rem;
    text-align: center;
    background: var(--accent-bg);
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--accent-text);
    margin-bottom: 1rem;
}

.hero-content .tagline {
    font-size: 1.3rem;
    color: var(--text);
    max-width: 800px;
    margin: 0 auto;
}

/* ========================================
   MOBILE: HORIZONTAL SCROLLABLE NAV
   ======================================== */
@media (max-width: 768px) {
    .nav-inner {
        display: flex;
        overflow-x: auto;
        padding: 1rem 0;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        gap: 1.5rem;
        align-items: center;
        scrollbar-width: none;
    }
    .nav-inner::-webkit-scrollbar {
        display: none;
    }
    .logo-link {
        flex-shrink: 0;
        scroll-snap-align: start;
    }
    .logo {
        height: 40px;
    }
    .nav-links {
        display: flex;
        gap: 1.5rem;
        flex-shrink: 0;
    }
    .nav-links a {
        white-space: nowrap;
        scroll-snap-align: start;
        font-size: 1rem;
    }
    .theme-toggle {
        flex-shrink: 0;
        scroll-snap-align: end;
    }
    .toggle-label {
        width: 44px;
        height: 22px;
    }
    .toggle-label::after {
        width: 18px;
        height: 18px;
        top: 2px;
        left: 2px;
    }
    #themeSwitch:checked + .toggle-label::after {
        transform: translateX(22px);
    }
}

/* ========================================
   3D LOD TABLE — MOBILE: RATE UNDER LOD
   ======================================== */
.lod-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
    margin-top: 0.8rem;
    background: var(--bg);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
}

.lod-table thead {
    display: none;
}

.lod-table th,
.lod-table td {
    padding: 1rem 0.9rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.lod-table tr:hover {
    background: rgba(52, 211, 153, 0.06);
}

/* MOBILE: STACKED CARDS */
@media (max-width: 768px) {
    .lod-table {
        white-space: normal;
    }
    .lod-table tbody {
        display: block;
    }
    .lod-table tr {
        display: block;
        margin-bottom: 1.5rem;
        padding: 1rem;
        background: var(--card-bg);
        border-radius: 16px;
        box-shadow: 0 4px 12px var(--shadow);
        border: 1px solid var(--border);
    }
    .lod-table td {
        display: block;
        padding: 0.5rem 0;
        border: none;
        text-align: center;
    }
    .lod-table td:first-child {
        font-weight: 700;
        font-size: 1.1rem;
        color: var(--accent-text);
    }
    .lod-table .price {
        font-size: 1.3rem;
        font-weight: 700;
        color: var(--accent-text);
        margin: 0.3rem 0;
    }
    .lod-table .example {
        font-size: 0.85rem;
        color: var(--text-light);
        font-style: italic;
    }
}

/* DESKTOP: ORIGINAL TABLE */
@media (min-width: 769px) {
    .lod-table {
        display: table;
    }
    .lod-table thead {
        display: table-header-group;
    }
    .lod-table th {
        background: var(--accent-bg);
        color: var(--accent-text);
        padding: 1.1rem 0.9rem;
        font-weight: 600;
        font-size: 0.98rem;
        border-bottom: 2px solid var(--accent-border);
        min-width: 100px;
    }
    .lod-table td {
        padding: 1.1rem 0.9rem;
        vertical-align: top;
        min-width: 100px;
    }
    .lod-table .price {
        font-weight: 700;
        color: var(--accent-text);
        font-size: 1.15rem;
        white-space: nowrap;
    }
    .lod-table .example {
        font-size: 0.85rem;
        color: var(--text-light);
        margin-top: 0.3rem;
        font-style: italic;
        display: block;
    }
}

/* ========================================
   ABOUT US: MOBILE FLIP CARDS
   ======================================== */
.team-card {
    cursor: pointer;
}

.team-card.flipped .card-inner {
    transform: rotateY(180deg);
}

@media (max-width: 768px) {
    .team-card {
        -webkit-tap-highlight-color: transparent;
    }
}

/* ========================================
   UTILITIES
   ======================================== */
.text-center { text-align: center; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }

@media (max-width: 600px) {
    .hero { padding: 6rem 0 3rem; }
    .hero-content h1 { font-size: 2.8rem; }
    .hero-content .tagline { font-size: 1.1rem; }
}