/* ============================================================
   SCHOOL OS — LANDING PAGE STYLES
   Design system: dark editorial, Instrument Serif display,
   DM Sans body, teal accent (#00C48C) from the School OS spec
   ============================================================ */


/* ─── DESIGN TOKENS ─────────────────────────────────────── */

:root {
    /* Backgrounds */
    --bg:         #0A0E14;
    --surface-1:  #111418;
    --surface-2:  #181C22;
    --surface-3:  #1E2430;

    /* Borders */
    --border-subtle: rgba(255, 255, 255, 0.07);
    --border-medium: rgba(255, 255, 255, 0.12);

    /* Text */
    --text-primary:   rgba(255, 255, 255, 0.90);
    --text-secondary: rgba(255, 255, 255, 0.55);
    --text-tertiary:  rgba(255, 255, 255, 0.25);

    /* Accent colours (from School OS design spec) */
    --accent:       #00C48C;
    --accent-dim:   rgba(0, 196, 140, 0.10);
    --accent-glow:  rgba(0, 196, 140, 0.20);
    --gold:         #EF9F27;
    --red:          #FF4D4D;
    --red-dim:      rgba(255, 77, 77, 0.12);

    /* Fonts */
    --font-display: 'Instrument Serif', Georgia, serif;
    --font-body:    'DM Sans', -apple-system, sans-serif;

    /* Spacing (4px base) */
    --space-xs:  4px;
    --space-sm:  8px;
    --space-md:  16px;
    --space-lg:  24px;
    --space-xl:  40px;
    --space-2xl: 64px;
    --space-3xl: 96px;

    /* Layout */
    --max-width: 1200px;
    --page-pad:  clamp(20px, 5vw, 80px);

    /* Transitions */
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
}


/* ─── RESET ──────────────────────────────────────────────── */

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a   { color: inherit; text-decoration: none; }
button, input, select { font-family: inherit; }


/* ─── TYPOGRAPHY HELPERS ─────────────────────────────────── */

h1, h2, h3 {
    font-family: var(--font-display);
    line-height: 1.15;
    font-weight: 400;
    color: var(--text-primary);
}

h1 { font-size: clamp(32px, 5vw, 52px); }
h2 { font-size: clamp(28px, 4vw, 44px); }
h3 { font-size: clamp(18px, 2.5vw, 22px); }

h2 em, h3 em {
    font-style: italic;
    color: var(--accent);
}

p {
    color: var(--text-secondary);
    line-height: 1.7;
}

.section-label {
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: var(--space-md);
}

.section-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--page-pad);
}


/* ─── SCROLL ANIMATION ───────────────────────────────────── */

[data-animate] {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

[data-animate][data-delay="1"] { transition-delay: 0.1s; }
[data-animate][data-delay="2"] { transition-delay: 0.2s; }
[data-animate][data-delay="3"] { transition-delay: 0.3s; }

[data-animate].is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    [data-animate] {
        opacity: 1;
        transform: none;
        transition: none;
    }
}


/* ─── NAVIGATION ─────────────────────────────────────────── */

#nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: var(--space-md) var(--page-pad);
    transition: background 0.3s var(--ease), border-color 0.3s var(--ease);
    border-bottom: 1px solid transparent;
}

#nav.scrolled {
    background: rgba(10, 14, 20, 0.90);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom-color: var(--border-subtle);
}

.nav-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-weight: 500;
    font-size: 15px;
}

.logo-mark {
    color: var(--accent);
    font-size: 12px;
    line-height: 1;
}

.logo-text {
    letter-spacing: -0.01em;
}

.nav-cta {
    font-size: 13px;
    font-weight: 500;
    padding: 8px 18px;
    border: 1px solid var(--border-medium);
    border-radius: 6px;
    color: var(--text-primary);
    transition: border-color 0.2s, background 0.2s;
}

.nav-cta:hover {
    border-color: var(--accent);
    background: var(--accent-dim);
    color: var(--accent);
}


/* ─── HERO ───────────────────────────────────────────────── */

#hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding: 100px var(--page-pad) 80px;
}

#particle-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.6;
}

.hero-inner {
    position: relative;
    z-index: 1;
    max-width: var(--max-width);
    margin: 0 auto;
    width: 100%;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: var(--space-xl);
    padding: 7px 14px;
    border: 1px solid rgba(0, 196, 140, 0.25);
    border-radius: 100px;
    background: var(--accent-dim);
}

.eyebrow-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    animation: pulse 2s ease infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.5; transform: scale(0.7); }
}

.hero-headline {
    display: flex;
    align-items: flex-start;
    gap: clamp(24px, 4vw, 64px);
    margin-bottom: var(--space-2xl);
}

.hero-number {
    font-family: var(--font-display);
    font-size: clamp(100px, 18vw, 200px);
    line-height: 0.9;
    color: var(--text-primary);
    letter-spacing: -0.04em;
    flex-shrink: 0;
    position: relative;
    /* Subtle gradient on the number */
    background: linear-gradient(135deg, rgba(255,255,255,0.95) 0%, rgba(0,196,140,0.7) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-text {
    padding-top: clamp(8px, 2vw, 20px);
    max-width: 520px;
}

.hero-text h1 {
    margin-bottom: var(--space-md);
    font-size: clamp(26px, 4vw, 42px);
}

.hero-sub {
    font-size: clamp(15px, 1.5vw, 17px);
    color: var(--text-secondary);
    margin-bottom: var(--space-sm);
    line-height: 1.65;
}

.hero-sub-b {
    font-size: clamp(14px, 1.3vw, 15px);
    color: var(--text-tertiary);
    line-height: 1.65;
}

/* ─── EMAIL FORM (shared) ────────────────────────────────── */

.email-form {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    max-width: 580px;
    margin-bottom: var(--space-md);
}

.email-form input,
.email-form select {
    flex: 1;
    min-width: 200px;
    background: var(--surface-1);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    padding: 12px 16px;
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
    -webkit-appearance: none;
    appearance: none;
}

.email-form select {
    background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='rgba(255,255,255,0.35)' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
    cursor: pointer;
}

.email-form select option {
    background: var(--surface-2);
    color: var(--text-primary);
}

.email-form input:focus,
.email-form select:focus {
    border-color: var(--accent);
}

.email-form input::placeholder {
    color: var(--text-tertiary);
}

.email-form button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--accent);
    color: #000;
    border: none;
    border-radius: 8px;
    padding: 12px 22px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity 0.2s, transform 0.15s;
}

.email-form button:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.email-form button:active {
    transform: translateY(0);
}

/* ─── Larger waitlist form variant ─── */

.email-form-full {
    flex-direction: column;
    max-width: 100%;
}

.email-form-full input,
.email-form-full select {
    width: 100%;
    min-width: unset;
}

.form-row {
    display: flex;
    gap: var(--space-sm);
}

.form-row input {
    flex: 1;
}

.btn-large {
    width: 100%;
    justify-content: center;
    padding: 14px 24px;
    font-size: 15px;
}

.form-small {
    font-size: 12px;
    color: var(--text-tertiary);
    text-align: center;
    margin-top: 4px;
}

/* ─── Form meta (count + privacy note) ─── */

.form-meta {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    flex-wrap: wrap;
}

.signup-count {
    font-size: 13px;
    color: var(--text-secondary);
}

#hero-count {
    color: var(--accent);
    font-weight: 500;
}

.form-privacy {
    font-size: 12px;
    color: var(--text-tertiary);
}

/* ─── Form success state ─── */

.form-success {
    text-align: center;
    padding: var(--space-2xl) var(--space-xl);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    background: var(--surface-1);
}

.form-success[hidden] { display: none; }

.success-icon {
    display: block;
    font-size: 24px;
    color: var(--accent);
    margin-bottom: var(--space-md);
    animation: spin-in 0.4s var(--ease);
}

@keyframes spin-in {
    from { transform: rotate(-90deg) scale(0.5); opacity: 0; }
    to   { transform: rotate(0deg) scale(1); opacity: 1; }
}

.form-success h3 {
    font-size: 22px;
    margin-bottom: var(--space-sm);
}

.form-success p {
    font-size: 15px;
    color: var(--text-secondary);
}

/* ─── Hero scroll hint ─── */

.hero-scroll-hint {
    position: absolute;
    bottom: var(--space-xl);
    left: var(--page-pad);
    display: flex;
    align-items: center;
    gap: var(--space-md);
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-tertiary);
}

.scroll-line {
    width: 40px;
    height: 1px;
    background: var(--text-tertiary);
    position: relative;
    overflow: hidden;
}

.scroll-line::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--accent);
    animation: scan 2s ease infinite;
}

@keyframes scan {
    0%   { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}


/* ─── PROBLEM SECTION ────────────────────────────────────── */

#problem {
    padding: var(--space-3xl) 0;
    border-top: 1px solid var(--border-subtle);
}

#problem h2 {
    margin-bottom: clamp(40px, 6vw, 80px);
    max-width: 700px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: var(--space-md);
    margin-bottom: clamp(48px, 6vw, 80px);
}

.stat-card {
    background: var(--surface-1);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: var(--space-xl) var(--space-lg);
}

.stat-card.stat-accent {
    border-color: rgba(0, 196, 140, 0.25);
    background: linear-gradient(135deg, var(--surface-1) 0%, rgba(0, 196, 140, 0.06) 100%);
}

.stat-number {
    font-family: var(--font-display);
    font-size: clamp(48px, 7vw, 72px);
    line-height: 1;
    color: var(--text-primary);
    letter-spacing: -0.03em;
    margin-bottom: 4px;
}

.stat-card.stat-accent .stat-number {
    color: var(--accent);
}

.stat-unit {
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-tertiary);
    margin-bottom: var(--space-md);
}

.stat-desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: var(--space-md);
}

.stat-source {
    font-size: 11px;
    color: var(--text-tertiary);
    font-style: italic;
}

/* ─── Blockquote ─── */

.problem-quote {
    position: relative;
    border-left: 2px solid var(--accent);
    padding-left: var(--space-xl);
    max-width: 680px;
    margin-left: auto;
    margin-right: auto;
}

.quote-mark {
    font-family: var(--font-display);
    font-size: 80px;
    line-height: 0.5;
    color: var(--accent);
    opacity: 0.4;
    display: block;
    margin-bottom: var(--space-sm);
}

blockquote {
    font-family: var(--font-display);
    font-style: italic;
    font-size: clamp(18px, 2.5vw, 24px);
    color: var(--text-primary);
    line-height: 1.5;
    margin-bottom: var(--space-md);
}

.problem-quote p {
    font-size: 14px;
    color: var(--text-secondary);
}


/* ─── REPLACEMENT SECTION ────────────────────────────────── */

#replacement {
    padding: var(--space-3xl) 0;
    border-top: 1px solid var(--border-subtle);
}

#replacement h2 {
    margin-bottom: clamp(40px, 6vw, 72px);
}

.stack-comparison {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: var(--space-xl);
    align-items: start;
}

.stack-label {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-tertiary);
    margin-bottom: var(--space-md);
}

/* ─── Old stack ─── */

.stack-old {
    background: var(--surface-1);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: var(--space-lg);
    opacity: 0.75;
}

.stack-items { display: flex; flex-direction: column; gap: 2px; }

.stack-item {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-subtle);
    gap: var(--space-md);
}

.item-name {
    font-size: 14px;
    color: var(--text-secondary);
}

.item-cost {
    font-size: 13px;
    color: var(--text-tertiary);
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.stack-total {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: var(--space-md) 0 0;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    gap: var(--space-md);
}

.total-cost-bad {
    color: var(--red);
    font-family: var(--font-display);
    font-size: 18px;
}

.total-cost-good {
    color: var(--accent);
    font-family: var(--font-display);
    font-size: 18px;
}

/* ─── Arrow divider ─── */

.stack-vs {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary);
    padding-top: 40px;
}

/* ─── New stack ─── */

.stack-new {
    background: linear-gradient(135deg, var(--surface-1) 0%, rgba(0, 196, 140, 0.06) 100%);
    border: 1px solid rgba(0, 196, 140, 0.25);
    border-radius: 16px;
    padding: var(--space-lg);
}

.stack-new-inner {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.stack-new-logo {
    font-size: 24px;
    color: var(--accent);
}

.stack-new-inner > p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.65;
}

.stack-total-new {
    border-top: 1px solid rgba(0, 196, 140, 0.15);
    padding-top: var(--space-md);
    margin-top: 4px;
}

.stack-saving {
    font-size: 14px;
    color: var(--text-tertiary);
}

.stack-saving strong {
    color: var(--text-primary);
}


/* ─── FEATURES SECTION ───────────────────────────────────── */

#features {
    padding: var(--space-3xl) 0;
    border-top: 1px solid var(--border-subtle);
}

#features h2 {
    margin-bottom: clamp(40px, 6vw, 72px);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-template-rows: auto auto;
    gap: var(--space-md);
}

/* First wide card: spans 3 cols */
.feature-card:nth-child(1) { grid-column: span 3; }
/* Regular cards: 3 cols each, then wrap */
.feature-card:nth-child(2) { grid-column: span 2; }
.feature-card:nth-child(3) { grid-column: span 2; }
.feature-card:nth-child(4) { grid-column: span 2; }
/* Last wide card: spans full row */
.feature-card:nth-child(5) { grid-column: span 3; }

.feature-card {
    background: var(--surface-1);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: var(--space-xl);
    transition: border-color 0.25s, background 0.25s;
}

.feature-card:hover {
    border-color: rgba(0, 196, 140, 0.25);
    background: linear-gradient(135deg, var(--surface-1) 0%, rgba(0, 196, 140, 0.04) 100%);
}

.feature-icon {
    display: block;
    font-size: 20px;
    color: var(--accent);
    margin-bottom: var(--space-md);
    opacity: 0.8;
}

.feature-card h3 {
    margin-bottom: var(--space-sm);
    font-size: clamp(16px, 1.8vw, 19px);
}

.feature-card p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.65;
    margin-bottom: var(--space-md);
}

.feature-tag {
    display: inline-block;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    color: var(--accent);
    background: var(--accent-dim);
    border: 1px solid rgba(0, 196, 140, 0.15);
    padding: 4px 10px;
    border-radius: 100px;
}


/* ─── WAITLIST SECTION ───────────────────────────────────── */

#waitlist {
    padding: var(--space-3xl) 0;
    border-top: 1px solid var(--border-subtle);
    background: linear-gradient(180deg, transparent 0%, rgba(0, 196, 140, 0.03) 100%);
}

.waitlist-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(40px, 6vw, 100px);
    align-items: start;
}

.waitlist-left h2 {
    margin-bottom: var(--space-md);
}

.waitlist-desc {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: var(--space-xl);
    line-height: 1.7;
}

.waitlist-benefits {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.waitlist-benefits li {
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.benefit-check {
    color: var(--accent);
    font-size: 14px;
    flex-shrink: 0;
    margin-top: 1px;
}

.waitlist-right {
    background: var(--surface-1);
    border: 1px solid var(--border-medium);
    border-radius: 20px;
    padding: var(--space-xl);
}


/* ─── FOOTER ─────────────────────────────────────────────── */

#footer {
    border-top: 1px solid var(--border-subtle);
    padding: var(--space-xl) 0;
}

.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--page-pad);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-md);
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 14px;
    font-weight: 500;
}

.footer-meta {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    flex-wrap: wrap;
    font-size: 12px;
    color: var(--text-tertiary);
}

.footer-sep { opacity: 0.4; }

.footer-contact a {
    font-size: 13px;
    color: var(--text-secondary);
    transition: color 0.2s;
}

.footer-contact a:hover {
    color: var(--accent);
}


/* ─── RESPONSIVE ─────────────────────────────────────────── */

@media (max-width: 900px) {
    .hero-headline {
        flex-direction: column;
        gap: var(--space-lg);
    }

    .hero-number {
        font-size: clamp(80px, 20vw, 140px);
    }

    .stack-comparison {
        grid-template-columns: 1fr;
    }

    .stack-vs { display: none; }

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

    .feature-card:nth-child(n) {
        grid-column: span 1;
    }

    .waitlist-inner {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .email-form {
        flex-direction: column;
    }

    .email-form input,
    .email-form select,
    .email-form button {
        width: 100%;
        min-width: unset;
    }

    .form-row {
        flex-direction: column;
    }

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

    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-sm);
    }

    .footer-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .footer-sep { display: none; }
}


/* ─── QUOTES SECTION ─────────────────────────────────────── */

.quotes-section {
    padding: var(--space-3xl) 0;
    border-top: 1px solid var(--border-subtle);
}

.quotes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: var(--space-md);
    margin-top: clamp(32px, 4vw, 56px);
}

.quote-card {
    background: var(--surface-1);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: var(--space-xl);
    transition: border-color 0.25s;
}

.quote-card:hover {
    border-color: var(--border-medium);
}

.quote-card p {
    font-family: var(--font-display);
    font-style: italic;
    font-size: clamp(15px, 1.6vw, 17px);
    color: var(--text-primary);
    line-height: 1.6;
    margin-bottom: var(--space-md);
}

.quote-card cite {
    font-size: 12px;
    color: var(--text-tertiary);
    font-style: normal;
    letter-spacing: 0.03em;
}


/* ─── PILOT SPOTS INDICATOR ──────────────────────────────── */

.pilot-spots {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: var(--space-md);
    margin-top: -4px;
}

.pilot-spots-count {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    padding: 5px 12px;
    border: 1px solid var(--border-medium);
    border-radius: 100px;
    background: var(--surface-2);
}

#pilot-spots-remaining {
    color: var(--accent);
    font-weight: 600;
}


/* ─── EXTRA FEATURE GRID SPAN CLASSES ────────────────────── */

.feature-span-2 { grid-column: span 2; }
.feature-span-3 { grid-column: span 3; }

@media (max-width: 900px) {
    .feature-span-2,
    .feature-span-3 {
        grid-column: span 1;
    }
}
