/* ==================================================
   QUANTUM DESIGN SYSTEM — single source of truth
   (Geist · light display weights · square corners ·
    neutral palette · block buttons with arrow squares)
   ================================================== */
:root {
    --neutral-100: #ffffff;
    --neutral-200: #fbfbfb;
    --neutral-300: #f3f3f3;
    --neutral-400: #e3e3e3;
    --neutral-500: #ababab;
    --neutral-600: #505050;
    --neutral-700: #292929;
    --neutral-800: #161616;

    --color-title: var(--neutral-800);
    --color-paragraph: var(--neutral-600);
    --color-border: var(--neutral-400);

    --font: 'Geist', 'Inter', system-ui, sans-serif;

    /* weight scale — large text rides on size, small titles need the weight */
    --w-display: 400;   /* hero, section headings, pull-quote */
    --w-label:   400;   /* small uppercase tracked labels, buttons, nav */
    --w-title:   600;   /* card + cell titles, wordmark */

    --container: 1186px;
    --pd-section: 160px;
    --gap-grid: 1px;   /* lattice borders */
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

body {
    font-family: var(--font);
    background: var(--neutral-100);
    color: var(--color-title);
    -webkit-font-smoothing: antialiased;
    font-size: 1rem;
    line-height: 1.6;
}

.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.section { padding: var(--pd-section) 0; }

/* ------- typography ------- */
.display-hero {
    font-size: clamp(3rem, 7.5vw, 5.5rem);
    font-weight: var(--w-display);
    line-height: 1.02;
    letter-spacing: -0.03em;
}
.display-lg {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: var(--w-display);
    line-height: 1.1;
    letter-spacing: -0.02em;
}
.display-md {
    font-size: clamp(1.25rem, 2vw, 1.5rem);
    font-weight: var(--w-display);
    line-height: 1.25;
    letter-spacing: -0.01em;
}
.paragraph { color: var(--color-paragraph); font-size: 1.125rem; line-height: 1.7; }
.paragraph-sm { color: var(--color-paragraph); font-size: 0.9375rem; line-height: 1.65; }

/* Section tag — [ LABEL ] with pixel square */
.section-tag {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.8125rem;
    font-weight: var(--w-label);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--neutral-800);
    border: 1px solid var(--color-border);
    background: var(--neutral-100);
    padding: 8px 16px;
}
.section-tag::before {
    content: '';
    width: 8px; height: 8px;
    background: var(--neutral-800);
    flex-shrink: 0;
}

/* ------- buttons: black block + separate arrow square ------- */
.q-button {
    display: inline-flex;
    align-items: stretch;
    font-size: 0.875rem;
    font-weight: var(--w-label);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    line-height: 1;
    transition: opacity .2s ease;
}
.q-button:hover { opacity: .85; }
.q-button .button-content {
    display: inline-flex;
    align-items: center;
    padding: 20px 28px;
    background: var(--neutral-800);
    color: #fff;
}
.q-button .button-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    background: var(--neutral-700);
    color: #fff;
}
.q-button.secondary .button-content {
    background: var(--neutral-100);
    color: var(--neutral-800);
    border: 1px solid var(--color-border);
    border-right: none;
}
.q-button.secondary .button-icon {
    background: var(--neutral-300);
    color: var(--neutral-800);
    border: 1px solid var(--color-border);
    border-left: none;
}
.q-button.on-dark .button-content { background: #fff; color: var(--neutral-800); }
.q-button.on-dark .button-icon { background: var(--neutral-300); color: var(--neutral-800); }
.q-button svg { width: 16px; height: 16px; }

/* ------- pre-animation state (Motion reveals) ------- */
/* Hidden only once JS has confirmed it can reveal them (html.js);
   revealed by an IntersectionObserver in footer.php — same timings and
   easing as the mockup's Motion.dev calls, without the CDN dependency. */
.js .fade-up,
.js .hero-animate {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity .9s cubic-bezier(.25, 0, .3, 1), transform .9s cubic-bezier(.25, 0, .3, 1);
    transition-delay: var(--d, 0s);
}
.js .hero-animate { transform: translateY(30px); transition-duration: .8s; }
.js .fade-up.is-visible,
.js .hero-animate.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    .js .fade-up, .js .hero-animate { opacity: 1; transform: none; transition: none; }
}

/* ==================================================
   NAVBAR — white bar, flush black CTA block at right
   ================================================== */
.navbar {
    position: sticky;
    top: 0;
    z-index: 60;
    background: var(--neutral-100);
    border-bottom: 1px solid var(--color-border);
}
.navbar-inner {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    min-height: 72px;
}
.nav-logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding-left: 24px;
    font-weight: var(--w-title);
    font-size: 1rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.nav-links {
    display: flex;
    align-items: center;
    gap: 36px;
    font-size: 0.875rem;
    font-weight: var(--w-label);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--neutral-800);
}
.nav-links a { position: relative; padding: 4px 0; }
.nav-links a:hover { color: var(--neutral-500); }
.nav-cta { display: flex; align-items: stretch; }
.nav-cta .q-button .button-content { padding: 0 32px; display: inline-flex; align-items: center; }
.nav-cta .q-button { height: 100%; }

/* burger */
.nav-burger {
    display: none;
    align-items: center;
    justify-content: center;
    width: 72px;
    border: none;
    border-left: 1px solid var(--color-border);
    background: var(--neutral-100);
    cursor: pointer;
}
.nav-burger span { display: block; width: 26px; height: 2px; background: var(--neutral-800); position: relative; }
.nav-burger span::before, .nav-burger span::after {
    content: ''; position: absolute; left: 0; width: 26px; height: 2px; background: var(--neutral-800);
}
.nav-burger span::before { top: -8px; }
.nav-burger span::after { top: 8px; }

.mobile-menu {
    display: none;
    flex-direction: column;
    border-top: 1px solid var(--color-border);
    background: var(--neutral-100);
}
.mobile-menu.is-open { display: flex; }
.mobile-menu a {
    padding: 18px 24px;
    font-size: 0.875rem;
    font-weight: var(--w-label);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border-bottom: 1px solid var(--neutral-300);
}
.mobile-menu a.menu-cta { background: var(--neutral-800); color: #fff; border-bottom: none; }

/* ==================================================
   HERO — two columns: copy left, portrait right
   ================================================== */
.hero {
    position: relative;
    padding: 124px 0 136px;
    text-align: left;
    overflow: hidden;
}
.hero-grid {
    display: grid;
    grid-template-columns: 6fr 5fr;
    gap: 64px;
    align-items: center;
}
.hero-copy { order: -1; }   /* copy left, portrait right */
.hero-figure { position: relative; }
.hero-figure img {
    width: 100%;
    height: clamp(420px, 44vw, 580px);
    object-fit: cover;
    object-position: 50% 20%;
    border: 1px solid var(--color-border);
}
.hero-kicker {
    display: inline-flex;
    margin-bottom: 28px;
}
.hero p.lede {
    max-width: 520px;
    margin: 28px 0 0;
}
.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 16px;
    margin-top: 44px;
}

/* ==================================================
   QUOTE — dark slab
   ================================================== */
.quote-section { background: var(--neutral-800); }
.quote-box {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
    padding: 0 24px;
}
.quote-box blockquote {
    font-size: clamp(1.375rem, 2.6vw, 1.875rem);
    font-weight: var(--w-display);
    line-height: 1.4;
    letter-spacing: -0.01em;
    color: #fff;
}
.quote-box blockquote::before { content: '“'; }
.quote-box blockquote::after { content: '”'; }
.quote-attribution {
    margin-top: 28px;
    font-size: 0.8125rem;
    font-weight: var(--w-label);
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--neutral-500);
}

/* ==================================================
   SECTION HEADERS
   ================================================== */
.section-header { max-width: 720px; margin-bottom: 64px; }
.section-header.centered { margin-left: auto; margin-right: auto; text-align: center; }
.section-header .section-tag { margin-bottom: 24px; }
.section-header .paragraph { margin-top: 20px; }

/* ==================================================
   ABOUT — two-column with vertical divider
   ================================================== */
.about-grid {
    display: grid;
    grid-template-columns: 5fr 7fr;
    gap: 64px;
    align-items: start;
}
.about-left .section-tag { margin-bottom: 24px; }
.about-left .sub-role {
    margin-top: 20px;
    font-size: 0.8125rem;
    font-weight: var(--w-label);
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--neutral-500);
}
.about-copy { border-left: 1px solid var(--color-border); padding-left: 64px; }
.about-copy p + p { margin-top: 24px; }
.about-copy a {
    color: var(--neutral-800);
    font-weight: 500;
    border-bottom: 2px solid var(--neutral-800);
    transition: color .15s ease, border-color .15s ease;
}
.about-copy a:hover { color: var(--neutral-500); border-color: var(--neutral-500); }

/* ==================================================
   EXPERTISE — lattice grid of bordered cells
   ================================================== */
.lattice {
    display: grid;
    gap: var(--gap-grid);
    background: var(--color-border);
    border: 1px solid var(--color-border);
}
.lattice-3 { grid-template-columns: repeat(3, 1fr); }
.lattice-cell {
    background: var(--neutral-100);
    padding: 40px 36px;
}
.lattice-cell:hover { background: var(--neutral-200); }
.cell-shape {
    width: 64px; height: 64px;
    border: 1px solid var(--color-border);
    background: var(--neutral-100);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 26px;
}
.cell-shape svg { width: 36px; height: 36px; display: block; }
/* three tonal steps, driven by the palette above */
.cell-shape .sh-ink   { fill: var(--neutral-800); }
.cell-shape .sh-mid   { fill: var(--neutral-500); }
.cell-shape .sh-light { fill: var(--neutral-400); }
.cell-shape .st-mid   { fill: none; stroke: var(--neutral-500); stroke-width: 2; }
.cell-shape .st-light { fill: none; stroke: var(--neutral-400); stroke-width: 2; }
.lattice-cell h4 { font-size: 1.1875rem; font-weight: var(--w-title); letter-spacing: -0.01em; margin-bottom: 10px; }

/* ==================================================
   MEDIA & PRESS
   ================================================== */
.media-section { background: var(--neutral-200); border-top: 1px solid var(--color-border); border-bottom: 1px solid var(--color-border); }
.mentioned-strip {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 40px;
    padding: 8px 24px;
    margin-bottom: 64px;
}
.mentioned-label {
    font-size: 0.75rem;
    font-weight: var(--w-label);
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--neutral-500);
}
.mentioned-strip img { height: 34px; filter: grayscale(1); opacity: .75; }
.mentioned-strip .wordmark { font-size: 1.625rem; font-weight: var(--w-title); letter-spacing: -0.01em; color: var(--neutral-600); }

.press-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--gap-grid);
    background: var(--color-border);
    border: 1px solid var(--color-border);
    max-width: 920px;
    margin: 0 auto;
}
.press-card { background: var(--neutral-100); display: flex; flex-direction: column; }
.press-card .thumb { overflow: hidden; aspect-ratio: 16 / 9; border-bottom: 1px solid var(--color-border); }
.press-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.press-card:hover .thumb img { transform: scale(1.04); }
.press-card .body { padding: 28px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.meta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    font-size: 0.75rem;
    font-weight: var(--w-label);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--neutral-500);
}
.meta-row .sep { color: var(--color-border); }
.press-card .title { font-size: 1.125rem; font-weight: var(--w-title); line-height: 1.35; letter-spacing: -0.01em; }
.card-link {
    margin-top: auto;
    padding-top: 12px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    font-weight: var(--w-title);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--neutral-800);
}
.card-link svg { width: 14px; height: 14px; }
.press-card:hover .card-link, .insight-card:hover .card-link { color: var(--neutral-500); }

/* ==================================================
   INSIGHTS — 4-up lattice cards
   ================================================== */
.insights-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--gap-grid);
    background: var(--color-border);
    border: 1px solid var(--color-border);
}
.insight-card { background: var(--neutral-100); display: flex; flex-direction: column; }
.insight-card .thumb { overflow: hidden; aspect-ratio: 4 / 3; border-bottom: 1px solid var(--color-border); }
.insight-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.insight-card:hover .thumb img { transform: scale(1.04); }
.insight-card .body { padding: 24px; display: flex; flex-direction: column; gap: 14px; flex: 1; }
.insight-card .title { font-size: 1rem; font-weight: var(--w-title); line-height: 1.4; letter-spacing: -0.01em; }

/* ==================================================
   CONTACT — dark CTA band
   ================================================== */
.contact-band {
    position: relative;
    background: var(--neutral-800);
    color: #fff;
    text-align: center;
    padding: calc(var(--pd-section) + 10px) 24px;
    overflow: hidden;
}
.contact-band .section-tag {
    background: transparent;
    color: #fff;
    border-color: var(--neutral-600);
    margin-bottom: 28px;
}
.contact-band .section-tag::before { background: #fff; }
.contact-band h2 { color: #fff; }
.contact-band .paragraph { color: var(--neutral-500); max-width: 560px; margin: 20px auto 44px; }
.contact-band .q-button svg.li { width: 18px; height: 18px; margin-right: 10px; }

/* ==================================================
   FOOTER
   ================================================== */
.footer { border-top: 1px solid var(--color-border); }
.footer-grid {
    display: grid;
    grid-template-columns: 6fr 3fr 3fr;
    gap: var(--gap-grid);
    background: var(--color-border);
    border-left: 1px solid var(--color-border);
    border-right: 1px solid var(--color-border);
}
.footer-cell { background: var(--neutral-100); padding: 56px 40px; }
.footer-cell .nav-logo { padding-left: 0; margin-bottom: 20px; }
.footer-cell .paragraph-sm { max-width: 340px; }
.footer-heading {
    font-size: 0.75rem;
    font-weight: var(--w-label);
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--neutral-500);
    margin-bottom: 20px;
}
.footer-links li + li { margin-top: 12px; }
.footer-links a {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--neutral-600);
}
.footer-links a:hover { color: var(--neutral-800); }
.footer-bottom {
    border-top: 1px solid var(--color-border);
    padding: 24px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 0.8125rem;
    color: var(--neutral-500);
}
.footer-bottom a { text-decoration: underline; text-underline-offset: 3px; }
.footer-bottom a:hover { color: var(--neutral-800); }

/* ==================================================
   COOKIE BANNER
   ================================================== */
#cookie-banner {
    position: fixed;
    z-index: 70;
    bottom: 20px; left: 20px; right: 20px;
    max-width: 380px;
    opacity: 0;
    transform: translateY(14px);
    transition: opacity .3s ease, transform .3s ease;
}
#cookie-banner.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { #cookie-banner { transition: none; } }
.cookie-card {
    background: var(--neutral-100);
    border: 1px solid var(--color-border);
    box-shadow: 0 10px 40px rgba(22,22,22,.12);
    padding: 28px;
}
.cookie-card .cookie-title { font-weight: var(--w-title); font-size: 1rem; margin-bottom: 8px; }
.cookie-actions { display: flex; gap: 10px; margin-top: 22px; }
.cookie-actions button {
    flex: 1;
    font-family: var(--font);
    font-size: 0.8125rem;
    font-weight: var(--w-label);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 14px 12px;
    cursor: pointer;
    border: 1px solid var(--neutral-800);
}
#cookie-accept { background: var(--neutral-800); color: #fff; }
#cookie-decline { background: var(--neutral-100); color: var(--neutral-800); border-color: var(--color-border); }

/* ==================================================
   RESPONSIVE
   ================================================== */
@media (max-width: 1024px) {
    :root { --pd-section: 112px; }
    /* keep portrait on the left — only tighten the columns */
    .hero-grid { gap: 36px; }
    .hero-figure img { height: clamp(340px, 40vw, 480px); }
    .lattice-3 { grid-template-columns: repeat(2, 1fr); }
    .insights-grid { grid-template-columns: repeat(2, 1fr); }
    .about-grid { grid-template-columns: 1fr; gap: 40px; }
    .about-copy { border-left: none; padding-left: 0; border-top: 1px solid var(--color-border); padding-top: 40px; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .footer-grid .footer-cell:first-child { grid-column: 1 / -1; }
}
@media (max-width: 860px) {
    .nav-links, .nav-cta { display: none; }
    .nav-burger { display: flex; }
}
@media (max-width: 640px) {
    :root { --pd-section: 80px; }
    .hero { padding-top: 88px; padding-bottom: 72px; }
    /* too narrow for two columns — stack, headline first */
    .hero-grid { grid-template-columns: 1fr; gap: 40px; }
    .hero-copy { order: -1; }
    .hero-figure img { height: clamp(380px, 82vw, 520px); }
    .lattice-3 { grid-template-columns: 1fr; }
    .insights-grid { grid-template-columns: 1fr; }
    .press-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .footer-cell { padding: 40px 24px; }
    .hero-buttons .q-button .button-content { padding: 16px 20px; }
    .section-header { margin-bottom: 44px; }
}

/* ==================================================
   SITE ADDITIONS (not in the v1 mockup)
   ================================================== */
/* Two-part role label: one part per line, square aligned to the first line */
.section-tag { line-height: 1.5; }
.section-tag::before { align-self: flex-start; margin-top: .45em; }
.tag-lines { display: flex; flex-direction: column; }

/* Hero subtitle sits after the h1 in the markup (same order as the other
   expert sites) but keeps the mockup's position above the name. */
.hero-copy { display: flex; flex-direction: column; align-items: flex-start; }
.hero-copy .hero-kicker { order: -1; margin: 0 0 28px; }
.about-left .sub-role { text-wrap: balance; }

/* Mentioned-in strip: wide wordmark logos (e.g. Medium) sit lower than badges */
.mentioned-strip img.logo-wide { height: 22px; }

/* Grids with fewer items than the mockup's 2-up / 4-up: no empty lattice cells */
.press-grid.count-1 { grid-template-columns: 1fr; max-width: 460px; }
.insights-grid.count-1 { grid-template-columns: 1fr; max-width: 460px; margin: 0 auto; }
.insights-grid.count-2 { grid-template-columns: repeat(2, 1fr); max-width: 920px; margin: 0 auto; }
.insights-grid.count-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 1024px) {
    .insights-grid.count-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
    .insights-grid.count-2, .insights-grid.count-3 { grid-template-columns: 1fr; }
}

/* Skip link */
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 100; padding: 12px 20px; background: var(--neutral-800); color: #fff; }
.skip-link:focus { left: 0; }

/* Keyboard focus */
a:focus-visible, button:focus-visible { outline: 2px solid var(--neutral-800); outline-offset: 3px; }
.contact-band a:focus-visible { outline-color: #fff; }

/* WP admin bar pushes the sticky navbar down for logged-in editors */
.admin-bar .navbar { top: 32px; }
@media (max-width: 782px) { .admin-bar .navbar { top: 46px; } }

/* Fallback page (index.php) */
.fallback { min-height: 60vh; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 28px; }

/* Button labels never break mid-label on narrow screens */
.q-button .button-content { white-space: nowrap; }
