/*
 * McPoopyPants Potty Polishing — site stylesheet
 * Aesthetic: warm-black coachbuilt-luxury press kit. Gold is line, not fill.
 * Bodoni Moda (display, deadpan grandeur) + Jost (geometric precision).
 * One non-black section on the entire site: the oxblood E.S.R.T. block.
 */

/* ============================================================
   Design Tokens
   ============================================================ */
:root {
  --color-primary: #C9A84C;
  --color-accent: #C9A84C;
  --gold: #C9A84C;
  --gold-deep: #9F8238;
  --gold-soft: rgba(201, 168, 76, 0.55);
  --gold-hair: rgba(201, 168, 76, 0.32);
  --color-secondary: #6B3A2A;
  --oxblood: #6B3A2A;
  --oxblood-deep: #4E281C;
  --color-bg: #0A0A0A;
  --bg: #0A0A0A;
  --surface: #141210;
  --surface-2: #1B1813;
  --border: #2A2620;
  --color-text: #FFFFFF;
  --text: #FFFFFF;
  --color-text-secondary: #B8B2A6;
  --muted: #B8B2A6;
  --muted-dim: #8A857B;

  --font-primary: 'Bodoni Moda', Georgia, serif;
  --font-display: 'Bodoni Moda', Georgia, serif;
  --font-secondary: 'Jost', sans-serif;
  --font-body: 'Jost', sans-serif;
  --font-size-base: 16px;
  --spacing-base: 8px;

  --maxw: 1280px;
  --gutter: clamp(1.25rem, 5vw, 5rem);
  --measure: 64ch;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ============================================================
   Base Reset
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: var(--font-size-base, 16px);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.7;
  padding-bottom: 42px; /* required */
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: var(--gold); text-decoration: none; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; }

/* Focus states — WCAG AA */
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

::selection { background: var(--gold); color: #0A0A0A; }

/* ============================================================
   Typography scale
   ============================================================ */
.display {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(3rem, 8vw, 6.75rem);
  line-height: 0.98;
  letter-spacing: 0.012em;
  text-transform: uppercase;
}
.h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.6rem, 6vw, 4.5rem);
  line-height: 1.02;
  letter-spacing: 0.012em;
  text-transform: uppercase;
}
.h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2rem, 4.4vw, 3rem);
  line-height: 1.08;
  letter-spacing: 0.006em;
}
.h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.5rem, 2.6vw, 1.95rem);
  line-height: 1.14;
}
.lead {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: clamp(1.15rem, 1.7vw, 1.45rem);
  line-height: 1.55;
  color: #ECE7DC;
}
.body-copy {
  font-weight: 400;
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--muted);
  max-width: var(--measure);
}
.body-copy + .body-copy { margin-top: 1.1em; }
.gold-word { color: var(--gold); }
.tm { font-size: 0.62em; vertical-align: 0.55em; letter-spacing: 0; }

/* Tracked small-caps label + gold hairline rule — the connective device */
.label {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.75rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold);
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
}
.label::before {
  content: "";
  width: clamp(28px, 4vw, 54px);
  height: 1px;
  background: var(--gold);
  display: inline-block;
}
.label--plain::before { display: none; }

/* ============================================================
   Layout helpers
   ============================================================ */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section { padding-block: clamp(5rem, 11vw, 9.5rem); position: relative; }
.section--tight { padding-block: clamp(3.5rem, 7vw, 6rem); }
.min0 { min-width: 0; }

/* Orbital gold motif — flattened to a full-width hairline divider */
.gold-rule-full {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold) 18%, var(--gold) 82%, transparent);
  border: 0;
}

/* ============================================================
   Splash
   ============================================================ */
#splash {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: #060606;
  display: grid;
  place-items: center;
  transition: opacity 0.7s var(--ease), visibility 0.7s var(--ease);
}
#splash.gone { opacity: 0; visibility: hidden; pointer-events: none; }
#splash .brand-emblem { width: 92px; height: 92px; opacity: 0; animation: splashIn 1s var(--ease) 0.1s forwards; }
@keyframes splashIn {
  from { opacity: 0; transform: scale(0.92); }
  to   { opacity: 1; transform: scale(1); }
}

/* ============================================================
   Brand mark (emblem + wordmark)
   ============================================================ */
.brand-emblem { display: block; }
.brand-mark {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  line-height: 1;
  color: var(--text);
}
.brand-mark .emblem { width: 40px; height: 40px; }
.brand-mark .wordmark {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1.18rem;
  letter-spacing: 0.01em;
  color: var(--text);
}
.brand-mark .subword {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.56rem;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--gold);
  margin-left: 0.42em;
}

/* ============================================================
   Header / Navigation — centered logo, split menu
   ============================================================ */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  transition: background 1s var(--ease), border-color 1s var(--ease), backdrop-filter 1s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(20, 18, 16, 0.92);
  border-bottom-color: var(--gold-hair);
  backdrop-filter: blur(8px);
}
.nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1.5rem;
  padding-block: 1.1rem;
}
.nav-side {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.4vw, 2.4rem);
}
.nav-side.left { justify-content: flex-end; }
.nav-side.right { justify-content: flex-start; }
.nav-link {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #E7E2D6;
  position: relative;
  padding-block: 0.4rem;
  white-space: nowrap;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 1px;
  background: var(--gold);
  transition: width 0.4s var(--ease);
}
.nav-link:hover::after, .nav-link:focus-visible::after, .nav-link[aria-current="page"]::after { width: 100%; }
.nav-link[aria-current="page"] { color: #fff; }

.nav-cta {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid var(--gold);
  padding: 0.7rem 1.2rem;
  transition: background 0.4s var(--ease), color 0.4s var(--ease);
  white-space: nowrap;
}
.nav-cta:hover, .nav-cta:focus-visible { background: var(--gold); color: #0A0A0A; }

.nav-center { display: flex; justify-content: center; }
.nav-toggle { display: none; }

/* Mobile menu */
@media (max-width: 900px) {
  .nav { grid-template-columns: auto 1fr auto; }
  .nav-side.desktop { display: none; }
  .nav-toggle {
    display: inline-flex;
    align-items: center; justify-content: center;
    width: 44px; height: 44px;
    background: transparent; border: 0; color: var(--gold);
    font-size: 1.7rem; cursor: pointer;
  }
  .nav-center { justify-content: center; }
  .mobile-menu {
    position: fixed; inset: 0;
    background: rgba(8, 7, 6, 0.98);
    backdrop-filter: blur(6px);
    z-index: 250;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: 1.8rem;
    opacity: 0; visibility: hidden;
    transition: opacity 0.5s var(--ease), visibility 0.5s var(--ease);
  }
  .mobile-menu.open { opacity: 1; visibility: visible; }
  .mobile-menu a {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 1.9rem;
    color: #EDE8DC; text-transform: uppercase; letter-spacing: 0.04em;
  }
  .mobile-menu a.nav-cta {
    font-family: var(--font-body);
    font-size: 0.85rem; color: var(--gold);
  }
  .mobile-close {
    position: absolute; top: 1.5rem; right: 1.5rem;
    background: none; border: 0; color: var(--gold); font-size: 2rem; cursor: pointer;
  }
}
@media (min-width: 901px) {
  .nav-toggle, .mobile-menu { display: none; }
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
}
.hero-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
}
.hero-bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 42%;
}
.hero-scrim {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(120% 90% at 60% 38%, transparent 30%, rgba(0,0,0,0.5) 78%, rgba(0,0,0,0.85) 100%),
    linear-gradient(to top, rgba(0,0,0,0.92) 2%, rgba(0,0,0,0.35) 42%, rgba(0,0,0,0.25) 100%);
}
.hero-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
  padding-bottom: clamp(4rem, 12vh, 9rem);
  padding-top: 8rem;
}
.hero-content { max-width: min(40%, 30rem); }
.hero .label { margin-bottom: 1.6rem; }
.hero-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.9rem, 7.2vw, 5.6rem);
  line-height: 1.0;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}
.hero-lead { color: #E4DFD4; max-width: 30ch; font-weight: 300; }

/* Hero orbital arc */
.hero-arc {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: visible;
}
.hero-arc path {
  fill: none;
  stroke: var(--gold);
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-dasharray: 2200;
  stroke-dashoffset: 2200;
  opacity: 0.85;
  filter: drop-shadow(0 0 6px rgba(201,168,76,0.25));
}
.loaded .hero-arc path { animation: drawArc 1.8s var(--ease) 0.7s forwards; }
@keyframes drawArc { to { stroke-dashoffset: 0; } }

/* ============================================================
   Buttons
   ============================================================ */
.btn-gold {
  display: inline-flex;
  align-items: center; gap: 0.7rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  background: var(--gold);
  color: #0A0A0A;
  padding: 1rem 1.9rem;
  border: 1px solid var(--gold);
  transition: background 0.35s var(--ease), border-color 0.35s var(--ease);
}
.btn-gold:hover, .btn-gold:focus-visible { background: var(--gold-deep); border-color: var(--gold-deep); color: #0A0A0A; }
.btn-ghost {
  display: inline-flex;
  align-items: center; gap: 0.6rem;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.76rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  border-bottom: 1px solid var(--gold-soft);
  padding-bottom: 0.35rem;
  transition: border-color 0.35s var(--ease), gap 0.35s var(--ease);
}
.btn-ghost:hover, .btn-ghost:focus-visible { border-color: var(--gold); gap: 1rem; }
.btn-gold i, .btn-ghost i { font-size: 1.05em; }

/* ============================================================
   Doctrine / type-only panels
   ============================================================ */
.doctrine { background: #070707; }
.doctrine-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}
.doctrine-statement {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.1rem, 4.8vw, 3.7rem);
  line-height: 1.12;
  letter-spacing: 0.005em;
  max-width: 18ch;
}
.doctrine-statement .pull { font-style: italic; font-weight: 500; }
.doctrine-body { max-width: 46ch; margin-left: auto; }
@media (min-width: 860px) {
  .doctrine-grid { grid-template-columns: 1.1fr 0.9fr; align-items: end; gap: 4rem; }
  .doctrine { padding-block: clamp(7rem, 14vw, 12rem); }
}

/* ============================================================
   Signature services preview — prestige-weighted asymmetry
   ============================================================ */
.svc-preview { background: var(--bg); }
.svc-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  margin-top: 3rem;
}
.svc-flag { position: relative; }
.svc-flag-media {
  position: relative;
  aspect-ratio: 4 / 3.4;
  overflow: clip;
  border: 1px solid var(--border);
}
.svc-flag-media img { width: 100%; height: 100%; object-fit: cover; object-position: center 40%; transition: transform 1.2s var(--ease); }
.svc-flag:hover .svc-flag-media img { transform: scale(1.04); }
.svc-flag-body { padding-top: 1.6rem; }
.svc-flag-body .h2 { margin: 0.6rem 0 0.8rem; }

.svc-minor-list { display: flex; flex-direction: column; gap: 1.6rem; }
.svc-minor {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.4rem;
  padding: 1.6rem 0;
  border-top: 1px solid var(--border);
  transition: transform 0.4s var(--ease);
}
.svc-minor:last-child { border-bottom: 1px solid var(--border); }
.svc-minor:hover { transform: translateY(-2px); }
.svc-minor .icon-medal { color: var(--gold); }
.svc-minor h3 { margin-bottom: 0.4rem; }
.svc-minor p { color: var(--muted); font-size: 0.96rem; max-width: 42ch; }
.svc-minor .micro {
  position: relative;
  display: inline-block;
  margin-top: 0.7rem;
}
.svc-minor .micro::after {
  content: ""; position: absolute; left: 0; bottom: -4px; height: 1px; width: 0; background: var(--gold); transition: width 0.45s var(--ease);
}
.svc-minor:hover .micro::after { width: 100%; }

@media (min-width: 920px) {
  .svc-grid { grid-template-columns: 1.32fr 1fr; gap: clamp(2.5rem, 5vw, 5rem); align-items: stretch; }
  .svc-flag-media { aspect-ratio: auto; height: 100%; min-height: 520px; }
  .svc-flag-media img { object-position: 38% center; }
  /* edge-bleed left */
  .svc-flag { margin-left: calc(-1 * var(--gutter)); }
  .svc-flag-media { border-left: 0; }
}

/* Bespoke gold prestige icons (hairline-weight, same metal system) */
.prestige-icon { width: 46px; height: 46px; flex: none; }
.prestige-icon path, .prestige-icon circle, .prestige-icon line, .prestige-icon polyline, .prestige-icon polygon {
  fill: none; stroke: var(--gold); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round;
}
.prestige-icon .fill { fill: var(--gold); stroke: none; }

/* ============================================================
   Certified Throne guarantee — museum plinth
   ============================================================ */
.certified { background: var(--surface); }
.certified-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
}
.plinth {
  position: relative;
  display: grid;
  place-items: center;
  padding: clamp(2rem, 5vw, 4rem);
  background:
    radial-gradient(70% 60% at 50% 42%, rgba(201,168,76,0.10), transparent 70%),
    #0B0B0B;
  border: 1px solid var(--border);
}
.plinth img {
  width: min(360px, 80%);
  border-radius: 50%;
  box-shadow: 0 30px 60px rgba(0,0,0,0.7);
}
.plinth-caption {
  margin-top: 1.6rem;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.68rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--muted-dim);
  text-align: center;
  line-height: 1.9;
}
.plinth-caption strong { color: var(--gold); font-weight: 600; }
.guarantee-callout {
  margin-top: 1.8rem;
  border-left: 1px solid var(--gold);
  padding-left: 1.4rem;
  font-family: var(--font-display);
  font-weight: 500;
  font-style: italic;
  font-size: clamp(1.3rem, 2.4vw, 1.8rem);
  line-height: 1.3;
  color: #F1ECE0;
}
@media (min-width: 880px) {
  .certified-grid { grid-template-columns: 0.95fr 1.05fr; gap: clamp(3rem, 6vw, 6rem); }
}

/* ============================================================
   Full-bleed environment band (facilities / where we work)
   ============================================================ */
.band {
  position: relative;
  min-height: 78vh;
  display: flex;
  align-items: flex-end;
  overflow: clip;
}
.band-media { position: absolute; inset: 0; z-index: 0; }
.band-media img { width: 100%; height: 100%; object-fit: cover; object-position: center 55%; }
.band-scrim {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(to top, rgba(0,0,0,0.94) 4%, rgba(0,0,0,0.5) 45%, rgba(0,0,0,0.55) 100%);
}
.band-inner {
  position: relative; z-index: 2; width: 100%;
  max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter);
  padding-block: clamp(3rem, 7vw, 6rem);
}
.band-statement { max-width: 26ch; }
.facility-rail {
  margin-top: 2.6rem;
  border-top: 1px solid var(--gold);
  padding-top: 1.4rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0;
}
.facility-rail .fac {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.74rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: #E7E2D6;
  padding: 0 clamp(1rem, 3vw, 2.2rem);
  position: relative;
}
.facility-rail .fac:not(:first-child)::before {
  content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 1px; height: 1.1em; background: var(--gold-soft);
}

/* ============================================================
   CTA ring
   ============================================================ */
.cta-final { background: #070707; text-align: center; }
.cta-ring-wrap { position: relative; display: inline-grid; place-items: center; padding: clamp(3rem, 8vw, 6rem); }
.cta-ring {
  position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none;
}
.cta-ring circle {
  fill: none; stroke: var(--gold); stroke-width: 1; opacity: 0.7;
  stroke-dasharray: 920; stroke-dashoffset: 920;
}
.is-visible .cta-ring circle { animation: drawRing 1.6s var(--ease) forwards; }
@keyframes drawRing { to { stroke-dashoffset: 0; } }
.cta-final .micro-label { margin-bottom: 1.4rem; justify-content: center; }
.cta-final .h2 { max-width: 16ch; margin-inline: auto; margin-bottom: 2rem; }

/* ============================================================
   Page header band (interior pages)
   ============================================================ */
.page-head {
  position: relative;
  min-height: 64vh;
  display: flex;
  align-items: flex-end;
  overflow: clip;
}
.page-head-media { position: absolute; inset: 0; z-index: 0; }
.page-head-media img { width: 100%; height: 100%; object-fit: cover; }
.page-head-scrim {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(90deg, rgba(0,0,0,0.92) 0%, rgba(0,0,0,0.55) 55%, rgba(0,0,0,0.2) 100%),
             linear-gradient(to top, rgba(0,0,0,0.8), transparent 60%);
}
.page-head-inner {
  position: relative; z-index: 2; width: 100%;
  max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter);
  padding-block: clamp(3rem, 7vw, 6rem); padding-top: 9rem;
}
.page-head .label { margin-bottom: 1.3rem; }
.page-head-title { max-width: 14ch; }

/* ============================================================
   Service detail blocks (services page)
   ============================================================ */
.svc-detail { position: relative; }
.svc-detail + .svc-detail { border-top: 1px solid var(--border); }
.svc-detail-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: center;
}
.svc-detail-media {
  position: relative;
  aspect-ratio: 5 / 4;
  overflow: clip;
  border: 1px solid var(--border);
}
.svc-detail-media img { width: 100%; height: 100%; object-fit: cover; }
.svc-detail-body .label { margin-bottom: 1.2rem; }
.svc-detail-body .h2 { margin-bottom: 1.2rem; display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.spec-list { list-style: none; margin-top: 1.8rem; display: grid; gap: 0; }
.spec-list li {
  display: grid; grid-template-columns: auto 1fr; gap: 1rem; align-items: baseline;
  padding: 0.9rem 0; border-top: 1px solid var(--border);
  font-size: 0.98rem; color: var(--muted);
}
.spec-list li i { color: var(--gold); font-size: 1rem; }
.spec-list li:last-child { border-bottom: 1px solid var(--border); }

@media (min-width: 920px) {
  .svc-detail-grid { grid-template-columns: 1.1fr 1fr; gap: clamp(3rem, 6vw, 6rem); }
  .svc-detail-grid.reversed .svc-detail-media { order: 2; }
  .svc-detail-media.bleed-left { margin-left: calc(-1 * var(--gutter)); height: 100%; aspect-ratio: auto; min-height: 540px; }
  .svc-detail-media.bleed-right { margin-right: calc(-1 * var(--gutter)); height: 100%; aspect-ratio: auto; min-height: 540px; }
}

/* Presidential inset overlap */
.media-with-inset { position: relative; }
.media-inset {
  position: absolute;
  right: -6%; bottom: -8%;
  width: 46%;
  max-width: 260px;
  border: 1px solid var(--gold-hair);
  box-shadow: 0 24px 48px rgba(0,0,0,0.75);
  aspect-ratio: 3 / 4;
  overflow: clip;
}
.media-inset img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
@media (max-width: 560px) {
  .media-inset { position: relative; right: 0; bottom: 0; width: 60%; margin-top: -2rem; margin-left: auto; }
}

/* ============================================================
   E.S.R.T. oxblood block — the only non-black section
   ============================================================ */
.esrt {
  background: linear-gradient(135deg, var(--oxblood) 0%, var(--oxblood-deep) 100%);
  color: #fff;
}
.esrt-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: center;
}
.esrt .label { color: #F0D9A6; }
.esrt .label::before { background: var(--gold); }
.esrt .h2 { color: #fff; margin-block: 0.8rem 1.2rem; }
.esrt p { color: rgba(255,255,255,0.86); max-width: 46ch; }
.esrt-badge { display: grid; place-items: center; }
.esrt-badge svg { width: clamp(130px, 22vw, 190px); height: auto; }
.esrt-actions { margin-top: 1.8rem; display: flex; flex-wrap: wrap; gap: 1.2rem; align-items: center; }
.esrt-phone {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  letter-spacing: 0.01em;
  color: #fff;
  display: inline-block;
}
.esrt-phone:hover { color: #F0D9A6; }
@media (min-width: 820px) {
  .esrt-grid { grid-template-columns: auto 1fr; gap: clamp(3rem, 6vw, 5.5rem); }
}

/* ============================================================
   Process — connected gold seam through steps
   ============================================================ */
.swirl-steps { position: relative; }
.swirl-steps .seam {
  position: absolute;
  left: 50%; top: 0; bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, transparent, var(--gold-soft) 6%, var(--gold-soft) 94%, transparent);
  transform: translateX(-50%);
  z-index: 0;
}
.swirl-step {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center;
  padding-block: clamp(3rem, 7vw, 6rem);
}
.swirl-step-media { position: relative; aspect-ratio: 4 / 3; overflow: clip; border: 1px solid var(--border); }
.swirl-step-media img { width: 100%; height: 100%; object-fit: cover; }
.swirl-num {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(3.5rem, 9vw, 7rem);
  line-height: 0.8;
  color: transparent;
  -webkit-text-stroke: 1px var(--gold-soft);
  margin-bottom: 0.6rem;
}
.swirl-node {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%);
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--gold); box-shadow: 0 0 0 5px rgba(201,168,76,0.16);
  z-index: 2;
}
@media (min-width: 880px) {
  .swirl-step { grid-template-columns: 1fr 1fr; gap: clamp(3rem, 7vw, 7rem); }
  .swirl-step:nth-child(even) .swirl-step-media { order: 2; }
  .swirl-step-media { aspect-ratio: 3 / 4; max-height: 560px; }
}
@media (max-width: 879px) {
  .swirl-steps .seam { left: 22px; }
  .swirl-node { display: none; }
}

/* Lineage — broadsheet break for exactly one block */
.lineage { background: #070707; }
.lineage-quote {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.22;
  max-width: 22ch;
  margin-bottom: 3rem;
}
.lineage-columns { columns: 1; column-gap: 3rem; max-width: 70ch; }
.lineage-columns .entry { break-inside: avoid; margin-bottom: 1.8rem; }
.lineage-columns .entry .label { margin-bottom: 0.7rem; }
.lineage-columns .entry p { color: var(--muted); font-size: 0.98rem; }
@media (min-width: 760px) { .lineage-columns { columns: 2; } }

/* ============================================================
   Detail strip (recurring / standards)
   ============================================================ */
.detail-strip-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: stretch;
  margin-top: 3rem;
}
.detail-strip-img { position: relative; overflow: clip; border: 1px solid var(--border); min-height: 320px; }
.detail-strip-img img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
@media (min-width: 820px) {
  .detail-strip-grid { grid-template-columns: 0.42fr 1fr; gap: clamp(2.5rem, 5vw, 4.5rem); }
  .detail-strip-img { min-height: 100%; }
}

/* ============================================================
   Contact — boxless gold-hairline form
   ============================================================ */
.contact-split {
  display: grid;
  grid-template-columns: 1fr;
}
.contact-form-side {
  background: var(--surface);
  padding: clamp(2.5rem, 6vw, 6rem) var(--gutter);
}
.contact-form-side .inner { max-width: 560px; margin-inline: auto; }
.contact-media-side { position: relative; min-height: 340px; overflow: clip; }
.contact-media-side img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.contact-media-side .band-scrim { background: linear-gradient(to right, rgba(0,0,0,0.6), transparent); }

.contact-form { margin-top: 2.2rem; display: grid; gap: 2rem; }
.field { position: relative; }
.field label {
  display: block;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.7rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.6rem;
}
.field input, .field textarea, .field select {
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--border);
  color: #fff;
  font-family: var(--font-body);
  font-size: 1.05rem;
  padding: 0.6rem 0;
  transition: border-color 0.4s var(--ease);
}
.field input::placeholder, .field textarea::placeholder { color: #6b665c; }
.field textarea { resize: vertical; min-height: 120px; }
.field .underline {
  position: absolute; left: 0; bottom: 0; height: 1px; width: 0; background: var(--gold);
  transition: width 0.5s var(--ease);
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; }
.field input:focus ~ .underline, .field textarea:focus ~ .underline, .field select:focus ~ .underline { width: 100%; }
.field select { color: #fff; }
.field select option { background: #141210; color: #fff; }
.contact-form .btn-gold { justify-self: start; margin-top: 0.5rem; }

@media (min-width: 920px) {
  .contact-split { grid-template-columns: 1.15fr 0.85fr; min-height: 100svh; }
  .contact-form-side { padding-top: 10rem; display: flex; align-items: center; }
}

/* ============================================================
   Footer — dense dark grid, gold cap
   ============================================================ */
.site-footer { background: var(--bg); position: relative; }
.footer-cap { width: 100%; height: 1px; background: linear-gradient(90deg, transparent, var(--gold), transparent); }
.footer-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.6rem;
  padding-block: clamp(3.5rem, 7vw, 5.5rem);
}
.footer-brand .brand-mark { align-items: flex-start; }
.footer-brand .brand-mark .subword { margin-left: 0; }
.footer-tagline { color: var(--muted); font-size: 0.95rem; margin-top: 1.2rem; max-width: 30ch; font-style: italic; font-family: var(--font-display); }
.footer-cols { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2.2rem; }
.footer-col h4 {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.7rem; letter-spacing: 0.26em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 1.1rem;
}
.footer-col a, .footer-col span {
  display: block;
  font-size: 0.9rem; color: var(--muted);
  padding: 0.4rem 0;
  position: relative; width: fit-content;
}
.footer-col a { transition: color 0.3s var(--ease); }
.footer-col a::after { content:""; position:absolute; left:0; bottom:0.25rem; height:1px; width:0; background: var(--gold); transition: width 0.35s var(--ease); }
.footer-col a:hover { color: #fff; }
.footer-col a:hover::after { width: 100%; }
.footer-contact-item { display: flex; gap: 0.7rem; align-items: flex-start; color: var(--muted); font-size: 0.9rem; padding: 0.4rem 0; }
.footer-contact-item i { color: var(--gold); margin-top: 0.15rem; }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-block: 1.6rem;
  display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: center;
}
.footer-bottom p { color: var(--muted-dim); font-size: 0.78rem; letter-spacing: 0.04em; }
.footer-bottom .legal-links { display: flex; gap: 1.4rem; }
.footer-bottom .legal-links a { color: var(--muted-dim); font-size: 0.78rem; }
.footer-bottom .legal-links a:hover { color: var(--gold); }

@media (min-width: 820px) {
  .footer-inner { grid-template-columns: 1.2fr 2fr; gap: clamp(3rem, 7vw, 7rem); }
  .footer-cols { grid-template-columns: repeat(3, 1fr); }
}

/* ============================================================
   404
   ============================================================ */
.error-page {
  min-height: 100svh; display: grid; place-items: center; text-align: center;
  padding: 8rem var(--gutter) 4rem;
}
.error-page .display { margin-bottom: 1.4rem; }
.error-page p { color: var(--muted); margin-bottom: 2.2rem; max-width: 44ch; margin-inline: auto; }

/* ============================================================
   Reveal animations (IntersectionObserver)
   ============================================================ */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s var(--ease), transform 0.9s var(--ease); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.reveal-d1 { transition-delay: 0.08s; }
.reveal-d2 { transition-delay: 0.16s; }
.reveal-d3 { transition-delay: 0.24s; }
.reveal-d4 { transition-delay: 0.32s; }

/* Grid text children must be allowed to shrink (no text overflow) */
.doctrine-grid > *, .certified-grid > *, .svc-grid > *, .svc-detail-grid > *,
.esrt-grid > *, .contact-split > *, .intro-flex > *, .detail-strip-grid > *,
.swirl-step > *, .footer-inner > *, .footer-cols > * { min-width: 0; }

/* Hero readability on tablet / mobile — keep the anchor, widen the measure */
@media (max-width: 900px) {
  .hero-content { max-width: min(82%, 34rem); }
}
@media (max-width: 600px) {
  .hero-content { max-width: 100%; }
  .hero-inner { padding-top: 7rem; }
  .hero-title { font-size: clamp(2.9rem, 13vw, 4rem); letter-spacing: 0.03em; }
  .page-head-inner { padding-top: 7.5rem; }
  .nav-link { font-size: 0.72rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
  .hero-arc path { stroke-dashoffset: 0; }
  .cta-ring circle { stroke-dashoffset: 0; }
}

/* ============================================================
   Generic intro block used across pages
   ============================================================ */
.section-head { max-width: 32ch; }
.section-head .label { margin-bottom: 1.3rem; }
.section-head .h2 { margin-bottom: 1.2rem; }
.intro-flex { display: grid; gap: 1.6rem; }
@media (min-width: 880px) {
  .intro-flex { grid-template-columns: 1fr 1fr; gap: clamp(3rem,6vw,6rem); align-items: end; }
}
