/* ============================================================
   PROJECT OCTOPUS — STYLES (layout only)
   ============================================================
   Colors, fonts, type sizes and spacing live in theme.css as
   CSS variables. Do not put hex values or font names here.
   Copy lives in copy.js / copy-education.js.
   ============================================================ */

/* === RESET & BASE === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-sans);
    font-size: var(--fs-body);
    font-weight: var(--fw-body);
    line-height: var(--lh-body);
    color: var(--color-text);
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
}
code, pre, kbd, samp { font-family: var(--font-mono); }

/* === UTILITIES === */
.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--space-6); }
.text-center { text-align: center; }
.section-pad { padding: var(--space-25) 0; }
@media (max-width: 768px) { .section-pad { padding: var(--space-16) 0; } }

/* === OCTOPUS MARK (logo-as-O) === */
.octo-mark {
    display: inline-block;
    width: 0.95em;
    height: 0.95em;
    vertical-align: -0.12em;
    margin: 0 -0.01em;
}
.octo-mark img,
.octo-mark svg {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* === NAVIGATION === */
.nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    background: var(--color-nav-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-hairline);
    padding: var(--space-3) 0;
    transition: box-shadow 0.3s;
}
.nav.scrolled { box-shadow: var(--shadow-lg); }
.nav-inner {
    max-width: var(--container); margin: 0 auto; padding: 0 var(--space-6);
    display: flex; align-items: center; justify-content: space-between;
}
.nav-logo {
    font-size: var(--fs-logo); font-weight: var(--fw-logo); color: var(--color-text);
    text-decoration: none; display: flex; align-items: center; gap: 0;
}
.nav-logo .octo-mark { width: 22px; height: 22px; vertical-align: -2px; }
.nav-cta {
    display: inline-block; padding: var(--space-3) var(--space-6);
    background: var(--color-primary); color: var(--color-on-primary); border: none; border-radius: var(--radius-sm);
    font-family: inherit; font-size: var(--fs-button); font-weight: var(--fw-button); line-height: 1.2;
    cursor: pointer; text-decoration: none;
    transition: background 0.2s, transform 0.15s;
}
.nav-cta:hover { background: var(--color-primary-hover); transform: translateY(-1px); }

/* === HERO === */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
    background: var(--color-deep);
}
.hero-bg {
    position: absolute; inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
.hero-bg::before {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(135deg, var(--overlay-deep) 0%, var(--overlay-deep-soft) 100%);
}
.hero-bg::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(180deg, transparent 60%, var(--color-deep) 100%);
}
.hero-content {
    position: relative; z-index: 2;
    text-align: center; padding: var(--space-35) var(--space-6) var(--space-25);
    max-width: 780px; margin: 0 auto;
}
.hero-brand {
    display: flex; align-items: center; justify-content: center;
    gap: 0; margin-bottom: var(--space-10);
    font-size: var(--fs-brand); font-weight: var(--fw-logo); color: var(--color-on-deep);
}
.hero-brand .octo-mark { width: 30px; height: 30px; }
.hero h1 {
    font-size: var(--fs-hero);
    font-weight: var(--fw-hero); line-height: var(--lh-hero);
    color: var(--color-on-deep); margin-bottom: var(--space-6);
    letter-spacing: var(--tracking-tight);
}
.hero h1 .accent { color: var(--color-accent-on-deep); }
.hero-sub {
    font-size: var(--fs-lede);
    color: var(--color-on-deep-muted); line-height: var(--lh-body);
    max-width: 620px; margin: 0 auto var(--space-10);
}
.cta-btn {
    display: inline-block; padding: var(--space-4) var(--space-10);
    background: var(--color-primary); color: var(--color-on-primary); border: none; border-radius: var(--radius-md);
    font-family: inherit; font-size: var(--fs-button); font-weight: var(--fw-button);
    cursor: pointer; text-decoration: none;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
    box-shadow: 0 4px 24px var(--color-glow);
}
.cta-btn:hover {
    background: var(--color-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 32px var(--color-glow);
}
.hero-micro {
    margin-top: var(--space-4); font-size: var(--fs-small); line-height: var(--lh-small);
    color: var(--color-on-deep-muted);
}
.hero-micro strong { color: var(--color-accent-on-deep); font-weight: 600; }

/* === STATS === */
.stats { background: var(--color-bg); }
.stats h2, .personas h2 {
    font-size: var(--fs-section);
    font-weight: var(--fw-section); line-height: var(--lh-section);
    text-align: center;
    margin-bottom: var(--space-15); color: var(--color-text);
    letter-spacing: -0.01em;
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-6);
}
@media (max-width: 900px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .stats-grid { grid-template-columns: 1fr; } }
.stat-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-9) var(--space-7);
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s, box-shadow 0.2s;
}
.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}
.stat-num {
    font-size: var(--fs-stat);
    font-weight: var(--fw-stat); color: var(--color-primary);
    line-height: 1; margin-bottom: var(--space-3);
    letter-spacing: var(--tracking-tight);
}
.stat-label {
    font-size: var(--fs-small); color: var(--color-text);
    line-height: var(--lh-small); margin-bottom: var(--space-3);
}
.stat-source {
    font-size: var(--fs-caption); color: var(--color-muted);
    font-style: italic;
}
.stats-closing {
    text-align: center; margin-top: var(--space-14);
    font-size: var(--fs-lede);
    color: var(--color-muted); max-width: 680px; margin-left: auto; margin-right: auto;
    line-height: var(--lh-body);
}
.stats-closing strong { color: var(--color-text); font-weight: 600; }

/* === BENEFITS === */
.benefits { background: var(--color-deep); color: var(--color-on-deep); }
.benefits h2 {
    font-size: var(--fs-section);
    font-weight: var(--fw-section); line-height: var(--lh-section);
    text-align: center;
    color: var(--color-on-deep); margin-bottom: var(--space-20);
    letter-spacing: -0.01em;
}
.benefit-block {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-15);
    align-items: center;
    margin-bottom: var(--space-20);
}
.benefit-block:last-child { margin-bottom: 0; }
.benefit-block.reverse { direction: rtl; }
.benefit-block.reverse > * { direction: ltr; }
@media (max-width: 768px) {
    .benefit-block, .benefit-block.reverse { grid-template-columns: 1fr; direction: ltr; gap: var(--space-8); }
}
.benefit-text h3 {
    font-size: var(--fs-card);
    font-weight: var(--fw-card); color: var(--color-accent-on-deep);
    line-height: var(--lh-card); margin-bottom: var(--space-5);
}
.benefit-text p {
    font-size: var(--fs-body); color: var(--color-on-deep-muted);
    line-height: var(--lh-body); margin-bottom: var(--space-5);
}
.benefit-cite {
    font-size: var(--fs-small); color: var(--color-on-deep-muted);
    font-style: italic; line-height: var(--lh-small);
    border-left: 3px solid var(--color-accent-on-deep);
    padding-left: var(--space-4);
}
.benefit-img {
    border-radius: var(--radius-lg);
    overflow: hidden;
    aspect-ratio: 4/3;
    position: relative;
}
.benefit-img img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
}
.benefit-img::after {
    content: '';
    position: absolute; inset: 0;
    border-radius: var(--radius-lg);
    box-shadow: inset 0 0 0 1px var(--color-accent-wash);
    pointer-events: none;
}
.benefit-block:nth-child(odd) .benefit-img { transform: perspective(800px) rotateY(-2deg); }
.benefit-block:nth-child(even) .benefit-img { transform: perspective(800px) rotateY(2deg); }

/* === PERSONAS === */
.personas { background: var(--color-bg); }
.persona-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-7);
}
@media (max-width: 768px) { .persona-grid { grid-template-columns: 1fr; } }
.persona-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-9) var(--space-8);
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s, box-shadow 0.2s;
}
.persona-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}
.persona-avatar {
    width: 56px; height: 56px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: var(--space-5);
    border: 2px solid var(--color-accent);
}
.persona-quote {
    font-size: var(--fs-body); font-style: italic;
    color: var(--color-text); line-height: var(--lh-body);
    margin-bottom: var(--space-4);
}
.persona-label {
    font-size: var(--fs-small); font-weight: 600;
    color: var(--color-secondary);
}

/* === CTA SECTION === */
.cta-section {
    position: relative;
    overflow: hidden;
    background: var(--color-deep);
}
.cta-bg {
    position: absolute; inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
.cta-bg::before {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(180deg, var(--overlay-deep) 0%, var(--overlay-deep-strong) 100%);
}
.cta-content {
    position: relative; z-index: 2;
    text-align: center;
    max-width: 640px; margin: 0 auto;
}
.cta-section h2 {
    font-size: var(--fs-section);
    font-weight: var(--fw-section); line-height: var(--lh-section);
    color: var(--color-on-deep);
    margin-bottom: var(--space-6);
}
.cta-section .cta-sub {
    font-size: var(--fs-body); color: var(--color-on-deep-muted);
    margin-bottom: var(--space-10); line-height: var(--lh-body);
}
.perks {
    display: flex; gap: var(--space-8); justify-content: center;
    margin-bottom: var(--space-12); flex-wrap: wrap;
}
.perk {
    text-align: center; flex: 1; min-width: 160px; max-width: 200px;
}
.perk-icon {
    width: 48px; height: 48px;
    background: var(--color-accent-wash);
    border-radius: var(--radius-md);
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto var(--space-3);
}
.perk-icon svg { width: 24px; height: 24px; stroke: var(--color-accent-on-deep); fill: none; }
.perk h4 {
    font-size: var(--fs-button); font-weight: 600; color: var(--color-on-deep);
    margin-bottom: var(--space-2);
}
.perk p { font-size: var(--fs-small); color: var(--color-on-deep-muted); line-height: var(--lh-small); }

/* === FORM === */
.signup-form {
    background: var(--color-glass-on-deep);
    border: 1px solid var(--color-hairline-on-deep);
    border-radius: var(--radius-xl);
    padding: var(--space-10) var(--space-9);
    max-width: 480px; margin: 0 auto;
    backdrop-filter: blur(8px);
}
.form-group { margin-bottom: var(--space-4); }
.form-group label {
    display: block; font-size: var(--fs-small); font-weight: 600;
    color: var(--color-on-deep-muted); margin-bottom: var(--space-2);
}
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%; padding: var(--space-3) var(--space-4);
    background: var(--color-glass-on-deep);
    border: 1px solid var(--color-hairline-on-deep);
    border-radius: var(--radius-md);
    color: var(--color-on-deep); font-size: var(--fs-button);
    font-family: inherit;
    transition: border-color 0.2s, background 0.2s;
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--color-on-deep-muted); }
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-accent-on-deep);
}
.form-group select { appearance: none; cursor: pointer; }
.form-group select option { background: var(--color-deep); color: var(--color-on-deep); }
.form-group textarea { resize: vertical; min-height: 60px; }
.submit-btn {
    width: 100%; padding: var(--space-4);
    background: var(--color-primary); color: var(--color-on-primary); border: none; border-radius: var(--radius-md);
    font-family: inherit; font-size: var(--fs-button); font-weight: var(--fw-button); cursor: pointer;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
    box-shadow: 0 4px 24px var(--color-glow);
}
.submit-btn:hover {
    background: var(--color-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 32px var(--color-glow);
}
.form-privacy {
    text-align: center; margin-top: var(--space-4);
    font-size: var(--fs-caption); color: var(--color-on-deep-muted);
}

/* === HUBSPOT FORM ===
   The current embed is an iframe (hs-form-frame) whose labels are dark and
   can't be styled from here, so index/edu set the card to --color-form-card
   (light in both modes). Rules below only apply to the legacy non-iframe embed. */
.signup-form .hs-form label,
.signup-form .hs-form .hs-form-field > label {
    color: var(--color-text) !important;
    font-size: var(--fs-small);
    font-weight: 600;
}
.signup-form .hs-form input,
.signup-form .hs-form select,
.signup-form .hs-form textarea {
    background: var(--color-surface) !important;
    border: 1px solid var(--color-border) !important;
    border-radius: var(--radius-md) !important;
    color: var(--color-text) !important;
    font-family: inherit;
    font-size: var(--fs-button);
    padding: var(--space-3) var(--space-4);
}
.signup-form .hs-form input:focus,
.signup-form .hs-form select:focus,
.signup-form .hs-form textarea:focus {
    border-color: var(--color-primary) !important;
    outline: none;
}
.signup-form .hs-form .hs-button,
.signup-form .hs-form input[type="submit"] {
    width: 100%;
    padding: var(--space-4) !important;
    background: var(--color-primary) !important;
    color: var(--color-on-primary) !important;
    border: none !important;
    border-radius: var(--radius-md) !important;
    font-family: inherit;
    font-size: var(--fs-button);
    font-weight: var(--fw-button);
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
}
.signup-form .hs-form .hs-button:hover,
.signup-form .hs-form input[type="submit"]:hover {
    background: var(--color-primary-hover) !important;
    transform: translateY(-2px);
}
.signup-form .hs-form .hs-error-msgs,
.signup-form .hs-form .hs-error-msg {
    color: var(--color-error) !important;
    font-size: var(--fs-caption);
}
.signup-form .hs-form .hs-richtext,
.signup-form .hs-form .hs-richtext p,
.signup-form .hs-form .legal-consent-container,
.signup-form .hs-form .hs-form-field .hs-field-desc {
    color: var(--color-muted) !important;
    font-size: var(--fs-caption);
}
.signup-form .hs-form a { color: var(--color-link) !important; }
.signup-form .hs-form .submitted-message {
    color: var(--color-text) !important;
    font-size: var(--fs-body);
}

/* === FOOTER === */
footer {
    background: var(--color-deep);
    border-top: 1px solid var(--color-hairline-on-deep);
    padding: var(--space-10) 0;
}
.footer-inner {
    max-width: var(--container); margin: 0 auto; padding: 0 var(--space-6);
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: var(--space-5);
}
.footer-brand {
    display: flex; align-items: center; gap: 0;
    font-size: var(--fs-button); font-weight: var(--fw-logo); color: var(--color-on-deep);
}
.footer-brand .octo-mark { width: 18px; height: 18px; }
.footer-tagline {
    font-size: var(--fs-small); color: var(--color-on-deep-muted);
    margin-left: var(--space-3); font-weight: 400;
}
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-3) var(--space-6); }
.footer-links a {
    font-size: var(--fs-small); color: var(--color-on-deep-muted);
    text-decoration: none; transition: color 0.2s;
}
.footer-links a:hover { color: var(--color-accent-on-deep); }
.footer-social { display: flex; gap: var(--space-4); }
.footer-social a {
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    border-radius: var(--radius-sm); background: var(--color-glass-on-deep);
    transition: background 0.2s;
}
.footer-social a:hover { background: var(--color-accent-wash); }
.footer-social svg { width: 18px; height: 18px; fill: var(--color-on-deep-muted); }
@media (max-width: 600px) {
    .footer-inner { flex-direction: column; text-align: center; }
}

/* === SCROLL ANIMATIONS === */
.reveal {
    opacity: 0; transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* === FOCUS, CONSENT, TEXT PAGES, 404 === */
.footer-links a:focus-visible, .nav-cta:focus-visible, .cta-btn:focus-visible,
.page-text a:focus-visible, .form-consent a:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 3px; }
.footer-links a:focus-visible, .form-consent a:focus-visible { outline-color: var(--color-accent-on-deep); }
.form-consent { margin-top: var(--space-4); font-size: var(--fs-small); color: var(--color-on-deep-muted); }
.form-consent a { color: var(--color-accent-on-deep); text-decoration: underline; }
.page-text { padding: var(--space-35) 0 var(--space-25); background: var(--color-bg); }
.page-text .container { max-width: 760px; }
.page-text h1 { font-size: var(--fs-page-title); font-weight: var(--fw-hero); line-height: var(--lh-section); letter-spacing: var(--tracking-tight); margin-bottom: var(--space-3); }
.page-text .page-lede { font-size: var(--fs-lede); color: var(--color-muted); margin-bottom: var(--space-10); }
.page-text .page-updated { font-size: var(--fs-small); color: var(--color-muted); margin-bottom: var(--space-8); }
.page-text h2 { font-size: var(--fs-card); font-weight: var(--fw-section); line-height: var(--lh-card); margin: var(--space-10) 0 var(--space-3); }
.page-text p, .page-text li { margin-bottom: var(--space-3); }
.page-text ul { padding-left: var(--space-6); margin-bottom: var(--space-4); }
.page-text a { color: var(--color-link); }
.page-text .summary-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: var(--space-7) var(--space-8); box-shadow: var(--shadow-sm); margin-bottom: var(--space-4); }
.page-text .summary-card ul { margin-bottom: 0; }
.page-text address { font-style: normal; }
.page-text .todo { background: var(--color-note-bg); color: var(--color-note-text); padding: 0 var(--space-1); border-radius: 4px; font-size: 0.9em; }
.notfound { min-height: 100vh; display: flex; align-items: center; justify-content: center; text-align: center; background: var(--color-deep); color: var(--color-on-deep); padding: var(--space-35) var(--space-6); }
.notfound h1 { font-size: var(--fs-hero); font-weight: var(--fw-hero); line-height: var(--lh-hero); margin-bottom: var(--space-3); }
.notfound p { color: var(--color-on-deep-muted); margin-bottom: var(--space-8); }
.notfound .octo-big { width: 96px; height: 96px; margin: 0 auto var(--space-6); }
