/* ==========================================================================
   BRIDGE HOUSE: White & Navy with champagne-gold accents
   ========================================================================== */

:root {
  /* Palette */
  --navy-900: #071528;
  --navy-800: #0B1F3A;
  --navy-700: #13294A;
  --navy-600: #1E3A61;
  --ink: #16233A;
  --text: #3A4558;
  --muted: #626C7C;
  --line: #DFE4EB;
  --white: #FFFFFF;
  --ivory: #F4F6F9;          /* cool off-white panel tint */
  --gold: #C5AE7C;          /* champagne: decorative lines and accents */
  --gold-light: #D9C79E;    /* champagne on navy, high contrast */
  --gold-deep: #85693A;     /* champagne text on white (WCAG AA) */
  --error: #A33A2F;

  /* Type */
  --font-display: "Cormorant Garamond", "Times New Roman", Georgia, serif;
  --font-body: "Manrope", "Segoe UI", system-ui, -apple-system, sans-serif;

  /* Layout */
  --container: 1200px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --section-y: clamp(5rem, 11vw, 9.5rem);
  --header-h: 84px;
  --radius: 2px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* Reset ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) - 8px); }
body {
  margin: 0;
  background: var(--white);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3 { margin: 0; color: var(--ink); font-weight: 500; }
p { margin: 0 0 1.1em; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 1rem; top: -100px; z-index: 100;
  background: var(--navy-800); color: var(--white); padding: .75rem 1.25rem;
  text-decoration: none; font-size: .9rem;
}
.skip-link:focus { top: 1rem; }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

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

/* Typography helpers ----------------------------------------------------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: .9rem;
  margin-bottom: 1.5rem;
  font-size: .75rem; font-weight: 600; letter-spacing: .22em; text-transform: uppercase;
  color: var(--navy-600);
}
.eyebrow::before { content: ""; width: 2.25rem; height: 1px; background: var(--gold); }

h1, h2 { font-variant-numeric: lining-nums; font-family: var(--font-display); letter-spacing: -.01em; line-height: 1.08; }
h1 { font-size: clamp(2.75rem, 6.4vw, 5.25rem); font-weight: 500; }
h2 { font-size: clamp(2.1rem, 4.2vw, 3.4rem); max-width: 18ch; }
h1 em, h2 em { font-style: italic; color: var(--gold-deep); font-weight: 400; }
h3 { font-family: var(--font-body); font-size: 1.05rem; font-weight: 600; letter-spacing: .01em; }

.lead { font-size: clamp(1.075rem, 1.4vw, 1.2rem); max-width: 34rem; color: var(--text); }

/* Buttons ---------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  min-height: 52px; padding: 0 2rem;
  border: 1px solid transparent; border-radius: var(--radius);
  font-size: .8125rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  text-decoration: none; cursor: pointer;
  transition: background-color .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease);
}
.btn-primary { background: var(--navy-800); color: var(--white); }
.btn-primary:hover { background: var(--navy-600); }
.btn-primary::after {
  content: ""; width: 18px; height: 1px; background: var(--gold);
  transition: width .3s var(--ease);
}
.btn-primary:hover::after { width: 28px; }
.btn-link { padding-inline: .25rem; color: var(--navy-800); }
.btn-link span { transition: transform .3s var(--ease); }
.btn-link:hover span { transform: translateX(4px); }
.btn-link:hover { color: var(--navy-600); }

/* Header ----------------------------------------------------------------- */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 50; height: var(--header-h);
  background: rgba(255, 255, 255, 0);
  transition: background-color .35s var(--ease), box-shadow .35s var(--ease), height .35s var(--ease);
}
.site-header.is-scrolled {
  --header-h: 70px;
  height: 70px;
  background: rgba(255, 255, 255, .94);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  backdrop-filter: saturate(160%) blur(12px);
  box-shadow: 0 1px 0 var(--line);
}
.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 2rem; }

.brand { display: inline-flex; align-items: center; gap: .8rem; text-decoration: none; color: var(--navy-800); }
.brand-mark { width: 34px; height: 34px; }
.brand-name { font-family: var(--font-body); font-size: .95rem; font-weight: 600; letter-spacing: .32em; }

.site-nav ul { display: flex; align-items: center; gap: 2.5rem; }
.site-nav a {
  position: relative; text-decoration: none;
  font-size: .8125rem; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--ink);
}
.site-nav a:not(.nav-cta)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 1px;
  background: var(--gold); transform: scaleX(0); transform-origin: left;
  transition: transform .35s var(--ease);
}
.site-nav a:not(.nav-cta):hover::after,
.site-nav a[aria-current="true"]::after { transform: scaleX(1); }
.nav-cta {
  display: inline-flex; align-items: center; min-height: 42px; padding: 0 1.3rem;
  border: 1px solid var(--navy-800); border-radius: var(--radius);
  transition: background-color .3s var(--ease), color .3s var(--ease);
}
.nav-cta:hover { background: var(--navy-800); color: var(--white); }

.nav-toggle {
  display: none; position: relative; width: 44px; height: 44px; padding: 0;
  background: none; border: 0; cursor: pointer;
}
.nav-toggle-bar {
  position: absolute; left: 10px; right: 10px; height: 1.5px; background: var(--navy-800);
  transition: transform .3s var(--ease), top .3s var(--ease);
}
.nav-toggle-bar:nth-of-type(2) { top: 18px; }
.nav-toggle-bar:nth-of-type(3) { top: 25px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-of-type(2) { top: 21.5px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-of-type(3) { top: 21.5px; transform: rotate(-45deg); }

/* Hero ------------------------------------------------------------------- */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: flex; align-items: center;
  padding: calc(var(--header-h) + 3rem) 0 6rem;
  background: var(--white);
  overflow: hidden;
}
.hero-inner { display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: clamp(2rem, 5vw, 5rem); }
.hero h1 { margin-bottom: 1.75rem; max-width: 14ch; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem 2rem; margin-top: 2.5rem; }

.bridge-art { width: 100%; height: auto; overflow: visible; }
.bridge-art * { fill: none; stroke-linecap: round; }
.bridge-art .arc-main { stroke: var(--navy-800); stroke-width: 1.6; }
.bridge-art .arc-echo { stroke: var(--gold); stroke-width: 1; opacity: .9; }
.bridge-art .deck { stroke: var(--navy-800); stroke-width: 1.6; }
.bridge-art .cables line { stroke: var(--navy-600); stroke-width: .8; opacity: .55; }
.bridge-art .water { stroke: var(--gold); stroke-width: .8; opacity: .55; }

.js .bridge-art .arc, .js .bridge-art .deck, .js .bridge-art .water {
  stroke-dasharray: 700; stroke-dashoffset: 700;
  animation: draw 2.2s var(--ease) forwards;
}
.js .bridge-art .arc-echo { animation-delay: .45s; }
.js .bridge-art .deck { animation-delay: .15s; }
.js .bridge-art .water { animation-delay: 1s; }
.js .bridge-art .cables line { opacity: 0; animation: fadeCable .8s var(--ease) forwards; }
.js .bridge-art .cables line:nth-child(1) { animation-delay: 1.1s; }
.js .bridge-art .cables line:nth-child(2) { animation-delay: 1.18s; }
.js .bridge-art .cables line:nth-child(3) { animation-delay: 1.26s; }
.js .bridge-art .cables line:nth-child(4) { animation-delay: 1.34s; }
.js .bridge-art .cables line:nth-child(5) { animation-delay: 1.42s; }
.js .bridge-art .cables line:nth-child(6) { animation-delay: 1.5s; }
.js .bridge-art .cables line:nth-child(7) { animation-delay: 1.58s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fadeCable { to { opacity: .55; } }

.scroll-cue {
  position: absolute; left: 50%; bottom: 2rem; width: 1px; height: 56px; transform: translateX(-50%);
  overflow: hidden; background: var(--line);
}
.scroll-cue span {
  position: absolute; left: 0; top: -40%; width: 1px; height: 40%; background: var(--navy-800);
  animation: cue 2.4s var(--ease) infinite;
}
@keyframes cue { to { top: 100%; } }

/* Sections --------------------------------------------------------------- */
.section { padding-block: var(--section-y); }
.section-head { max-width: 46rem; margin-bottom: clamp(3rem, 6vw, 5rem); }
.section-head h2 { margin-bottom: 1.5rem; }
.section-intro { color: var(--muted); max-width: 36rem; margin: 0; }

/* About ------------------------------------------------------------------ */
.about-grid { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(2.5rem, 7vw, 7rem); }
.about-body > p { font-size: 1.1rem; }
.about-body > p:first-of-type::first-line { color: var(--ink); }
.principles {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem;
  margin-top: 3.5rem; padding-top: 2.5rem; border-top: 1px solid var(--line);
}
.principles h3 {
  font-family: var(--font-display); font-size: 1.6rem; font-weight: 500; color: var(--navy-800);
  margin-bottom: .6rem;
}
.principles p { margin: 0; font-size: .95rem; color: var(--muted); }

/* Services --------------------------------------------------------------- */
.services { background: var(--ivory); counter-reset: svc; }
.service-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  border-top: 1px solid var(--line); border-left: 1px solid var(--line);
}
.service {
  counter-increment: svc;
  position: relative; padding: 2.75rem 2.25rem 3rem;
  background: var(--white);
  border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  transition: background-color .4s var(--ease);
}
.service::before {
  font-variant-numeric: lining-nums;
  content: counter(svc, decimal-leading-zero);
  display: block; margin-bottom: 2.5rem;
  font-family: var(--font-display); font-size: 1.15rem; color: var(--navy-600); letter-spacing: .05em;
}
.service::after {
  content: ""; position: absolute; left: 0; top: -1px; height: 2px; width: 100%;
  background: var(--gold); transform: scaleX(0); transform-origin: left;
  transition: transform .5s var(--ease);
}
.service:hover::after { transform: scaleX(1); }
.service h3 { font-family: var(--font-display); font-size: 1.65rem; font-weight: 500; line-height: 1.2; margin-bottom: .9rem; color: var(--navy-800); }
.service p { margin: 0; font-size: .975rem; color: var(--muted); }

/* How we work (navy) ---------------------------------------------------- */
.approach { background: var(--navy-800); color: rgba(255, 255, 255, .78); }
.approach h2, .approach h3 { color: var(--white); }
.approach .eyebrow { color: var(--gold-light); }
.approach .section-intro { color: rgba(255, 255, 255, .7); }

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2.5rem; position: relative; }
.steps::before {
  content: ""; position: absolute; left: 0; right: 0; top: 1.4rem; height: 1px;
  background: linear-gradient(90deg, var(--gold) 0%, rgba(197, 174, 124, .25) 100%);
}
.step { position: relative; padding-top: 4rem; }
.step-num {
  font-variant-numeric: lining-nums;
  position: absolute; top: 0; left: 0;
  display: inline-grid; place-items: center; width: 2.8rem; height: 2.8rem;
  background: var(--navy-800); border: 1px solid var(--gold); border-radius: 50%;
  font-family: var(--font-display); font-size: 1rem; color: var(--gold-light);
}
.step h3 { font-family: var(--font-display); font-size: 1.85rem; font-weight: 500; margin-bottom: .8rem; }
.step p { margin: 0; font-size: .975rem; }

/* Contact ---------------------------------------------------------------- */
.contact-grid { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(2.5rem, 7vw, 7rem); align-items: start; }
.contact-intro > p { color: var(--muted); max-width: 26rem; }
.contact-intro h2 { margin-bottom: 1.5rem; }

.contact-details { margin: 3rem 0 0; display: grid; gap: 1.75rem; }
.contact-details div { padding-top: 1.25rem; border-top: 1px solid var(--line); }
.contact-details dt { font-size: .72rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--navy-600); margin-bottom: .35rem; }
.contact-details dd { margin: 0; color: var(--ink); font-size: 1.05rem; }
.contact-details a { text-decoration: none; border-bottom: 1px solid var(--gold); padding-bottom: 2px; }
.contact-details a:hover { color: var(--navy-600); }

.contact-form {
  padding: clamp(1.75rem, 4vw, 3.25rem);
  background: var(--ivory); border-top: 2px solid var(--navy-800);
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.5rem; }
.field { margin-bottom: 1.6rem; }
.field label { display: block; margin-bottom: .5rem; font-size: .78rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink); }
.req { color: var(--navy-600); }
.opt { text-transform: none; letter-spacing: 0; font-weight: 400; color: var(--muted); }

.field input:not([type="checkbox"]), .field select, .field textarea {
  width: 100%; min-height: 50px; padding: .8rem 1rem;
  background: var(--white); border: 1px solid #CDD4DE; border-radius: var(--radius);
  font-size: 1rem; color: var(--ink);
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.field textarea { resize: vertical; min-height: 140px; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: #A9B3C2; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--navy-800); box-shadow: 0 0 0 3px rgba(30, 58, 97, .15);
}
.field [aria-invalid="true"] { border-color: var(--error) !important; }
.select-wrap { position: relative; }
.select-wrap select { appearance: none; -webkit-appearance: none; padding-right: 2.75rem; cursor: pointer; }
.select-wrap::after {
  content: ""; position: absolute; right: 1.1rem; top: 50%; width: 7px; height: 7px;
  border-right: 1.5px solid var(--navy-800); border-bottom: 1.5px solid var(--navy-800);
  transform: translateY(-70%) rotate(45deg); pointer-events: none;
}
.field-check { display: grid; grid-template-columns: auto 1fr; gap: .25rem .85rem; align-items: start; }
.field-check input { width: 20px; height: 20px; margin: .2rem 0 0; accent-color: var(--navy-800); cursor: pointer; }
.field-check label { text-transform: none; letter-spacing: 0; font-weight: 400; font-size: .92rem; color: var(--text); margin: 0; cursor: pointer; }
.field-check .field-error { grid-column: 2; }
.field-error { margin: .45rem 0 0; font-size: .85rem; color: var(--error); }
.form-note { font-size: .8rem; color: var(--muted); margin-bottom: 1.5rem; }
.btn-submit { width: 100%; }
.btn-submit[disabled] { opacity: .65; cursor: progress; }
.form-status { margin: 1.25rem 0 0; font-size: .95rem; }
.form-status:empty { display: none; }
.form-status.is-success { color: var(--navy-800); padding: 1rem 1.25rem; background: var(--white); border-left: 2px solid var(--gold); }
.form-status.is-error { color: var(--error); }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Footer ----------------------------------------------------------------- */
.site-footer { background: var(--navy-900); color: rgba(255, 255, 255, .62); padding: 4.5rem 0 2.5rem; font-size: .9rem; }
.footer-inner { display: grid; grid-template-columns: 1fr auto; gap: 2.5rem 2rem; align-items: center; }
.brand-footer { color: var(--white); }
.footer-nav ul { display: flex; flex-wrap: wrap; gap: .75rem 2rem; }
.footer-nav a { text-decoration: none; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: rgba(255, 255, 255, .8); }
.footer-nav a:hover { color: var(--gold-light); }
.footer-meta, .footer-copy { margin: 0; }
.footer-meta { grid-column: 1 / -1; padding-top: 2.25rem; border-top: 1px solid rgba(255, 255, 255, .12); }
.footer-meta a { color: var(--gold-light); text-decoration: none; }
.footer-meta a:hover { text-decoration: underline; }
.footer-copy { grid-column: 1 / -1; font-size: .8rem; color: rgba(255, 255, 255, .45); margin-top: -1.5rem; }

/* Simple pages (thank-you, 404) ------------------------------------------ */
.simple-page { min-height: 100vh; min-height: 100svh; display: grid; place-items: center; text-align: center; padding: 6rem var(--gutter); background: var(--white); }
.simple-page .brand { margin: 0 auto 3rem; }
.simple-page h1 { font-size: clamp(2.4rem, 5vw, 3.75rem); margin: 0 auto 1.25rem; max-width: 16ch; }
.simple-page p { max-width: 32rem; margin: 0 auto 2.5rem; }
.simple-page .eyebrow { justify-content: center; }

/* Reveal animation ------------------------------------------------------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }
.service-grid .reveal:nth-child(3n+2), .steps .reveal:nth-child(2) { transition-delay: .08s; }
.service-grid .reveal:nth-child(3n), .steps .reveal:nth-child(3) { transition-delay: .16s; }
.steps .reveal:nth-child(4) { transition-delay: .24s; }

/* Responsive ------------------------------------------------------------- */
@media (max-width: 1024px) {
  .service-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); row-gap: 3.5rem; }
  .steps::before { display: none; }
  .step { padding-top: 0; padding-left: 4.25rem; }
  .principles { grid-template-columns: 1fr; gap: 1.75rem; }
}

@media (max-width: 860px) {
  :root { --header-h: 70px; }
  .nav-toggle { display: block; z-index: 2; }
  .site-nav {
    position: fixed; inset: 0; z-index: 1;
    display: flex; align-items: center; justify-content: center;
    background: var(--white);
    opacity: 0; visibility: hidden; transition: opacity .35s var(--ease), visibility .35s;
  }
  .site-nav.is-open { opacity: 1; visibility: visible; }
  .site-nav ul { flex-direction: column; gap: 2rem; text-align: center; }
  .site-nav a { font-family: var(--font-display); font-size: 2rem; letter-spacing: 0; text-transform: none; }
  .nav-cta { font-family: var(--font-body) !important; font-size: .85rem !important; letter-spacing: .14em !important; text-transform: uppercase !important; min-height: 52px; padding: 0 2rem; margin-top: 1rem; }
  .brand { position: relative; z-index: 2; }
  body.nav-open { overflow: hidden; }
  .site-header.is-scrolled { -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--white); }

  .hero { min-height: auto; padding-top: calc(var(--header-h) + 3.5rem); padding-bottom: 5rem; }
  .hero-inner { grid-template-columns: 1fr; gap: 1.5rem; }
  .hero-art { max-width: 380px; margin: 1rem auto 0; width: 100%; }
  .scroll-cue { display: none; }

  .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-copy { margin-top: -1rem; }
}

@media (max-width: 640px) {
  body { font-size: 1rem; }
  .brand-name { font-size: .82rem; letter-spacing: .26em; }
  .service-grid { grid-template-columns: 1fr; }
  .service { padding: 2.25rem 1.75rem 2.5rem; }
  .service::before { margin-bottom: 1.5rem; }
  .steps { grid-template-columns: 1fr; row-gap: 2.75rem; }
  .field-row { grid-template-columns: 1fr; }
  .hero-actions .btn-primary { width: 100%; }
}

/* Reduced motion --------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  .js .reveal { opacity: 1; transform: none; }
  .js .bridge-art .arc, .js .bridge-art .deck, .js .bridge-art .water { stroke-dashoffset: 0; }
}

/* Print ------------------------------------------------------------------ */
@media print {
  .site-header, .scroll-cue, .hero-art, .contact-form { display: none; }
  .approach { background: none; color: #000; }
  .approach h2, .approach h3 { color: #000; }
}
