/* ============================================================
   Specrom Analytics — ALDI Store Locations Landing Page
   Design tokens aligned with style_main.css (DM Sans, blue primary)
   ============================================================ */

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

:root {
    /* Brand — matches style_main.css */
    --clr-primary:       #1a56db;
    --clr-primary-dark:  #1244b0;
    --clr-primary-light: #e8effc;
    --clr-accent:        #f59e0b;

    /* Neutrals */
    --clr-bg:            #ffffff;
    --clr-surface:       #f8fafc;
    --clr-surface-alt:   #f1f5f9;
    --clr-border:        #e2e8f0;
    --clr-border-light:  #f1f5f9;
    --clr-text:          #1e293b;
    --clr-text-secondary:#475569;
    --clr-text-muted:    #94a3b8;

    /* Feedback */
    --clr-success:       #16a34a;

    /* Typography — matches style_main.css */
    --font-heading: 'DM Sans', 'Segoe UI', system-ui, sans-serif;
    --font-body:    'DM Sans', 'Segoe UI', system-ui, sans-serif;
    --font-mono:    'DM Mono', 'Fira Code', monospace;

    /* Spacing (4px base) */
    --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px; --sp-4: 16px;
    --sp-5: 20px; --sp-6: 24px; --sp-8: 32px; --sp-10: 40px;
    --sp-12: 48px;

    /* Radii & Shadows */
    --radius-sm: 6px;
    --radius:    10px;
    --radius-lg: 16px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,.06);
    --shadow-md: 0 4px 14px rgba(0,0,0,.08);
    --shadow-lg: 0 10px 30px rgba(0,0,0,.10);

    --container: 960px;
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    background: var(--clr-bg);
    color: var(--clr-text);
    line-height: 1.65;
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}

a { color: var(--clr-primary); text-decoration: none; }
a:hover { text-decoration: underline; color: var(--clr-primary-dark); }
strong { font-weight: 600; }
img { max-width: 100%; height: auto; }

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
    border-bottom: 1px solid var(--clr-border);
    background: rgba(255,255,255,.96);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
}

.logo-link { display: flex; align-items: center; }
.logo-img  { height: 28px; width: auto; }

.header-nav { display: flex; gap: 24px; }
.header-nav a {
    font-size: 13px;
    font-weight: 500;
    color: var(--clr-text-secondary);
    letter-spacing: .01em;
}
.header-nav a:hover { color: var(--clr-text); text-decoration: none; }

/* ============================================================
   BREADCRUMB
   ============================================================ */
.breadcrumb-bar {
    background: var(--clr-surface);
    border-bottom: 1px solid var(--clr-border-light);
    padding: 10px 0;
    font-size: 12px;
}
.breadcrumb-bar a { color: var(--clr-text-muted); }
.breadcrumb-bar a:hover { color: var(--clr-primary); }
.breadcrumb-bar .sep     { color: var(--clr-border); margin: 0 6px; }
.breadcrumb-bar .current { color: var(--clr-text-secondary); font-weight: 500; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
    padding: 52px 0 60px;
    background:
        radial-gradient(ellipse 80% 60% at 0% 0%, rgba(26,86,219,.06) 0%, transparent 60%),
        radial-gradient(ellipse 60% 60% at 100% 100%, rgba(26,86,219,.04) 0%, transparent 50%),
        var(--clr-bg);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 48px;
    align-items: start;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--clr-primary-light);
    color: var(--clr-primary);
    font-size: 12px;
    font-weight: 600;
    padding: 5px 14px;
    border-radius: 20px;
    margin-bottom: 20px;
    font-family: var(--font-mono);
}

.badge-dot {
    width: 7px; height: 7px;
    background: var(--clr-primary);
    border-radius: 50%;
    display: inline-block;
    animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50%       { opacity: .4; }
}

.hero h1 {
    font-family: var(--font-heading);
    font-size: 40px;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -.03em;
    color: var(--clr-text);
    margin-bottom: 16px;
}
.hero h1 .accent { color: var(--clr-primary); }

.hero-desc {
    font-size: 16px;
    color: var(--clr-text-secondary);
    line-height: 1.7;
    margin-bottom: 28px;
    max-width: 520px;
}

/* Hero Stats */
.hero-stats {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 32px;
    padding: 20px 24px;
    background: var(--clr-surface);
    border: 1px solid var(--clr-border);
    border-radius: var(--radius);
}
.stat-item { text-align: center; }
.stat-num {
    display: block;
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 800;
    color: var(--clr-text);
    line-height: 1;
    letter-spacing: -.02em;
}
.stat-label {
    display: block;
    font-size: 11px;
    color: var(--clr-text-muted);
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-top: 4px;
    font-weight: 500;
}
.stat-divider { width: 1px; height: 36px; background: var(--clr-border); }

/* Hero CTA */
.hero-cta { display: flex; flex-direction: column; gap: 12px; }

.price-block {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 4px;
}
.price-old {
    font-size: 16px;
    color: var(--clr-text-muted);
    text-decoration: line-through;
    font-weight: 500;
}
.price-now {
    font-family: var(--font-heading);
    font-size: 36px;
    font-weight: 800;
    color: var(--clr-primary);
    letter-spacing: -.02em;
}
.price-format {
    font-size: 13px;
    color: var(--clr-text-muted);
    font-weight: 500;
}

.btn-buy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--clr-primary);
    color: #fff;
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 700;
    padding: 14px 32px;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    transition: background .2s, transform .15s, box-shadow .2s;
    text-decoration: none;
    box-shadow: 0 1px 3px rgba(26,86,219,.2), 0 4px 12px rgba(26,86,219,.15);
}
.btn-buy:hover {
    background: var(--clr-primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(26,86,219,.25), 0 8px 20px rgba(26,86,219,.18);
    text-decoration: none;
    color: #fff;
}
.btn-buy:active { transform: translateY(0); }
.btn-buy-lg { font-size: 17px; padding: 16px 40px; }

.cta-note { font-size: 12px; color: var(--clr-text-muted); }

/* Hero Visual — data card */
.hero-visual { padding-top: 8px; }

.data-card-preview {
    background: var(--clr-bg);
    border: 1px solid var(--clr-border);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow-md);
}

.card-header-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--clr-border-light);
}

.brand-logo {
    border-radius: 8px;
    object-fit: contain;
    background: #fff;
    border: 1px solid var(--clr-border-light);
}
.card-brand {
    display: block;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 16px;
    color: var(--clr-text);
}
.card-cat {
    display: block;
    font-size: 12px;
    color: var(--clr-text-muted);
    margin-top: 1px;
}

.card-fields { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 20px; }

.field-tag {
    background: var(--clr-surface);
    border: 1px solid var(--clr-border);
    color: var(--clr-text-secondary);
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 4px;
}

.card-row-count {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--clr-text-secondary);
    font-weight: 500;
    padding-top: 16px;
    border-top: 1px solid var(--clr-border-light);
}

/* ============================================================
   SECTIONS
   ============================================================ */
.section { padding: 56px 0; }
.section-alt { background: var(--clr-surface); }

.section h2 {
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -.03em;
    color: var(--clr-text);
    margin-bottom: 12px;
    line-height: 1.2;
}

.section-lead {
    font-size: 15px;
    color: var(--clr-text-secondary);
    line-height: 1.7;
    margin-bottom: 28px;
    max-width: 700px;
}

.section p {
    color: var(--clr-text-secondary);
    margin-bottom: 16px;
    line-height: 1.7;
    max-width: 750px;
}

/* ============================================================
   MAP
   ============================================================ */
.map-container {
    margin-top: 32px;
    background: var(--clr-bg);
    border: 1px solid var(--clr-border);
    border-radius: var(--radius);
    overflow: hidden;
}

.map-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--clr-border-light);
}
.map-title-row h3 {
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 700;
    color: var(--clr-text);
    margin: 0;
}

.map-legend { display: flex; gap: 12px; flex-wrap: wrap; }

.legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    color: var(--clr-text-muted);
    font-weight: 500;
}

.legend-swatch {
    width: 14px; height: 14px;
    border-radius: 3px;
    display: inline-block;
    border: 1px solid rgba(0,0,0,.08);
}

.map-svg-wrap { padding: 24px 20px; }
.map-svg-wrap svg { width: 100%; height: auto; }

.map-svg-wrap .state-path {
    transition: opacity .15s;
    cursor: default;
}
.map-svg-wrap .state-path:hover { opacity: .8; }
.map-svg-wrap .state-path.inactive { fill: #f1f5f9; stroke: #e2e8f0; }

/* ============================================================
   STATE TABLE
   ============================================================ */
.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--clr-border);
    border-radius: var(--radius);
    background: var(--clr-bg);
}

table { width: 100%; border-collapse: collapse; font-size: 14px; }

thead th {
    text-align: left;
    padding: 12px 16px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--clr-text-muted);
    border-bottom: 2px solid var(--clr-border);
    font-family: var(--font-mono);
    white-space: nowrap;
    cursor: pointer;
    user-select: none;
}
thead th:hover { color: var(--clr-text-secondary); }
thead th.num    { text-align: right; }
thead th.bar-col { cursor: default; min-width: 160px; }

thead th.sorted-asc::after,
thead th.sorted-desc::after {
    content: '';
    display: inline-block;
    width: 0; height: 0;
    margin-left: 6px;
    vertical-align: middle;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
}
thead th.sorted-asc::after  { border-bottom: 5px solid var(--clr-primary); }
thead th.sorted-desc::after { border-top:    5px solid var(--clr-primary); }

tbody td {
    padding: 10px 16px;
    border-bottom: 1px solid var(--clr-border-light);
    color: var(--clr-text);
}
tbody td.num { text-align: right; font-family: var(--font-mono); font-weight: 500; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: rgba(26,86,219,.03); }

.bar-cell { display: flex; align-items: center; }
.bar-track {
    flex: 1;
    height: 8px;
    background: var(--clr-surface);
    border-radius: 4px;
    overflow: hidden;
}
.bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #93c5fd, #1d4ed8);
    border-radius: 4px;
    transition: width .4s ease;
}

/* ============================================================
   SAMPLE TABLE
   ============================================================ */
.sample-table-wrap { margin-bottom: 28px; }
.sample-table thead th { cursor: default; }
.sample-table td.mono  { font-family: var(--font-mono); font-size: 13px; color: var(--clr-text-secondary); }
.sample-table td strong { color: var(--clr-primary); font-family: var(--font-mono); font-weight: 600; }

/* Fields block */
.fields-block {
    background: var(--clr-bg);
    border: 1px solid var(--clr-border);
    border-radius: var(--radius);
    padding: 24px;
}
.fields-block h3 {
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 14px;
    color: var(--clr-text);
}
.fields-list  { display: flex; flex-wrap: wrap; gap: 8px; }
.field-chip {
    background: var(--clr-surface);
    border: 1px solid var(--clr-border);
    color: var(--clr-text-secondary);
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 500;
    padding: 6px 14px;
    border-radius: 5px;
}

/* ============================================================
   CITIES GRID
   ============================================================ */
.cities-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.city-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: var(--clr-bg);
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-sm);
    transition: border-color .2s;
}
.city-card:hover { border-color: var(--clr-primary); }

.city-card.city-top {
    background: var(--clr-primary-light);
    border-color: rgba(26,86,219,.2);
}

.city-rank {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 600;
    color: var(--clr-text-muted);
    min-width: 24px;
}
.city-top .city-rank { color: var(--clr-primary); }

.city-name { flex: 1; font-weight: 600; font-size: 14px; color: var(--clr-text); }

.city-count {
    font-family: var(--font-mono);
    font-size: 16px;
    font-weight: 700;
    color: var(--clr-text);
}
.city-top .city-count { color: var(--clr-primary-dark); }

/* ============================================================
   USE CASES
   ============================================================ */
.usecase-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.usecase-card {
    padding: 28px 24px;
    background: var(--clr-bg);
    border: 1px solid var(--clr-border);
    border-radius: var(--radius);
    transition: border-color .2s, box-shadow .2s;
}
.usecase-card:hover {
    border-color: var(--clr-primary);
    box-shadow: 0 2px 12px rgba(26,86,219,.07);
}
.usecase-icon {
    width: 44px; height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    margin-bottom: 16px;
    color: var(--clr-primary);
}
.icon-bg-1 { background: #ede9fe; color: #7c3aed !important; }
.icon-bg-2 { background: #dbeafe; color: var(--clr-primary) !important; }
.icon-bg-3 { background: #dcfce7; color: #16a34a !important; }
.icon-bg-4 { background: #fef9c3; color: #ca8a04 !important; }

.usecase-card h3 {
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--clr-text);
}
.usecase-card p {
    font-size: 14px;
    color: var(--clr-text-secondary);
    line-height: 1.6;
    margin: 0;
    max-width: none;
}

/* ============================================================
   BUY / CTA SECTION
   ============================================================ */
.section-buy {
    background:
        linear-gradient(135deg, var(--clr-primary-light) 0%, #fff 40%, var(--clr-primary-light) 100%);
    border-top: 1px solid var(--clr-border);
    border-bottom: 1px solid var(--clr-border);
}

.buy-card {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 48px;
    align-items: center;
}
.buy-card h2     { margin-bottom: 8px; }
.buy-card > .buy-info > p { color: var(--clr-text-secondary); margin-bottom: 20px; }

.buy-features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.buy-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--clr-text);
    font-weight: 500;
}

.buy-action {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    min-width: 240px;
}

.buy-price-block { display: flex; align-items: baseline; gap: 10px; }
.buy-old {
    font-size: 18px;
    color: var(--clr-text-muted);
    text-decoration: line-through;
}
.buy-now {
    font-family: var(--font-heading);
    font-size: 48px;
    font-weight: 800;
    color: var(--clr-primary);
    letter-spacing: -.03em;
    line-height: 1;
}

.buy-secure {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--clr-text-muted);
}

/* ============================================================
   FAQ
   ============================================================ */
.faq-list {
    max-width: 700px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.faq-item {
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-sm);
    background: var(--clr-bg);
    overflow: hidden;
    transition: box-shadow .2s;
}
.faq-item[open] { box-shadow: var(--shadow-sm); }

.faq-item summary {
    padding: 16px 20px;
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 700;
    color: var(--clr-text);
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
    content: '+';
    font-size: 20px;
    font-weight: 400;
    color: var(--clr-text-muted);
    transition: transform .2s;
    flex-shrink: 0;
    margin-left: 16px;
}
.faq-item[open] summary::after { content: '−'; color: var(--clr-primary); }

.faq-body { padding: 0 20px 16px; }
.faq-body p {
    font-size: 14px;
    color: var(--clr-text-secondary);
    line-height: 1.7;
    margin: 0;
    max-width: none;
}

/* ============================================================
   BOTTOM CTA
   ============================================================ */
.section-bottom-cta { text-align: center; padding: 56px 0; }
.section-bottom-cta h2 { margin-bottom: 8px; }
.section-bottom-cta p {
    color: var(--clr-text-secondary);
    margin: 0 auto 24px;
    font-size: 15px;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
    background: var(--clr-surface);
    border-top: 1px solid var(--clr-border);
    padding: 40px 0 24px;
    font-size: 13px;
    color: var(--clr-text-secondary);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 32px;
}
.footer-grid strong {
    font-family: var(--font-heading);
    font-size: 15px;
    color: var(--clr-text);
    display: block;
    margin-bottom: 6px;
}
.footer-grid p    { margin: 0; max-width: none; }
.footer-grid h4   {
    font-family: var(--font-heading);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--clr-text-muted);
    margin-bottom: 12px;
}
.footer-grid div:nth-child(2),
.footer-grid div:nth-child(3) { display: flex; flex-direction: column; gap: 8px; }
.footer-grid a { color: var(--clr-text-secondary); font-size: 13px; }
.footer-grid a:hover { color: var(--clr-primary); }

.footer-bottom {
    padding-top: 20px;
    border-top: 1px solid var(--clr-border);
    font-size: 12px;
    color: var(--clr-text-muted);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
    .hero-grid          { grid-template-columns: 1fr; gap: 32px; }
    .hero h1            { font-size: 30px; }
    .hero-stats         { gap: 16px; padding: 16px; }
    .stat-num           { font-size: 22px; }
    .hero-visual        { order: -1; }
    .cities-grid        { grid-template-columns: 1fr 1fr; }
    .usecase-grid       { grid-template-columns: 1fr; }
    .buy-card           { grid-template-columns: 1fr; gap: 28px; text-align: center; }
    .buy-features       { align-items: center; }
    .footer-grid        { grid-template-columns: 1fr; gap: 24px; }
    .map-title-row      { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
    .hero            { padding: 32px 0 40px; }
    .hero h1         { font-size: 26px; }
    .hero-stats      { flex-direction: column; gap: 12px; }
    .stat-divider    { width: 40px; height: 1px; }
    .cities-grid     { grid-template-columns: 1fr; }
    .price-now       { font-size: 28px; }
    .buy-now         { font-size: 36px; }
    .map-legend      { gap: 8px; }
    .legend-item     { font-size: 10px; }
}
