/* Headframe Consulting — homepage
   Tokens and measurements follow design/HANDOFF.md.
   Display face changed from Space Grotesk to Zilla Slab (Oct 2026). */

/* ---------- Fonts (self-hosted, SIL OFL — see assets/fonts/) ---------- */

@font-face {
  font-family: 'Zilla Slab';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/assets/fonts/zilla-slab-latin-500-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Zilla Slab';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/assets/fonts/zilla-slab-latin-600-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/ibm-plex-sans-latin-400-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/ibm-plex-mono-latin-400-normal.woff2') format('woff2');
}

:root {
  --hematite-900: #4A2E2B;
  --hematite-700: #6B4440;
  --hematite-500: #8C5B55;
  --hematite-300: #C9A9A3;
  --hematite-50: #F1E6E4;
  --magnetite-900: #2F3336;
  --body-grey: #54595C;
  --warm-body: #463C3A;
  --paper: #F6F4F3;
  --white: #FFFFFF;
  --card-border: #E2DCDA;
  --hairline: #E7E2E0;

  --font-display: 'Zilla Slab', Rockwell, Georgia, serif;
  --font-body: 'IBM Plex Sans', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;

  --page-pad: clamp(20px, 4vw, 48px);
  --section-pad: clamp(64px, 8vw, 110px);
  --header-h: 74px;
}

/* ---------- Base ---------- */

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

html {
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

html, body { margin: 0; padding: 0; background: var(--paper); }

body {
  font-family: var(--font-body);
  color: var(--magnetite-900);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

[hidden] { display: none !important; }

img { display: block; }

a {
  color: var(--hematite-700);
  text-decoration: none;
  transition: color 150ms ease, background-color 150ms ease, border-color 150ms ease;
}
a:hover { color: var(--hematite-900); }

[id] { scroll-margin-top: var(--header-h); }

ul { list-style: none; margin: 0; padding: 0; }

h1, h2, h3, p { margin: 0; }

/* ---------- Layout ---------- */

/* Header & hero pad inside the 1180 column; content sections pad outside it. */
.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding-left: var(--page-pad);
  padding-right: var(--page-pad);
}

.container {
  max-width: 1180px;
  margin: 0 auto;
}

.section {
  padding: var(--section-pad) var(--page-pad);
}
.section-paper { background: var(--paper); }
.section-white { background: var(--white); border-top: 1px solid var(--hairline); }
.section-tint { background: var(--hematite-50); }

.watermark {
  position: absolute;
  width: auto;
  pointer-events: none;
}

/* ---------- Type ---------- */

.eyebrow {
  display: block;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.22em;
  color: var(--hematite-500);
  margin-bottom: 18px;
}
.eyebrow-dark { color: var(--hematite-300); }

.h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(28px, 3.7vw, 46px);
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--magnetite-900);
  margin: 0 0 clamp(36px, 5vw, 60px);
}
.h2-tight { margin-bottom: clamp(36px, 5vw, 56px); }
.h2-accent { color: var(--hematite-900); }

.num {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--hematite-500);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 15px 26px;
  border-radius: 2px;
  border: 1px solid transparent;
  line-height: normal;
}
.btn-sm {
  font-size: 12px;
  padding: 11px 18px;
  white-space: nowrap;
}

.btn-light,
.btn-light:hover { color: var(--hematite-900); }
.btn-light { background: var(--paper); }
.btn-light:hover { background: var(--white); }

.btn-white,
.btn-white:hover { background: var(--white); color: var(--hematite-900); }

.btn-ghost,
.btn-ghost:hover { color: var(--paper); }
.btn-ghost { border-color: rgba(246, 244, 243, 0.4); }
.btn-ghost:hover { border-color: var(--paper); }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
.btn-row-center { justify-content: center; }

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--hematite-900);
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.header-inner {
  position: relative;
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 32px;
}

.header-logo {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
}
.header-logo img { height: 34px; width: auto; }

.header-nav {
  display: flex;
  gap: clamp(14px, 2.4vw, 30px);
  margin-left: auto;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.header-nav a { color: rgba(255, 255, 255, 0.78); }
.header-nav a:hover { color: var(--white); }

.header-cta { flex: 0 0 auto; }

.menu-toggle {
  display: none;
  margin-left: auto;
  width: 40px;
  height: 40px;
  padding: 0;
  background: none;
  border: 1px solid rgba(246, 244, 243, 0.4);
  border-radius: 2px;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.menu-toggle span {
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--paper);
  transition: transform 150ms ease, opacity 150ms ease;
}
.menu-open .menu-toggle span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.menu-open .menu-toggle span:nth-child(2) { opacity: 0; }
.menu-open .menu-toggle span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

@media (max-width: 900px) {
  .header-inner { gap: 16px; }
  .menu-toggle { display: flex; }
  .header-cta { margin-left: auto; }
  .header-cta + .menu-toggle { margin-left: 0; }

  .header-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--hematite-900);
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
    padding: 8px var(--page-pad) 16px;
  }
  .header-nav a {
    padding: 14px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }
  .menu-open .header-nav { display: flex; }
}

@media (max-width: 520px) {
  .header-cta { display: none; }
  .header-cta + .menu-toggle { margin-left: auto; }
}

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

.hero {
  position: relative;
  background: var(--hematite-900);
  color: var(--paper);
  overflow: hidden;
}

.hero-mark {
  right: -6%;
  top: 50%;
  transform: translateY(-50%);
  height: 150%;
  opacity: 0.16;
}

.hero-inner {
  position: relative;
  padding-top: clamp(72px, 11vw, 150px);
  padding-bottom: clamp(80px, 12vw, 160px);
}

.hero-eyebrow { margin-bottom: 28px; }

.hero h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(38px, 6vw, 74px);
  line-height: 1.02;
  letter-spacing: -0.01em;
  max-width: 17ch;
  text-wrap: pretty;
}

.hero-lede {
  font-size: clamp(16px, 1.45vw, 19px);
  line-height: 1.6;
  color: rgba(246, 244, 243, 0.82);
  max-width: 60ch;
  margin-top: 28px;
  text-wrap: pretty;
}

.hero .btn-row { margin-top: 40px; }

/* ---------- Cards ---------- */

.card-grid {
  display: grid;
  gap: 16px;
}
.card-grid-4 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.card-grid-engage { grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); }

.card {
  background: var(--white);
  border: 1px solid var(--card-border);
  padding: clamp(24px, 3vw, 36px);
}
.card h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 21px;
  line-height: 1.2;
  margin: 16px 0 10px;
  color: var(--magnetite-900);
}
.card p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--body-grey);
}

.card-row {
  display: flex;
  gap: 18px;
  padding: clamp(22px, 2.6vw, 30px);
}
.card-row .num {
  letter-spacing: normal;
  padding-top: 3px;
}
.card-row h3 {
  font-size: 20px;
  margin: 0 0 8px;
}

/* ---------- Services ---------- */

.service {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.3fr);
  gap: clamp(16px, 4vw, 56px);
  padding: clamp(24px, 3vw, 34px) 0;
  border-top: 1px solid var(--hairline);
}
.service:last-child { border-bottom: 1px solid var(--hairline); }

.service h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(20px, 2.2vw, 25px);
  line-height: 1.2;
  color: var(--hematite-900);
}
.service p {
  font-size: 16px;
  line-height: 1.65;
  color: var(--body-grey);
  text-wrap: pretty;
}

@media (max-width: 720px) {
  .service { grid-template-columns: 1fr; gap: 10px; }
}

/* ---------- Why Headframe ---------- */

.why-mark {
  height: 64px;
  width: auto;
  margin-bottom: 26px;
}

.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(290px, 100%), 1fr));
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
}

.why-copy {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.why-copy p {
  font-size: 17px;
  line-height: 1.65;
  color: var(--warm-body);
  text-wrap: pretty;
}

.why-list {
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.why-list li {
  display: flex;
  flex-direction: column;
  gap: 7px;
  border-left: 2px solid var(--hematite-500);
  padding-left: 18px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--body-grey);
}
.why-label {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: normal;
  letter-spacing: 0.14em;
  color: var(--hematite-900);
}

/* ---------- Why the name ---------- */

.section-name {
  background: var(--white);
  padding: clamp(56px, 7vw, 96px) var(--page-pad);
  border-top: 1px solid var(--hairline);
}

.name-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(270px, 100%), 1fr));
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
}

.name-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(26px, 3.3vw, 40px);
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin-bottom: 22px;
  color: var(--magnetite-900);
  max-width: 20ch;
}

.name-copy {
  font-size: 17px;
  line-height: 1.65;
  color: var(--body-grey);
  max-width: 56ch;
  text-wrap: pretty;
}
.name-copy + .name-copy { margin-top: 16px; }

.name-figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.photo-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: var(--paper);
  border: 1px solid var(--hairline);
  overflow: hidden;
}
.photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.name-figure figcaption {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.8;
  letter-spacing: 0.12em;
  color: var(--hematite-500);
}

/* ---------- Pull-quote band ---------- */

.quote-band {
  position: relative;
  background: var(--hematite-900);
  overflow: hidden;
  padding: clamp(56px, 8vw, 96px) var(--page-pad);
}
.quote-band .container { position: relative; }

.quote-mark {
  left: -60px;
  top: 50%;
  transform: translateY(-50%);
  height: 220%;
  opacity: 0.07;
}

.quote {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(26px, 3.9vw, 48px);
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--paper);
  max-width: 20ch;
  text-wrap: pretty;
}

/* ---------- Contact ---------- */

.contact {
  position: relative;
  background: var(--hematite-900);
  overflow: hidden;
  padding: clamp(72px, 9vw, 120px) var(--page-pad);
}

.contact-mark {
  right: -12%;
  bottom: -40%;
  height: 260%;
  opacity: 0.08;
}

.contact-inner {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 26px;
}

.contact-logo { height: 30px; width: auto; }

.contact h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(26px, 3.7vw, 44px);
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: var(--paper);
  max-width: 22ch;
  text-wrap: pretty;
}

.contact .btn-row { margin-top: 6px; }

.contact-fine {
  margin-top: 6px;
  font-size: 14px;
  color: rgba(246, 244, 243, 0.7);
}
.contact-fine a,
.contact-fine a:hover {
  color: var(--paper);
  text-decoration: underline;
  text-underline-offset: 3px;
}

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

.site-footer {
  background: var(--magnetite-900);
  padding: clamp(40px, 5vw, 60px) var(--page-pad);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.footer-row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 40px;
  align-items: center;
  justify-content: space-between;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--paper);
}
.footer-brand img { height: 26px; width: auto; }

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.footer-nav a { color: rgba(246, 244, 243, 0.82); }
.footer-nav a:hover { color: var(--paper); }

.disclaimer {
  font-size: 12.5px;
  line-height: 1.7;
  color: rgba(246, 244, 243, 0.78);
  max-width: 92ch;
  border-top: 1px solid rgba(246, 244, 243, 0.14);
  padding-top: 22px;
}
