/* ============================================
   NERDCROFT — MAIN STYLESHEET
   Learning Arcade Edition
   ============================================ */

/* 1. Reset
   ============================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--ink);
    background: var(--bg);
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

*:focus-visible {
    outline: 2px solid var(--purple);
    outline-offset: 2px;
}


/* 2. Design Tokens
   ============================================ */
:root {
    /* Backgrounds */
    --bg:          #F7F6F2;
    --bg-alt:      #EEECEA;
    --bg-paper:    #FFFFFF;
    --bg-purple:   #EDEAFF;
    --bg-yellow:   #FFF9E0;
    --bg-teal:     #E2F8F3;
    --bg-coral:    #FFEEEA;

    /* Ink */
    --ink:         #0B0F1A;
    --ink-2:       #374151;
    --ink-3:       #71717A;

    /* Brand accents (solid, no gradients) */
    --purple:      #5533E8;
    --purple-dark: #3D1FC9;
    --purple-text: #4428CC;

    --yellow:      #F5C200;
    --yellow-dark: #C9A000;
    --yellow-ink:  #5C4600;

    --coral:       #E84530;
    --coral-dark:  #C43320;

    --teal:        #009E82;
    --teal-dark:   #007A65;

    --indigo:      #1D4ED8;

    /* Borders */
    --border:      #DDDBD4;
    --border-2:    #C8C5BC;

    /* Shadows — subtle, no glow */
    --shadow-xs: 0 1px 2px rgba(0,0,0,0.06);
    --shadow-sm: 0 2px 6px rgba(0,0,0,0.08);
    --shadow:    0 4px 14px rgba(0,0,0,0.09);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.10);

    /* Layout */
    --max-w:  1200px;
    --nav-h:  68px;

    /* Radii — sharp by design */
    --r-xs:  2px;
    --r:     6px;
    --r-lg:  10px;
    --r-xl:  14px;

    /* Motion */
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --t:      0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --t-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}


/* 3. Typography
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--ink);
}

.eyebrow {
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--purple);
    margin-bottom: 12px;
    padding: 4px 10px;
    background: var(--bg-purple);
    border-radius: var(--r-xs);
}

.eyebrow-teal   { color: var(--teal);   background: var(--bg-teal);   }
.eyebrow-coral  { color: var(--coral);  background: var(--bg-coral);  }
.eyebrow-yellow { color: var(--yellow-ink); background: var(--bg-yellow); }


/* 4. Layout
   ============================================ */
.container {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 24px;
}

.section      { padding: 96px 0; }
.section-sm   { padding: 64px 0; }

.section-white  { background: var(--bg-paper); }
.section-gray   { background: var(--bg-alt); }
.section-tint   { background: var(--bg); }
.section-purple { background: var(--purple); }
.section-dark   { background: var(--ink); }

.section-header {
    margin-bottom: 56px;
}

.section-header.center { text-align: center; }
.section-header.center p { margin: 0 auto; }

.section-header h2 {
    font-size: clamp(1.875rem, 3.5vw, 2.625rem);
    margin-bottom: 14px;
}

.section-header p {
    font-size: 1.0625rem;
    color: var(--ink-2);
    max-width: 560px;
    line-height: 1.75;
}

.sr-only {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}


/* 5. Buttons
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 24px;
    border-radius: var(--r);
    font-size: 0.9375rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--t);
    white-space: nowrap;
    text-decoration: none;
    line-height: 1;
    letter-spacing: -0.01em;
}

.btn-lg { padding: 16px 32px; font-size: 1rem; }
.btn-sm { padding: 10px 18px; font-size: 0.875rem; }
.btn-block { width: 100%; }

.btn-primary {
    background: var(--purple);
    color: #FFFFFF;
    border-color: var(--purple);
}
.btn-primary:hover {
    background: var(--purple-dark);
    border-color: var(--purple-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.btn-yellow {
    background: var(--yellow);
    color: var(--yellow-ink);
    border-color: var(--yellow);
}
.btn-yellow:hover {
    background: var(--yellow-dark);
    border-color: var(--yellow-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.btn-teal {
    background: var(--teal);
    color: #FFFFFF;
    border-color: var(--teal);
}
.btn-teal:hover {
    background: var(--teal-dark);
    border-color: var(--teal-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.btn-outline {
    background: transparent;
    color: var(--ink);
    border-color: var(--border-2);
}
.btn-outline:hover {
    border-color: var(--ink);
    transform: translateY(-1px);
}

.btn-outline-white {
    background: transparent;
    color: #FFFFFF;
    border-color: rgba(255,255,255,0.4);
}
.btn-outline-white:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.7);
}

.btn-ghost {
    background: transparent;
    color: var(--purple);
    border-color: transparent;
    padding-left: 0;
    padding-right: 0;
}
.btn-ghost:hover {
    color: var(--purple-dark);
}

/* Offset shadow button (arcade token feel) */
.btn-offset {
    box-shadow: 3px 3px 0 var(--ink);
    transition: box-shadow var(--t), transform var(--t);
}
.btn-offset:hover {
    transform: translate(-1px, -1px);
    box-shadow: 4px 4px 0 var(--ink);
}
.btn-offset:active {
    transform: translate(2px, 2px);
    box-shadow: 1px 1px 0 var(--ink);
}


/* 6. Navigation
   ============================================ */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 200;
    height: var(--nav-h);
    background: var(--bg-paper);
    border-bottom: 2px solid var(--border);
}

.nav-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-logo {
    font-size: 1.25rem;
    font-weight: 900;
    letter-spacing: -0.045em;
    color: var(--ink);
    text-decoration: none;
    flex-shrink: 0;
}

.logo-nerd  { color: var(--ink); }
.logo-croft { color: var(--purple); }

/* Footer overrides — dark background needs white/light logo */
.footer .logo-nerd  { color: #FFFFFF; }
.footer .logo-croft { color: #8B72FF; }

.nav-links {
    display: flex;
    align-items: center;
    gap: 2px;
    flex: 1;
}

.nav-links a {
    color: var(--ink-2);
    font-size: 0.9375rem;
    font-weight: 600;
    padding: 7px 14px;
    border-radius: var(--r-xs);
    transition: var(--t);
    text-decoration: none;
}

.nav-links a:hover { color: var(--ink); background: var(--bg-alt); }
.nav-links a.active { color: var(--purple); background: var(--bg-purple); }

.nav-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    padding: 8px;
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--ink);
    border-radius: 1px;
    transition: var(--t);
}

.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-mobile {
    display: none;
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: var(--bg-paper);
    border-bottom: 2px solid var(--border);
    padding: 12px 16px 20px;
    flex-direction: column;
    gap: 2px;
}

.nav-mobile.open { display: flex; }

.nav-mobile a {
    display: block;
    color: var(--ink-2);
    font-size: 1rem;
    font-weight: 600;
    padding: 12px 14px;
    border-radius: var(--r);
    transition: var(--t);
    text-decoration: none;
}

.nav-mobile a:hover { color: var(--ink); background: var(--bg-alt); }
.nav-mobile .btn    { margin-top: 10px; width: 100%; }


/* 7. Hero (Split arcade layout)
   ============================================ */
.hero {
    padding-top: var(--nav-h);
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
}

.hero-left {
    background: var(--bg-paper);
    display: flex;
    align-items: center;
    padding: 80px 64px 80px 0;
    padding-left: max(24px, calc((100vw - var(--max-w)) / 2 + 24px));
    border-right: 2px solid var(--border);
}

.hero-left-inner { max-width: 520px; }

.hero h1 {
    font-size: clamp(2.75rem, 4.5vw, 4rem);
    font-weight: 900;
    line-height: 1.03;
    margin-bottom: 20px;
}

.hero h1 .accent { color: var(--purple); }

.hero-sub {
    font-size: 1.125rem;
    color: var(--ink-2);
    line-height: 1.75;
    margin-bottom: 36px;
    max-width: 440px;
}

.hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

/* Right side — arcade panel */
.hero-right {
    background: var(--purple);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 48px;
    position: relative;
    overflow: hidden;
}

.hero-right::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 40px,
            rgba(255,255,255,0.04) 40px,
            rgba(255,255,255,0.04) 41px
        ),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 40px,
            rgba(255,255,255,0.04) 40px,
            rgba(255,255,255,0.04) 41px
        );
}

.arcade-label {
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.5);
    margin-bottom: 24px;
    position: relative;
    z-index: 1;
}

.arcade-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    width: 100%;
    max-width: 380px;
    position: relative;
    z-index: 1;
}

.arcade-tile {
    background: var(--bg-paper);
    border-radius: var(--r-lg);
    padding: 28px 20px 24px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    text-decoration: none;
    transition: var(--t);
    border: 2px solid transparent;
    cursor: pointer;
}

.arcade-tile:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(255,255,255,0.6);
}

.tile-icon {
    display: flex;
    align-items: center;
}

.tile-subject {
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-3);
}

.tile-name {
    font-size: 1.0625rem;
    font-weight: 800;
    color: var(--ink);
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.tile-count {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--ink-3);
    margin-top: auto;
}

/* Tile accent bars */
.tile--purple .tile-subject { color: var(--purple); }
.tile--teal   .tile-subject { color: var(--teal); }
.tile--coral  .tile-subject { color: var(--coral); }
.tile--yellow .tile-subject { color: var(--yellow-ink); }

.tile-bar {
    display: block;
    width: 32px;
    height: 4px;
    border-radius: 2px;
    margin-bottom: 2px;
}

.tile--purple .tile-bar { background: var(--purple); }
.tile--teal   .tile-bar { background: var(--teal); }
.tile--coral  .tile-bar { background: var(--coral); }
.tile--yellow .tile-bar { background: var(--yellow); }

/* Wide extracurricular tile */
.arcade-tile-wide {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: center;
    padding: 18px 22px;
    gap: 16px;
}
.arcade-tile-wide .tile-bar   { display: none; }
.arcade-tile-wide .tile-count { margin-left: auto; flex-shrink: 0; }
.arcade-tile-wide > div       { display: flex; flex-direction: column; gap: 4px; }

.tile--extra { background: var(--ink); border-color: rgba(255,255,255,0.08); }
.tile--extra .tile-subject { color: var(--yellow-dark); }
.tile--extra .tile-name    { color: #FFFFFF; }
.tile--extra .tile-count   { color: rgba(255,255,255,0.4); }
.tile--extra .tile-icon [data-lucide] { color: var(--yellow); }
.tile--extra:hover { border-color: rgba(255,255,255,0.18); }


/* 8. Pillar Cards
   ============================================ */
.pillars-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
    background: var(--border);
    border: 2px solid var(--border);
    border-radius: var(--r-lg);
    overflow: hidden;
}

.pillar-card {
    background: var(--bg-paper);
    padding: 36px 28px;
    transition: var(--t);
}

.pillar-card:hover { background: var(--bg); }

.pillar-icon {
    margin-bottom: 16px;
}

.pillar-accent {
    display: block;
    width: 28px;
    height: 4px;
    border-radius: 2px;
    margin-bottom: 18px;
}

.pa--purple { background: var(--purple); }
.pa--coral  { background: var(--coral); }
.pa--teal   { background: var(--teal); }
.pa--yellow { background: var(--yellow); }

.pillar-card h3 {
    font-size: 1.125rem;
    margin-bottom: 10px;
}

.pillar-card p {
    font-size: 0.9375rem;
    color: var(--ink-2);
    line-height: 1.7;
}


/* 9. Product Cards
   ============================================ */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

.product-card {
    background: var(--bg-paper);
    border: 2px solid var(--border);
    border-radius: var(--r-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: var(--t);
}

.product-card:hover {
    border-color: var(--border-2);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.product-card[data-hidden="true"] { display: none; }

/* Colored solid header block */
.product-thumb {
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Solid fills — no gradients */
.pt--purple { background: var(--purple); }
.pt--blue   { background: var(--indigo); }
.pt--teal   { background: var(--teal); }
.pt--coral  { background: var(--coral); }
.pt--yellow { background: var(--yellow); }

.product-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.product-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.product-cat {
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-3);
}

.product-price {
    font-size: 1rem;
    font-weight: 900;
    color: var(--ink);
    letter-spacing: -0.02em;
}

.product-card h3 {
    font-size: 1rem;
    margin-bottom: 8px;
}

.product-card p {
    font-size: 0.875rem;
    color: var(--ink-2);
    line-height: 1.65;
    margin-bottom: 18px;
    flex: 1;
}


/* 10. Resource Cards
   ============================================ */
.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 12px;
}

.resource-card {
    background: var(--bg-paper);
    border: 2px solid var(--border);
    border-radius: var(--r-lg);
    padding: 20px;
    display: flex;
    gap: 16px;
    align-items: flex-start;
    transition: var(--t);
}

.resource-card:hover {
    border-color: var(--border-2);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.resource-card[data-hidden="true"] { display: none; }

.res-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--r);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 2px solid transparent;
}

.ri--purple { background: var(--bg-purple); border-color: rgba(85,51,232,0.15); }
.ri--teal   { background: var(--bg-teal);   border-color: rgba(0,158,130,0.15); }
.ri--yellow { background: var(--bg-yellow); border-color: rgba(245,194,0,0.2); }
.ri--coral  { background: var(--bg-coral);  border-color: rgba(232,69,48,0.15); }

.res-body { flex: 1; min-width: 0; }

.res-tag {
    display: inline-block;
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: var(--r-xs);
    margin-bottom: 7px;
}

.rt--game      { background: var(--bg-purple); color: var(--purple); }
.rt--tool      { background: var(--bg-teal);   color: var(--teal-dark); }
.rt--worksheet { background: var(--bg-yellow); color: var(--yellow-ink); }
.rt--guide     { background: var(--bg-coral);  color: var(--coral-dark); }

.res-body h3 {
    font-size: 0.9375rem;
    color: var(--ink);
    margin-bottom: 5px;
}

.res-body p {
    font-size: 0.8125rem;
    color: var(--ink-2);
    line-height: 1.55;
    margin-bottom: 14px;
}


/* 11. Score / Stats Bar
   ============================================ */
.stats-bar {
    background: var(--ink);
    padding: 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
}

.stat-item {
    padding: 52px 32px;
    border-right: 1px solid rgba(255,255,255,0.08);
    text-align: center;
}

.stat-item:last-child { border-right: none; }

.stat-num {
    font-size: clamp(2.25rem, 4vw, 3.25rem);
    font-weight: 900;
    color: #FFFFFF;
    line-height: 1;
    margin-bottom: 8px;
    letter-spacing: -0.04em;
}

.stat-num span { color: var(--yellow); }

.stat-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: rgba(255,255,255,0.5);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}


/* 12. CTA Section
   ============================================ */
.cta-section {
    background: var(--purple);
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

/* Subtle grid pattern */
.cta-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 48px,
            rgba(255,255,255,0.05) 48px,
            rgba(255,255,255,0.05) 49px
        ),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 48px,
            rgba(255,255,255,0.05) 48px,
            rgba(255,255,255,0.05) 49px
        );
}

.cta-inner { position: relative; z-index: 1; text-align: center; }

.cta-section h2 {
    font-size: clamp(2rem, 4vw, 3.25rem);
    color: #FFFFFF;
    max-width: 680px;
    margin: 0 auto 18px;
}

.cta-section p {
    font-size: 1.125rem;
    color: rgba(255,255,255,0.68);
    max-width: 480px;
    margin: 0 auto 40px;
    line-height: 1.75;
}

.cta-actions {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
}


/* 13. Page Hero (Shop / Resources / About)
   ============================================ */
.page-hero {
    background: var(--bg-paper);
    border-bottom: 2px solid var(--border);
    padding: 80px 0 72px;
    padding-top: calc(var(--nav-h) + 80px);
}

.page-hero h1 {
    font-size: clamp(2.25rem, 5vw, 3.5rem);
    margin-bottom: 16px;
}

.page-hero p {
    font-size: 1.125rem;
    color: var(--ink-2);
    max-width: 540px;
    line-height: 1.75;
}


/* 14. Filter Tabs
   ============================================ */
.filter-row {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.ftab {
    padding: 9px 18px;
    border-radius: var(--r-xs);
    font-size: 0.875rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    border: 2px solid var(--border);
    background: var(--bg-paper);
    color: var(--ink-2);
    transition: var(--t);
    line-height: 1;
}

.ftab:hover  { border-color: var(--border-2); color: var(--ink); }
.ftab.active { background: var(--purple); color: #FFFFFF; border-color: var(--purple); }


/* 15. Featured Resource Banner
   ============================================ */
.featured-resource {
    background: var(--ink);
    border-radius: var(--r-xl);
    padding: 40px 48px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 40px;
    align-items: center;
    margin-bottom: 40px;
    border: 2px solid var(--border-2);
}

.featured-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--yellow);
    color: var(--yellow-ink);
    padding: 5px 12px;
    border-radius: var(--r-xs);
    font-size: 0.6875rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.featured-resource h2 {
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    color: #FFFFFF;
    margin-bottom: 12px;
}

.featured-resource p {
    font-size: 1rem;
    color: rgba(255,255,255,0.65);
    line-height: 1.7;
    max-width: 520px;
}

.featured-resource-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    flex-wrap: wrap;
}

.featured-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    opacity: 0.5;
}


/* 16. About / Mission
   ============================================ */
.mission-hero {
    background: var(--bg-paper);
    border-bottom: 2px solid var(--border);
    padding: 100px 0 80px;
    padding-top: calc(var(--nav-h) + 100px);
}

.mission-hero h1 {
    font-size: clamp(2.5rem, 5.5vw, 4rem);
    max-width: 760px;
    margin-bottom: 24px;
}

.mission-hero .lead {
    font-size: 1.1875rem;
    color: var(--ink-2);
    max-width: 600px;
    line-height: 1.8;
}

/* Values grid */
.values-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2px;
    background: var(--border);
    border: 2px solid var(--border);
    border-radius: var(--r-xl);
    overflow: hidden;
}

.value-card {
    background: var(--bg-paper);
    padding: 40px 36px;
    transition: var(--t);
}

.value-card:hover { background: var(--bg); }

.value-icon { margin-bottom: 16px; }

.value-card h3 { font-size: 1.25rem; margin-bottom: 12px; }

.value-card p { font-size: 0.9375rem; color: var(--ink-2); line-height: 1.75; }

/* Story section */
.story-section { background: var(--bg); }

.story-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: start;
}

.story-content h2 {
    font-size: clamp(1.875rem, 3.5vw, 3rem);
    margin-bottom: 24px;
}

.story-content p {
    font-size: 1.0625rem;
    color: var(--ink-2);
    line-height: 1.85;
    margin-bottom: 18px;
}

.story-panel {
    background: var(--bg-paper);
    border: 2px solid var(--border);
    border-radius: var(--r-xl);
    overflow: hidden;
}

.story-stat {
    padding: 28px 32px;
    border-bottom: 2px solid var(--border);
}

.story-stat:last-child { border-bottom: none; }

.story-stat .num {
    font-size: 2.75rem;
    font-weight: 900;
    color: var(--purple);
    line-height: 1;
    margin-bottom: 6px;
    letter-spacing: -0.04em;
}

.story-stat .lbl { font-size: 0.9375rem; color: var(--ink-2); }


/* 17. Footer
   ============================================ */
.footer {
    background: var(--ink);
    border-top: 2px solid rgba(255,255,255,0.06);
    padding: 72px 0 36px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 56px;
}

.footer-logo {
    display: block;
    font-size: 1.25rem;
    font-weight: 900;
    letter-spacing: -0.045em;
    color: #FFFFFF;
    margin-bottom: 14px;
    text-decoration: none;
}

.footer-tagline {
    font-size: 0.9375rem;
    color: rgba(255,255,255,0.45);
    line-height: 1.7;
    max-width: 240px;
    margin-bottom: 24px;
}

.social-row { display: flex; gap: 8px; }

.social-btn {
    width: 36px;
    height: 36px;
    border-radius: var(--r);
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.5);
    font-size: 0.875rem;
    transition: var(--t);
    text-decoration: none;
}

.social-btn:hover {
    background: var(--purple);
    border-color: var(--purple);
    color: #FFFFFF;
}

.footer-col h4 {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.5);
    margin-bottom: 16px;
}

.footer-links { display: flex; flex-direction: column; gap: 10px; }

.footer-links a {
    font-size: 0.9375rem;
    color: rgba(255,255,255,0.5);
    transition: var(--t);
    text-decoration: none;
}

.footer-links a:hover { color: #FFFFFF; }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding-top: 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.footer-copy { font-size: 0.875rem; color: rgba(255,255,255,0.35); }

.footer-legal { display: flex; gap: 24px; flex-wrap: wrap; }

.footer-legal a {
    font-size: 0.875rem;
    color: rgba(255,255,255,0.35);
    text-decoration: none;
    transition: var(--t);
}

.footer-legal a:hover { color: #FFFFFF; }


/* 18. Scroll Reveal
   ============================================ */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.reveal.visible { opacity: 1; transform: none; }
.reveal-d1 { transition-delay: 0.08s; }
.reveal-d2 { transition-delay: 0.16s; }
.reveal-d3 { transition-delay: 0.24s; }
.reveal-d4 { transition-delay: 0.32s; }
.reveal-d5 { transition-delay: 0.40s; }


/* 19. Responsive
   ============================================ */
@media (max-width: 1024px) {
    .hero              { grid-template-columns: 1fr; min-height: auto; }
    .hero-left         { border-right: none; border-bottom: 2px solid var(--border); padding: 72px 24px 64px; }
    .hero-left-inner   { max-width: 100%; }
    .hero-right        { padding: 56px 24px; }
    .hero h1           { font-size: clamp(2.25rem, 5vw, 3rem); }

    .pillars-grid      { grid-template-columns: 1fr; }
    .values-grid       { grid-template-columns: 1fr; }
    .story-inner       { grid-template-columns: 1fr; gap: 48px; }
    .footer-grid       { grid-template-columns: repeat(2, 1fr); gap: 36px; }
    .stats-grid        { grid-template-columns: repeat(2, 1fr); }
    .stat-item         { border-right: none; border-bottom: 1px solid rgba(255,255,255,0.08); }
    .stat-item:nth-child(2n) { }
    .stat-item:last-child    { border-bottom: none; }
}

@media (max-width: 768px) {
    :root { --nav-h: 60px; }

    .section { padding: 72px 0; }

    .nav-links, .nav-actions { display: none; }
    .nav-toggle { display: flex; margin-left: auto; }

    .products-grid  { grid-template-columns: 1fr 1fr; }
    .resources-grid { grid-template-columns: 1fr; }

    .arcade-grid { grid-template-columns: 1fr 1fr; max-width: 100%; }

    .featured-resource {
        grid-template-columns: 1fr;
        padding: 28px 24px;
        text-align: left;
    }
    .featured-visual { display: none; }

    .footer-grid   { grid-template-columns: 1fr; }
    .footer-bottom { flex-direction: column; text-align: center; }
    .footer-legal  { justify-content: center; }

    .hero-left     { padding: 56px 20px 48px; }
    .hero-right    { padding: 48px 20px; }
    .hero-actions  { flex-direction: column; align-items: flex-start; }
    .cta-actions   { flex-direction: column; align-items: center; }
}

@media (max-width: 480px) {
    .products-grid { grid-template-columns: 1fr; }
    .stats-grid    { grid-template-columns: 1fr; }
    .container     { padding: 0 16px; }
    .pillars-grid  { gap: 0; }
}


/* 20. Icon System (Lucide)
   ============================================ */
[data-lucide] {
    display: block;
    stroke-width: 1.75;
    flex-shrink: 0;
}

/* Arcade tile icons */
.tile-icon [data-lucide]          { width: 28px; height: 28px; }
.tile--purple .tile-icon [data-lucide] { color: var(--purple); }
.tile--teal   .tile-icon [data-lucide] { color: var(--teal); }
.tile--coral  .tile-icon [data-lucide] { color: var(--coral); }
.tile--yellow .tile-icon [data-lucide] { color: var(--yellow-dark); }

/* Product thumbnail icons (white on colored bg) */
.product-thumb [data-lucide] {
    width: 48px;
    height: 48px;
    color: rgba(255,255,255,0.9);
    stroke-width: 1.5;
}
/* Yellow bg gets dark icon for contrast */
.pt--yellow [data-lucide] { color: var(--yellow-ink); }

/* Pillar icons */
.pillar-icon [data-lucide] { width: 28px; height: 28px; color: var(--ink); }

/* Resource card icons */
.res-icon [data-lucide]          { width: 22px; height: 22px; }
.ri--purple [data-lucide]        { color: var(--purple); }
.ri--teal   [data-lucide]        { color: var(--teal); }
.ri--yellow [data-lucide]        { color: var(--yellow-dark); }
.ri--coral  [data-lucide]        { color: var(--coral); }

/* Value card icons */
.value-icon [data-lucide] { width: 32px; height: 32px; color: var(--purple); }

/* Social icons */
.social-btn [data-lucide]        { width: 16px; height: 16px; color: currentColor; }

/* Featured visual (large) */
.featured-visual [data-lucide]   { width: 96px; height: 96px; color: #FFFFFF; }
