@font-face {
    font-family: 'Inter';
    src: url('fonts/inter-variable-latin.woff2') format('woff2-variations'), url('fonts/inter-variable-latin.woff2') format('woff2');
    font-weight: 380 620;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Outfit';
    src: url('fonts/outfit-variable-latin.woff2') format('woff2-variations'), url('fonts/outfit-variable-latin.woff2') format('woff2');
    font-weight: 480 820;
    font-style: normal;
    font-display: swap;
}

:root {
    --cream: #f5f2ea;
    --cream-2: #eeeade;
    --ink: #15171b;
    --ink-soft: #5c5e64;
    --ink-faint: #8b8d92;
    --line: #ddd7c7;
    --navy: #1c2b4a;
    --paper: #fffdf9;
    --radius-lg: 28px;
    --radius-md: 18px;
    --radius-sm: 10px;
    --container: 1180px;
    --font-display: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font-body);
    font-weight: 420;
    color: var(--ink);
    background: var(--cream);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.wrap { max-width: var(--container); margin: 0 auto; padding: 0 32px; }
.wrap.narrow { max-width: 820px; }

a { color: inherit; }

h1, h2, h3 {
    font-family: var(--font-display);
    font-weight: 620;
    letter-spacing: -0.02em;
    margin: 0;
}

/* ---------- Header ---------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    padding: 20px 0;
    background: rgba(245, 242, 234, 0.82);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid transparent;
    transition: border-color .3s ease;
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.site-header .logo { height: 56px; display: block; }
.site-nav { display: flex; align-items: center; gap: 10px; }
.pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    color: var(--ink);
    padding: 10px 20px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--paper);
    transition: background .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
}
.pill:hover { background: var(--ink); color: var(--cream); border-color: var(--ink); transform: translateY(-1px); }
.pill.pill-solid { background: var(--navy); color: #fff; border-color: var(--navy); }
.pill.pill-solid:hover { background: var(--ink); border-color: var(--ink); }

/* ---------- Reveal animation ---------- */

[data-reveal] {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity .8s cubic-bezier(.16,.8,.24,1), transform .8s cubic-bezier(.16,.8,.24,1);
}
[data-reveal].is-visible { opacity: 1; transform: translateY(0); }

/* ---------- Hero ---------- */

.hero {
    padding: 120px 0 96px;
    text-align: center;
}
.hero h1 {
    font-size: clamp(38px, 6.4vw, 84px);
    line-height: 1.02;
    color: var(--ink);
    max-width: 920px;
    margin: 0 auto;
}
.hero .lead {
    font-size: clamp(17px, 1.8vw, 20px);
    color: var(--ink-soft);
    max-width: 680px;
    margin: 32px auto 0;
    white-space: pre-line;
}

/* ---------- About / second section ---------- */

.about {
    padding: 96px 0;
    border-top: 1px solid var(--line);
}
.about .wrap { display: grid; grid-template-columns: 1fr 1.4fr; gap: 64px; align-items: start; }
.about h2 {
    font-size: clamp(30px, 4vw, 46px);
    position: sticky;
    top: 120px;
}
.about p {
    font-size: 19px;
    color: var(--ink-soft);
    white-space: pre-line;
    margin: 0;
}

/* ---------- References ---------- */

.references { padding: 96px 0 120px; border-top: 1px solid var(--line); }
.section-head { margin-bottom: 48px; }
.section-head h2 { font-size: clamp(30px, 4vw, 46px); }

.ref-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}
.ref-card {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
    background: var(--paper);
    border: 1px solid rgba(28, 43, 74, 0.16);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: border-color .28s ease, transform .28s ease;
}
.ref-card:hover {
    border-color: var(--navy);
    transform: translateY(-3px);
}
.ref-logo-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 100%;
    min-height: 168px;
    padding: 28px;
    background: var(--cream-2);
    border-bottom: 1px solid rgba(28, 43, 74, 0.16);
}
.ref-logo-banner img { max-width: 82%; max-height: 120px; object-fit: contain; }
.ref-fallback-banner {
    font-family: var(--font-display);
    font-weight: 650;
    font-size: clamp(22px, 2.6vw, 30px);
    color: var(--navy);
    text-align: center;
    letter-spacing: -0.01em;
}
.ref-caption { padding: 18px 22px 22px; flex: 1; }
.ref-card h3 {
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 650;
    color: var(--ink);
    margin-bottom: 4px;
}
.ref-card p {
    margin: 0;
    font-size: 13px;
    color: var(--ink-faint);
}

/* ---------- Legal pages ---------- */

.legal { padding: 96px 0 120px; }
.legal h1 { font-size: clamp(32px, 5vw, 52px); margin-bottom: 40px; }
.legal-body { color: var(--ink-soft); font-size: 16px; white-space: pre-line; }
.legal .back {
    display: inline-block;
    margin-top: 48px;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px solid var(--ink);
    padding-bottom: 2px;
}

/* ---------- Footer ---------- */

.site-footer { background: var(--ink); color: rgba(245,242,234,0.6); padding: 56px 0 32px; }
.site-footer .wrap { display: flex; flex-direction: column; align-items: center; gap: 24px; }
.footer-mark { font-family: var(--font-display); font-weight: 650; font-size: 20px; color: var(--cream); }
.footer-links { display: flex; gap: 28px; flex-wrap: wrap; justify-content: center; }
.footer-links a { color: var(--cream); text-decoration: none; font-size: 14px; opacity: .85; }
.footer-links a:hover { opacity: 1; text-decoration: underline; }
.copyright { font-size: 12px; color: rgba(245,242,234,0.4); margin: 0; }

@media (max-width: 900px) {
    .about .wrap { grid-template-columns: 1fr; gap: 28px; }
    .about h2 { position: static; }
    .ref-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
    .wrap { padding: 0 20px; }
    .hero { padding: 96px 0 64px; }
    .about, .references { padding: 64px 0; }
    .site-header .logo { height: 42px; }
    .pill { padding: 9px 16px; font-size: 13px; }
}
