/* ================================================================
   Equinox ICL — Design Tokens
   Single source of truth for colour, type, spacing, radius, motion.
   ================================================================ */

:root {
    /* Palette */
    --green: #0b2600;
    --yellow: #ffcf6d;
    --yellow-hover: #cca64c;
    --rust: #c65200;
    --darkrust: #963200;
    --rust-text: #e8742a;   /* rust lifted to pass AA on green for small text */

    /* Semantic aliases */
    --bg: var(--green);
    --surface: var(--yellow);
    --ink: var(--yellow);
    --ink-dark: var(--green);
    --accent: var(--rust);
    --accent-warm: var(--yellow);

    /* Typography */
    --font-body: 'Poppins', system-ui, -apple-system, sans-serif;
    --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
    --leading-body: 1.65;
    --leading-display: 1.05;
    --tracking-tight: -0.02em;
    --tracking-eyebrow: 0.12em;

    /* Spacing scale (8pt rhythm) */
    --space-1: 8px;
    --space-2: 16px;
    --space-3: 24px;
    --space-4: 48px;
    --space-5: 96px;

    /* Misc */
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 20px;
    --measure: 62ch;

    /* Motion */
    --ease-warm: cubic-bezier(.2, .7, .2, 1);
    --ease-snap: cubic-bezier(.2, .8, .2, 1);
    --ease-spring: cubic-bezier(.18, 1.15, .3, 1);
    --dur-fast: 280ms;
    --dur-warm: 240ms;
    --dur-mid: 600ms;
    --dur-slow: 480ms;
    --dur-reveal: 900ms;
}

/* ================================================================
   Reveal-on-scroll primitive — observed by scroll.js, which adds
   .is-lit when the element enters the viewport. Lives in helper.css
   so every page (about/projects/connect/index/amazi) gets it without
   needing to import index.css.
   ================================================================ */
[data-reveal] {
    opacity: 0;
    transform: translateY(24px);
    transition:
        opacity var(--dur-reveal) var(--ease-warm),
        transform var(--dur-reveal) var(--ease-warm),
        clip-path var(--dur-reveal) var(--ease-snap),
        filter var(--dur-reveal) var(--ease-warm);
}
[data-reveal="left"]  { transform: translateX(-32px); opacity: 0; }
[data-reveal="right"] { transform: translateX(32px);  opacity: 0; }
[data-reveal="up"]    { transform: translateY(36px);  opacity: 0; }
[data-reveal="zoom"]  { transform: scale(0.94);       opacity: 0; }
[data-reveal="clip"]  { clip-path: inset(0 100% 0 0); opacity: 1; transform: none; }
[data-reveal].is-lit {
    opacity: 1;
    transform: none;
    clip-path: inset(0 0 0 0);
}

/* ================================================================
   Fonts — loaded from Google Fonts in auxhtml/font.html
   Phase 3 self-hosts Poppins & Fraunces in static/fonts/
   ================================================================ */

body {
    font-family: var(--font-body);
    font-optical-sizing: auto;
    font-style: normal;
    background-color: var(--bg);
    color: var(--ink);
    line-height: var(--leading-body);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

img {
    image-rendering: -webkit-optimize-contrast;
    max-width: 100%;
    height: auto;
}

/* ================================================================
   Utility classes (retained as aliases so existing markup works)
   ================================================================ */

.yellow       { color: var(--yellow); }
.yellowHover:hover { color: var(--yellow-hover); }
.yellowbg     { background-color: var(--yellow); }
.green        { color: var(--green); }
.greenbg      { background-color: var(--green); }
.rust         { color: var(--rust); }
.darkrust     { color: var(--darkrust); }
.rustbg       { background-color: var(--rust); }

.weight400 { font-weight: 400; }
.weight300 { font-weight: 300; }

.font40 { font-size: 40px; }
.font28 { font-size: 28px; }
.font24 { font-size: 24px; }
.font20 { font-size: 20px; }
.font16 { font-size: 16px; }
.font14 { font-size: 14px; }

/* Display type */
.display,
.font-display {
    font-family: var(--font-display);
    font-weight: 300;
    font-variation-settings: 'SOFT' 50, 'opsz' 144;
    letter-spacing: var(--tracking-tight);
    line-height: var(--leading-display);
}

/* Eyebrow labels (e.g. “STUDENT-LED · IMPERIAL CHAPTER”) */
.eyebrow {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 12px;
    letter-spacing: var(--tracking-eyebrow);
    text-transform: uppercase;
    color: var(--rust-text);
}

/* Spinoff project name — used in about.html’s impact cards */
.projectName {
    font-weight: 600;
    color: var(--yellow);
    margin: var(--space-1) 0;
}

/* ================================================================
   Accessibility non-negotiables
   ================================================================ */

:focus-visible {
    outline: 3px solid var(--rust);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

a {
    color: inherit;
    text-decoration: none;
}
a:hover { color: var(--yellow); }

/* Minimum 44×44 touch target on nav links — set on the actual selector in header.css */

/* ================================================================
   Filament-warm micro-interactions — single vocabulary reused across
   nav, buttons, project cards, and form inputs.
   ================================================================ */

.warm {
    transition:
        color var(--dur-warm) var(--ease-warm),
        background-color var(--dur-warm) var(--ease-warm),
        border-color var(--dur-warm) var(--ease-warm),
        box-shadow var(--dur-warm) var(--ease-warm),
        text-shadow var(--dur-warm) var(--ease-warm),
        transform var(--dur-warm) var(--ease-warm),
        filter var(--dur-warm) var(--ease-warm);
}

/* Reduce motion: strip all transitions + animations wholesale */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
    [data-reveal] { opacity: 1; transform: none; clip-path: none; }
}
