/* =============================================
   Closiq – Shared Styles

   Three background colours, total: white body, blue nav, black footer.
   That is the ceiling; do not add a fourth band.

   Deliberately absent, because they were removed on purpose:
     - .eyebrow  (small uppercase label above a heading)
     - stat bars / decorative counts
     - numbered 01..06 card indices
   ============================================= */

/* Self-hosted. The Google Fonts @import sent every visitor's IP to a third
   party and blocked render on a cross-origin stylesheet. Same faces,
   served from this origin. Regenerate with build_fonts.py. */
@font-face {
    font-family: 'Cormorant Garamond';
    font-style: normal;
    font-weight: 300;
    font-display: swap;
    src: url('/fonts/cormorant-garamond-300-normal-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Cormorant Garamond';
    font-style: normal;
    font-weight: 300;
    font-display: swap;
    src: url('/fonts/cormorant-garamond-300-normal-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Cormorant Garamond';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/fonts/cormorant-garamond-400-normal-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Cormorant Garamond';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/fonts/cormorant-garamond-400-normal-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'EB Garamond';
    font-style: italic;
    font-weight: 400;
    font-display: swap;
    src: url('/fonts/eb-garamond-400-italic-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'EB Garamond';
    font-style: italic;
    font-weight: 400;
    font-display: swap;
    src: url('/fonts/eb-garamond-400-italic-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'EB Garamond';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/fonts/eb-garamond-400-normal-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'EB Garamond';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/fonts/eb-garamond-400-normal-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'EB Garamond';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('/fonts/eb-garamond-600-normal-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'EB Garamond';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('/fonts/eb-garamond-600-normal-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/fonts/inter-400-normal-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/fonts/inter-400-normal-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('/fonts/inter-500-normal-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('/fonts/inter-500-normal-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}


:root {
    --nav-bg: #7297C5;
    --nav-text: #000;
    --footer-bg: #000;
    --footer-text: #fff;
    --body-bg: #fff;
    --text-primary: #000;
    --text-secondary: #444;
    --text-muted: #777;
    --border: #e0e0e0;
    --hover-wash: #f7f7f7;
    --font-display: 'Cormorant Garamond', serif;
    --font-body: 'EB Garamond', serif;
    --font-ui: 'Inter', sans-serif;
    --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    background: var(--body-bg);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1.125rem;
    line-height: 1.7;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: clip;
    -webkit-tap-highlight-color: transparent;
}

/* ---- NAV ---- */
.nav {
    background: var(--nav-bg);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(0,0,0,0.08);
}

.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-left { display: flex; align-items: center; gap: 2.5rem; }

.nav-logo {
    font-family: var(--font-display);
    font-size: 1.45rem;
    font-weight: 300;
    color: var(--nav-text);
    text-decoration: none;
    letter-spacing: 0.1em;
}

.nav-link {
    font-family: var(--font-ui);
    font-size: 0.82rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--nav-text);
    text-decoration: none;
    opacity: 0.85;
    transition: opacity 0.2s;
}
.nav-link:hover, .nav-link[aria-current="page"] { opacity: 1; }

.nav-cta {
    font-family: var(--font-ui);
    font-size: 0.82rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #fff;
    background: #000;
    text-decoration: none;
    padding: 0.45rem 1.1rem;
    border-radius: 2px;
    transition: background 0.2s;
}
.nav-cta:hover { background: #222; }

.nav-right { display: flex; align-items: center; }

/* The collapsed mobile menu exists in the markup on every page; it must be
   hidden on desktop or its links render loose inside the nav bar. */
.nav-menu { display: none; }

/* Hamburger: hidden on desktop, shown under 768px. Without this the links
   simply vanished on a phone, which is what the old stylesheet did. */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    z-index: 110;
}
.nav-toggle span {
    display: block;
    width: 22px;
    height: 1.5px;
    background: var(--nav-text);
    transition: transform 0.3s var(--ease-out), opacity 0.2s;
    transform-origin: center;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ---- FOOTER ---- */
.footer { background: var(--footer-bg); color: var(--footer-text); margin-top: auto; }

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.4rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.footer-copy {
    font-family: var(--font-ui);
    font-size: 0.78rem;
    opacity: 0.6;
    letter-spacing: 0.03em;
}

.footer-links { display: flex; gap: 2rem; flex-wrap: wrap; }

.footer-link {
    font-family: var(--font-ui);
    font-size: 0.78rem;
    color: #fff;
    text-decoration: none;
    opacity: 0.6;
    letter-spacing: 0.03em;
    transition: opacity 0.2s;
}
.footer-link:hover { opacity: 1; }

/* ---- LAYOUT ---- */
main { flex: 1; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }
.container--narrow { max-width: 780px; }

/* 7rem reads as cramped; 11rem does not. */
.section    { padding: 11rem 0; }
.section--sm { padding: 6rem 0; }

/* ---- HERO ----
   Full viewport minus the nav, with the content anchored LOW. The empty upper
   half is the point: it is what makes the headline land. Do not fill it. */
.hero {
    min-height: calc(100vh - 60px);
    min-height: calc(100svh - 60px);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding-bottom: 9rem;
    padding-top: 6rem;
}

/* Inner pages get the same anchored-low treatment at about two thirds height.
   A full viewport of emptiness works once, on the homepage, where it reads as
   confidence; on every page in a row it reads as a page that failed to load. */
.hero--page {
    min-height: 62vh;
    min-height: 62svh;
    padding-bottom: 5rem;
}

/* .container carries margin:0 auto; as a flex item that auto margin beats
   align-items:stretch and shrink-wraps the column. Force the fill. */
.hero > .container { width: 100%; }

.hero .lede { margin-top: 1.9rem; }
.hero .btn  { margin-top: 3rem; align-self: flex-start; }

/* ---- SCROLL REVEALS ---- */
.fade-in {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.75s var(--ease-out), transform 0.75s var(--ease-out);
}
.fade-in.in-view { opacity: 1; transform: translateY(0); }

/* The headline lifts as a curtain rather than sliding, which reads as
   typography revealing itself instead of a UI element animating in. */
h1.fade-in {
    transform: none;
    clip-path: inset(0 0 100% 0);
    transition: opacity 0.95s var(--ease-out), clip-path 0.95s var(--ease-out);
}
h1.fade-in.in-view { clip-path: inset(0 0 0% 0); }

.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.22s; }
.delay-3 { transition-delay: 0.34s; }
.delay-4 { transition-delay: 0.46s; }

@media (prefers-reduced-motion: reduce) {
    .fade-in, h1.fade-in {
        opacity: 1; transform: none; clip-path: none; transition: none;
    }
}

.divider { border: none; border-top: 1px solid var(--border); margin: 0; }

/* ---- TYPOGRAPHY ---- */
h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 300;
    line-height: 1.08;
    letter-spacing: -0.015em;
    color: var(--text-primary);
}

/* The clip-path reveal clips to the border box, and with line-height 1.08 a
   descender (the g in "running") hangs below it and gets sliced off. The
   padding puts the descender inside the box. */
.h-hero { font-size: clamp(2.9rem, 6.5vw, 5.1rem); padding-bottom: 0.18em; }
.h-section { font-size: clamp(2.1rem, 4vw, 3.2rem); }
.h-card { font-family: var(--font-display); font-size: 1.85rem; font-weight: 300; }

/* Cap prose so a short paragraph sets to two lines, not three stubby ones. */
.lede {
    font-size: 1.28rem;
    line-height: 1.75;
    color: var(--text-secondary);
    max-width: 62ch;
}
.prose { max-width: 70ch; color: var(--text-secondary); }
.prose p + p { margin-top: 1.5rem; }
.prose h2 { font-size: 1.9rem; margin: 3.25rem 0 1.1rem; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 1.4rem; margin: 2.25rem 0 0.8rem; }
.prose ul, .prose ol { margin: 1.1rem 0 1.1rem 1.4rem; }
.prose li + li { margin-top: 0.5rem; }
.prose a { color: inherit; }

/* Micro-caps, used for column headers and meta only. Never as a label
   floating above a heading. */
.meta {
    font-family: var(--font-ui);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--text-muted);
}

/* ---- BUTTONS: one per view ---- */
.btn {
    display: inline-block;
    font-family: var(--font-ui);
    font-size: 0.82rem;
    font-weight: 500;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    text-decoration: none;
    padding: 0.85rem 1.9rem;
    border-radius: 2px;
    transition: background 0.2s;
    cursor: pointer;
    border: none;
}
.btn-dark { background: #000; color: #fff; }
.btn-dark:hover { background: #222; }

/* ---- PANELS: the whole block is the hit area ---- */
.panel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
}

.panel {
    display: block;
    background: #fff;
    color: inherit;
    text-decoration: none;
    cursor: pointer;
    padding: 3rem 2.5rem;
    transition: background 0.25s var(--ease-out);
}
.panel:hover { background: var(--hover-wash); }
.panel h3 { margin-bottom: 0.9rem; }
.panel p { font-size: 1.02rem; color: var(--text-secondary); }

/* Non-clickable variant, same rhythm */
.panel--static { cursor: default; }
.panel--static:hover { background: #fff; }

/* ---- WORK ENTRIES ---- */
.entry { padding: 3.5rem 0; border-top: 1px solid var(--border); }
.entry:last-child { border-bottom: 1px solid var(--border); }
.entry-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}
.entry p { max-width: 70ch; color: var(--text-secondary); font-size: 1.05rem; }

/* ---- DEFINITION ROWS (engagement models, contact details) ---- */
.rows { border-top: 1px solid var(--border); }
.row {
    display: grid;
    grid-template-columns: 15rem 1fr;
    gap: 2rem;
    padding: 2.1rem 0;
    border-bottom: 1px solid var(--border);
}
.row h3 { font-size: 1.35rem; }
.row p { color: var(--text-secondary); font-size: 1.02rem; max-width: 62ch; }

a.row { text-decoration: none; color: inherit; transition: background 0.25s var(--ease-out); }
a.row:hover { background: var(--hover-wash); }

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
    .nav-inner { padding: 0 1.5rem; flex-wrap: wrap; height: auto; min-height: 60px; }
    .nav-left { gap: 0; }
    .nav-toggle { display: flex; }
    .nav-right { order: 3; width: 100%; }

    /* Collapsed menu. Fully opaque, colour-matched to the nav: at 96% the
       page text ghosts through on a phone. */
    .nav-left .nav-link { display: none; }
    .nav-menu {
        display: block;
        order: 4;
        width: 100%;
        max-height: 0;
        overflow: hidden;
        background: var(--nav-bg);
        transition: max-height 0.35s var(--ease-out);
    }
    .nav-menu.open { max-height: 26rem; }
    .nav-menu a {
        display: block;
        font-family: var(--font-ui);
        font-size: 0.82rem;
        font-weight: 500;
        letter-spacing: 0.06em;
        text-transform: uppercase;
        color: var(--nav-text);
        text-decoration: none;
        padding: 0.95rem 0;
        border-top: 1px solid rgba(0,0,0,0.08);
    }
    /* Contact is repeated inside .nav-menu on mobile, so the button is dropped
       rather than shown twice. */
    .nav-right { display: none; }

    .container { padding: 0 1.5rem; }
    .section { padding: 6rem 0; }
    .hero { padding-bottom: 5rem; padding-top: 3rem; }
    .section--sm { padding: 3.5rem 0; }
    .row { grid-template-columns: 1fr; gap: 0.6rem; }
    .panel { padding: 2.5rem 1.75rem; }
}
