* {
    box-sizing: border-box;
}

:root {
    --brand-gold: #caa45f;
    /* Mirage gold */
    --brand-gold-600: #b9904b;
    --brand-gold-700: #a8813f;
    --brand-blue: #2563eb;
    /* keep for accents */
    --ink: #231f20;
    --muted: #747474;
    --bg: #f4f4f3;
    --card: #ffffff;
    --dark-900: #0f141c;
    --dark-800: #1b2432;
}

html {
    scroll-behavior: smooth
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg);
    color: var(--ink);
}

#dealers-grid,
#rc {
    scroll-margin-top: 84px
}

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

/* Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(15, 20, 28, 0.8);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.brand {
    display: flex;
    align-items: center;
    gap: .75rem;
    color: #fff;
    text-decoration: none;
}

.brand-logo {
    height: 28px;
}

.brand-name {
    font-weight: 600;
    letter-spacing: .5px;
}

.site-nav {
    display: flex;
    gap: 1rem;
}

.nav-link {
    color: #eaeaea;
    text-decoration: none;
    font-weight: 500;
    opacity: .9;
    border: 1px solid transparent;
    padding: .4rem .8rem;
    border-radius: .5rem;
}

.nav-link:hover,
.nav-link.active {
    opacity: 1;
    border-color: rgba(255, 255, 255, 0.2);
}

/* Buttons */
.btn {
    display: inline-block;
    border-radius: .6rem;
    padding: .75rem 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all .2s ease;
    border: 2px solid transparent
}

.btn-primary {
    background: var(--brand-gold);
    color: #1b1b1b;
    border-color: var(--brand-gold)
}

.btn-primary:hover {
    background: var(--brand-gold-600);
    border-color: var(--brand-gold-600)
}

.btn-outline {
    background: transparent;
    color: #fff;
    border-color: rgba(255, 255, 255, .6)
}

.btn-outline:hover {
    background: rgba(255, 255, 255, .1);
}

/* Hero */
.hero-section {
    background: url('./header_bg.jpg') center center;
    background-size: cover;
    background-repeat: no-repeat;
    color: white;
    padding: 5rem 2rem 6rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    min-height: 60vh;
}

.hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, .55), rgba(0, 0, 0, .65));
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
}

.hero-logo {
    height: 80px;
    width: auto;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.hero-badge,
.dealer-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.12);
    padding: 0.5rem 1rem;
    border-radius: 25px;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin: 0 0 1rem 0;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.125rem;
    margin: 0;
    opacity: 0.95;
    max-width: 715px;
    margin-left: auto;
    margin-right: auto;
}

.hero-ctas {
    margin-top: 1.75rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap
}

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

.section-header {
    color: var(--brand-gold);
    text-transform: uppercase;
    letter-spacing: 0.5rem;
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 1rem;
    text-align: center;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #231f20;
    text-align: center;
    margin-bottom: 1rem;
}

.section-description {
    color: var(--muted);
    text-align: center;
    margin-bottom: 1.5rem;
    line-height: 1.6;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Filters */
.filter-bar{display:flex;gap:.75rem;align-items:center;justify-content:center;margin-bottom:2rem}
.filter-label{font-weight:600;color:var(--ink)}
.filter-select{appearance:none;padding:.5rem .75rem;border:1px solid #e5e7eb;border-radius:.5rem;background:#fff;min-width:200px;font-weight:600}
.filter-select:focus{outline:none;border-color:var(--brand-gold)}

.dealers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.dealer-card {
    background: var(--card);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.08);
    transition: all 0.25s ease;
    border: 1px solid #ececec;
    position: relative;
    overflow: hidden;
}

.dealer-card::after {
    content: '';
    position: absolute;
    inset: auto -20% 0 -20%;
    height: 6px;
    background: linear-gradient(90deg, var(--brand-gold), var(--brand-gold-700));
    opacity: .9
}

.dealer-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

.dealer-name {
    font-size: 1.35rem;
    font-weight: 700;
    color: #231f20;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.dealer-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
}

.dealer-meta-item {
    text-align: center;
}

.dealer-meta-label {
    font-size: 0.75rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
}

.dealer-meta-value {
    font-weight: 700;
    color: #231f20;
    font-size: 0.95rem;
}

.dealer-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.dealer-link {
    flex: 1;
    min-width: 120px;
    text-align: center;
    padding: 0.75rem 1rem;
    text-decoration: none;
    border-radius: 0.6rem;
    font-weight: 600;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.dealer-link.primary {
    background: var(--brand-gold);
    color: #1b1b1b;
    border: 2px solid var(--brand-gold);
}

.dealer-link.primary:hover {
    background: var(--brand-gold-600);
    border-color: var(--brand-gold-600);
}

.dealer-link.secondary {
    background: transparent;
    color: var(--brand-gold-700);
    border: 2px solid var(--brand-gold-700);
}

.dealer-link.secondary:hover {
    background: var(--brand-gold-700);
    color: white;
}

.alt-access-section {
    background: var(--card);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.08);
    margin-top: 2rem;
    border: 1px solid #ececec
}

.alt-access-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #231f20;
    margin-bottom: 1rem;
    text-align: center;
}

.alt-access-description {
    color: var(--muted);
    text-align: center;
    margin-bottom: 2rem;
}

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

.rc-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: #fbfbfb;
    border-radius: 0.6rem;
    text-decoration: none;
    color: #231f20;
    transition: all 0.2s ease;
    border: 1px solid #eee;
}

.rc-link:hover {
    background: #fff7ea;
    border-color: var(--brand-gold);
    transform: translateX(4px);
}

.rc-code {
    font-weight: 800;
    color: var(--brand-gold-700);
    font-family: monospace;
}

.rc-dealer-name {
    font-size: 0.9rem;
    color: var(--muted);
    margin-right: auto;
    margin-left: 1rem;
}

.stats-section {
    background: linear-gradient(135deg, var(--dark-800) 0%, var(--dark-900) 100%);
    color: white;
    padding: 3rem 2rem;
    border-radius: 1rem;
    margin: 3rem 0;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, .08)
}

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

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--brand-gold);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Dealer page specific styles */
.step-section {
    background: var(--card);
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.08);
    border: 1px solid #ececec
}

.step-header {
    color: var(--brand-gold);
    text-transform: uppercase;
    letter-spacing: 0.5rem;
    font-weight: 700;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.step-title {
    font-size: 2rem;
    font-weight: 700;
    color: #231f20;
    margin-bottom: 1rem;
}

.step-description {
    color: var(--muted);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.script-container {
    background: #0f172a;
    color: #eaeaea;
    padding: 2rem;
    border-radius: 1rem;
    margin: 2rem 0;
    font-family: 'Courier New', monospace;
    font-size: 1rem;
    border: 1px solid rgba(255, 255, 255, .08);
    position: relative;
    overflow-x: auto;
}

/* Lightweight syntax highlighting */
.script-container code {
    display: block;
    white-space: pre-wrap;
    word-break: break-word;
    line-height: 1.6;
    font-size: 0.95rem;
}
.script-container code .tok-tag { color: var(--brand-gold); font-weight: 700; }
.script-container code .tok-attr { color: #93c5fd; }
.script-container code .tok-string { color: #86efac; }
.script-container code .tok-punc { color: #9aa4b2; }

.copy-button {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--brand-gold);
    color: #1b1b1b;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 0.875rem;
    transition: background-color 0.2s ease;
}

.copy-button:hover {
    background: var(--brand-gold-600);
}

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

.feature-card {
    background: var(--card);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.08);
    border: 1px solid #ececec
}

.feature-card.success {
    border-left: 4px solid #27ae60;
    background: #e8f5e8;
}

.feature-card.warning {
    border-left: 4px solid #f39c12;
    background: #fff3cd;
}

.feature-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #231f20;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

.feature-list li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.feature-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--brand-gold-700);
    font-weight: bold;
}

.dealer-info-card {
    background: linear-gradient(135deg, var(--dark-800) 0%, var(--dark-900) 100%);
    color: white;
    padding: 2rem;
    border-radius: 1rem;
    margin-bottom: 2rem;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, .08)
}

.dealer-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.dealer-info-item {
    text-align: center;
}

.dealer-info-label {
    font-size: 0.875rem;
    opacity: 0.8;
    margin-bottom: 0.25rem;
}

.dealer-info-value {
    font-weight: 700;
    font-size: 1.1rem;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--brand-gold-700);
    text-decoration: none;
    font-weight: 600;
    margin-top: 2rem;
    transition: color 0.2s ease;
}

.back-link:hover {
    color: var(--brand-gold);
}

.instructions-list {
    counter-reset: step-counter;
    list-style: none;
    padding: 0;
}

.instructions-list li {
    counter-increment: step-counter;
    padding: 1rem 0;
    padding-left: 3rem;
    position: relative;
    border-bottom: 1px solid #f0f0f0;
}

.instructions-list li:last-child {
    border-bottom: none;
}

.instructions-list li::before {
    content: counter(step-counter);
    position: absolute;
    left: 0;
    top: 1rem;
    background: var(--brand-gold);
    color: #1b1b1b;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.875rem;
}

/* Utilities */
.utility-bar{display:flex;justify-content:flex-end;margin-bottom:1rem}
.print-hide{ }
@media print{
  .site-header,.site-footer,.print-hide{display:none !important}
  .main-content{padding:0}
}

/* Footer */
.site-footer {
    border-top: 1px solid #eaeaea;
    background: #fafafa;
    color: #6b7280
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 72px
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .hero-section {
        padding: 2rem 1rem;
    }

    .hero-logo {
        height: 60px;
    }

    .main-content {
        padding: 2rem 1rem;
    }

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

    .dealer-actions {
        flex-direction: column;
    }

    .dealer-link {
        min-width: auto;
    }

    .rc-links {
        grid-template-columns: 1fr;
    }

    .step-section {
        padding: 1.5rem;
    }

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