/* ===========================================================================
   Graphixcon — main stylesheet
   Design system ported from the static one-pager. Loaded after the WP
   default block-library style so it can override it. Keep this file as
   the single source of truth for visual style.
   ========================================================================= */

/* ---------- Design tokens ---------- */
:root {
    --bg:           #FAFAF8;
    --bg-2:         #F2F1EC;
    --ink:          #1A1B1A;
    --muted:        #5C5F5C;
    --line:         #E5E5E2;
    --accent:       #1C85E8;
    --accent-soft:  #EAF2FC;
    --dark:         #0E0F0E;
    --dark-2:       #16181A;

    --display: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
    --body:    "Inter",   system-ui, -apple-system, "Segoe UI", sans-serif;
    --mono:    "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;

    --container: 88rem;
    --gutter-sm: 1.25rem;
    --gutter-md: 2rem;
    --gutter-lg: 3rem;
    --radius:    14px;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font: 400 16px/1.5 var(--body);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
h1, h2, h3, h4, .font-display { font-family: var(--display); letter-spacing: -0.025em; line-height: 1.08; }
.font-mono { font-family: var(--mono); }
.muted    { color: var(--muted); }
.eyebrow  { font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin: 0; }

/* ---------- Container ---------- */
.container-x { max-width: var(--container); margin-left: auto; margin-right: auto; padding-left: var(--gutter-sm); padding-right: var(--gutter-sm); }
@media (min-width: 768px)  { .container-x { padding-left: var(--gutter-md); padding-right: var(--gutter-md); } }
@media (min-width: 1280px) { .container-x { padding-left: var(--gutter-lg); padding-right: var(--gutter-lg); } }

/* ---------- Buttons (light theme — used outside the dark hero) ---------- */
.btn-primary, .btn-ghost {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.75rem 1.1rem; border-radius: 9999px;
    font: 500 14px/1 var(--body); text-decoration: none;
    transition: background .2s ease, border-color .2s ease, color .2s ease, transform .15s ease;
    border: 1px solid transparent; cursor: pointer; user-select: none;
}
.btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-primary:hover { background: #1571CE; border-color: #1571CE; }
.btn-primary:active { transform: translateY(1px); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--bg-2); border-color: #C9CAC5; }

/* Header CTA — uses black instead of the brand blue so the nav bar
   reads as a quiet utility row, not a marketing strip. */
.site-header .nav-cta,
.site-header .nav-cta:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.site-header .nav-cta:hover { background: #000; border-color: #000; }

.status-pill {
    display: inline-flex; align-items: center; gap: 0.45rem;
    padding: 0.4rem 0.7rem; border: 1px solid var(--line); border-radius: 9999px;
    font: 500 12px/1 var(--body); color: var(--muted);
    background: rgba(250, 250, 248, 0.6); backdrop-filter: blur(6px);
}
.status-dot { width: 7px; height: 7px; border-radius: 9999px; background: #2BB673; box-shadow: 0 0 0 4px rgba(43, 182, 115, 0.18); animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(43, 182, 115, 0.4); } 50% { box-shadow: 0 0 0 6px rgba(43, 182, 115, 0); } }

/* ---------- Header / nav ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    background: var(--bg);     /* Solid, not translucent. Stops the scroll-frame
                                   re-paint cycle that browsers do on `backdrop-filter`
                                   + `position: sticky` (a common cause of subtle 1px
                                   shifts at the top edge during scroll). */
    border-bottom: 1px solid var(--line);
}
.nav-grid { display: flex; align-items: center; height: 56px; gap: 0.75rem; }
@media (min-width: 768px) { .nav-grid { height: 64px; } }
.nav-left { display: flex; align-items: center; gap: 0.6rem; margin-right: auto; }
.nav-mid  { display: none; }
.nav-mid ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 2.5rem; }
.nav-mid li { display: inline-flex; }
.nav-right{ display: flex; align-items: center; gap: 0.6rem; margin-left: auto; }
@media (min-width: 768px) {
    .nav-mid { display: flex; align-items: center; gap: 2.5rem; margin-left: auto; margin-right: auto; font: 500 14px/1 var(--body); }
    .nav-mid a { color: var(--muted); }
    .nav-mid a:hover { color: var(--ink); }
}
.graphixcon-wordmark { display: inline-flex; align-items: center; gap: 0.6rem; }
.graphixcon-wordmark--img img {
    display: block;
    /* The full-logo SVG has viewBox 0 0 248.49 76.13 — render at its native
       aspect ratio (~3.26:1). Height caps so it fits the sticky nav (h-14 / h-16);
       width is then derived from aspect, capped so the wordmark doesn't
       dominate smaller screens. */
    height: 35.4px;   /* 28px × 1.265 (1.15 then a further 1.10) */
    width: auto;
    width: calc(35.4px * 248.49 / 76.13); /* = 115.57px on desktop */
    max-width: 100%;
}
@media (max-width: 768px) {
    .graphixcon-wordmark--img img {
        height: 30.4px;  /* 24px × 1.265 */
        width: calc(30.4px * 248.49 / 76.13); /* = 99.25px on mobile */
    }
}
/* Footer variant. The white-on-dark logo is wider in the footer's md:col-span-5
   column, so we size it up slightly and lift the height cap to match the
   footer's larger reading rhythm. */
.graphixcon-wordmark--light img {
    height: 38px;     /* 30px × 1.265 */
    width: calc(38px * 248.49 / 76.13); /* = 124.02px on desktop */
    filter: none; /* the SVG is already white-on-dark by design */
}
@media (max-width: 768px) {
    .graphixcon-wordmark--light img {
        height: 30.4px;  /* 24px × 1.265 */
        width: calc(30.4px * 248.49 / 76.13);
    }
}
.wordmark-mark { width: 22px; height: 22px; border-radius: 6px; background: var(--ink); display: inline-block; }
.wordmark-text { font: 600 15px/1 var(--display); letter-spacing: -0.02em; color: var(--ink); }
.nav-toggle { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 9999px; border: 1px solid var(--line); background: transparent; cursor: pointer; }
@media (min-width: 768px) { .nav-toggle { display: none; } }
.nav-toggle svg { width: 16px; height: 16px; }
.nav-mobile { display: none; border-top: 1px solid var(--line); background: rgba(250, 250, 248, 0.95); backdrop-filter: blur(8px); }
.nav-mobile.is-open { display: block; }
.nav-mobile a { display: block; padding: 14px 0; border-bottom: 1px solid var(--line); font: 500 15px/1 var(--body); color: var(--ink); }
.nav-mobile a:last-child { border-bottom: 0; }
@media (min-width: 768px) { .nav-mobile { display: none !important; } }

/* ---------- Section base ---------- */
section { position: relative; }
.section-border { border-top: 1px solid var(--line); }
.section { padding-top: clamp(56px, 8vw, 112px); padding-bottom: clamp(56px, 8vw, 112px); }
.section-tight { padding-top: clamp(40px, 6vw, 80px); padding-bottom: clamp(40px, 6vw, 80px); }
.section-heading { display: grid; grid-template-columns: 1fr; gap: 16px; margin-bottom: clamp(32px, 5vw, 64px); }
@media (min-width: 768px) { .section-heading { grid-template-columns: 1fr 1fr; gap: 32px; align-items: end; } }
.section-heading h2 { margin: 8px 0 0; font-size: clamp(1.6rem, 3.4vw, 2.6rem); }
.section-lede { color: var(--muted); font-size: 1.0625rem; max-width: 46ch; }

/* ---------- Card primitive ---------- */
.gx-card {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    padding: clamp(20px, 3vw, 32px);
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.gx-card:hover { transform: translateY(-2px); border-color: #C9CAC5; box-shadow: 0 12px 32px -16px rgba(26, 27, 26, 0.12); }
.gx-card .row { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: clamp(16px, 2vw, 24px); font: 400 12px/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.gx-card h3 { font-size: clamp(1.15rem, 1.8vw, 1.4rem); margin: 0 0 14px; }
.gx-card p  { color: var(--muted); margin: 0 0 18px; }
.gx-card ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.gx-card li { display: flex; gap: 12px; align-items: baseline; font-size: 0.95rem; color: var(--muted); }
.gx-card li::before { content: ""; display: inline-block; width: 14px; height: 1px; background: var(--muted); flex-shrink: 0; transform: translateY(-3px); }

/* ---------- Grid utilities ---------- */
.cols-3 { display: grid; grid-template-columns: 1fr; gap: 24px; }
.cols-4 { display: grid; grid-template-columns: 1fr; gap: 24px; }
@media (min-width: 768px) { .cols-3 { grid-template-columns: repeat(2, 1fr); } .cols-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .cols-3 { grid-template-columns: repeat(3, 1fr); gap: 28px; } .cols-4 { grid-template-columns: repeat(4, 1fr); gap: 24px; } }

/* ---------- Two-column with sticky right ---------- */
.split { display: grid; grid-template-columns: 1fr; gap: clamp(32px, 5vw, 64px); }
@media (min-width: 1024px) { .split { grid-template-columns: 5fr 7fr; } }
.split-right { display: grid; gap: 16px; }

/* ---------- Pill / chip group (stack section) ---------- */
.chip-group { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; padding: 7px 12px; border-radius: 9999px; border: 1px solid var(--line); font: 500 13px/1 var(--body); color: var(--ink); background: #fff; }
.chip-mono { font-family: var(--mono); font-weight: 400; }

/* ---------- Work / case-study card ---------- */
.work-card { display: flex; flex-direction: column; gap: 16px; padding: 0; border-radius: var(--radius); overflow: hidden; background: #fff; border: 1px solid var(--line); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.work-card:hover { transform: translateY(-2px); box-shadow: 0 16px 40px -20px rgba(26, 27, 26, 0.18); border-color: #C9CAC5; }
.work-card .thumb { aspect-ratio: 16 / 10; background: var(--bg-2); border-bottom: 1px solid var(--line); overflow: hidden; }
.work-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.work-card .body { padding: 22px 24px 26px; display: flex; flex-direction: column; gap: 8px; }
.work-card .row { display: flex; justify-content: space-between; font: 400 11px/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.work-card h3 { font-size: 1.15rem; margin: 0; }
.work-card p  { color: var(--muted); margin: 4px 0 0; font-size: 0.95rem; }
.case-tag { font: 500 12px/1 var(--mono); color: var(--muted); letter-spacing: 0.06em; }
.case-meta { display: flex; gap: 6px; align-items: center; font: 400 12px/1 var(--mono); color: var(--muted); }
.case-dot  { color: var(--line); }

/* ---------- Numbers / stats ---------- */
.nums { font-variant-numeric: tabular-nums; }
.stat-num { font: 500 clamp(2rem, 4.5vw, 3rem)/1 var(--display); color: var(--ink); letter-spacing: -0.03em; }

/* ---------- Footer ---------- */
.site-footer { background: var(--dark); color: #D7D6D1; padding: clamp(56px, 7vw, 96px) 0 32px; }
.site-footer a { color: #D7D6D1; }
.site-footer a:hover { color: #fff; }

/* Footer typography refinements */
.site-footer .footer-eyebrow {
    font-family: var(--mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: rgba(255, 255, 255, 0.45);
    margin: 0;
}
.site-footer .footer-linklist {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    /* padding-top clears the eyebrow's text-bottom vs. line-box bottom gap.
       Without it, the first link visually crowds the heading because the
       eyebrow has line-height 1.4. */
    padding-top: 0.9rem;
    gap: 0.3rem;          /* tighter inter-item rhythm than the previous 0.6rem */
}

/* Legal-page links that live under the Status / "Available" indicator.
   - Larger top margin so they read as a separate group from "Available".
   - Smaller font size (12px) so they sit visually below the status line.
   - Dotted style by default; underline on hover. */
.site-footer .footer-legal {
    list-style: none;
    padding: 0;
    margin: 1.25rem 0 0;   /* breathing room between "Available" and the legal links */
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}
.site-footer .footer-legal a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 12px;
    letter-spacing: 0.01em;
    transition: color 150ms ease;
    border-bottom: 1px dotted rgba(255, 255, 255, 0.25);
    padding-bottom: 1px;
}
.site-footer .footer-legal a:hover {
    color: #fff;
    border-bottom-color: rgba(255, 255, 255, 0.7);
}
.site-footer .footer-link {
    display: inline-flex;
    align-items: center;
    font-size: 13px;        /* 1px smaller than the previous 14px default */
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.78);
    letter-spacing: 0.01em; /* a touch of professional tracking */
    transition: color .15s ease, transform .15s ease;
    width: fit-content;
}
.site-footer .footer-link:hover {
    color: #fff;
    transform: translateX(2px);   /* subtle right-shift on hover */
}
.site-footer .footer-link:focus-visible {
    outline: 1px solid rgba(255, 255, 255, 0.6);
    outline-offset: 2px;
    border-radius: 2px;
}
.site-footer .footer-link--social {
    gap: 0.5rem;
}
.site-footer .footer-link--social svg {
    flex-shrink: 0;
    opacity: 0.7;
    transition: opacity .15s ease;
}
.site-footer .footer-link--social:hover svg {
    opacity: 1;
}
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 32px; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.footer-grid h4 { font: 500 12px/1 var(--mono); letter-spacing: 0.18em; text-transform: uppercase; color: rgba(255, 255, 255, 0.55); margin: 0 0 18px; }
.footer-grid .links a { display: block; padding: 6px 0; font-size: 0.95rem; }
.footer-bottom { margin-top: clamp(32px, 4vw, 56px); padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, 0.1); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px; font: 400 12px/1 var(--mono); color: rgba(255, 255, 255, 0.45); }
.social { display: flex; gap: 10px; }
.social a { width: 36px; height: 36px; border-radius: 9999px; border: 1px solid rgba(255, 255, 255, 0.18); display: inline-flex; align-items: center; justify-content: center; transition: border-color .2s ease, background .2s ease; }
.social a:hover { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.45); }
.social svg { width: 16px; height: 16px; fill: currentColor; }

/* ---------- Reveal animation (light theme) ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- Process section (text left, cards right) ---------- */
.process-card { display: grid; grid-template-columns: auto 1fr; gap: 18px; padding: 22px 0; border-top: 1px solid var(--line); }
.process-card .n { font: 500 13px/1 var(--mono); color: var(--muted); letter-spacing: 0.14em; padding-top: 3px; }
.process-card h3 { margin: 0 0 6px; font-size: 1.0625rem; }
.process-card p  { margin: 0; color: var(--muted); }

/* ---------- Dark hero (3D + service index) ---------- */
.hero-dark {
    --h-bg:    #0A0B0D;
    --h-fg:    #F2F1EC;
    --h-mute:  #9CA3AF;
    --h-line:  rgba(156, 163, 175, 0.28);
    --h-glow:  rgba(156, 163, 175, 0.13);
    background: var(--h-bg); color: var(--h-fg);
    font-family: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
    color-scheme: dark;
}
.hero-dark .container-x { padding-top: clamp(24px, 3vw, 40px); padding-bottom: clamp(24px, 3vw, 40px); }
.hero-dark .hero-grid { display: grid; grid-template-columns: 1fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
@media (min-width: 860px) { .hero-dark .hero-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); } }
.hero-dark h1 {
    margin: 0 0 20px; font-weight: 600;
    font-family: var(--display); /* Poppins — matches all other h2/h3 on the site */
    font-size: clamp(2.1rem, 4.4vw, 3.9rem); line-height: 1.03;
    letter-spacing: -0.03em; text-wrap: balance;
}
.hero-dark .lede { color: var(--h-mute); max-width: 46ch; margin: 0 0 28px; font-size: 1.0625rem; }
.hero-dark .cta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: clamp(32px, 5vw, 56px); }
.hero-dark .btn-primary, .hero-dark .btn-ghost {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.75rem 1.1rem; border-radius: 9999px;
    font: 500 14px/1 var(--body); text-decoration: none;
    transition: background .2s ease, box-shadow .25s ease, transform .15s ease, border-color .2s ease;
    border: 1px solid transparent; cursor: pointer;
}
.hero-dark .btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); box-shadow: 0 0 0 0 rgba(28, 133, 232, 0.45), 0 8px 24px -8px rgba(28, 133, 232, 0.55); }
.hero-dark .btn-primary:hover { background: #1571CE; border-color: #1571CE; box-shadow: 0 0 0 6px rgba(28, 133, 232, 0.18), 0 10px 28px -6px rgba(28, 133, 232, 0.7); }
.hero-dark .btn-primary:active { transform: translateY(1px); }
.hero-dark .btn-ghost { background: transparent; color: var(--h-fg); border-color: rgba(156, 163, 175, 0.45); }
.hero-dark .btn-ghost:hover { border-color: var(--accent); background: rgba(28, 133, 232, 0.08); }
.hero-dark .eyebrow { font: 400 11px/1.4 "Martian Mono", monospace; letter-spacing: 0.18em; text-transform: uppercase; color: var(--h-mute); margin: 0 0 20px; }
.hero-dark .svcs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: 0 28px; }
@media (min-width: 520px) { .hero-dark .svcs { grid-template-columns: repeat(2, 1fr); } }
.hero-dark .svc { position: relative; padding: 16px 0 18px; border-top: 1px solid var(--h-line); display: grid; gap: 4px; min-width: 0; }
.hero-dark .svc::after { content: ""; position: absolute; left: 0; top: -1px; height: 1px; width: calc(var(--p, 0) * 100%); background: var(--h-fg); opacity: 0; transition: opacity .3s ease; }
.hero-dark .svc.on::after { opacity: 1; }
.hero-dark .svc .n { font: 400 11px/1 "Martian Mono", monospace; letter-spacing: 0.12em; color: var(--h-mute); }
.hero-dark .svc .t { font: 500 1rem/1.2 "Schibsted Grotesk", sans-serif; color: var(--h-mute); transition: color .4s ease; }
.hero-dark .svc .d { font-size: 0.875rem; color: var(--h-mute); }
.hero-dark .svc.on .t { color: var(--h-fg); }
.hero-dark .stage { position: relative; width: 100%; aspect-ratio: 1 / 0.85; min-width: 0; }
@media (min-width: 860px) { .hero-dark .stage { aspect-ratio: 1 / 1; max-height: 78vh; } }
.hero-dark .stage::before { content: ""; position: absolute; inset: 6%; background: radial-gradient(closest-side, var(--h-glow), transparent); pointer-events: none; }
.hero-dark .stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero-dark .corner { position: absolute; width: 16px; height: 16px; border: 0 solid var(--h-line); }
.hero-dark .corner.tl { top: 0; left: 0; border-top-width: 1px; border-left-width: 1px; }
.hero-dark .corner.tr { top: 0; right: 0; border-top-width: 1px; border-right-width: 1px; }
.hero-dark .corner.bl { bottom: 0; left: 0; border-bottom-width: 1px; border-left-width: 1px; }
.hero-dark .corner.br { bottom: 0; right: 0; border-bottom-width: 1px; border-right-width: 1px; }
.hero-dark .fig { position: absolute; left: 0; bottom: 0; padding: 14px 18px; font: 400 11px/1.4 "Martian Mono", monospace; letter-spacing: 0.14em; text-transform: uppercase; color: var(--h-mute); }

/* ---------- Contact section ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr; gap: clamp(32px, 5vw, 64px); }
@media (min-width: 1024px) { .contact-grid { grid-template-columns: 5fr 7fr; } }
.contact-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(24px, 3vw, 40px); }

/* ---------- Single page (case study) ---------- */
.case-hero { background: var(--bg-2); padding: clamp(48px, 7vw, 96px) 0; border-bottom: 1px solid var(--line); }
.case-hero h1 { font-size: clamp(2rem, 4vw, 3.2rem); margin: 16px 0; max-width: 18ch; }
.case-hero .row { display: flex; flex-wrap: wrap; gap: 24px; font: 400 12px/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.case-body { max-width: 760px; margin: 0 auto; padding: clamp(48px, 6vw, 80px) 0; font-size: 1.0625rem; line-height: 1.7; }
.case-body h2, .case-body h3 { font-family: var(--display); letter-spacing: -0.02em; margin: 1.4em 0 0.5em; }
.case-body p { margin: 0 0 1em; color: var(--ink); }
.case-body a { color: var(--accent); border-bottom: 1px solid currentColor; }
.case-body ul, .case-body ol { padding-left: 1.4em; }
.case-body code { font: 400 0.9em/1.4 var(--mono); background: var(--bg-2); padding: 2px 6px; border-radius: 4px; }

/* Legal/privacy pages — the body uses the same readability column as case
   studies, plus a tighter “T&Cs” type rhythm (section dividers between
   h2s feel like real policy text). */
.legal-body { max-width: 760px; }
.legal-body > h2 { margin-top: 2.2em; padding-top: 1.0em; border-top: 1px solid var(--line); font-size: clamp(1.15rem, 1.5vw, 1.35rem); color: var(--ink); }
.legal-body > h2:first-of-type { margin-top: 0; padding-top: 0; border-top: 0; }
.legal-body > h3 { font-size: 1rem; color: var(--ink); margin-top: 1.6em; }
.legal-body > p, .legal-body > ul, .legal-body > ol { font-size: 1.0625rem; line-height: 1.7; color: var(--ink); }
.legal-body > p:last-of-type { margin-bottom: 0; }

/* ---------- Archive (case studies list) ---------- */
.archive-grid { display: grid; grid-template-columns: 1fr; gap: 24px; }
@media (min-width: 768px) { .archive-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .archive-grid { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Misc ---------- */
.hr-dot { height: 1px; background-image: radial-gradient(circle, rgba(255, 255, 255, 0.45) 1.2px, transparent 1.5px); background-size: 8px 1px; background-repeat: repeat-x; }
.thumb-fallback { width: 100%; aspect-ratio: 16 / 10; background: linear-gradient(135deg, var(--bg-2) 0%, #ECEAE3 100%); }
.graphixcon-pagination { display: flex; gap: 8px; justify-content: center; margin: 32px 0; }
.graphixcon-pagination .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 36px; height: 36px; padding: 0 10px; border: 1px solid var(--line); border-radius: 9999px; font: 500 13px/1 var(--body); }
.graphixcon-pagination .page-numbers.current { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ---------- WordPress core block fallbacks ---------- */
.alignwide { max-width: var(--container); margin-left: auto; margin-right: auto; }
.alignfull { max-width: 100%; width: 100%; }
.wp-block-image img { border-radius: 8px; }

/* ===========================================================================
   Front-page section styles
   ---------------------------------------------------------------------------
   These mirror the Tailwind utilities used in the static
   E:/projects/graphixcon/website/index.html so the theme renders the same
   layouts without depending on a Tailwind CDN.
   ========================================================================= */

/* 12-column grid system (used by every section) */
.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-cols-12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }
.gap-2 { gap: 0.5rem; } .gap-3 { gap: 0.75rem; } .gap-5 { gap: 1.25rem; }
.gap-6 { gap: 1.5rem; } .gap-8 { gap: 2rem; } .gap-10 { gap: 2.5rem; } .gap-16 { gap: 4rem; }

/* Base flex utilities — defined HERE (before any @media) so the
   `.md:flex-row` responsive variant defined below wins on cascade order
   (same specificity; later in the file = higher priority). */
.flex { display: flex; }
.flex-col { flex-direction: column; }

/* 640px+ (small) — same as Tailwind sm: */
@media (min-width: 640px) {
    .sm\:flex { display: flex; }
    .sm\:flex-col { flex-direction: column; }
    .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sm\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 768px) {
    .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .md\:grid-cols-12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }
    .md\:gap-6 { gap: 1.5rem; }
    .md\:gap-8 { gap: 2rem; } .md\:gap-10 { gap: 2.5rem; } .md\:gap-16 { gap: 4rem; }
    .md\:col-span-2 { grid-column: span 2 / span 2; }
    .md\:col-span-3 { grid-column: span 3 / span 3; }
    .md\:col-span-4 { grid-column: span 4 / span 4; }
    .md\:col-span-5 { grid-column: span 5 / span 5; }
    .md\:col-span-8 { grid-column: span 8 / span 8; }
    .md\:border-t-0 { border-top-width: 0; }
    .md\:border-l { border-left-width: 1px; border-left-style: solid; }
    .md\:pt-0 { padding-top: 0; }
    .md\:pl-10 { padding-left: 2.5rem; }
    .md\:p-8 { padding: 2rem; }
    .md\:block { display: block; }
    .md\:flex { display: flex; }
    .md\:flex-row { flex-direction: row; }
    .md\:items-center { align-items: center; }
    .md\:hidden { display: none; }
    .md\:text-\[19px\] { font-size: 19px; }
    .md\:mt-8 { margin-top: 2rem; }
    .md\:mt-10 { margin-top: 2.5rem; }
    .md\:mb-16 { margin-bottom: 4rem; }
    .md\:py-28 { padding-top: 7rem; padding-bottom: 7rem; }
    .md\:py-24 { padding-top: 6rem; padding-bottom: 6rem; }
    .md\:py-20 { padding-top: 5rem; padding-bottom: 5rem; }
    .md\:py-16 { padding-top: 4rem; padding-bottom: 4rem; }
}
@media (min-width: 1024px) {
    .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.order-1 { order: 1; }
.order-2 { order: 2; }
/* .flex / .flex-col / etc. are defined BEFORE the @media blocks so the
   responsive variants (defined inside @media) win on cascade order. */
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-end { align-items: flex-end; }
.justify-between { justify-content: space-between; }
.gap-8 { gap: 2rem; }
.mt-2 { margin-top: 0.5rem; } .mt-3 { margin-top: 0.75rem; } .mt-4 { margin-top: 1rem; }
.mt-5 { margin-top: 1.25rem; } .mt-6 { margin-top: 1.5rem; } .mt-8 { margin-top: 2rem; }
.mt-10 { margin-top: 2.5rem; }
.mb-12 { margin-bottom: 3rem; } .mb-16 { margin-bottom: 4rem; }
.py-20 { padding-top: 5rem; padding-bottom: 5rem; }
.py-24 { padding-top: 6rem; padding-bottom: 6rem; }
.py-16 { padding-top: 4rem; padding-bottom: 4rem; }
.py-28 { padding-top: 7rem; padding-bottom: 7rem; }
.py-36 { padding-top: 9rem; padding-bottom: 9rem; }
.p-6 { padding: 1.5rem; } .p-7 { padding: 1.75rem; } .p-8 { padding: 2rem; }
.px-2\.5 { padding-left: 0.625rem; padding-right: 0.625rem; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.rounded-2xl { border-radius: 1rem; }
.rounded-full { border-radius: 9999px; }
.border { border-width: 1px; border-style: solid; }
.border-t { border-top-width: 1px; border-top-style: solid; }
.border-l { border-left-width: 1px; border-left-style: solid; }
.border-line { border-color: var(--line); }
.bg-bg { background: var(--bg); }
.bg-bg-2 { background: var(--bg-2); }
.text-ink { color: var(--ink); }
.text-ink\/85 { color: rgba(26, 27, 26, 0.85); }
.text-ink\/90 { color: rgba(26, 27, 26, 0.9); }
.text-muted { color: var(--muted); }
.text-accent { color: var(--accent); }
.text-\[11px\] { font-size: 11px; }
.text-\[12px\] { font-size: 12px; }
.text-\[13px\] { font-size: 13px; }
.text-\[14px\] { font-size: 14px; }
.text-\[15px\] { font-size: 15px; }
.text-\[18px\] { font-size: 18px; }
.text-\[22px\] { font-size: 22px; }
.text-\[24px\] { font-size: 24px; }
.text-\[28px\] { font-size: 28px; }
.text-\[34px\] { font-size: 34px; }
.text-\[36px\] { font-size: 36px; }
.text-\[40px\] { font-size: 40px; }
.text-\[44px\] { font-size: 44px; }
.text-\[56px\] { font-size: 56px; }
.text-\[72px\] { font-size: 72px; }
.text-\[80px\] { font-size: 80px; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-mono { font-family: var(--mono); }
.font-display { font-family: var(--display); }
.tracking-tight-2 { letter-spacing: -0.02em; }
.tracking-tight-3 { letter-spacing: -0.03em; }
.tracking-wide-2 { letter-spacing: 0.08em; }
.leading-relaxed { line-height: 1.6; }
.leading-\[1\.04\] { line-height: 1.04; }
.leading-\[1\.05\] { line-height: 1.05; }
.leading-\[1\.1\] { line-height: 1.1; }
.space-y-2\.5 > * + * { margin-top: 0.625rem; }
.space-y-5 > * + * { margin-top: 1.25rem; }
.max-w-\[16ch\] { max-width: 16ch; }
.max-w-\[22ch\] { max-width: 22ch; }
.max-w-\[24ch\] { max-width: 24ch; }
.max-w-\[36ch\] { max-width: 36ch; }
.max-w-\[38ch\] { max-width: 38ch; }
.max-w-\[46ch\] { max-width: 46ch; }
.max-w-\[52ch\] { max-width: 52ch; }
.uppercase { text-transform: uppercase; }
.hidden { display: none; }
@media (min-width: 768px) {
    .md\:block { display: block; }
    .md\:flex { display: flex; }
    .md\:hidden { display: none; }
}
.inline-flex { display: inline-flex; }
.overflow-hidden { overflow: hidden; }

/* Background tones */
.bg-dark { background: var(--dark); }

/* Type helpers (used in front-page.php) */
.muted { color: var(--muted); }
.body-text { font-size: 0.95rem; }
.mono-label { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.mono-label-sm { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.heading-xl { font-size: clamp(1.7rem, 3.4vw, 2.6rem); line-height: 1.05; letter-spacing: -0.025em; font-weight: 600; }
.heading-stack { font-size: clamp(1.5rem, 2.8vw, 2.1rem); line-height: 1.1; letter-spacing: -0.02em; font-weight: 600; }
.pillar-title { font-size: 1.25rem; font-weight: 600; letter-spacing: -0.02em; }
.service-title { font-size: clamp(1.25rem, 1.6vw, 1.5rem); font-weight: 600; letter-spacing: -0.02em; }
.service-bullets li { display: flex; gap: 0.75rem; }
.domain-title { font-size: 1.125rem; font-weight: 600; letter-spacing: -0.02em; }
.domain-lede { font-size: 0.875rem; }
.case-card-title { font-size: clamp(1.25rem, 1.7vw, 1.6rem); letter-spacing: -0.02em; line-height: 1.15; }
.read-more { color: var(--accent); }
.read-more:hover { text-decoration: underline; }
.stack-chip {
    display: inline-block; font: 400 12px/1 var(--mono);
    color: rgba(26, 27, 26, 0.85);
    padding: 0.3rem 0.625rem; border: 1px solid var(--line); border-radius: 9999px;
    list-style: none;
    margin: 0;
}
/* The chip groups in /05 — stack are wrapped in a flex <ul>. Reset the
   default browser list indentation so the chips align flush with the kicker
   label above them. */
:where(.stack-chips) { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.process-num { font-size: 1.75rem; color: rgba(26, 27, 26, 0.9); }
.process-title { font-size: 1.0625rem; font-weight: 600; letter-spacing: -0.015em; }
.process-lede { font-size: 0.875rem; }
.process-list { list-style: none; padding: 0; margin: 0; }
.contact-h1 { font-size: clamp(2.5rem, 5.4vw, 5rem); line-height: 1.04; letter-spacing: -0.03em; font-weight: 600; max-width: 16ch; }
.contact-aside { font-size: 0.95rem; }

/* Email link in the contact details — keeps the same body rhythm as the
   other dd values, but tinted with the brand accent so it reads as
   clickable without looking like a CTA button. */
.contact-email { color: var(--accent); text-decoration: none; border-bottom: 1px dotted currentColor; padding-bottom: 1px; transition: color 150ms ease; }
.contact-email:hover { color: #155fb0; border-bottom-style: solid; }

/* ---------- Reset list / description-list defaults so content
                inside the contact details section lines up flush. ---------- */
dl, dt, dd { margin: 0; padding: 0; }
dt { font-weight: inherit; }
dd { margin-left: 0; }

/* Footer / dark bg link colours (when not using .footer-grid in main.css) */
.site-footer .muted, .site-footer [class*="text-white\/"] { color: rgba(255, 255, 255, 0.55); }
.site-footer .text-ink { color: var(--ink); }

/* ===========================================================================
   Case Study (single-case_study.php)
   ---------------------------------------------------------------------------
   Renders the static at E:/projects/graphixcon/website/case-study.html.
   Classes ending in `-static` carry the EXACT pixel values from that
   file. (The rest of the typography uses the design tokens — body, mono,
   display, muted, ink, bg-2 — which already match.)
   ========================================================================= */

.cs-title-static {
    font-size: 40px;
    line-height: 1.04;
    letter-spacing: -0.035em;
    font-weight: 500;
    max-width: 18ch;
}
@media (min-width: 640px)  { .cs-title-static { font-size: 52px; } }
@media (min-width: 768px)  { .cs-title-static { font-size: 68px; } }
@media (min-width: 1024px) { .cs-title-static { font-size: 80px; } }

.cs-lede-static {
    font-size: 17px;
    color: var(--muted);
    max-width: 62ch;
    line-height: 1.6;
}
@media (min-width: 768px) { .cs-lede-static { font-size: 19px; } }

/* The cs-* classes below are kept (with a small fallback rule) for any
   third-party code that still references the older generic names. They
   map 1:1 to the `-static` versions above. */
.cs-title   { font-size: clamp(2.25rem, 4.8vw, 5rem); line-height: 1.04; letter-spacing: -0.035em; font-weight: 500; max-width: 18ch; }
.cs-lede    { font-size: 1.0625rem; color: var(--muted); max-width: 62ch; line-height: 1.6; }
.cs-body-h2 { font-size: clamp(1.25rem, 1.6vw, 1.6rem); font-weight: 500; letter-spacing: -0.025em; line-height: 1.15; }
.cs-body-h2-static {
    font-size: 22px;
    font-weight: 500;
    letter-spacing: -0.025em;
    line-height: 1.25;
}
@media (min-width: 768px) { .cs-body-h2-static { font-size: 26px; } }

.cs-meta-dl { /* uses the static's exact gap values */ }
.cs-meta-label {
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}
.cs-meta-value { font-size: 15px; color: var(--ink); line-height: 1.5; }

.cs-cover { aspect-ratio: 16 / 7; display: flex; align-items: center; justify-content: center; }
@media (min-width: 768px) { .cs-cover { aspect-ratio: 21 / 9; } }
.cs-cover-img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 1rem; }

.cs-stat-num-static { font-size: 40px; line-height: 1.5; }
@media (min-width: 768px) { .cs-stat-num-static { font-size: 48px; } }
.cs-stat-num { font-size: clamp(2.5rem, 4.5vw, 3rem); letter-spacing: -0.025em; color: var(--ink); line-height: 1.5; }
.cs-stat-label { color: var(--muted); font-size: 13px; line-height: 1.5; }

.cs-next-title-static {
    font-size: 28px;
    line-height: 1.1;
    letter-spacing: -0.025em;
    font-weight: 500;
    max-width: 20ch;
}
@media (min-width: 768px) { .cs-next-title-static { font-size: 36px; } }
.cs-next-title { font-size: clamp(1.5rem, 2.6vw, 2.25rem); line-height: 1.1; letter-spacing: -0.025em; font-weight: 500; max-width: 20ch; }
.cs-next-lede { color: var(--muted); max-width: 44ch; font-size: 15px; line-height: 1.5; }

.cs-cta-title-static {
    font-size: 36px;
    line-height: 1.05;
    letter-spacing: -0.035em;
    font-weight: 500;
    max-width: 18ch;
}
@media (min-width: 768px) { .cs-cta-title-static { font-size: 52px; } }
.cs-cta-title { font-size: clamp(2rem, 3.6vw, 3.25rem); line-height: 1.05; letter-spacing: -0.035em; font-weight: 500; max-width: 18ch; }

/* Static's CTA button: white pill, dark text, hover drops to white/90 */
.cs-cta-btn {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 12px 20px;
    border-radius: 9999px;
    background: #fff;
    color: var(--ink);
    font-weight: 500;
    line-height: 1.5;
    text-decoration: none;
    transition: background .2s ease;
}
.cs-cta-btn:hover { background: rgba(255, 255, 255, 0.9); color: var(--ink); }

/* Dot-grid texture used by the static's CTA + footer */
.dot-grid {
    background-image: radial-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1.4px);
    background-size: 22px 22px;
}

/* prose-graphixcon — exactly the static's body typography */
.prose-graphixcon p { color: var(--ink); line-height: 1.75; }
.prose-graphixcon p + p { margin-top: 1rem; }

/* ===========================================================================
   Tailwind utility aliases (template uses arbitrary-value classes that
   Tailwind would normally compile at build time — we re-implement them
   here so the same class names work without a Tailwind build step)
   ========================================================================= */

/* Margin reset — Tailwind preflight normalizes headings & paragraphs.
   Without it, user-agent defaults leave a 0.67em block margin on h1/h2/h3,
   a 1em margin on p, and a 40px margin-left on ul — all of which break
   the case-study template's spacing. The static uses Tailwind's preflight
   to zero these out, so we do the same here. */
h1, h2, h3, h4, h5, h6, p, ul, ol, dl, dt, dd, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; font-size: inherit; cursor: pointer; background: none; border: 0; padding: 0; }
img, svg { display: block; max-width: 100%; }

/* Colors */
.text-ink          { color: var(--ink); }
.text-muted        { color: var(--muted); }
.text-accent       { color: var(--accent); }
.text-dark         { color: var(--dark); }
.text-white        { color: #fff; }
.text-bg-2         { color: var(--bg-2); }
.text-line         { color: var(--line); }
.text-white\/45    { color: rgba(255, 255, 255, 0.45); }
.text-white\/50    { color: rgba(255, 255, 255, 0.5); }
.text-white\/85    { color: rgba(255, 255, 255, 0.85); }
.text-ink\/85      { color: rgba(26, 27, 26, 0.85); }
.hover\:text-ink:hover     { color: var(--ink); }
.hover\:text-white:hover   { color: #fff; }

/* Backgrounds */
.bg-bg-2           { background: var(--bg-2); }
.bg-bg             { background: var(--bg); }
.bg-dark           { background: var(--dark); }
.bg-white          { background: #fff; }
.hover\:bg-white\/90:hover { background: rgba(255, 255, 255, 0.9); }

/* Borders */
.border            { border: 1px solid var(--line); }
.border-line       { border-color: var(--line); }
.border-t          { border-top: 1px solid var(--line); }
.border-b          { border-bottom: 1px solid var(--line); }
.border-white\/10  { border-color: rgba(255, 255, 255, 0.10); }

/* Rounded */
.rounded           { border-radius: 4px; }
.rounded-2xl       { border-radius: 1rem; }
.rounded-full      { border-radius: 9999px; }

/* Display */
.block             { display: block; }
.flex              { display: flex; }
.inline-flex       { display: inline-flex; }
.grid              { display: grid; }
.hidden            { display: none; }
.text-center       { text-align: center; }
.md\:text-right    { text-align: right; }
.md\:justify-self-end { justify-self: end; }

/* Grid template — used by the static's 12-col case-study layout */
.gap-2             { gap: 0.5rem; }
.gap-6             { gap: 1.5rem; }
.gap-8             { gap: 2rem; }
.gap-10            { gap: 2.5rem; }
.md\:gap-16        { gap: 4rem; }
.grid-cols-2       { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sm\:grid-cols-2   { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.md\:grid-cols-4   { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.md\:grid-cols-2   { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.md\:grid-cols-12  { grid-template-columns: repeat(12, minmax(0, 1fr)); }
@media (min-width: 768px) {
    .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .md\:grid-cols-12{ grid-template-columns: repeat(12, minmax(0, 1fr)); }
    .md\:col-span-2  { grid-column: span 2 / span 2; }
    .md\:col-span-4  { grid-column: span 4 / span 4; }
    .md\:col-span-8  { grid-column: span 8 / span 8; }
    .md\:gap-16      { gap: 4rem; }
    .md\:text-right  { text-align: right; }
    .md\:justify-self-end { justify-self: end; }
    .md\:pt-24       { padding-top: 6rem !important; }
    .md\:pt-12       { padding-top: 3rem !important; }
    .md\:pt-16       { padding-top: 4rem !important; }
    .md\:pb-12       { padding-bottom: 3rem !important; }
    .md\:pb-14       { padding-bottom: 3.5rem !important; }
    .md\:pb-16       { padding-bottom: 4rem !important; }
    .md\:pb-20       { padding-bottom: 5rem !important; }
    .md\:pb-24       { padding-bottom: 6rem !important; }
    .md\:pb-28       { padding-bottom: 7rem !important; }
    .md\:py-24       { padding-top: 6rem; padding-bottom: 6rem; }
    .md\:py-28       { padding-top: 7rem; padding-bottom: 7rem; }
    .md\:items-end   { align-items: end; }
}
.gap-y-6           { row-gap: 1.5rem; }
.gap-y-8           { row-gap: 2rem; }
.gap-x-6           { column-gap: 1.5rem; }
.gap-x-8           { column-gap: 2rem; }

/* Flex children */
.items-start       { align-items: flex-start; }
.items-center      { align-items: center; }
.items-end         { align-items: end; }
.justify-between   { justify-content: space-between; }
.justify-center    { justify-content: center; }
.flex-col          { flex-direction: column; }
.flex-wrap         { flex-wrap: wrap; }
@media (min-width: 768px) {
    .md\:flex-row  { flex-direction: row; }
    .md\:items-end { align-items: end; }
    .md\:items-center { align-items: center; }
}

/* Spacing — used by the case study template */
.px-6              { padding-left: 1.5rem; padding-right: 1.5rem; }
.px-8              { padding-left: 2rem; padding-right: 2rem; }
.py-3              { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-12             { padding-top: 3rem; padding-bottom: 3rem; }
.py-16             { padding-top: 4rem; padding-bottom: 4rem; }
.py-20             { padding-top: 5rem; padding-bottom: 5rem; }
.pt-6              { padding-top: 1.5rem; }
.pt-8              { padding-top: 2rem; }
.pt-12             { padding-top: 3rem; }
.pt-16             { padding-top: 4rem; }
.pb-10             { padding-bottom: 2.5rem; }
.pb-12             { padding-bottom: 3rem; }
.pb-14             { padding-bottom: 3.5rem; }
.pb-16             { padding-bottom: 4rem; }
.pb-20             { padding-bottom: 5rem; }
.mt-3              { margin-top: 0.75rem; }
.mt-4              { margin-top: 1rem; }
.mt-5              { margin-top: 1.25rem; }
.mt-6              { margin-top: 1.5rem; }
.mt-10             { margin-top: 2.5rem; }

/* Font families */
.font-mono         { font-family: var(--mono); }
.font-display      { font-family: var(--display); }
.font-body         { font-family: var(--body); }
.font-medium       { font-weight: 500; }
.font-semibold     { font-weight: 600; }

/* Font sizes — arbitrary values used in templates */
.text-\[11px\]     { font-size: 11px; }
.text-\[12px\]     { font-size: 12px; }
.text-\[13px\]     { font-size: 13px; }
.text-\[14px\]     { font-size: 14px; }
.text-\[15px\]     { font-size: 15px; }
.text-\[16px\]     { font-size: 16px; }
.text-\[17px\]     { font-size: 17px; }
.text-\[19px\]     { font-size: 19px; }

/* Uppercase */
.uppercase         { text-transform: uppercase; }

/* Letter-spacing utilities */
.tracking-tight-2  { letter-spacing: -0.025em; }
.tracking-tight-3  { letter-spacing: -0.035em; }
.tracking-wide     { letter-spacing: 0.04em; }
.tracking-wide-2   { letter-spacing: 0.08em; }

/* Max-widths */
.max-w-\[18ch\]    { max-width: 18ch; }
.max-w-\[20ch\]    { max-width: 20ch; }
.max-w-\[44ch\]    { max-width: 44ch; }
.max-w-\[62ch\]    { max-width: 62ch; }
.max-w-\[64ch\]    { max-width: 64ch; }

/* Utility for monospace stat numerals (matches static's font-mono nums) */
.nums              { font-feature-settings: "tnum" 1; font-variant-numeric: tabular-nums; }

/* Line-height utilities (Tailwind scale) */
.leading-none       { line-height: 1; }
.leading-tight      { line-height: 1.25; }
.leading-snug       { line-height: 1.375; }
.leading-normal     { line-height: 1.5; }
.leading-relaxed    { line-height: 1.625; }
.leading-loose      { line-height: 2; }

/* ===========================================================================
   Responsive arbitrary-value font sizes (Tailwind sm: / md: / lg: variants
   that the case-study template uses)
   ========================================================================= */
@media (min-width: 640px) {
    .sm\:text-\[52px\] { font-size: 52px; }
}
@media (min-width: 768px) {
    .md\:text-\[19px\] { font-size: 19px; }
    .md\:text-\[26px\] { font-size: 26px; }
    .md\:text-\[36px\] { font-size: 36px; }
    .md\:text-\[48px\] { font-size: 48px; }
    .md\:text-\[52px\] { font-size: 52px; }
    .md\:text-\[68px\] { font-size: 68px; }
}
@media (min-width: 1024px) {
    .lg\:text-\[80px\] { font-size: 80px; }
}

/* ===========================================================================
   Lead popup (gx-lead-popup)
   ---------------------------------------------------------------------------
   Triggered by any element with data-gx-popup="start_project" or
   "audit_request". Popup markup is rendered at wp_footer().
   ========================================================================= */
.gx-lp[hidden] { display: none; }
.gx-lp {
    position: fixed; inset: 0; z-index: 100;
    display: flex; align-items: center; justify-content: center;
    padding: 24px;
}
.gx-lp__backdrop {
    position: absolute; inset: 0;
    background: rgba(14, 15, 14, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.gx-lp__dialog {
    position: relative;
    background: #FAFAF8;
    color: #1A1B1A;
    border-radius: 1rem;
    width: 100%;
    max-width: 540px;
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    padding: 36px 32px 28px;
    box-shadow: 0 30px 80px -20px rgba(14, 15, 14, 0.45), 0 8px 24px -10px rgba(14, 15, 14, 0.30);
    font-family: 'Inter', system-ui, sans-serif;
}
.gx-lp__close {
    position: absolute; top: 14px; right: 14px;
    width: 36px; height: 36px;
    display: inline-flex; align-items: center; justify-content: center;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 9999px;
    color: var(--muted);
    cursor: pointer;
    transition: background .15s ease, color .15s ease;
}
.gx-lp__close:hover { background: var(--bg-2); color: var(--ink); }
.gx-lp__eyebrow {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase;
    color: var(--muted);
    margin: 0 0 16px;
}
.gx-lp__title {
    font-family: 'Poppins', system-ui, sans-serif;
    font-size: 28px; line-height: 1.15; letter-spacing: -0.025em; font-weight: 600;
    margin: 0 0 8px;
    color: var(--ink);
}
.gx-lp__lede {
    font-size: 15px; color: var(--muted);
    margin: 0 0 24px;
    line-height: 1.5;
}
.gx-lp__form { display: flex; flex-direction: column; gap: 16px; }
.gx-lp__row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.gx-lp__row[style*="display: none"] { display: none !important; }
.gx-lp__field { display: flex; flex-direction: column; gap: 6px; }
.gx-lp__label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px; letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
}
.gx-lp__field input,
.gx-lp__field select,
.gx-lp__field textarea {
    font-family: inherit; font-size: 15px;
    color: var(--ink);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px 12px;
    width: 100%;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.gx-lp__field input:focus,
.gx-lp__field select:focus,
.gx-lp__field textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(28, 133, 232, 0.18);
}
.gx-lp__field textarea { resize: vertical; min-height: 80px; }
.gx-lp__honey { position: absolute; left: -9999px; }
.gx-lp__error {
    margin: 0; padding: 10px 12px;
    background: #FBE9E7; color: #7A1F1F;
    border: 1px solid #E8B4AD;
    border-radius: 8px; font-size: 14px;
}
.gx-lp__success {
    margin: 0; padding: 10px 12px;
    background: #E8F5EE; color: #1F5A3A;
    border: 1px solid #B6DBC4;
    border-radius: 8px; font-size: 14px;
}
.gx-lp__actions {
    display: flex; justify-content: flex-end; gap: 12px; align-items: center;
    margin-top: 8px;
}
.gx-lp__cancel {
    font: inherit; font-size: 14px;
    color: var(--muted);
    background: transparent; border: none;
    padding: 10px 14px;
    cursor: pointer;
    border-radius: 9999px;
}
.gx-lp__cancel:hover { color: var(--ink); background: var(--bg-2); }
.gx-lp__submit {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 12px 22px;
    border-radius: 9999px;
    background: var(--accent);
    color: #fff;
    font: 500 14px/1 inherit;
    border: 1px solid var(--accent);
    cursor: pointer;
    transition: background .15s ease, box-shadow .15s ease;
    box-shadow: 0 4px 14px -4px rgba(28, 133, 232, 0.55);
}
.gx-lp__submit:hover:not(:disabled) { background: #1571CE; border-color: #1571CE; }
.gx-lp__submit:disabled { opacity: 0.65; cursor: progress; }
@media (max-width: 540px) {
    .gx-lp { padding: 12px; }
    .gx-lp__dialog { padding: 28px 20px 22px; }
    .gx-lp__row { grid-template-columns: 1fr; }
    .gx-lp__title { font-size: 24px; }
}
/* =========================================================================
   MOBILE-FIRST OVERRIDES
   The theme uses Tailwind utilities (md:grid-cols-12, md:col-span-* etc.)
   that are also defined at file level (so they apply at all viewports,
   not just min-width: 768px). On <768px that collapses every 12-column
   parent to 12 zero-width columns and forces text into a 0-50px column.

   The block below resets all responsive grid + col-span utilities to
   single-column / full-width on mobile, and tightens typography, padding,
   and the hero stage for phone-sized viewports.
   ========================================================================= */
@media (max-width: 767px) {

    /* --- Container / section padding ----------------------------------- */
    .container-x { padding-left: 1.25rem; padding-right: 1.25rem; }
    .section { padding-top: 4rem; padding-bottom: 4rem; }

    /* --- Headings ------------------------------------------------------ */
    .heading-xl  { font-size: clamp(2rem, 8vw, 2.6rem); line-height: 1.05; letter-spacing: -0.03em; max-width: 100%; }
    h1, .font-display { font-size: clamp(2.1rem, 9vw, 3rem); }
    h2, .font-display { font-size: clamp(1.5rem, 6vw, 1.9rem); }
    h3 { font-size: 1rem; }

    /* --- Responsive grid / col-span resets ----------------------------- */
    /* Force all 12-column parents back to 1 column on mobile. The Tailwind
       utility duplicates above defined md:grid-cols-12 without a media
       wrapper, so on phones we override it back. */
    .grid,
    .md\:grid-cols-2, .md\:grid-cols-3, .md\:grid-cols-4, .md\:grid-cols-12,
    .lg\:grid-cols-3,
    .sm\:grid-cols-2, .sm\:grid-cols-3 {
        grid-template-columns: 1fr !important;
    }

    /* All col-spans become full-width on mobile. */
    .md\:col-span-2, .md\:col-span-3, .md\:col-span-4,
    .md\:col-span-5, .md\:col-span-6, .md\:col-span-7,
    .md\:col-span-8, .md\:col-span-9, .md\:col-span-12,
    .lg\:col-span-5 {
        grid-column: 1 / -1 !important;
    }

    /* Reduce excessive gap between sections */
    .gap-10, .md\:gap-10 { gap: 1.25rem; }
    .md\:gap-16 { gap: 2rem; }
    .grid.md\:gap-16 { gap: 2rem !important; }

    /* --- Header ------------------------------------------------------- */
    .nav-grid { padding: 0.75rem 1.25rem; }
    .nav-grid .nav-mid { display: none; }   /* hide desktop nav */
    .status-pill { display: none; }          /* hide "accepting projects" pill */
    .nav-cta { padding: 0.45rem 0.85rem; font-size: 13px; }

    /* Section order on mobile — sections where the section heading lives
       in an `order-2` slot on desktop (so the cards read top-down first
       in DOM, then the heading visually on the right) need to be reversed
       on mobile so the heading comes before the cards. The .gx-heading-
       last-on-mobile class marks those sections and is applied per-section
       in front-page.php where appropriate.
       The /03 Domains section is the only one currently using this. */
    .gx-heading-last-on-mobile .order-1 { order: 2 !important; }
    .gx-heading-last-on-mobile .order-2 { order: 1 !important; }

    /* --- Hero --------------------------------------------------------- */
    .hero-dark .hero-grid { gap: 2rem; padding: 4rem 0 3rem; }
    .hero-dark h1 { font-size: clamp(2rem, 9vw, 2.6rem); line-height: 1.05; max-width: 100%; letter-spacing: -0.03em; }
    .hero-dark .eyebrow { font-size: 11px; }
    .hero-dark .lede { font-size: 0.95rem; max-width: 100%; }
    .hero-dark .cta a { padding: 0.6rem 1rem; font-size: 14px; }
    .hero-dark .stage {
        /* hero stage was 1:1 aspect with 78vh max on desktop — on mobile
           we keep it visible but much shorter */
        aspect-ratio: 5 / 4;
        max-height: 320px;
    }
    .hero-dark .svcs { gap: 0.5rem 1rem; }
    .hero-dark .svcs .svc { padding: 0.6rem 0; }

    /* --- Process & work grids ----------------------------------------- */
    .process-list { grid-template-columns: 1fr !important; gap: 0 !important; }
    .process-card { padding: 1.25rem 0; gap: 1rem; }
    .process-card .process-title { font-size: 1rem; }
    .archive-grid { grid-template-columns: 1fr !important; }
    .work-card { padding: 1.25rem; }

    /* --- Card sizing in sections -------------------------------------- */
    .service-card, .domain-card { padding: 1.25rem; }
    .service-title { font-size: 1.1rem; }
    .domain-title { font-size: 1rem; }

    /* --- Footer ------------------------------------------------------- */
    .footer-grid { grid-template-columns: 1fr !important; gap: 2.5rem; }
    .footer-grid > * { padding-left: 0; }
    .footer-row { flex-direction: column; align-items: flex-start !important; gap: 0.5rem; }

    /* --- Lead popup form ---------------------------------------------- */
    .gx-lp__dialog { padding: 1.25rem; max-width: 100%; }

    /* --- Form inputs (iOS won't auto-zoom if >=16px) ------------------ */
    input[type="text"], input[type="email"], input[type="url"],
    textarea, select { font-size: 16px; }

    /* --- Philosophy / stack / domains sub-grids ----------------------- */
    .philosophy-grid, .stack-grid { grid-template-columns: 1fr !important; }
    .stack-grid > * { padding: 1.25rem; }

    /* --- Contact section ---------------------------------------------- */
    .contact-h1 { font-size: clamp(2rem, 9vw, 2.8rem); }
    .contact-aside { padding-left: 0 !important; border-left: 0 !important; padding-top: 2rem; }

    /* --- Stats grids -------------------------------------------------- */
    .stats-grid { grid-template-columns: 1fr 1fr !important; gap: 1rem !important; }

    /* --- Section lede paragraphs -------------------------------------- */
    .section-lede { max-width: 100%; }
}

/* =========================================================================
   BELOW 380px — extra-tight phones
   ========================================================================= */
@media (max-width: 380px) {
    .container-x { padding-left: 1rem; padding-right: 1rem; }
    .nav-grid { padding: 0.6rem 1rem; }
    .hero-dark h1 { font-size: 1.85rem; }
    .hero-dark .eyebrow { font-size: 10px; }
}

/* =========================================================================
   Keep CTA pill labels on a single line at all viewport widths
   (otherwise "Let's talk" wraps to "Let's / talk" on narrow phones).
   ========================================================================= */
.nav-cta { white-space: nowrap; }
.btn-primary, .btn-ghost { white-space: nowrap; }
/* =========================================================================
   BLOG POSTS — single.php + archive grid (uses .work-card already).
   ========================================================================= */

/* Eyebrow that becomes the primary-category link above the title. */
.post-eyebrow-link { text-decoration: none; color: inherit; display: inline-block; }
.post-eyebrow-link:hover .eyebrow { color: var(--accent); }

/* Article title */
.post-title {
    font-family: var(--display);
    letter-spacing: -0.025em;
    line-height: 1.04;
    margin-top: 1.25rem;
    font-size: clamp(2.25rem, 5.5vw, 4.25rem);
    font-weight: 500;
    max-width: 22ch;
}

/* Lede paragraph (post subtitle/extract) */
.post-lede {
    margin-top: 1.5rem;
    font-size: clamp(1.05rem, 1.4vw, 1.25rem);
    color: var(--muted);
    max-width: 62ch;
    line-height: 1.55;
}

/* Meta strip — same grid + mono labels as case-study + legal pages */
.post-meta {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem 1.5rem;
    margin-top: 2.5rem;
    padding-top: 1.75rem;
    border-top: 1px solid var(--line);
}
@media (min-width: 640px) { .post-meta { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .post-meta { grid-template-columns: repeat(4, 1fr); } }
.post-meta dt {
    font-family: var(--mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--muted);
    margin-bottom: 0.4rem;
}
.post-meta dd {
    margin: 0;
    font-size: 15px;
    color: var(--ink);
}

/* Featured image — wide, restrained, matching the case-study hero band. */
.post-cover {
    margin: 0;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--line);
    background: var(--bg-2);
}
.post-cover img { display: block; width: 100%; height: auto; max-height: 520px; object-fit: cover; }
.post-cover figcaption {
    margin-top: 0.6rem;
    font-size: 12px;
    color: var(--muted);
    text-align: left;
    padding: 0 0.25rem;
}

/* Article body — uses the same readable column as case studies + legal pages. */
.post-body { max-width: 760px; margin: 0 auto; }
.post-body > h2 {
    margin-top: 2.4em; padding-top: 1em; border-top: 1px solid var(--line);
    font-family: var(--display); letter-spacing: -0.02em; line-height: 1.15;
    font-size: clamp(1.4rem, 2vw, 1.75rem);
}
.post-body > h2:first-of-type { margin-top: 0; padding-top: 0; border-top: 0; }
.post-body > h3 { font-family: var(--display); margin-top: 1.6em; font-size: 1.2rem; }
.post-body > p  { margin: 0 0 1em; line-height: 1.75; font-size: 1.0625rem; color: var(--ink); }
.post-body a { color: var(--accent); border-bottom: 1px solid currentColor; }
.post-body blockquote {
    margin: 1.5em 0; padding: 0.5em 0 0.5em 1.2em;
    border-left: 3px solid var(--accent);
    color: var(--ink); font-size: 1.15rem; line-height: 1.5;
    font-style: italic;
}
.post-body pre, .post-body code {
    font-family: var(--mono); font-size: 0.9rem;
    background: var(--bg-2);
    padding: 2px 6px;
    border-radius: 4px;
}
.post-body pre { padding: 1rem 1.2rem; overflow-x: auto; line-height: 1.55; }
.post-body pre code { background: transparent; padding: 0; }
.post-body img { max-width: 100%; height: auto; border-radius: var(--radius); display: block; margin: 1.5em auto; border: 1px solid var(--line); }
.post-body ul, .post-body ol { padding-left: 1.4em; line-height: 1.75; }

/* Tag chips after the body */
.post-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; padding-top: 1.5rem; border-top: 1px solid var(--line); margin-top: 2.5rem; }
.post-tags-label { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.14em; color: var(--muted); margin-right: 0.5rem; }
.post-tag-chip {
    display: inline-flex; align-items: center;
    padding: 0.4rem 0.8rem; border: 1px solid var(--line); border-radius: 9999px;
    font-size: 12px; color: var(--ink); text-decoration: none;
    transition: background 150ms ease, border-color 150ms ease;
}
.post-tag-chip:hover { background: var(--bg-2); border-color: #C9CAC5; }

/* Author bio block */
.post-author {
    margin-top: 2.5rem;
    padding: 1.5rem 1.75rem;
    background: var(--bg-2);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}
.post-author-name { font-family: var(--display); font-weight: 600; font-size: 1.05rem; }
.post-author-bio  { color: var(--muted); margin: 0.4rem 0 0; line-height: 1.6; font-size: 0.95rem; }

/* Prev / next post navigation */
.post-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--line);
}
.post-nav-link {
    display: flex; flex-direction: column; gap: 0.4rem;
    padding: 1rem 1.25rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    text-decoration: none;
    transition: background 150ms ease, border-color 150ms ease, transform 150ms ease;
}
.post-nav-link:hover { background: var(--bg-2); border-color: #C9CAC5; transform: translateY(-1px); }
.post-nav-disabled { /* leaves gap for prev/next asymmetry */ visibility: hidden; }
.post-nav-direction { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.14em; color: var(--muted); }
.post-nav-title { font-family: var(--display); font-size: 1rem; color: var(--ink); font-weight: 500; line-height: 1.3; }
.post-nav-prev { text-align: left; }
.post-nav-next { text-align: right; }

/* "Keep reading" recent grid */
.post-recent-h2 {
    font-family: var(--display);
    font-size: clamp(1.5rem, 3vw, 1.85rem);
    margin: 0.5rem 0 1.5rem;
    letter-spacing: -0.02em;
}
.post-recent-grid { grid-template-columns: 1fr; gap: 1.5rem; }
@media (min-width: 768px) { .post-recent-grid { grid-template-columns: repeat(3, 1fr); } }

/* ---------- MOBILE — single blog post ---------- */
@media (max-width: 767px) {
    .post-title { font-size: clamp(1.85rem, 8vw, 2.25rem); margin-top: 1rem; }
    .post-lede  { font-size: 1rem; margin-top: 1rem; }
    .post-meta   { margin-top: 1.5rem; padding-top: 1.25rem; }
    .post-meta dd { font-size: 14px; }
    .post-cover img { max-height: 320px; }
    .post-cover { border-radius: 10px; }
    .post-body > h2 { font-size: 1.25rem; }
    .post-body > h3 { font-size: 1.05rem; }
    .post-body > p  { font-size: 1rem; line-height: 1.7; }
    .post-nav   { grid-template-columns: 1fr; gap: 0.75rem; }
    .post-nav-next { text-align: left; }
    .post-recent-grid { grid-template-columns: 1fr !important; }
    .post-tags-label { width: 100%; margin-bottom: 0.25rem; }
}
/* =========================================================================
   ARCHIVE HEROES — index.php / category / tag / search.
   ========================================================================= */
.archive-h1 {
    font-family: var(--display);
    letter-spacing: -0.025em;
    line-height: 1.04;
    margin-top: 1.25rem;
    font-size: clamp(2.25rem, 5.5vw, 4.25rem);
    font-weight: 500;
    max-width: 22ch;
}
.archive-lede {
    margin-top: 1.5rem;
    font-size: clamp(1.05rem, 1.4vw, 1.2rem);
    color: var(--muted);
    max-width: 62ch;
    line-height: 1.55;
}
.archive-empty {
    padding: 2rem 0;
    border-top: 1px solid var(--line);
}
.archive-empty-h2 {
    font-family: var(--display);
    font-size: clamp(1.5rem, 3vw, 1.85rem);
    margin: 0.5rem 0 1rem;
    letter-spacing: -0.02em;
}
@media (max-width: 767px) {
    .archive-h1 { font-size: clamp(1.85rem, 8vw, 2.25rem); margin-top: 1rem; }
    .archive-lede { font-size: 1rem; margin-top: 1rem; }
}
/* =========================================================================
   SERVICES DROPDOWN (header nav)
   ========================================================================= */
.nav-services { position: relative; }

.nav-services__trigger {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: 0;
    padding: 0;
    cursor: pointer;
    font: inherit;
    font: 500 14px/1 var(--body);
    color: var(--ink);
    white-space: nowrap;
}
.nav-services__trigger:hover { color: var(--accent); }
.nav-services__chev { transition: transform .18s ease; }
.nav-services.is-open .nav-services__chev { transform: rotate(180deg); }

.nav-services__panel {
    position: absolute;
    top: calc(100% + 14px);
    left: 50%;
    transform: translateX(-50%) translateY(-4px);
    min-width: 460px;
    max-width: 520px;
    width: max-content;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 18px 44px -22px rgba(26, 27, 26, 0.24);
    opacity: 0;
    pointer-events: none;
    transition: opacity .16s ease, transform .16s ease;
    z-index: 60;
}
.nav-services.is-open .nav-services__panel {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}
/* Small arrow notch at the top of the panel */
.nav-services__panel::before {
    content: "";
    position: absolute;
    top: -5px; left: 50%;
    width: 9px; height: 9px;
    background: #fff;
    border-left: 1px solid var(--line);
    border-top: 1px solid var(--line);
    transform: translateX(-50%) rotate(45deg);
}

/* Override the .nav-mid ul { display:flex } rule that would otherwise lay
   these items out in a horizontal row. Selector needs to beat it on
   specificity, hence the doubled class. */
.nav-mid .nav-services__list {
    list-style: none;
    margin: 0;
    padding: 6px;
    display: block;
}
.nav-mid .nav-services__list li {
    display: block;
    margin: 0;
    padding: 0;
}
.nav-mid .nav-services__list li + li { border-top: 1px solid var(--line); }
.nav-services__list a {
    display: block;
    padding: 12px 14px;
    text-decoration: none;
    border-radius: 8px;
    transition: background .15s ease;
}
.nav-services__list a:hover,
.nav-services__list a:focus-visible { background: var(--bg-2); }
.nav-services__label {
    display: block;
    font-family: var(--display);
    font-weight: 600;
    font-size: 0.98rem;
    color: var(--ink);
    letter-spacing: -0.01em;
    white-space: nowrap;
}
.nav-services__desc {
    display: block;
    margin-top: 3px;
    font-size: 12.5px;
    line-height: 1.45;
    color: var(--muted);
    white-space: nowrap;
}

/* Mobile drawer: services sit as an indented group under a small heading */
.nav-mobile__heading {
    margin: 0 0 6px;
    font: 500 11px/1 var(--mono);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
}
.nav-mobile__services { list-style: none; margin: 0 0 14px; padding: 0 0 0 12px; }
.nav-mobile__services a { padding: 10px 0; font-size: 15px; }

/* ---------- MOBILE — dropdown is hidden; services live in the drawer ---------- */
@media (max-width: 767px) {
    .nav-services { display: none; }
}/* =========================================================================
   SERVICE PAGES — single-service.php
   ========================================================================= */

/* --- Hero --------------------------------------------------------- */
.svc-title {
    font-family: var(--display);
    letter-spacing: -0.03em;
    line-height: 1.03;
    margin-top: 1.25rem;
    font-size: clamp(2.4rem, 6vw, 4.75rem);
    font-weight: 500;
    max-width: 20ch;
}
.svc-lede {
    margin-top: 1.5rem;
    font-size: clamp(1.1rem, 1.6vw, 1.35rem);
    line-height: 1.5;
    color: var(--muted);
    max-width: 58ch;
}
.svc-meta {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem 1.5rem;
    margin-top: 2.5rem;
    padding-top: 1.75rem;
    border-top: 1px solid var(--line);
}
@media (min-width: 640px) { .svc-meta { grid-template-columns: repeat(3, 1fr); } }
.svc-meta dt {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--muted);
    margin-bottom: 0.4rem;
}
.svc-meta dd { margin: 0; font-size: 15px; color: var(--ink); }

/* --- Separator under the hero (before the "what we ship" section) --- */
.svc-covers-section {
    border-top: 1px solid var(--line);
}

/* --- "How we build it" — / 03 — domains style --------------------
   Cards on the LEFT (2-col grid), heading on the RIGHT. Uses the same
   Tailwind utility stack as the homepage domain section so the
   background, padding, type scale and card treatment match exactly. */
.svc-step__title { font-size: 1.125rem; font-weight: 600; letter-spacing: -0.02em; line-height: 1.25; }
.svc-step__desc  { font-size: 0.875rem; line-height: 1.6; }

/* --- "What this covers" — /01 — philosophy layout -------------------
   Eyebrow + title in the left column, capability items laid out as
   labelled columns on the right. Matches the homepage philosophy section
   exactly: mono "fig. 0.1" kicker, Poppins item title, muted description,
   no boxes, no borders. */
.svc-covers__title {
    font-family: var(--display);
    font-size: clamp(1.85rem, 3.6vw, 3rem);
    letter-spacing: -0.03em;
    line-height: 1.08;
    font-weight: 600;
    margin-top: 1.25rem;
    max-width: 16ch;
}
.svc-covers__intro {
    margin: 1.5rem 0 0;
    font-size: 1rem;
    line-height: 1.65;
    color: var(--muted);
    max-width: 38ch;
}
.svc-covers__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.75rem 2.5rem;
}
@media (min-width: 560px)  { .svc-covers__grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .svc-covers__grid { grid-template-columns: repeat(3, 1fr); } }

.svc-cap { min-width: 0; }
.svc-cap__kicker {
    font-family: var(--mono);
    font-size: 12px;
    letter-spacing: 0.02em;
    color: var(--muted);
    margin-bottom: 0.55rem;
}
.svc-cap__title {
    font-family: var(--display);
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: -0.015em;
    line-height: 1.25;
    color: var(--ink);
    margin: 0 0 0.4rem;
}
.svc-cap__desc {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--muted);
}

/* --- Body: four sections in alternating two-column rows -------------- */
.svc-rows { display: flex; flex-direction: column; }

/* Top padding on the first row so the title never collides with the
   sticky header when a section is scrolled to. */
.svc-rows { padding-top: clamp(1.5rem, 3vw, 2.5rem); }

.svc-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
    padding-top: clamp(2.5rem, 5vw, 4rem);
    margin-top: clamp(2.5rem, 5vw, 4rem);
    border-top: 1px solid var(--line);
}
.svc-row:first-child { padding-top: 0; margin-top: 0; border-top: 0; }

@media (min-width: 860px) {
    .svc-row {
        /* Titles get the narrower column, content the wider one — the
           original 5fr/7fr gave titles more room than they needed and
           squeezed the content into awkward wraps. */
        grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
        gap: clamp(2.5rem, 5vw, 5rem);
        align-items: start;
    }
    /* Alternating: title-left rows put the heading in col 1, title-last
       rows swap so the heading sits in col 2. */
    .svc-row--title-last .svc-row__head { order: 2; }
    .svc-row--title-last .svc-row__body { order: 1; }
    /* Optically centre each title against its own content block instead of
       pinning it to the top — stops the title looking stranded above an
       empty column when the content runs long. */
    .svc-row__head {
        position: sticky;
        top: calc(var(--header-h, 72px) + 2rem);
        align-self: start;
    }
}

.svc-row__head { min-width: 0; }
.svc-row__title {
    font-family: var(--display);
    font-size: clamp(1.4rem, 2.1vw, 1.75rem);
    letter-spacing: -0.025em;
    line-height: 1.2;
    font-weight: 600;
    margin: 0;
    /* Let long titles wrap rather than push the column wide. */
    max-width: 15ch;
    text-wrap: balance;
}
/* Small mono rule above the title — mirrors the eyebrow treatment on the
   homepage and fills the top of the title column so it doesn't read as an
   empty void when the content column runs long. */
.svc-row__head::before {
    content: "";
    display: block;
    width: 28px;
    height: 2px;
    background: var(--accent);
    margin-bottom: 1.1rem;
}
@media (max-width: 859px) {
    .svc-row__title { margin-bottom: 0.25rem; }
}
.svc-row__body { min-width: 0; }

.svc-empty { color: var(--muted); font-style: italic; }

/* --- Inner body typography (applies inside every row's body) -------- */
.svc-body { max-width: 100%; }
.svc-body > h2 {
    margin-top: 3rem;
    padding-top: 1.75rem;
    border-top: 1px solid var(--line);
    font-family: var(--display);
    font-size: clamp(1.5rem, 2.4vw, 2rem);
    letter-spacing: -0.025em;
    line-height: 1.15;
    font-weight: 600;
}
.svc-body > h2:first-of-type {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}
.svc-body > p {
    margin: 0 0 1.1em;
    font-size: 1.0625rem;
    line-height: 1.72;
    color: var(--ink);
}
.svc-body > ul,
.svc-body > ol { padding-left: 0; margin: 1.2em 0 1.4em; list-style: none; }
.svc-body > ul > li {
    position: relative;
    padding-left: 1.6rem;
    margin-bottom: 0.7rem;
    font-size: 1.02rem;
    line-height: 1.62;
    color: var(--ink);
}
.svc-body > ul > li::before {
    content: "\2192";
    position: absolute;
    left: 0;
    top: 0;
    color: var(--muted);
}
.svc-body > ol { counter-reset: svc-step; }
.svc-body > ol > li {
    position: relative;
    counter-increment: svc-step;
    padding-left: 2.4rem;
    margin-bottom: 1.25rem;
    font-size: 1.02rem;
    line-height: 1.62;
    color: var(--ink);
}
.svc-body > ol > li::before {
    content: counter(svc-step, decimal-leading-zero);
    position: absolute;
    left: 0;
    top: 0.1rem;
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.1em;
    color: var(--muted);
}
.svc-body > ol > li strong {
    display: block;
    margin-bottom: 0.15rem;
    font-family: var(--display);
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--ink);
}
.svc-body > h3 {
    font-family: var(--display);
    font-size: 1.15rem;
    font-weight: 600;
    margin: 2rem 0 0.6rem;
    color: var(--ink);
}
.svc-body > blockquote {
    margin: 1.6em 0;
    padding: 0.25em 0 0.25em 1.25rem;
    border-left: 3px solid var(--accent);
    font-size: 1.15rem;
    line-height: 1.55;
    font-style: italic;
    color: var(--ink);
}
.svc-body a { color: var(--accent); border-bottom: 1px solid currentColor; }

/* --- Delivery + Honest — two equal columns ------------------------- */
.svc-pair { align-items: start; }
.svc-pair__title {
    font-size: clamp(1.5rem, 2.6vw, 2rem);
    line-height: 1.12;
    letter-spacing: -0.025em;
    font-weight: 600;
    max-width: none;
    text-wrap: balance;
}
.svc-pair__body { margin-top: 1.5rem; }
.svc-pair__body > p:first-child { margin-top: 0; }
.svc-pair__body > ul:first-child,
.svc-pair__body > ol:first-child { margin-top: 0; }
.svc-pair__body > p { font-size: 1.02rem; line-height: 1.68; }
.svc-pair__body > ul > li,
.svc-pair__body > ol > li { font-size: 1rem; }

/* --- Domain chips -------------------------------------------------- */
.svc-domain-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
    margin-top: 1.25rem;
}
@media (min-width: 640px)  { .svc-domain-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .svc-domain-grid { grid-template-columns: repeat(4, 1fr); } }
.svc-domain {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    padding: 1.25rem 1.35rem;
}
.svc-domain-title {
    font-family: var(--display);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--ink);
}
.svc-domain-lede {
    margin: 0.4rem 0 0;
    font-size: 0.875rem;
    line-height: 1.55;
    color: var(--muted);
}

/* --- Related work --------------------------------------------------- */
.svc-related-h2 {
    font-family: var(--display);
    font-size: clamp(1.5rem, 2.6vw, 2.1rem);
    letter-spacing: -0.025em;
    font-weight: 500;
    margin: 0.6rem 0 1.75rem;
}
.svc-case-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 1.25rem;
    font: 500 13px/1 var(--body);
    color: var(--accent);
}
.case-card:hover .svc-case-cta { gap: 10px; }

/* --- CTA band ------------------------------------------------------- */
.svc-cta-band {
    background: var(--bg-2);
    border-top: 1px solid var(--line);
    padding: 0;
}
.svc-cta-band .container-x { padding-top: clamp(56px, 8vw, 112px); padding-bottom: clamp(56px, 8vw, 112px); }
.svc-cta-inner {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.75rem;
    align-items: center;
}
@media (min-width: 860px) {
    .svc-cta-inner { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 3rem; }
}
.svc-cta-title {
    font-family: var(--display);
    font-size: clamp(1.75rem, 3.4vw, 2.6rem);
    letter-spacing: -0.025em;
    line-height: 1.1;
    font-weight: 500;
    margin: 0;
}
.svc-cta-lede {
    margin: 0.9rem 0 0;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--muted);
    max-width: 48ch;
}
.svc-cta-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
@media (min-width: 860px) { .svc-cta-actions { justify-content: flex-end; } }

/* ---------- MOBILE ------------------------------------------------ */
@media (max-width: 767px) {
    .svc-title { font-size: clamp(1.9rem, 8.5vw, 2.4rem); margin-top: 1rem; }
    .svc-lede  { font-size: 1rem; margin-top: 1rem; }
    .svc-meta  { margin-top: 1.75rem; padding-top: 1.25rem; }
    .svc-meta dd { font-size: 14px; }
    .svc-body > h2 { font-size: 1.3rem; margin-top: 2.25rem; padding-top: 1.25rem; }
    .svc-body > p  { font-size: 1rem; line-height: 1.68; }
    .svc-body > ul > li,
    .svc-body > ol > li { font-size: 0.98rem; }
    .svc-domain { padding: 1.1rem; }
    .svc-related-h2 { font-size: 1.35rem; }
    .svc-cta-actions .btn-primary,
    .svc-cta-actions .btn-ghost { width: 100%; justify-content: center; }
}