@font-face {
  font-family: "Archivo";
  src: url("assets/fonts/archivo.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}

:root {
  --navy: #0b1630;
  --navy-line: #33436d;
  --off-white: #f6f4ee;
  --off-white-deep: #eae7dd;
  --white: #fffefb;
  --ink-soft: #465069;
  --on-navy-soft: #bec8e0;
  --gold: #c9b26b;        /* accent on navy */
  --gold-hover: #dac78a;
  --olive: #655117;       /* accent on light surfaces */
  --olive-hover: #4a3a0c;
  --gate: #16254a;
  --error: #b3261e;
  --field-line: #747d92;
  --space-section: clamp(4rem, 9vw, 7.5rem);
  --header-h: 4.5rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--off-white);
  color: var(--navy);
  font: 400 1.0625rem/1.6 "Archivo", system-ui, sans-serif;
}
h1, h2, h3, p, ul { margin: 0; }
h1, h2, h3 { font-weight: 650; text-wrap: balance; }
h1, h2 { font-stretch: 112%; letter-spacing: -0.02em; line-height: 1.08; }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
a { color: inherit; }
main:focus { outline: none; }
:focus-visible { outline: 3px solid var(--olive); outline-offset: 3px; }
.site-header, .hero, .contact, .site-footer { color: var(--white); background: var(--navy); }
:is(.site-header, .hero, .site-footer) :focus-visible { outline-color: var(--gold-hover); }

.wrap { width: min(100% - 2.5rem, 74rem); margin-inline: auto; }
.lede { font-size: clamp(1.125rem, 1.6vw, 1.3rem); color: var(--on-navy-soft); max-width: 34em; text-wrap: pretty; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: fixed; z-index: 20; top: .5rem; left: .5rem; padding: .75rem 1rem; background: var(--white); transform: translateY(-200%); }
.skip-link:focus { transform: none; }

.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 3rem; padding: .625rem 1.375rem;
  border: 0; border-radius: 4px;
  background: var(--gold); color: var(--navy);
  font: inherit; font-weight: 600; text-decoration: none;
  cursor: pointer; transition: background-color .15s;
}
.button:hover { background: var(--gold-hover); }
.inquiry .button { background: var(--olive); color: #fff; }
.inquiry .button:hover { background: var(--olive-hover); }
.inquiry .button:disabled { background: var(--navy-line); cursor: not-allowed; }
.text-link, .card-link { font-weight: 600; text-underline-offset: .3em; text-decoration-thickness: 1px; }
.text-link { padding-block: .625rem; text-decoration-color: var(--gold); }
.text-link:hover, .card-link:hover { text-decoration-thickness: 2px; }

/* Header */
.site-header { position: sticky; z-index: 10; top: 0; border-bottom: 1px solid var(--navy-line); }
.header-row { display: flex; align-items: center; gap: 1.25rem; min-height: var(--header-h); }
.wordmark { display: inline-flex; align-items: center; gap: .25em; min-height: 2.75rem; margin-right: auto; font-size: 1.25rem; font-stretch: 118%; font-weight: 400; letter-spacing: -.02em; text-decoration: none; white-space: nowrap; }
.wordmark b { font-weight: 750; }
.brand { gap: .625rem; }
.brand img { flex: none; width: auto; height: 2.75rem; padding: 2px 3px; border-radius: 3px; background: #fff; }
.site-nav { display: flex; gap: .5rem; }
.site-nav a { padding: .625rem .75rem; text-decoration: none; }
.site-nav a:hover, .site-footer nav a:hover { text-decoration: underline; text-underline-offset: .35em; }
.menu-toggle { display: none; flex: none; width: 2.75rem; height: 2.75rem; padding: .5rem; border: 0; background: none; color: inherit; cursor: pointer; }
.menu-toggle svg { display: block; width: 100%; fill: none; stroke: currentColor; stroke-width: 2; }
.menu-toggle[aria-expanded="false"] .icon-close,
.menu-toggle[aria-expanded="true"] .icon-open { display: none; }

/* Hero */
.hero { padding-block: clamp(3.5rem, 9vw, 8rem); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(2.5rem, 6vw, 5.5rem); align-items: center; }
h1 { font-size: clamp(2.375rem, 5vw, 4rem); }
.hero .lede { margin-top: 1.5rem; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.75rem; margin-top: 2.25rem; }
.hero-diagram svg { display: block; width: 100%; max-width: 30rem; margin-left: auto; overflow: visible; font-size: 18px; font-weight: 500; }
.hero-diagram text { fill: var(--on-navy-soft); }
.hero-diagram a { text-decoration: none; }
.hero-diagram a:hover text { text-decoration: underline; }
.hero-diagram .hit { fill: transparent; }
.hero-diagram .wire { fill: none; stroke: var(--gold); stroke-opacity: .6; stroke-width: 1.5; stroke-dasharray: 1; }
.hero-diagram .gate { fill: var(--gate); stroke: var(--gold); stroke-opacity: .6; stroke-width: 1.5; }
.hero-diagram .dot { fill: var(--gold); }
.hero-diagram .gate-label { font-weight: 600; font-stretch: 112%; font-size: 20px; fill: var(--white); }

/* About and Contact share a two-column layout */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: 2rem clamp(2.5rem, 7vw, 6rem); align-items: start; }
.services, .work, .contact { padding-block: var(--space-section); }
.about { padding-block: clamp(3rem, 5vw, 4.5rem); }
.about-grid { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: 1fr auto auto 1fr; column-gap: clamp(2rem, 6vw, 5rem); }
.about-grid h2 { grid-area: 2 / 2; margin-bottom: 1.25rem; }
.about-grid .about-logo { grid-area: 1 / 1 / -1 / 2; align-self: center; }
.about-grid .about-copy { grid-area: 3 / 2; }
.about-logo { display: block; width: clamp(13rem, 22vw, 17.5rem); height: auto; border-radius: 6px; }
.about-copy { max-width: 40rem; color: var(--ink-soft); }
.about-copy .statement { margin-bottom: .75rem; color: var(--navy); font-size: clamp(1.375rem, 2.4vw, 1.875rem); font-weight: 500; line-height: 1.3; text-wrap: balance; }

/* Services */
.services { background: var(--off-white-deep); }
.service-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 1fr; gap: 1.5rem; margin-top: clamp(2rem, 4vw, 3rem); }
.card { display: flex; flex-direction: column; padding: clamp(1.5rem, 3vw, 2.5rem); background: var(--white); border-radius: 6px; scroll-margin-top: 1.5rem; }
.card-icon { width: 3rem; height: 3rem; margin-bottom: 1.5rem; fill: none; stroke: var(--navy); stroke-width: 2.25; stroke-linejoin: round; stroke-linecap: round; }
.card-icon .accent { stroke: #927829; }
.card h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); line-height: 1.25; letter-spacing: -.01em; }
.card ul { padding: 0; margin-block: 1rem 1.5rem; list-style: none; color: var(--ink-soft); }
.card li { position: relative; padding: .25rem 0 .25rem 1.375rem; }
.card li::before { content: ""; position: absolute; left: 0; top: .8em; width: .5rem; height: .5rem; border-radius: 0 50% 50% 0; background: #927829; }
.card-link { align-self: flex-start; margin-top: auto; padding-block: .5rem; color: var(--olive); }
.card-link:hover { color: var(--olive-hover); }

/* Our Work */
.work-filters { display: flex; flex-wrap: wrap; gap: .625rem; margin-top: clamp(1.5rem, 3vw, 2rem); }
.work-filters button, .work-link {
  display: inline-flex; align-items: center; min-height: 2.75rem; padding: .5rem 1.125rem;
  border: 1px solid var(--olive); border-radius: 4px; background: none; color: var(--olive);
  font: inherit; font-size: 1rem; font-weight: 600; text-decoration: none; cursor: pointer;
  transition: background-color .15s, color .15s;
}
.work-filters button:hover { background: var(--off-white-deep); }
.work-filters button[aria-pressed="true"], .work-link:hover { background: var(--olive); color: #fff; }
.work-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; margin-top: 1.75rem; }
.work-card { display: flex; flex-direction: column; padding: clamp(1.25rem, 2vw, 1.75rem); border: 1px solid var(--off-white-deep); border-radius: 6px; background: var(--white); }
.work-card[hidden], .work-grid[hidden], .work-message[hidden] { display: none; }
.work-card h3 { font-size: 1.25rem; line-height: 1.25; letter-spacing: -.01em; }
.work-card p { margin-top: .25rem; color: var(--ink-soft); font-size: 1rem; }
.work-link { align-self: flex-start; margin-top: auto; }
.work-card p:last-of-type:not(:last-child) { margin-bottom: 1.25rem; }
.work-card p:not(:last-of-type) { font-weight: 600; }
.work-message { margin-top: 1.75rem; padding: clamp(1.5rem, 4vw, 2.5rem); border: 1px solid var(--off-white-deep); border-radius: 6px; background: var(--white); font-size: 1.25rem; font-weight: 500; }

/* Contact */
.contact .lede { margin-top: 1.25rem; }
.inquiry { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; padding: clamp(1.5rem, 3.5vw, 2.75rem); border-radius: 6px; background: var(--off-white); color: var(--navy); }
.inquiry > * { grid-column: 1 / -1; }
.inquiry > .field:nth-of-type(1), .inquiry > .field:nth-of-type(2) { grid-column: auto; }
.inquiry > .button { justify-self: start; }
.preview-note { padding: .875rem 1rem; border-radius: 4px; background: #eee5c9; font-size: 1rem; }
label { display: block; margin-bottom: .375rem; font-weight: 600; }
input, select, textarea { display: block; width: 100%; min-height: 3rem; padding: .625rem .875rem; border: 1px solid var(--field-line); border-radius: 4px; background: var(--white); color: inherit; font: inherit; }
textarea { resize: vertical; }
[aria-invalid="true"] { border-color: var(--error); box-shadow: 0 0 0 1px var(--error); }
.error { margin-top: .375rem; color: var(--error); font-size: .9375rem; }
.error:empty { display: none; }
.form-status { font-weight: 600; }

/* Footer */
.site-footer { border-top: 1px solid var(--navy-line); }
.footer-row { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 2rem; padding-block: 2rem; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 0 1.5rem; }
.site-footer nav a { padding-block: .625rem; color: var(--on-navy-soft); text-decoration: none; }

@media (max-width: 60rem) {
  .site-nav { gap: 0; }
  .site-nav a { padding-inline: .5rem; white-space: nowrap; }
  .header-cta { white-space: nowrap; }
}
@media (max-width: 56rem) {
  .hero-grid, .split { grid-template-columns: minmax(0, 1fr); }
  .work-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .js .menu-toggle { display: block; margin-right: -.5rem; }
  .js .site-nav {
    display: none; position: absolute; inset: 100% 0 auto; flex-direction: column; gap: 0;
    max-height: calc(100vh - var(--header-h)); max-height: calc(100dvh - var(--header-h)); overflow: auto;
    padding: .5rem 1.25rem 1.25rem; background: var(--navy); border-bottom: 1px solid var(--navy-line);
  }
  .js .site-nav.is-open { display: flex; }
  .js .site-nav a { padding: .875rem 0; font-size: 1.125rem; }
  .js .site-nav a + a { border-top: 1px solid var(--navy-line); }
  .hero-diagram svg { margin-left: 0; }
  .header-row { gap: .75rem; }
  html:not(.js) .header-row { flex-wrap: wrap; padding-block: .5rem; }
}
@media (max-width: 40rem) {
  .about-grid { display: block; }
  .about-grid .about-logo { width: 11rem; margin-bottom: 1.25rem; }
  .service-grid, .work-grid { grid-template-columns: minmax(0, 1fr); }
  .inquiry > .field:nth-of-type(n) { grid-column: 1 / -1; }
  .inquiry > .button { justify-self: stretch; }
  .site-header .wordmark { font-size: 1.0625rem; }
  .brand { gap: .5rem; }
  .brand-name { line-height: 1.1; }
  .brand-name b { display: block; }
  .header-cta { min-height: 2.75rem; padding: .5rem .75rem; font-size: .875rem; white-space: nowrap; }
  .hero-diagram a text { font-size: 21px; }
  .footer-row { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 23.4rem) {
  .header-row { gap: .375rem; }
  .site-header .wordmark { font-size: .9375rem; font-stretch: 105%; }
  .header-cta { padding-inline: .5rem; font-size: .8125rem; }
}
/* Entrances. Hero plays on load from CSS alone; script.js toggles .is-waiting to replay it. */
.word { display: inline-block; }
@keyframes rise { from { opacity: 0; translate: 0 var(--rise); } }
@keyframes fade { from { opacity: 0; } }
@keyframes draw { from { stroke-dashoffset: var(--draw-from); } }
@media screen and (prefers-reduced-motion: no-preference) {
  /* Words: 120ms start, 260ms stagger, 850ms each. Last button settles at 3s. */
  .hero { --ease: cubic-bezier(.39, .575, .565, 1); }
  .word { --rise: 30px; animation: rise 850ms var(--ease) calc(120ms + var(--i) * 260ms) backwards; }
  .hero .lede, .actions > * { --rise: 16px; animation: rise 700ms var(--ease) 1900ms backwards; }
  .actions > :nth-child(1) { animation-delay: 2200ms; }
  .actions > :nth-child(2) { animation-delay: 2300ms; }
  /* The diagram stays visible and readable; only its connectors draw in. */
  .hero-diagram .wire { --draw-from: 1; animation: draw 1000ms ease-in-out 500ms backwards; }
  .hero-diagram .wire.out { --draw-from: -1; }

  .hero.is-waiting :is(.word, .lede, .actions > *) { animation: none; opacity: 0; }
  .hero.is-waiting .wire { animation: none; stroke-dashoffset: var(--draw-from); }
  .hero.is-peeking :is(.lede, .actions > *) { animation: none; opacity: 1; }
  /* Buttons show at once when reached early. !important outranks the running animation. */
  .actions > :is(:hover, :focus-visible) { opacity: 1 !important; }

  /* About Us, Services, Our Work, Contact. Timing is set per item in script.js. */
  .reveal { --rise: 24px; }
  h2.reveal { --rise: 32px; }
  .reveal.is-waiting { opacity: 0; transition: opacity .3s; }
  .reveal.is-entering { animation: rise var(--duration) cubic-bezier(.39, .575, .565, 1) var(--delay) backwards; }
  /* Never hide something the visitor is using. */
  .reveal:focus-within { opacity: 1 !important; }
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .card { transition: transform .25s ease-out; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
