/* ============================================================
   Map & Vector — main site styles
   ============================================================ */

/* ── Fonts (self-hosted, latin subset, variable) ─────────── */
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('/fonts/cormorant-garamond-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: italic;
  font-weight: 300 700;
  font-display: swap;
  src: url('/fonts/cormorant-garamond-italic-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 100 1000;
  font-display: swap;
  src: url('/fonts/dm-sans-latin.woff2') format('woff2');
}

/* ── Tokens ──────────────────────────────────────────────── */
:root {
  --ink:          #0f0f0d;
  --paper:        #f5f0e8;
  --warm:         #faf7f2;
  --accent:       #b5834a;
  --accent-lt:    #d4a96a;
  --accent-text:  #86592a;   /* gold for small text on light grounds (>= 5.3:1) */
  --accent-text-hover: #6b4620;
  --muted:        #6b6560;
  --body:         #5c5652;
  --line:         rgba(15, 15, 13, 0.12);
  --line-dark:    rgba(245, 240, 232, 0.18);
  --text-dark:    rgba(245, 240, 232, 0.75);

  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans:  'DM Sans', system-ui, sans-serif;

  --max:     1180px;
  --gutter:  clamp(1.25rem, 5vw, 3rem);
  --section: clamp(4rem, 9vw, 7rem);
  --radius:  2px;
}

/* ── Base ────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 70px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--warm);
  color: var(--ink);
  font-family: var(--sans);
}
main { flex: 1 0 auto; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--accent-text); text-decoration: none; transition: color 0.2s, background-color 0.2s, border-color 0.2s; }
a:hover { color: var(--accent-text-hover); }
h1, h2, h3, p { margin: 0; }

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ── Type ────────────────────────────────────────────────── */
.h1 {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2.5rem, 5.5vw, 4.3rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
  text-wrap: pretty;
}
.h1 em { color: var(--accent-lt); }
.h2 {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(1.9rem, 3.5vw, 2.8rem);
  line-height: 1.15;
  text-wrap: pretty;
}
.label {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-text);
}
.label::before {
  content: '';
  width: 28px;
  height: 1px;
  background: currentColor;
}
.on-dark .label { color: var(--accent-lt); }
.body-text {
  font-size: 1.125rem;
  line-height: 1.7;
  font-weight: 400;
  color: var(--body);
  max-width: 56ch;
  text-wrap: pretty;
}
.lede {
  font-size: 1.25rem;
  line-height: 1.7;
  font-weight: 400;
  color: var(--text-dark);
  max-width: 560px;
  text-wrap: pretty;
}

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-block;
  padding: 14px 30px;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: var(--radius);
  border: 1px solid transparent;
}
.btn--gold { background: var(--accent); color: var(--ink); }
.btn--gold:hover { background: var(--accent-lt); color: var(--ink); }
.btn--dark { background: var(--ink); color: var(--paper); }
.btn--dark:hover { background: var(--accent); color: var(--ink); }
.btn--outline { border-color: rgba(245, 240, 232, 0.3); color: var(--paper); }
.btn--outline:hover { border-color: var(--accent-lt); color: var(--accent-lt); }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }

.text-link {
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  border-bottom: 1px solid var(--accent);
  padding-bottom: 4px;
}
.text-link:hover { color: var(--accent-text); }

/* ── Nav ─────────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(245, 240, 232, 0.96);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(15, 15, 13, 0.1);
}
.nav__inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 18px var(--gutter);
  display: flex;
  flex-wrap: wrap;
  gap: 16px 32px;
  align-items: center;
  justify-content: space-between;
}
.wordmark {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink);
}
.wordmark:hover { color: var(--ink); }
.wordmark span { color: var(--accent); }
.nav__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 30px;
  align-items: center;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.nav__links a { color: var(--ink); }
.nav__links a:hover,
.nav__links a[aria-current="page"] { color: var(--accent-text); }
.nav__links .nav__cta { background: var(--ink); color: var(--paper); padding: 9px 18px; border-radius: var(--radius); }
.nav__links .nav__cta:hover { background: var(--accent); color: var(--ink); }

/* ── Sections ────────────────────────────────────────────── */
.section { padding: var(--section) 0; }
.section--paper { background: var(--paper); border-top: 1px solid rgba(15, 15, 13, 0.08); }
.section--contours-ink { background: var(--warm) url('/assets/contours-ink.svg') center / cover no-repeat; }
.on-dark {
  background: var(--ink) url('/assets/contours-dark.svg') center / cover no-repeat;
  color: var(--paper);
}
.section-head {
  max-width: 640px;
  margin-bottom: 48px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.section-head--tight { margin-bottom: 40px; }

/* ── Heroes ──────────────────────────────────────────────── */
.hero__inner {
  padding-top: clamp(5rem, 12vw, 9rem);
  padding-bottom: clamp(4.5rem, 10vw, 7.5rem);
}
.hero__content {
  max-width: 800px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  align-items: flex-start;
}
.hero__eyebrow {
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-lt);
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(181, 131, 74, 0.45);
}
.hero__sub {
  font-size: clamp(1.125rem, 1rem + 0.5vw, 1.3rem);
  line-height: 1.7;
  font-weight: 400;
  color: var(--text-dark);
  max-width: 560px;
  text-wrap: pretty;
}
.hero__content .btn-row { margin-top: 6px; }

.page-hero__inner {
  padding-top: clamp(4rem, 9vw, 6.5rem);
  padding-bottom: clamp(3rem, 6vw, 5rem);
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-items: flex-start;
}
.page-hero__inner .h1 { font-size: clamp(2.5rem, 5.5vw, 4.2rem); }
.page-hero__inner .btn-row { margin-top: 8px; }

/* ── Hairline card grid (Home services) ──────────────────── */
/* Three cards: stack to one column, then three across. No two-column step,
   which would leave an empty fourth cell showing the divider colour. */
.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.card {
  background: var(--warm);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.card h3 {
  font-family: var(--serif);
  font-size: 1.625rem;
  font-weight: 400;
  line-height: 1.2;
}
.card p { font-size: 1.0625rem; line-height: 1.65; font-weight: 400; color: var(--muted); }
.num { font-size: 0.8125rem; letter-spacing: 0.14em; color: var(--accent-text); font-weight: 500; }
@media (min-width: 760px) {
  .cards { grid-template-columns: repeat(3, 1fr); }
}
.after-cards { margin-top: 32px; display: flex; }

/* ── Two-part rows (flex-wrap, between hairline dividers) ── */
.rows { display: flex; flex-direction: column; }
.rows > * { border-top: 1px solid var(--line); }
.rows > :last-child { border-bottom: 1px solid var(--line); }

/* Case studies */
.case {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 40px;
  padding: 34px 0;
  align-items: baseline;
}
.case__figure { flex: 1 1 220px; display: flex; flex-direction: column; gap: 4px; }
.case__stat {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  color: var(--accent-text);
  line-height: 1.15;
}
.case__caption { font-size: 0.8125rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.case__body { flex: 2 1 380px; display: flex; flex-direction: column; gap: 6px; }
.case__body h3 { font-size: 1.25rem; font-weight: 500; line-height: 1.4; }
.case__body p { font-size: 1.0625rem; line-height: 1.65; font-weight: 400; color: var(--muted); }

/* Approach services */
.service {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 48px;
  padding: 40px 0;
}
.service__head { flex: 1 1 260px; display: flex; gap: 16px; align-items: baseline; }
.service__head .num { font-size: 0.8125rem; }
.service__head h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.6rem, 2.6vw, 2.1rem);
  line-height: 1.15;
}
.service p {
  flex: 2 1 420px;
  font-size: 1.125rem;
  line-height: 1.7;
  font-weight: 400;
  color: var(--body);
  text-wrap: pretty;
}
.statement {
  margin-top: 44px;
  font-family: var(--serif);
  font-size: clamp(1.3rem, 2.2vw, 1.75rem);
  font-weight: 400;
  line-height: 1.45;
  text-wrap: pretty;
}

/* Insights post list */
.posts-section { padding: clamp(3rem, 7vw, 5.5rem) 0 var(--section); }
.post {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 48px;
  padding: 34px 0;
  color: var(--ink);
}
.post:hover { background: var(--paper); color: var(--ink); }
.post__topic {
  flex: 1 1 180px;
  font-size: 0.8125rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-text);
  padding-top: 8px;
}
.post__body { flex: 4 1 460px; display: flex; flex-direction: column; gap: 8px; }
.post__body h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.5rem, 2.4vw, 1.9rem);
  line-height: 1.2;
  text-wrap: pretty;
}
.post__body p { font-size: 1.0625rem; line-height: 1.65; font-weight: 400; color: var(--body); max-width: 62ch; }
.post__date { font-size: 0.8125rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.post__more {
  margin-top: 4px;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-text);
}

/* ── About ───────────────────────────────────────────────── */
.about {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: clamp(2.5rem, 6vw, 4.5rem);
  align-items: center;
}
.about__photo { position: relative; max-width: 440px; width: 100%; }
.about__photo img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center top;
  border-radius: var(--radius);
}
.about__photo::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background: var(--accent);
}
.about__text { display: flex; flex-direction: column; gap: 18px; align-items: flex-start; }
.about__text .btn { margin-top: 12px; }

/* ── Contact ─────────────────────────────────────────────── */
.contact {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr));
  gap: 48px;
  align-items: start;
}
.contact__intro { display: flex; flex-direction: column; gap: 16px; }
.contact__intro .h2 { font-size: clamp(2rem, 4vw, 3rem); line-height: 1.12; }
.contact__intro p { font-size: 1.125rem; line-height: 1.7; font-weight: 400; color: var(--text-dark); max-width: 46ch; }
.contact__list { display: flex; flex-direction: column; border-top: 1px solid var(--line-dark); }
.contact__row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 24px;
  justify-content: space-between;
  align-items: baseline;
  padding: 22px 0;
  border-bottom: 1px solid var(--line-dark);
}
.contact__row span {
  font-size: 0.8125rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(245, 240, 232, 0.6);
}
.contact__row a {
  font-family: var(--serif);
  font-size: clamp(1.4rem, 2.4vw, 1.8rem);
  color: var(--paper);
}
.contact__row a:hover { color: var(--accent-lt); }

/* ── Footer ──────────────────────────────────────────────── */
.footer {
  background: var(--ink);
  color: var(--paper);
  padding: 48px 0 32px;
  border-top: 1px solid rgba(245, 240, 232, 0.08);
}
.footer__top {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  justify-content: space-between;
  align-items: flex-end;
}
.footer__brand { display: flex; flex-direction: column; gap: 4px; }
.footer__wordmark {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 300;
  letter-spacing: 0.04em;
}
.footer__wordmark span { color: var(--accent); }
.footer__tagline { font-size: 0.875rem; color: rgba(245, 240, 232, 0.6); }
.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  font-size: 0.875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.footer__links a { color: rgba(245, 240, 232, 0.6); }
.footer__links a:hover { color: var(--accent-lt); }
.footer__legal {
  margin-top: 36px;
  padding-top: 18px;
  border-top: 1px solid rgba(245, 240, 232, 0.12);
  font-size: 0.8125rem;
  color: rgba(245, 240, 232, 0.6);
}
