/* ─────────────────────────────────────────────────────────────────────────────
   BLUEPRINT — main.css
   Override the :root variables per theme. Do not hardcode colours or fonts.
───────────────────────────────────────────────────────────────────────────── */

/* ─── VARIABLES ─────────────────────────────────────────────────────────────── */
:root {
    /* Colours — override all of these per theme */
    --bg:           #ffffff;
    --bg-alt:       #f5f5f5;
    --ink:          #111111;
    --ink-muted:    rgba(17, 17, 17, 0.55);
    --accent:       #111111;
    --accent-hover: #333333;
    --surface:      #ffffff;
    --border:       rgba(0, 0, 0, 0.1);

    /* Typography — override per theme */
    --font-body:    system-ui, -apple-system, sans-serif;
    --font-heading: system-ui, -apple-system, sans-serif;
    --size-xs:      0.75rem;
    --size-sm:      0.875rem;
    --size-base:    1rem;
    --size-lg:      1.125rem;
    --size-xl:      1.5rem;
    --size-2xl:     2rem;
    --size-3xl:     2.75rem;
    --size-4xl:     3.75rem;
    --weight-normal: 400;
    --weight-medium: 500;
    --weight-bold:   700;
    --leading-tight: 1.15;
    --leading-body:  1.65;

    /* Layout */
    --max-width:    1200px;
    --nav-height:   68px;
    --section-y:    90px;
    --section-x:    5%;
    --radius-sm:    4px;
    --radius:       8px;
    --radius-lg:    16px;

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

/* ─── RESET ──────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: var(--size-base);
    line-height: var(--leading-body);
    -webkit-font-smoothing: antialiased;
}
img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }
input, textarea, select { font: inherit; }

/* ─── TYPOGRAPHY ─────────────────────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: var(--weight-bold);
    line-height: var(--leading-tight);
    color: var(--ink);
}
h1 { font-size: clamp(var(--size-3xl), 5vw, var(--size-4xl)); }
h2 { font-size: clamp(var(--size-2xl), 3.5vw, var(--size-3xl)); }
h3 { font-size: clamp(var(--size-xl), 2.5vw, var(--size-2xl)); }
h4 { font-size: var(--size-lg); }
p  { color: var(--ink-muted); max-width: 65ch; }

/* ─── UTILITIES ──────────────────────────────────────────────────────────────── */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin-inline: auto;
    padding-inline: var(--section-x);
}
.section {
    padding-block: var(--section-y);
    padding-inline: var(--section-x);
}
.section__inner {
    max-width: var(--max-width);
    margin-inline: auto;
}
.section--alt { background: var(--bg-alt); }
.section__eyebrow {
    font-size: var(--size-sm);
    font-weight: var(--weight-medium);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 0.75rem;
    max-width: none;
}
.section__title { margin-bottom: 1rem; }
.section__body  { margin-bottom: 2rem; }

.text-center { text-align: center; }
.text-center p { margin-inline: auto; }

/* ─── BUTTONS ────────────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.75rem;
    border-radius: var(--radius);
    font-size: var(--size-base);
    font-weight: var(--weight-medium);
    transition: background var(--duration) var(--ease),
                color var(--duration) var(--ease),
                transform var(--duration) var(--ease);
    white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary {
    background: var(--accent);
    color: var(--bg);
}
.btn--primary:hover { background: var(--accent-hover); }
.btn--outline {
    border: 2px solid var(--accent);
    color: var(--accent);
}
.btn--outline:hover {
    background: var(--accent);
    color: var(--bg);
}
.btn--ghost {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 3px;
    padding-inline: 0;
}

/* ─── NAV ────────────────────────────────────────────────────────────────────── */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    z-index: 100;
    background: var(--bg);
    border-bottom: 1px solid transparent;
    transition: border-color var(--duration) var(--ease),
                box-shadow var(--duration) var(--ease);
}
.nav.is-scrolled {
    border-color: var(--border);
    box-shadow: 0 2px 16px rgba(0,0,0,0.06);
}
.nav__inner {
    max-width: var(--max-width);
    height: 100%;
    margin-inline: auto;
    padding-inline: var(--section-x);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}
.nav__logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}
.nav__logo img { height: 36px; width: auto; }
.nav__logo-text {
    font-family: var(--font-heading);
    font-weight: var(--weight-bold);
    font-size: var(--size-lg);
    color: var(--ink);
}
.nav__links {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-left: auto;
}
.nav__links li a {
    font-size: var(--size-sm);
    font-weight: var(--weight-medium);
    color: var(--ink-muted);
    transition: color var(--duration) var(--ease);
    white-space: nowrap;
}
.nav__links li a:hover { color: var(--ink); }
.nav__links li a.btn { color: var(--bg); }
.nav__toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 36px;
    height: 36px;
    padding: 4px;
    flex-shrink: 0;
}
.nav__toggle span {
    display: block;
    height: 2px;
    background: var(--ink);
    border-radius: 2px;
    transition: transform var(--duration) var(--ease),
                opacity var(--duration) var(--ease);
    transform-origin: center;
}
.nav--open .nav__toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav--open .nav__toggle span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav--open .nav__toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ─── HERO ───────────────────────────────────────────────────────────────────── */
.hero {
    min-height: 100svh;
    display: flex;
    align-items: center;
    padding-top: var(--nav-height);
    padding-inline: var(--section-x);
    background-color: var(--bg);
    background-size: cover;
    background-position: center;
    position: relative;
}
.hero::after {
    /* Overlay — adjust opacity per theme */
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0);
    pointer-events: none;
}
.hero__inner {
    position: relative;
    z-index: 1;
    max-width: var(--max-width);
    margin-inline: auto;
    width: 100%;
}
.hero__eyebrow {
    font-size: var(--size-sm);
    font-weight: var(--weight-medium);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 1rem;
    max-width: none;
}
.hero__title {
    margin-bottom: 1.25rem;
    max-width: 14ch;
}
.hero__subtitle {
    font-size: var(--size-lg);
    margin-bottom: 2.5rem;
    max-width: 45ch;
}

/* ─── CARDS ──────────────────────────────────────────────────────────────────── */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    transition: box-shadow var(--duration) var(--ease),
                transform var(--duration) var(--ease);
}
.card:hover {
    box-shadow: 0 8px 32px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}
.card__title { font-size: var(--size-xl); margin-bottom: 0.75rem; }
.card__body  { font-size: var(--size-base); }

/* ─── GRID LAYOUTS ───────────────────────────────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2rem; }

/* ─── FOOTER ─────────────────────────────────────────────────────────────────── */
.site-footer {
    background: var(--ink);
    color: var(--bg);
    padding-top: calc(var(--section-y) * 0.9);
}
.footer__inner {
    max-width: var(--max-width);
    margin-inline: auto;
    padding-inline: var(--section-x);
    display: grid;
    grid-template-columns: 1.5fr repeat(3, 1fr);
    gap: 3rem;
    padding-bottom: calc(var(--section-y) * 0.8);
}
.footer__logo {
    font-family: var(--font-heading);
    font-weight: var(--weight-bold);
    font-size: var(--size-xl);
    color: var(--bg);
    display: inline-block;
    margin-bottom: 1rem;
}
.footer__tagline {
    font-size: var(--size-sm);
    color: rgba(255,255,255,0.5);
    max-width: 28ch;
}
.footer__heading {
    font-size: var(--size-sm);
    font-weight: var(--weight-bold);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 1.25rem;
}
.footer__list { display: flex; flex-direction: column; gap: 0.6rem; }
.footer__list li a, .footer__list li {
    font-size: var(--size-sm);
    color: rgba(255,255,255,0.6);
    transition: color var(--duration) var(--ease);
}
.footer__list li a:hover { color: var(--bg); }
.footer__bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    max-width: var(--max-width);
    margin-inline: auto;
    padding: 1.5rem var(--section-x);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}
.footer__bottom p {
    font-size: var(--size-xs);
    color: rgba(255,255,255,0.35);
    max-width: none;
}
.footer__bottom a { color: var(--accent); }

/* ─── RESPONSIVE ─────────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .footer__inner { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    :root {
        --section-y: 60px;
        --section-x: 6%;
    }

    /* Mobile nav */
    .nav__toggle { display: flex; }
    .nav__links {
        position: fixed;
        top: var(--nav-height);
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--bg);
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        padding: 1.5rem var(--section-x);
        transform: translateX(100%);
        transition: transform var(--duration) var(--ease);
        overflow-y: auto;
    }
    .nav--open .nav__links { transform: translateX(0); }
    .nav__links li { width: 100%; border-bottom: 1px solid var(--border); }
    .nav__links li a {
        display: block;
        padding: 1rem 0;
        font-size: var(--size-base);
    }
    .nav__links li a.btn {
        margin-block: 1rem;
        display: inline-flex;
    }

    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .footer__inner { grid-template-columns: 1fr 1fr; gap: 2rem; }
    .footer__bottom { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
    .footer__inner { grid-template-columns: 1fr; }
    .hero__title { max-width: 100%; }
}
