/* ============================================================
   HALLMARK CAPITAL PARTNERS
   Design tokens + base + components (C-01 … C-07)
   Spec reference: Final Developer Handoff v1.0, §12 / §13
   ============================================================ */

/* ---------- 1. TOKENS ---------- */

:root {
  /* Palette — §12 Primary colors. Locked; do not extend. */
  --navy:        #0A1A2F;  /* Executive Blue  */
  --limestone:   #F2EDE6;  /* Warm Limestone  */
  --white:       #FFFFFF;
  --charcoal:    #2E3A45;
  --gold:        #C9A86A;  /* Punctuation only — §1, target 2–3% of viewport */

  /* Derived tones. Slate is the brand board's #5B6470, used for meta text only. */
  --slate:       #5B6470;
  --navy-deep:   #071322;  /* footer bar, one step below navy */
  --navy-scrim:  rgba(10, 26, 47, .78);
  --limestone-2: #EAE3D9;  /* hairline on limestone grounds */
  --gold-rule:   rgba(201, 168, 106, .55);

  /* Type — §12: editorial serif headlines, restrained sans elsewhere */
  --font-display: "Playfair Display", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --font-body:    "Montserrat", "Segoe UI", system-ui, -apple-system, sans-serif;

  /* Type scale */
  --t-hero:    clamp(2.25rem, 1.5rem + 2.1vw, 3.1rem);
  --t-display: clamp(1.9rem, 1.15rem + 2.2vw, 2.9rem);
  --t-lead:    clamp(1.35rem, 1.05rem + 0.9vw, 1.75rem);
  --t-body:    1rem;
  --t-small:   0.875rem;
  --t-label:   0.75rem;

  /* Spacing — brand board scale: 8 / 16 / 24 / 32 / 48 / 96 / 128 */
  --s1: 8px;  --s2: 16px; --s3: 24px; --s4: 32px;
  --s5: 48px; --s6: 96px; --s7: 128px;

  /* Layout — §12 */
  --w-content: 1200px;
  --w-read:     680px;
  --gutter:     clamp(20px, 4vw, 48px);

  /* Motion — §12: fade and subtle opacity only, 250–300ms */
  --ease: cubic-bezier(.32, .72, .35, 1);
  --dur:  280ms;
}

/* ---------- 2. RESET / BASE ---------- */

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--white);
  color: var(--charcoal);
  font-family: var(--font-body);
  font-size: var(--t-body);
  font-weight: 400;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
img { height: auto; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.18;
  letter-spacing: -0.005em;
  text-wrap: balance;
  margin: 0;
}

p { margin: 0; }

a { color: inherit; text-decoration: none; }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.skip-link {
  position: absolute; left: var(--s2); top: -100px; z-index: 100;
  background: var(--white); color: var(--navy);
  padding: var(--s2) var(--s3);
  font-size: var(--t-small);
  transition: top var(--dur) var(--ease);
}
.skip-link:focus { top: var(--s2); }

.u-visually-hidden {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- 3. SHARED PRIMITIVES ---------- */

/* Content column: 1200px cap, but the gutter only bites once the viewport
   is narrower than the cap — so wide screens get the full 1200 (§12). */
.shell {
  width: min(100% - (var(--gutter) * 2), var(--w-content));
  margin-inline: auto;
}

/* The approved header is full-bleed with a page inset, not capped at 1200. */
.site-header .shell,
.site-footer .shell {
  width: 100%;
  max-width: none;
  padding-inline: clamp(20px, 3.2vw, 48px);
}

/* Eyebrow label — gold, tracked, small caps feel */
.eyebrow {
  font-size: var(--t-label);
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 500;
  margin: 0;
}

/* The gold hairline. This is the primary gold surface on the site. */
.rule {
  width: 56px;
  height: 1px;
  background: var(--gold);
  border: 0;
  margin: 0;
}

.lede {
  max-width: var(--w-read);
  color: var(--slate);
  line-height: 1.85;
}

/* Buttons — §12: 1px gold outline, white text, restrained hover fill */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  padding: 14px var(--s4);
  border: 1px solid var(--gold);
  color: var(--white);
  background: transparent;
  font-family: var(--font-body);
  font-size: var(--t-label);
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color var(--dur) var(--ease),
              color var(--dur) var(--ease);
}
.btn:hover { background: rgba(201, 168, 106, .14); }

.btn--on-light { color: var(--navy); }
.btn--on-light:hover { background: rgba(201, 168, 106, .16); }

/* Quiet text link with gold underline */
.link-quiet {
  font-size: var(--t-label);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gold);
  border-bottom: 1px solid var(--gold-rule);
  padding-bottom: 4px;
  transition: border-color var(--dur) var(--ease);
}
.link-quiet:hover { border-color: var(--gold); }

/* ---------- 4. C-01 — GLOBAL HEADER ---------- */
/* §12: transparent over hero; deep navy after scroll; no heavy shadow */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  background: transparent;
  transition: background-color var(--dur) var(--ease);
}
.site-header.is-scrolled { background: var(--navy); }

.site-header__inner {
  display: flex;
  align-items: center;
  gap: var(--s4);
  min-height: 92px;
}
.header-cta { flex: none; padding-inline: var(--s3); }

.brand { display: flex; align-items: center; gap: 14px; flex: none; color: var(--gold); }
/* flex:none + explicit ratio — without it the svg is shrinkable to 0 when the
   header row runs tight, and the seal silently disappears. */
.brand__seal { flex: none; width: 30px; height: 41px; color: var(--gold); }
.brand__word { display: grid; gap: 3px; color: var(--white); }
.brand__name {
  font-size: 1.05rem; font-weight: 400;
  letter-spacing: .2em; line-height: 1;
}
.brand__sub {
  font-size: .58rem; font-weight: 400;
  letter-spacing: .26em; line-height: 1;
  color: rgba(255, 255, 255, .72);
}

.nav { margin-left: auto; flex: none; }
.nav__list {
  display: flex; align-items: center; gap: clamp(18px, 2vw, 34px);
  list-style: none; margin: 0; padding: 0;
}
.nav__link {
  display: inline-block;
  font-size: var(--t-label);
  letter-spacing: .13em;
  text-transform: uppercase;
  white-space: nowrap;
  color: rgba(255, 255, 255, .88);
  padding-block: 12px 6px;
  border-bottom: 1px solid transparent;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.nav__link:hover { color: var(--white); }
.nav__link[aria-current="page"] { color: var(--gold); border-bottom-color: var(--gold); }

.nav-toggle {
  display: none;
  margin-left: auto;
  background: none; border: 0; padding: var(--s1);
  color: var(--white); cursor: pointer;
}
.nav-toggle svg { width: 22px; }

/* ---------- 5. C-02 — HERO ---------- */

.hero {
  position: relative;
  min-height: 78vh;
  display: flex;
  align-items: center;
  padding-block: 168px var(--s6);
  overflow: hidden;
  background: var(--navy);
}
.hero__media {
  position: absolute; inset: 0;
  object-fit: cover;
  width: 100%; height: 100%;
}
/* Scrim keeps the headline legible and holds the navy character of the page */
.hero::after {
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(100deg, var(--navy) 6%, var(--navy-scrim) 34%, rgba(10, 26, 47, .28) 62%),
    linear-gradient(to bottom, var(--navy) 0%, transparent 26%);
}
/* NOTE: .hero__body is nested *inside* .shell, never combined with it —
   its narrow max-width would otherwise beat the shell's auto margins and
   centre the column instead of setting it on the gutter. Same for
   .statement__body below. */
.hero > .shell { position: relative; z-index: 1; }
.hero__body {
  display: grid; gap: var(--s4);
  max-width: 620px;
}
.hero__title {
  font-size: var(--t-hero);
  color: var(--white);
}
.hero__lede {
  max-width: 34ch;
  color: rgba(255, 255, 255, .82);
  line-height: 1.9;
}
.hero__cta { justify-self: start; }

/* ---------- 6. C-03 — EDITORIAL STATEMENT ---------- */

.statement {
  position: relative;
  background: var(--limestone);
  padding-block: var(--s7);
  overflow: hidden;
}
.statement > .shell { position: relative; z-index: 1; }
.statement__body { display: grid; gap: var(--s3); max-width: var(--w-read); }
.statement__title { font-size: var(--t-display); color: var(--navy); }
.statement__text { max-width: 44ch; color: var(--slate); }

/* Watermark seal — §13 C-03 "optional watermark seal" */
.statement__mark {
  position: absolute;
  right: clamp(24px, 8vw, 150px);
  top: 50%;
  translate: 0 -50%;
  width: clamp(120px, 14vw, 190px);
  color: var(--navy);
  opacity: .05;
  pointer-events: none;
}

/* ---------- 7. C-04 — NARRATIVE IMAGE ---------- */

.narrative { display: grid; grid-template-columns: 1fr 1fr; }
.narrative__media { position: relative; min-height: 420px; }
.narrative__media img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
}
.narrative__panel {
  position: relative;
  display: flex; align-items: center;
  padding: var(--s6) var(--gutter);
  background: var(--limestone);
  overflow: hidden;
}
/* Warm limestone panel, lifted very slightly toward the photograph's light
   so the two halves read as one band rather than a pasted-on card. */
.narrative__panel {
  background: linear-gradient(100deg, var(--limestone) 0%, #F7F2EA 100%);
}
.narrative__body {
  position: relative; z-index: 1;
  display: grid; gap: var(--s3);
  max-width: 420px;
}
.narrative__title { font-size: var(--t-lead); color: var(--navy); }
.narrative__lines {
  list-style: none; margin: 0; padding: 0;
  font-size: var(--t-small);
  color: var(--charcoal);
  line-height: 2;
}

/* ---------- 8. C-05 — LEADERSHIP FEATURE ---------- */

.leadership {
  background: var(--limestone);
  display: grid;
  grid-template-columns: minmax(240px, 340px) 1fr;
  align-items: stretch;
}
.leadership__portrait { position: relative; min-height: 400px; background: var(--charcoal); }
.leadership__portrait img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(1) contrast(1.04);
}
.leadership__body {
  display: grid; gap: var(--s3);
  align-content: center;
  padding: var(--s6) var(--gutter);
  max-width: 780px;
}
.leadership__quote {
  font-family: var(--font-display);
  font-size: var(--t-lead);
  line-height: 1.4;
  color: var(--navy);
  margin: 0;
  text-wrap: balance;
}
.leadership__mark {
  font-family: var(--font-display);
  font-size: 2.6rem; line-height: 0;
  color: var(--gold);
  display: block;
}
.leadership__name {
  font-size: var(--t-label);
  letter-spacing: .2em; text-transform: uppercase;
  color: var(--gold);
}
.leadership__role {
  font-size: var(--t-label);
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--charcoal);
}
.leadership__meta { display: grid; gap: 6px; }

/* ---------- 9. C-06 — CONVERSATION CTA ---------- */

.conversation {
  position: relative;
  background: var(--navy);
  color: var(--white);
  overflow: hidden;
  padding-block: var(--s6);
}
.conversation__media {
  position: absolute; inset: 0 0 0 auto;
  width: 46%; height: 100%;
  object-fit: cover;
  opacity: .5;
}
.conversation::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(90deg, var(--navy) 46%, rgba(10, 26, 47, .55) 100%);
}
.conversation__inner {
  position: relative; z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 1px minmax(0, .8fr);
  gap: var(--s6);
  align-items: center;
}
.conversation__divider { background: var(--gold-rule); align-self: stretch; }
.conversation__body { display: grid; gap: var(--s4); justify-items: start; }
.conversation__title {
  font-family: var(--font-display);
  font-size: var(--t-lead);
  line-height: 1.35;
  max-width: 16ch;
}
.contact-list { display: grid; gap: var(--s3); list-style: none; margin: 0; padding: 0; }
.contact-list li {
  display: flex; align-items: center; gap: var(--s2);
  font-size: var(--t-small); line-height: 1.5;
  overflow-wrap: anywhere;
}
.contact-list svg { width: 17px; color: var(--gold); flex: none; }
.contact-list a { border-bottom: 1px solid transparent; transition: border-color var(--dur) var(--ease); }
.contact-list a:hover { border-bottom-color: var(--gold-rule); }

/* ---------- 10. C-07 — GLOBAL FOOTER ---------- */

.site-footer {
  background: var(--navy-deep);
  color: rgba(255, 255, 255, .7);
  font-size: var(--t-small);
  border-top: 1px solid rgba(255, 255, 255, .07);
}
.site-footer__inner {
  display: flex; align-items: center; gap: var(--s5);
  min-height: 76px;
  flex-wrap: wrap;
}
.site-footer__brand {
  display: flex; align-items: center; gap: var(--s2);
  color: var(--white);
  font-size: var(--t-label);
  letter-spacing: .18em; text-transform: uppercase;
}
.site-footer__brand svg { width: 18px; color: var(--gold); }
.site-footer__legal { margin-inline: auto; }
.site-footer__links { display: flex; gap: var(--s5); list-style: none; margin: 0; padding: 0; }
.site-footer__links a {
  font-size: var(--t-label); letter-spacing: .14em; text-transform: uppercase;
  transition: color var(--dur) var(--ease);
}
.site-footer__links a:hover { color: var(--white); }

/* ---------- 10b. INNER-PAGE COMPONENTS ---------- */

/* Page head — the inner-page counterpart to C-02. Compact navy band, one idea. */
.page-head {
  background: var(--navy);
  color: var(--white);
  padding-block: 200px var(--s6);
}
.page-head__body { display: grid; gap: var(--s3); max-width: var(--w-read); }
.page-head__title { font-size: var(--t-display); color: var(--white); }
.page-head__lede { color: rgba(255, 255, 255, .78); max-width: 62ch; }

/* Editorial chapters — §4 requires capability read as advisory chapters,
   not service cards. No boxes, no borders, no icons: a rule, a title, a
   paragraph, separated by air. */
.chapters { background: var(--white); padding-block: var(--s7); }
.chapters__list { display: grid; gap: var(--s6); }
.chapter { display: grid; gap: var(--s2); max-width: var(--w-read); }
.chapter__title { font-size: var(--t-lead); color: var(--navy); }
.chapter__text { color: var(--slate); }

/* Numbered variant — used ONLY on Institutional Process, where the handoff
   numbers the steps 01–04 because the order genuinely carries meaning. */
.chapter--step { grid-template-columns: auto 1fr; column-gap: var(--s4); max-width: 820px; }
.chapter--step .chapter__num {
  grid-row: 1 / 3;
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--gold);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

/* Limestone editorial band for closing statements */
.closing { background: var(--limestone); padding-block: var(--s6); }
.closing__text {
  font-family: var(--font-display);
  font-size: var(--t-lead);
  line-height: 1.4;
  color: var(--navy);
  max-width: 24ch;
  text-wrap: balance;
}

/* Belief list — About */
.beliefs { display: grid; gap: var(--s3); max-width: var(--w-read); list-style: none; margin: 0; padding: 0; }
.beliefs li { display: grid; gap: 4px; }
.beliefs dt, .beliefs__term {
  font-size: var(--t-label);
  letter-spacing: .2em; text-transform: uppercase;
  color: var(--gold);
}
.beliefs__def { color: var(--slate); }

/* Leadership detail */
.bio { display: grid; grid-template-columns: minmax(0, 320px) 1fr; gap: var(--s6); align-items: start; }
.bio__portrait { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; filter: grayscale(1) contrast(1.04); background: var(--charcoal); }
.bio__body { display: grid; gap: var(--s3); max-width: var(--w-read); }
.bio__name { font-size: var(--t-lead); color: var(--navy); }
.bio__role { font-size: var(--t-label); letter-spacing: .2em; text-transform: uppercase; color: var(--gold); }
.bio__text { color: var(--slate); }

/* Contact form — §11 */
.form { display: grid; gap: var(--s3); max-width: var(--w-read); }
.form .btn { justify-self: start; margin-top: var(--s2); }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); }
.field { display: grid; gap: var(--s1); }
.field__label {
  font-size: var(--t-label);
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--charcoal);
}
.field__label .req { color: var(--gold); }
.field input, .field textarea {
  font-family: var(--font-body);
  font-size: var(--t-body);
  color: var(--navy);
  background: var(--white);
  border: 1px solid var(--limestone-2);
  border-bottom: 1px solid var(--slate);
  padding: 12px 14px;
  transition: border-color var(--dur) var(--ease);
}
.field input:focus, .field textarea:focus { border-bottom-color: var(--gold); }
.field textarea { min-height: 150px; resize: vertical; }

.contact-panel { display: grid; gap: var(--s3); align-content: start; }
.contact-panel .contact-list svg { color: var(--gold); }
.contact-panel .contact-list a:hover { border-bottom-color: var(--gold); }
.contact-grid { display: grid; grid-template-columns: 1fr minmax(0, 320px); gap: var(--s6); }

/* Location map — Contact */
.map { position: relative; border-top: 1px solid var(--gold-rule); }
.map iframe {
  display: block;
  width: 100%;
  height: clamp(260px, 42vh, 460px);
  border: 0;
  /* Desaturated so a full-colour Google map does not fight the palette. */
  filter: grayscale(1) contrast(.94);
  transition: filter var(--dur) var(--ease);
}
.map:hover iframe,
.map:focus-within iframe { filter: none; }
.map__bar {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: var(--s3) var(--s5);
  padding-block: var(--s3);
}
.map__address { font-size: var(--t-small); color: var(--slate); }
.map__bar .link-quiet { margin-left: auto; }

@media (prefers-reduced-motion: reduce) {
  .map iframe { transition: none; }
}

/* Long-form legal / utility pages */
.prose { max-width: var(--w-read); display: grid; gap: var(--s3); color: var(--slate); overflow-wrap: anywhere; }
.utility__text, .chapter__text, .bio__text { overflow-wrap: anywhere; }
.prose h2 { font-size: var(--t-lead); color: var(--navy); margin-top: var(--s4); }
.prose ul { margin: 0; padding-left: 1.2em; }

.section { padding-block: var(--s7); }
.section--tight { padding-block: var(--s6); }
.section--limestone { background: var(--limestone); }

/* Utility pages (404 / Thank You) — calm, centred, one action */
.utility { display: grid; gap: var(--s4); justify-items: start; max-width: var(--w-read); }
.utility__title { font-size: var(--t-display); color: var(--navy); }
.utility__text { color: var(--slate); }

@media (max-width: 900px) {
  .page-head { padding-block: 156px var(--s5); }
  .bio, .contact-grid { grid-template-columns: 1fr; gap: var(--s5); }
  .bio__portrait { max-width: 320px; }
  .form__row { grid-template-columns: 1fr; }
}

/* ---------- 11. MOTION ---------- */
/* §12: fade and subtle opacity only */

/* Content is visible by default. Only a JS-capable client opts into the fade,
   so a script failure can never leave the page blank. */
.js .reveal { opacity: 0; transition: opacity var(--dur) var(--ease); }
.js .reveal.is-visible { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transition: none; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

/* ---------- 12. RESPONSIVE ---------- */
/* §12: tablet simplifies; mobile prioritises readability and spacing */

@media (max-width: 1080px) {
  .nav__list { gap: var(--s4); }
  .site-header__inner { gap: var(--s4); }
}

@media (max-width: 1200px) {
  .nav-toggle { display: block; }
  .nav {
    position: fixed; inset: 92px 0 auto 0;
    background: var(--navy);
    display: none;
  }
  .nav.is-open { display: block; }
  .nav__list {
    flex-direction: column; align-items: stretch;
    gap: 0; padding: var(--s2) clamp(20px, 3.2vw, 48px) var(--s4);
  }
  /* block, not inline-block — otherwise each rule is only as wide as its label */
  .nav__link {
    display: block;
    padding-block: var(--s2);
    border-bottom: 1px solid rgba(255, 255, 255, .08);
  }
  .nav__list li:last-child .nav__link { border-bottom: 0; }
  .nav { border-bottom: 1px solid var(--gold-rule); }
  .header-cta { display: none; }
}

@media (max-width: 900px) {
  :root { --s6: 72px; --s7: 88px; }

  .narrative, .leadership { grid-template-columns: 1fr; }
  .narrative__media, .leadership__portrait { min-height: 280px; }
  .leadership__portrait { aspect-ratio: 4 / 3; min-height: 0; }

  .conversation__inner { grid-template-columns: 1fr; gap: var(--s5); }
  .conversation__divider { display: none; }
  .conversation__media { width: 100%; opacity: .28; }
  .conversation::after { background: linear-gradient(180deg, var(--navy) 30%, rgba(10, 26, 47, .72)); }

  .statement__mark { opacity: .035; right: 8px; width: clamp(96px, 22vw, 150px); }
}

@media (max-width: 620px) {
  .hero { min-height: 0; padding-block: 148px var(--s6); }
  .site-footer__inner { flex-direction: column; align-items: flex-start; gap: var(--s3); padding-block: var(--s4); }
  .site-footer__legal { margin-inline: 0; }
}
