/* =========================================================================
   Nathan Okoye — Design System
   Single stylesheet. No frameworks. Mobile-first. Pure CSS custom properties.
   ========================================================================= */

/* -------------------------------------------------------------------------
   1. TOKENS
   ------------------------------------------------------------------------- */
:root {
  /* Color — warm cream paper, ink near-black, single oxblood accent */
  --paper:        #F1ECE3;
  --paper-deep:   #E8E1D2;
  --paper-soft:   #F7F4ED;
  --ink:          #1A1714;
  --ink-soft:     #3A332C;
  --muted:        #6B6258;
  --muted-soft:   #8B8478;
  --rule:         #D6CFC2;
  --rule-soft:    #E2DCCF;
  --accent:       #8B3A2B;
  --accent-deep:  #6B2A1F;
  --accent-tint:  #EFE4DD;

  /* Typography */
  --font-display: 'Fraunces', 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
  --font-sans:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  /* Type scale */
  --fs-xs:   0.8125rem;   /* 13 */
  --fs-sm:   0.9375rem;   /* 15 */
  --fs-base: 1.0625rem;   /* 17 — editorial reading size */
  --fs-lg:   1.1875rem;   /* 19 */
  --fs-xl:   1.375rem;    /* 22 */
  --fs-2xl:  1.75rem;     /* 28 */
  --fs-3xl:  2.25rem;     /* 36 */
  --fs-4xl:  3rem;        /* 48 */
  --fs-5xl:  3.75rem;     /* 60 */
  --fs-6xl:  4.75rem;     /* 76 */

  /* Line heights */
  --lh-tight:    1.05;
  --lh-snug:     1.2;
  --lh-display:  1.08;
  --lh-heading:  1.18;
  --lh-body:     1.65;
  --lh-loose:    1.75;

  /* Spacing — 4px base */
  --s-1:  0.25rem;
  --s-2:  0.5rem;
  --s-3:  0.75rem;
  --s-4:  1rem;
  --s-5:  1.5rem;
  --s-6:  2rem;
  --s-7:  3rem;
  --s-8:  4rem;
  --s-9:  6rem;
  --s-10: 8rem;
  --s-11: 10rem;

  /* Layout */
  --container:       72rem;   /* 1152 */
  --container-wide:  84rem;   /* 1344 */
  --container-prose: 40rem;   /* 640 — narrow reading column */
  --container-narrow: 56rem;  /* 896 */
  --gutter:          clamp(1.25rem, 4vw, 2.5rem);

  /* Motion */
  --ease:    cubic-bezier(0.2, 0.6, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --t-fast:  140ms;
  --t-med:   240ms;
  --t-slow:  420ms;

  /* Border radius — kept restrained */
  --r-sm: 2px;
  --r-md: 4px;
  --r-lg: 8px;

  /* Shadows — soft, paper-feel */
  --shadow-sm: 0 1px 2px rgba(26, 23, 20, 0.04), 0 1px 1px rgba(26, 23, 20, 0.03);
  --shadow-md: 0 4px 16px rgba(26, 23, 20, 0.06), 0 2px 4px rgba(26, 23, 20, 0.04);
  --shadow-lg: 0 24px 60px rgba(26, 23, 20, 0.10), 0 8px 16px rgba(26, 23, 20, 0.06);
}

/* -------------------------------------------------------------------------
   2. RESET / BASE
   ------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: var(--lh-body);
  font-feature-settings: 'kern', 'liga', 'calt', 'ss01';
}

img, svg, video { display: block; max-width: 100%; height: auto; }

button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }

a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  text-decoration-color: var(--rule);
  transition: text-decoration-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
a:hover { text-decoration-color: var(--accent); color: var(--accent); }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: var(--r-sm); }

::selection { background: var(--accent); color: var(--paper-soft); }

hr {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: var(--s-7) 0;
}

/* Skip link — accessibility */
.skip-link {
  position: absolute;
  left: var(--s-4);
  top: var(--s-4);
  background: var(--ink);
  color: var(--paper-soft);
  padding: var(--s-3) var(--s-5);
  border-radius: var(--r-md);
  text-decoration: none;
  font-size: var(--fs-sm);
  font-weight: 500;
  transform: translateY(-200%);
  transition: transform var(--t-med) var(--ease);
  z-index: 100;
}
.skip-link:focus { transform: translateY(0); color: var(--paper-soft); }

/* -------------------------------------------------------------------------
   3. TYPOGRAPHY
   ------------------------------------------------------------------------- */

/* Display — used for hero H1 only */
.display {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.5rem, 6.4vw, var(--fs-6xl));
  line-height: var(--lh-display);
  letter-spacing: -0.022em;
  color: var(--ink);
  font-feature-settings: 'ss01', 'kern';
  margin: 0;
}
.display em {
  font-style: italic;
  font-variation-settings: 'opsz' 144, 'SOFT' 100;
  color: var(--ink-soft);
}

/* H1 — page title (non-hero) */
h1, .h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.25rem, 5vw, var(--fs-5xl));
  line-height: var(--lh-display);
  letter-spacing: -0.02em;
  margin: 0 0 var(--s-5);
  color: var(--ink);
}

/* H2 — section heading */
h2, .h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.875rem, 3.6vw, var(--fs-4xl));
  line-height: var(--lh-heading);
  letter-spacing: -0.018em;
  margin: 0 0 var(--s-5);
  color: var(--ink);
  max-width: 22ch;
}

/* H3 — sub-section */
h3, .h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.375rem, 2vw, var(--fs-2xl));
  line-height: var(--lh-snug);
  letter-spacing: -0.012em;
  margin: 0 0 var(--s-4);
  color: var(--ink);
}

/* H4 — small heading, sans */
h4, .h4 {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: var(--fs-lg);
  line-height: var(--lh-snug);
  letter-spacing: -0.005em;
  margin: 0 0 var(--s-3);
  color: var(--ink);
}

/* Eyebrow / kicker — small caps label above headings */
.eyebrow {
  font-family: var(--font-sans);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 var(--s-4);
  display: inline-flex;
  align-items: center;
  gap: var(--s-3);
}
.eyebrow::before {
  content: "";
  display: inline-block;
  width: 1.75rem;
  height: 1px;
  background: var(--accent);
  flex-shrink: 0;
}
.eyebrow.eyebrow-muted { color: var(--muted); }
.eyebrow.eyebrow-muted::before { background: var(--muted-soft); }
.eyebrow.eyebrow-plain::before { display: none; }

/* Body prose */
p { margin: 0 0 var(--s-3); }

.lead {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(1.125rem, 1.6vw, var(--fs-xl));
  line-height: var(--lh-body);
  letter-spacing: -0.005em;
  color: var(--ink-soft);
  margin: 0 0 var(--s-4);
  max-width: 36ch;
}

.subhead {
  font-size: clamp(1.0625rem, 1.4vw, var(--fs-lg));
  line-height: var(--lh-body);
  color: var(--ink-soft);
  font-weight: 400;
  margin: 0 0 var(--s-4);
  max-width: 44ch;
}

.prose { max-width: var(--container-prose); }
.prose p { line-height: var(--lh-body); color: var(--ink-soft); }
.prose p strong { color: var(--ink); font-weight: 600; }
.prose > * + h3 { margin-top: var(--s-5); }
.prose > * + h4 { margin-top: var(--s-4); }
.prose ul, .prose ol { padding-left: 1.25rem; margin: 0 0 var(--s-3); }
.prose li { margin-bottom: var(--s-2); line-height: var(--lh-body); color: var(--ink-soft); }
.prose li::marker { color: var(--muted-soft); }

/* Pull quote — large editorial */
.pullquote {
  font-family: var(--font-display);
  font-weight: 300;
  font-style: italic;
  font-size: clamp(1.5rem, 3vw, var(--fs-3xl));
  line-height: var(--lh-snug);
  letter-spacing: -0.012em;
  color: var(--ink);
  border-left: 2px solid var(--accent);
  padding-left: var(--s-6);
  margin: var(--s-6) 0;
  max-width: 28ch;
}
.pullquote cite {
  display: block;
  font-family: var(--font-sans);
  font-style: normal;
  font-size: var(--fs-sm);
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-top: var(--s-4);
  font-weight: 500;
}

/* Inline annotation / [INSERT: ...] placeholder */
.note {
  display: inline-block;
  background: var(--accent-tint);
  color: var(--accent-deep);
  font-family: var(--font-mono);
  font-size: 0.78125rem;
  letter-spacing: 0.02em;
  padding: var(--s-1) var(--s-3);
  border-radius: var(--r-sm);
  border: 1px dashed var(--accent);
}

/* Small print */
.small { font-size: var(--fs-sm); color: var(--muted); }
.fineprint { font-size: var(--fs-xs); color: var(--muted-soft); letter-spacing: 0.01em; }

/* -------------------------------------------------------------------------
   4. LAYOUT
   ------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container-wide   { max-width: var(--container-wide); }
.container-narrow { max-width: var(--container-narrow); }
.container-prose  { max-width: var(--container-prose); }

.section {
  padding-block: clamp(var(--s-6), 4vw, var(--s-7));
}
.section-sm { padding-block: clamp(var(--s-5), 3vw, var(--s-6)); }
.section-lg { padding-block: clamp(var(--s-7), 6vw, var(--s-8)); }

.section-paper      { background: var(--paper); }
.section-paper-deep { background: var(--paper-deep); }
.section-paper-soft { background: var(--paper-soft); }
.section-ink        { background: var(--ink); color: var(--paper-soft); }
.section-ink h1, .section-ink h2, .section-ink h3, .section-ink h4 { color: var(--paper-soft); }
.section-ink .eyebrow { color: var(--paper); opacity: 0.7; }
.section-ink .eyebrow::before { background: var(--paper); opacity: 0.5; }
.section-ink .lead, .section-ink .subhead, .section-ink .prose p { color: rgba(247, 244, 237, 0.78); }
.section-ink a { color: var(--paper-soft); text-decoration-color: rgba(247, 244, 237, 0.4); }
.section-ink a:hover { color: var(--paper-soft); text-decoration-color: var(--paper-soft); }

/* Section header — eyebrow + heading + optional lead, common pattern */
.section-header {
  margin-bottom: clamp(var(--s-4), 2.5vw, var(--s-5));
  max-width: 56rem;
}

/* -------------------------------------------------------------------------
   AUTO-NARROW TEXT-ONLY SECTIONS
   Any section without images, multi-column grids, or side-by-side layouts
   collapses to a centered 760px reading column. Sections containing wide
   content (split layouts, case grids, image placeholders, portraits, hero
   grids, stat grids, meta rows, or any <img>) keep the full 1152px container.
   ------------------------------------------------------------------------- */
:is(.section, .section-sm, .section-lg, .cta-banner, .hero):not(:has(.split, .case-grid, .core-letters, .image-duo, .img-placeholder, .portrait-frame, .hero-grid, .proof-grid, .case-meta-row, img)) > .container {
  max-width: 760px;
}
:is(.section, .section-sm, .section-lg, .cta-banner, .hero):not(:has(.split, .case-grid, .core-letters, .image-duo, .img-placeholder, .portrait-frame, .hero-grid, .proof-grid, .case-meta-row, img)) :is(.prose, .section-header) {
  max-width: none;
}

/* Grid utilities */
.grid { display: grid; gap: var(--s-6); }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 760px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

/* Two-column section: prose + aside (image, etc.) */
.split {
  display: grid;
  gap: clamp(var(--s-6), 5vw, var(--s-8));
  align-items: start;
}
@media (min-width: 880px) {
  .split { grid-template-columns: 1fr 1fr; }
  .split-asym  { grid-template-columns: 5fr 7fr; }
  .split-asym-r { grid-template-columns: 7fr 5fr; }
}

.divider {
  height: 1px;
  background: var(--rule);
  border: 0;
  margin-block: var(--s-5);
}
.divider-soft { background: var(--rule-soft); }

/* Vertical rhythm helpers */
.stack > * + * { margin-top: var(--s-3); }
.stack-sm > * + * { margin-top: var(--s-2); }
.stack-lg > * + * { margin-top: var(--s-4); }

/* -------------------------------------------------------------------------
   5. NAVIGATION
   ------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(241, 236, 227, 0.85);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--t-med) var(--ease), background var(--t-med) var(--ease);
}
.site-header.is-scrolled { border-bottom-color: var(--rule); }

.nav {
  display: flex;
  align-items: center;
  gap: clamp(var(--s-5), 3vw, var(--s-7));
  padding-block: var(--s-4);
}

.nav-brand {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--fs-lg);
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
  flex-shrink: 0;
}
.nav-brand:hover { color: var(--ink); text-decoration: none; }
.nav-brand small {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
  margin-top: 2px;
}

.nav-links {
  display: none;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: clamp(var(--s-4), 2vw, var(--s-6));
  align-items: center;
}
@media (min-width: 880px) {
  .nav-links { display: flex; }
}

.nav-link {
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--ink-soft);
  text-decoration: none;
  letter-spacing: -0.005em;
  position: relative;
  padding-block: var(--s-2);
  white-space: nowrap;
}
.nav-link:hover { color: var(--ink); text-decoration: none; }
.nav-link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  bottom: -2px;
  height: 1px;
  background: var(--accent);
}

/* CTA cluster pushed to the far right; nav-links stay near the brand */
.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  margin-left: auto;
}

/* Mobile menu trigger (presentational only — JS in pages) */
.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  gap: 5px;
  padding: var(--s-3);
  margin-right: calc(var(--s-3) * -1);
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--ink);
}
@media (min-width: 880px) {
  .nav-toggle { display: none; }
}

/* -------------------------------------------------------------------------
   6. BUTTONS
   ------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-3);
  padding: 0.95rem 1.5rem;
  font-family: var(--font-sans);
  font-size: var(--fs-sm);
  font-weight: 500;
  letter-spacing: 0.005em;
  line-height: 1;
  text-decoration: none;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background var(--t-fast) var(--ease),
              color var(--t-fast) var(--ease),
              border-color var(--t-fast) var(--ease),
              transform var(--t-fast) var(--ease);
  white-space: nowrap;
}
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.btn-primary {
  background: var(--ink);
  color: var(--paper-soft);
  border-color: var(--ink);
}
.btn-primary:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--paper-soft);
  text-decoration: none;
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn-ghost:hover {
  background: var(--ink);
  color: var(--paper-soft);
  text-decoration: none;
}

.btn-on-ink {
  background: var(--paper-soft);
  color: var(--ink);
  border-color: var(--paper-soft);
}
.btn-on-ink:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--paper-soft);
}

.btn-sm { padding: 0.7rem 1.15rem; font-size: var(--fs-xs); }
.btn-lg { padding: 1.15rem 1.85rem; font-size: var(--fs-base); }

/* Inline arrow link — used heavily in the copy */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: var(--s-3);
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: var(--fs-sm);
  letter-spacing: 0.005em;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 4px;
  transition: color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.link-arrow::after {
  content: "→";
  font-family: var(--font-display);
  transition: transform var(--t-med) var(--ease-out);
}
.link-arrow:hover {
  color: var(--accent);
  border-color: var(--accent);
  text-decoration: none;
}
.link-arrow:hover::after { transform: translateX(4px); }

.link-arrow-soft {
  border-bottom-color: var(--rule);
}

/* CTA cluster */
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-4);
  align-items: center;
  margin-top: var(--s-6);
}

/* -------------------------------------------------------------------------
   7. HERO
   ------------------------------------------------------------------------- */
.hero {
  padding-block: clamp(var(--s-6), 5vw, var(--s-7)) clamp(var(--s-6), 5vw, var(--s-8));
  position: relative;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  gap: clamp(var(--s-6), 5vw, var(--s-8));
  align-items: center;
}
@media (min-width: 960px) {
  .hero-grid { grid-template-columns: 1.3fr 1fr; }
}

.hero-eyebrow { margin-bottom: var(--s-5); }

.hero-h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.375rem, 6.2vw, var(--fs-6xl));
  line-height: var(--lh-display);
  letter-spacing: -0.024em;
  color: var(--ink);
  margin: 0 0 var(--s-6);
  max-width: 18ch;
}
.hero-h1 .accent {
  font-style: italic;
  color: var(--accent);
  font-weight: 300;
}

.hero-sub {
  font-size: clamp(1.0625rem, 1.4vw, var(--fs-lg));
  line-height: var(--lh-body);
  color: var(--ink-soft);
  max-width: 44ch;
  margin: 0 0 var(--s-5);
}

/* Hero portrait frame */
.portrait-frame {
  position: relative;
  aspect-ratio: 4 / 5;
  background: var(--ink);
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.portrait-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  filter: contrast(1.02);
}
.portrait-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(26, 23, 20, 0.18));
  pointer-events: none;
}

/* Show the full image at its natural aspect ratio — no crop, no overlay */
.portrait-frame--full {
  aspect-ratio: auto;
  background: transparent;
}
.portrait-frame--full img {
  height: auto;
  object-fit: contain;
  object-position: center;
  filter: none;
}
.portrait-frame--full::after { display: none; }

/* Hero variant — centered, no image */
.hero-centered { text-align: center; }
.hero-centered .hero-h1,
.hero-centered .hero-sub { margin-inline: auto; }
.hero-centered .eyebrow { justify-content: center; }
.hero-centered .cta-row { justify-content: center; }

/* -------------------------------------------------------------------------
   IMAGE PLACEHOLDERS — editorial visual blocks awaiting real photography.
   Replace by swapping the .img-placeholder element for an <img>, or by
   layering a real <img> inside it.
   ------------------------------------------------------------------------- */
.img-placeholder {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  background:
    linear-gradient(135deg, var(--paper-deep) 0%, var(--paper-soft) 50%, var(--paper-deep) 100%);
  border: 1px dashed var(--rule);
  border-radius: var(--r-md);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: clamp(var(--s-5), 4vw, var(--s-7));
  color: var(--ink-soft);
}
.img-placeholder::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(135deg,
      transparent 0,
      transparent 20px,
      rgba(107, 98, 88, 0.05) 20px,
      rgba(107, 98, 88, 0.05) 21px);
  pointer-events: none;
}
.img-placeholder::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 75% 55% at 50% 100%, rgba(26, 23, 20, 0.06), transparent 70%);
  pointer-events: none;
}
.img-placeholder__inner {
  position: relative;
  z-index: 1;
  max-width: 36ch;
}
.img-placeholder__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 999px;
  background: var(--paper-soft);
  border: 1px solid var(--rule);
  color: var(--muted);
  margin: 0 auto var(--s-4);
}
.img-placeholder__icon svg { width: 1.125rem; height: 1.125rem; display: block; }
.img-placeholder__eyebrow {
  font-size: var(--fs-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
  margin: 0 0 var(--s-3);
}
.img-placeholder__caption {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(0.95rem, 1.4vw, var(--fs-lg));
  line-height: var(--lh-snug);
  color: var(--ink-soft);
  margin: 0;
}
.img-placeholder--wide      { aspect-ratio: 16 / 9; }
.img-placeholder--banner    { aspect-ratio: 21 / 9; }
.img-placeholder--square    { aspect-ratio: 1 / 1; }
.img-placeholder--landscape { aspect-ratio: 3 / 2; }
.img-placeholder--portrait  { aspect-ratio: 4 / 5; }

/* Section wrapper for a single image break between content blocks */
.image-band { padding-block: clamp(var(--s-4), 3vw, var(--s-6)); }
.image-band .container { display: block; }
.image-band--paper-deep { background: var(--paper-deep); }

/* Real image frame — same aspect-ratio variants as .img-placeholder */
.img-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  background: var(--paper-deep);
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  margin: 0;
}
.img-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.img-frame--wide      { aspect-ratio: 16 / 9; }
.img-frame--banner    { aspect-ratio: 21 / 9; }
.img-frame--square    { aspect-ratio: 1 / 1; }
.img-frame--landscape { aspect-ratio: 3 / 2; }
.img-frame--portrait  { aspect-ratio: 4 / 5; }

/* Full image at its natural aspect ratio — no crop. Use for diagrams. */
.img-frame--full {
  aspect-ratio: auto;
  background: transparent;
  box-shadow: none;
}
.img-frame--full img {
  height: auto;
  object-fit: contain;
}

/* Side-by-side image grid for related shots */
.image-duo {
  display: grid;
  gap: clamp(var(--s-5), 3vw, var(--s-6));
  grid-template-columns: 1fr;
}
@media (min-width: 760px) {
  .image-duo { grid-template-columns: 1fr 1fr; }
}

/* -------------------------------------------------------------------------
   8. PROOF BAR — four-column stat row
   ------------------------------------------------------------------------- */
.proof-bar {
  border-block: 1px solid var(--rule);
  padding-block: clamp(var(--s-5), 3vw, var(--s-6));
}
.proof-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-6) var(--s-5);
}
@media (min-width: 760px) {
  .proof-grid { grid-template-columns: repeat(4, 1fr); gap: var(--s-5); }
}
.stat {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  position: relative;
  padding-left: var(--s-5);
}
@media (min-width: 760px) {
  .stat:not(:first-child)::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.4em;
    bottom: 0.4em;
    width: 1px;
    background: var(--rule);
  }
}
.stat-number {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.875rem, 3.6vw, var(--fs-4xl));
  line-height: 1;
  letter-spacing: -0.022em;
  color: var(--ink);
}
.stat-number .unit {
  font-size: 0.6em;
  color: var(--muted);
  margin-left: 0.1em;
  letter-spacing: 0;
}
.stat-label {
  font-size: var(--fs-sm);
  line-height: 1.4;
  color: var(--muted);
  max-width: 22ch;
}

/* -------------------------------------------------------------------------
   9. CORE FRAMEWORK — letter blocks
   ------------------------------------------------------------------------- */
.core-letters {
  display: grid;
  gap: var(--s-7);
}
@media (min-width: 760px) {
  .core-letters { grid-template-columns: repeat(2, 1fr); gap: var(--s-8) var(--s-7); }
}
@media (min-width: 1100px) {
  .core-letters { grid-template-columns: repeat(4, 1fr); }
}

.core-letter {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
  padding-top: var(--s-5);
  border-top: 1px solid var(--ink);
}
.core-letter .glyph {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(3.5rem, 6vw, 5.25rem);
  line-height: 0.9;
  letter-spacing: -0.04em;
  color: var(--accent);
}
.core-letter .label {
  font-family: var(--font-sans);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
}
.core-letter h3 {
  font-size: var(--fs-xl);
  margin: 0 0 var(--s-3);
}
.core-letter p {
  font-size: var(--fs-sm);
  line-height: var(--lh-loose);
  color: var(--ink-soft);
  margin: 0;
}

/* -------------------------------------------------------------------------
   10. CASE STUDY CARDS
   ------------------------------------------------------------------------- */
.case-grid {
  display: grid;
  gap: var(--s-6);
}
@media (min-width: 760px) {
  .case-grid { grid-template-columns: repeat(2, 1fr); }
}

.case-card {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
  padding: clamp(var(--s-6), 3vw, var(--s-7));
  background: var(--paper-soft);
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  text-decoration: none;
  color: inherit;
  transition: transform var(--t-med) var(--ease), border-color var(--t-med) var(--ease), box-shadow var(--t-med) var(--ease);
  position: relative;
}
.case-card:hover {
  border-color: var(--ink);
  text-decoration: none;
  color: inherit;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.case-card:hover .case-arrow { color: var(--accent); transform: translateX(4px); }

.case-card .eyebrow { margin-bottom: 0; }
.case-card .case-outcome {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.5rem, 2.5vw, var(--fs-2xl));
  line-height: var(--lh-snug);
  letter-spacing: -0.012em;
  color: var(--ink);
}
.case-card .case-desc {
  font-size: var(--fs-sm);
  line-height: var(--lh-loose);
  color: var(--ink-soft);
  margin: 0;
}
.case-card .case-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: var(--s-5);
  border-top: 1px solid var(--rule);
}
.case-card .case-meta {
  font-size: var(--fs-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}
.case-card .case-arrow {
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  color: var(--ink-soft);
  transition: transform var(--t-med) var(--ease-out), color var(--t-med) var(--ease);
}

/* Case study meta row — used at top of individual case study pages */
.case-meta-row {
  display: grid;
  gap: var(--s-5) var(--s-7);
  grid-template-columns: 1fr 1fr;
  padding-block: var(--s-6);
  border-block: 1px solid var(--rule);
}
@media (min-width: 760px) {
  .case-meta-row { grid-template-columns: repeat(4, 1fr); }
}
.case-meta-row dt {
  font-size: var(--fs-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
  margin-bottom: var(--s-2);
}
.case-meta-row dd {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  line-height: var(--lh-snug);
  color: var(--ink);
  letter-spacing: -0.008em;
}

/* -------------------------------------------------------------------------
   11. CALLOUT / INSET PANEL
   ------------------------------------------------------------------------- */
.callout {
  background: var(--paper-deep);
  border-radius: var(--r-lg);
  padding: clamp(var(--s-6), 4vw, var(--s-8));
  border: 1px solid var(--rule);
}
.callout-ink {
  background: var(--ink);
  color: var(--paper-soft);
  border-color: var(--ink);
}
.callout-ink h2, .callout-ink h3, .callout-ink h4 { color: var(--paper-soft); }
.callout-ink .eyebrow { color: var(--paper); opacity: 0.75; }
.callout-ink .eyebrow::before { background: var(--paper); opacity: 0.5; }
.callout-ink p { color: rgba(247, 244, 237, 0.78); }

/* Anonymous client quote block */
.client-quote {
  padding: clamp(var(--s-6), 3.5vw, var(--s-7));
  background: var(--paper-soft);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--r-md) var(--r-md) 0;
}
.client-quote q {
  font-family: var(--font-display);
  font-weight: 300;
  font-style: italic;
  font-size: clamp(1.125rem, 1.6vw, var(--fs-xl));
  line-height: var(--lh-loose);
  color: var(--ink);
  quotes: """ """;
  display: block;
  margin-bottom: var(--s-4);
}
.client-quote .attribution {
  font-size: var(--fs-sm);
  color: var(--muted);
  letter-spacing: 0.02em;
}

/* -------------------------------------------------------------------------
   12. CTA BANNER (closing section pattern)
   ------------------------------------------------------------------------- */
.cta-banner {
  text-align: center;
  padding-block: clamp(var(--s-7), 6vw, var(--s-8));
}
.cta-banner h2 {
  margin-inline: auto;
  max-width: 18ch;
  margin-bottom: var(--s-4);
}
.cta-banner p {
  margin-inline: auto;
  max-width: 40ch;
  font-size: var(--fs-lg);
  line-height: var(--lh-body);
  color: var(--ink-soft);
}
.cta-banner .cta-row { justify-content: center; }

/* -------------------------------------------------------------------------
   13. FOOTER
   ------------------------------------------------------------------------- */
.site-footer {
  background: var(--ink);
  color: rgba(247, 244, 237, 0.78);
  padding-block: clamp(var(--s-7), 7vw, var(--s-9));
  font-size: var(--fs-sm);
}
.site-footer a {
  color: var(--paper-soft);
  text-decoration-color: rgba(247, 244, 237, 0.3);
}
.site-footer a:hover { color: var(--paper-soft); text-decoration-color: var(--paper-soft); }

.footer-grid {
  display: grid;
  gap: var(--s-7);
  grid-template-columns: 1fr;
}
@media (min-width: 760px) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
}

.footer-brand {
  font-family: var(--font-display);
  font-size: var(--fs-2xl);
  font-weight: 400;
  letter-spacing: -0.012em;
  color: var(--paper-soft);
  margin: 0 0 var(--s-3);
}
.footer-tagline {
  max-width: 32ch;
  color: rgba(247, 244, 237, 0.65);
  line-height: var(--lh-loose);
}
.footer-heading {
  font-size: var(--fs-xs);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--paper-soft);
  font-weight: 600;
  margin: 0 0 var(--s-4);
}
.footer-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
}
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-4);
  justify-content: space-between;
  align-items: center;
  margin-top: var(--s-7);
  padding-top: var(--s-5);
  border-top: 1px solid rgba(247, 244, 237, 0.12);
  font-size: var(--fs-xs);
  letter-spacing: 0.04em;
  color: rgba(247, 244, 237, 0.55);
}

/* -------------------------------------------------------------------------
   14. UTILITIES (kept tight)
   ------------------------------------------------------------------------- */
.text-center { text-align: center; }
.text-balance { text-wrap: balance; }
.text-pretty { text-wrap: pretty; }
.text-muted { color: var(--muted); }
.text-accent { color: var(--accent); }
.italic { font-style: italic; }

.mt-0 { margin-top: 0; }
.mt-4 { margin-top: var(--s-4); }
.mt-5 { margin-top: var(--s-5); }
.mt-6 { margin-top: var(--s-6); }
.mt-7 { margin-top: var(--s-7); }
.mt-8 { margin-top: var(--s-8); }

.mb-0 { margin-bottom: 0; }
.mb-4 { margin-bottom: var(--s-4); }
.mb-5 { margin-bottom: var(--s-5); }
.mb-6 { margin-bottom: var(--s-6); }
.mb-7 { margin-bottom: var(--s-7); }

.hide-sm { display: none; }
@media (min-width: 760px) { .hide-sm { display: initial; } }
.show-sm { display: initial; }
@media (min-width: 760px) { .show-sm { display: none; } }

/* -------------------------------------------------------------------------
   15. MOTION — respect reduced-motion
   ------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0ms !important;
    animation-duration: 0ms !important;
    scroll-behavior: auto !important;
  }
}

/* Subtle reveal on scroll — opt-in via .reveal */
.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 600ms var(--ease-out), transform 600ms var(--ease-out);
}
.reveal.is-visible { opacity: 1; transform: none; }

/* -------------------------------------------------------------------------
   16. DRAMATIC DARK HERO — portrait as background, wordmark in front
   ------------------------------------------------------------------------- */
:root { --header-h: 80px; }

.hero-dramatic {
  --bg-deep: #0E0C0A;
  position: relative;
  background: var(--bg-deep);
  color: var(--paper-soft);
  overflow: hidden;
  isolation: isolate;
  min-height: clamp(720px, 100vh, 1080px);
  display: flex;
  flex-direction: column;
}

/* When the dark hero is in play, pull it up so its background extends
   behind the (transparent) sticky header. The header height is reserved
   inside the content so nothing slides under the nav. */
body.has-dark-hero .hero-dramatic {
  margin-top: calc(var(--header-h) * -1);
}

/* Background portrait — fills the hero, fades on all sides via radial mask */
.hero-bg-image {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: flex;
  justify-content: center;
  pointer-events: none;
}
.hero-bg-image img {
  width: 100%;
  max-width: 880px;
  height: 100%;
  object-fit: cover;
  object-position: center calc(18% + 10px);
  filter: contrast(1.06) saturate(0.95);
  -webkit-mask-image: radial-gradient(ellipse 60% 76% at 50% 45%, #000 22%, rgba(0,0,0,0.82) 55%, rgba(0,0,0,0.25) 80%, transparent 100%);
          mask-image: radial-gradient(ellipse 60% 76% at 50% 45%, #000 22%, rgba(0,0,0,0.82) 55%, rgba(0,0,0,0.25) 80%, transparent 100%);
}

/* Atmospheric tint + edge darkening for legibility of overlay text */
.hero-bg-glow {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 55% 50% at 50% 55%, rgba(139, 58, 43, 0.22), transparent 65%),
    linear-gradient(to bottom, rgba(14,12,10,0.35) 0%, rgba(14,12,10,0) 22%, rgba(14,12,10,0) 58%, rgba(14,12,10,0.92) 100%),
    linear-gradient(to right, rgba(14,12,10,0.55) 0%, rgba(14,12,10,0) 18%, rgba(14,12,10,0) 82%, rgba(14,12,10,0.55) 100%);
}

/* Subtle film grain */
.hero-dramatic::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.95' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='0.55'/></svg>");
  opacity: 0.05;
  mix-blend-mode: overlay;
}

/* Foreground content sits over the image. Top padding accounts for the
   header that now floats over the dark area. */
.hero-dramatic-content {
  position: relative;
  z-index: 2;
  flex: 1;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: clamp(var(--s-5), 4vw, var(--s-7));
  padding-block: calc(var(--header-h) + clamp(var(--s-3), 2vw, var(--s-5)))
                 clamp(var(--s-7), 8vw, var(--s-9));
}

/* Top row — left cluster (pill + H1) and right meta */
.hero-dramatic-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--s-5);
}

.hero-dramatic-top-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: clamp(var(--s-4), 2.5vw, var(--s-5));
  max-width: 22ch;
}

.eyebrow-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--s-3);
  padding: 0.55rem 0.9rem;
  border: 1px solid rgba(247, 244, 237, 0.18);
  background: rgba(247, 244, 237, 0.04);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 999px;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(247, 244, 237, 0.9);
}
.eyebrow-pill .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 14px rgba(139, 58, 43, 0.9);
  animation: dotPulse 2.4s var(--ease) infinite;
}
@keyframes dotPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.6; transform: scale(0.9); }
}

.hero-dramatic-aside {
  display: flex;
  flex-direction: column;
  gap: var(--s-1);
  font-family: var(--font-sans);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(247, 244, 237, 0.55);
  text-align: right;
}
.hero-dramatic-aside strong {
  color: rgba(247, 244, 237, 0.92);
  font-weight: 600;
}

/* H1 sits in the top-left cluster, narrow column kept off the face */
.hero-dramatic-h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.125rem, 1.6vw, 1.5rem);
  line-height: 1.28;
  letter-spacing: -0.008em;
  color: var(--paper-soft);
  margin: 0;
  max-width: 22ch;
  text-wrap: balance;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.55);
}
.hero-dramatic-h1 .accent {
  color: rgba(247, 244, 237, 0.7);
  font-style: italic;
  font-weight: 300;
  display: block;
  margin-top: 0.45em;
  font-size: 0.95em;
}

/* Empty mid spacer — pushes the foot to the bottom */
.hero-dramatic-mid {
  display: block;
  align-self: start;
  min-height: 1px;
}

/* Wordmark in FRONT of the figure, near the bottom of the hero */
.hero-dramatic-foot {
  display: flex;
  flex-direction: column;
  gap: clamp(var(--s-5), 3.5vw, var(--s-7));
  align-self: end;
  width: 100%;
}

.hero-wordmark-front {
  display: block;
  width: 100%;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(3.75rem, 17vw, 17rem);
  line-height: 0.85;
  letter-spacing: -0.045em;
  color: var(--paper-soft);
  text-align: center;
  white-space: nowrap;
  user-select: none;
  margin: 0;
  text-transform: lowercase;
  font-feature-settings: 'ss01';
  text-shadow: 0 4px 60px rgba(0, 0, 0, 0.55);
}
.hero-wordmark-front em {
  font-style: italic;
  font-weight: 300;
  color: rgba(247, 244, 237, 0.78);
  letter-spacing: -0.05em;
  margin-left: 0.05em;
}

/* Bottom row — tagline + CTA + meta */
.hero-dramatic-bottom {
  display: grid;
  gap: var(--s-6);
  align-items: end;
}
@media (min-width: 880px) {
  .hero-dramatic-bottom {
    grid-template-columns: 1fr auto 1fr;
    gap: var(--s-7);
  }
}

.hero-dramatic-tagline {
  font-family: var(--font-display);
  font-weight: 300;
  font-style: italic;
  font-size: clamp(1.0625rem, 1.4vw, var(--fs-lg));
  line-height: 1.55;
  color: rgba(247, 244, 237, 0.78);
  max-width: 36ch;
  margin: 0;
}

.hero-dramatic .cta-row {
  margin-top: 0;
  justify-content: center;
}
@media (min-width: 880px) {
  .hero-dramatic .cta-row { justify-content: center; }
}

.hero-dramatic-meta {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  text-align: right;
}
.hero-dramatic-meta-item {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(247, 244, 237, 0.55);
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: var(--s-3);
}
.hero-dramatic-meta-item strong {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--paper-soft);
  line-height: 1;
}

/* Header adapts when sitting on a dark hero — fully transparent, crisp white */
body.has-dark-hero .site-header {
  background: transparent !important;
  border-bottom-color: transparent !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}
body.has-dark-hero .site-header .nav-brand,
body.has-dark-hero .site-header .nav-link {
  color: #FFFFFF;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.55);
}
body.has-dark-hero .site-header .nav-link { color: rgba(255, 255, 255, 0.92); font-weight: 500; }
body.has-dark-hero .site-header .nav-link:hover { color: #FFFFFF; }
body.has-dark-hero .site-header .nav-brand small { color: rgba(255, 255, 255, 0.6); }
body.has-dark-hero .site-header .nav-link[aria-current="page"]::after { background: #FFFFFF; }
body.has-dark-hero .site-header .btn-primary {
  background: #FFFFFF;
  color: var(--ink);
  border-color: #FFFFFF;
}
body.has-dark-hero .site-header .btn-primary:hover {
  background: var(--accent);
  color: #FFFFFF;
  border-color: var(--accent);
}
body.has-dark-hero .site-header .nav-toggle span { background: #FFFFFF; }

/* Once scrolled, header reverts to the cream paper treatment */
body.has-dark-hero .site-header.is-scrolled {
  background: rgba(241, 236, 227, 0.92);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom-color: var(--rule);
}
body.has-dark-hero .site-header.is-scrolled .nav-brand,
body.has-dark-hero .site-header.is-scrolled .nav-link { color: var(--ink-soft); }
body.has-dark-hero .site-header.is-scrolled .nav-brand { color: var(--ink); }
body.has-dark-hero .site-header.is-scrolled .nav-brand small { color: var(--muted); }
body.has-dark-hero .site-header.is-scrolled .btn-primary {
  background: var(--ink);
  color: var(--paper-soft);
  border-color: var(--ink);
}
body.has-dark-hero .site-header.is-scrolled .btn-primary:hover {
  background: var(--accent);
  border-color: var(--accent);
}
body.has-dark-hero .site-header.is-scrolled .nav-toggle span { background: var(--ink); }

/* Mobile tightening */
@media (max-width: 759px) {
  .hero-dramatic { min-height: 88vh; }
  .hero-dramatic-aside { display: none; }
  .hero-dramatic-bottom { grid-template-columns: 1fr; gap: var(--s-5); text-align: center; }
  .hero-dramatic-tagline { margin-inline: auto; }
  .hero-dramatic-meta { align-items: center; text-align: center; }
  .hero-dramatic-meta-item { justify-content: center; }
}

/* -------------------------------------------------------------------------
   17. PRINT
   ------------------------------------------------------------------------- */
@media print {
  .site-header, .site-footer, .nav-toggle, .btn { display: none; }
  body { background: #fff; color: #000; }
  a { color: #000; text-decoration: underline; }
}
