/* The Works: theworks.pro
   Plain CSS, mobile-first. Fonts are self-hosted (SIL Open Font License). */

@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-latin.woff2") format("woff2");
  font-weight: 400 800;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Public Sans";
  src: url("../fonts/public-sans-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --navy: #004160;
  --navy-deep: #002a3f;
  --navy-ink: #0d2230;
  --grey: #666666;
  --ink: #1b2730;
  --muted: #4f5d68;
  --paper: #f6f8fa;
  --white: #ffffff;
  --line: #d9e1e7;
  --grid: #e7edf1;
  --accent: #b45309;      /* copper: 5:1 on white */
  --accent-soft: #f6e7d6;
  --radius: 6px;
  --wrap: 72rem;
  --gutter: clamp(1rem, 4vw, 2rem);
  --font-head: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 5rem; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font: 400 1.0625rem/1.65 var(--font-body);
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3 {
  font-family: var(--font-head);
  color: var(--navy-ink);
  line-height: 1.12;
  margin: 0 0 .6em;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.1rem, 5.6vw, 3.6rem); font-weight: 750; font-stretch: 92%; }
h2 { font-size: clamp(1.6rem, 3.6vw, 2.35rem); font-weight: 700; font-stretch: 95%; }
h3 { font-size: 1.2rem; font-weight: 650; }
p { margin: 0 0 1em; }

a { color: var(--navy); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--accent); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

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

.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--navy); color: var(--white); padding: .6rem 1rem; border-radius: var(--radius);
}
.skip-link:focus { top: 1rem; color: var(--white); }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- Eyebrow labels (drawing-sheet style) ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: .6rem;
  font: 600 .78rem/1 var(--font-head); font-stretch: 110%;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent); margin: 0 0 1rem;
}
.eyebrow::before { content: ""; width: 1.75rem; height: 2px; background: currentColor; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 2.9rem; padding: .7rem 1.3rem;
  font: 600 1rem/1.2 var(--font-head); text-decoration: none;
  border-radius: var(--radius); border: 2px solid var(--navy);
  transition: background-color .15s, color .15s, border-color .15s;
}
.btn-primary { background: var(--navy); color: var(--white); }
.btn-primary:hover { background: var(--navy-deep); border-color: var(--navy-deep); color: var(--white); }
.btn-secondary { background: transparent; color: var(--navy); }
.btn-secondary:hover { background: var(--navy); color: var(--white); }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid var(--line);
}
@supports (backdrop-filter: blur(8px)) {
  .site-header { background: rgba(255, 255, 255, .85); backdrop-filter: blur(8px); }
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4.25rem; }
.brand { display: block; flex-shrink: 0; }
.brand img { width: 150px; }

.nav-toggle {
  display: none; /* shown by JS on small screens */
  align-items: center; gap: .5rem;
  background: none; border: 1px solid var(--line); border-radius: var(--radius);
  padding: .5rem .8rem; font: 600 .95rem var(--font-head); color: var(--navy-ink); cursor: pointer;
}
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
  display: block; width: 18px; height: 2px; background: currentColor; position: relative;
}
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }

.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: .25rem 1.25rem; }
.site-nav a { font: 500 .98rem var(--font-head); color: var(--navy-ink); text-decoration: none; padding: .35rem 0; }
.site-nav a:hover { color: var(--accent); }
.site-nav a[aria-current="page"] { color: var(--navy); box-shadow: inset 0 -2px 0 var(--accent); }
.site-nav .nav-cta { background: var(--navy); color: var(--white); padding: .55rem 1rem; border-radius: var(--radius); }
.site-nav .nav-cta:hover { background: var(--navy-deep); color: var(--white); }

/* Without JS the nav simply wraps under the logo on small screens. */
@media (max-width: 47.99rem) {
  .header-inner { flex-wrap: wrap; padding-top: .6rem; padding-bottom: .6rem; }
  .site-nav { width: 100%; }
  .site-nav ul { gap: .1rem 1rem; }
  .site-nav li:last-child { margin-left: auto; }

  .js .header-inner { flex-wrap: nowrap; padding-top: 0; padding-bottom: 0; }
  .js .nav-toggle { display: inline-flex; }
  .js .site-nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    background: var(--white); border-bottom: 1px solid var(--line);
    box-shadow: 0 12px 24px rgba(13, 34, 48, .08);
  }
  .js .site-nav.is-open { display: block; }
  .js .site-nav ul { flex-direction: column; align-items: stretch; gap: 0; padding: .5rem var(--gutter) 1rem; }
  .js .site-nav li:last-child { margin: .5rem 0 0; }
  .js .site-nav a { display: block; padding: .8rem 0; border-bottom: 1px solid var(--grid); }
  .js .site-nav .nav-cta { text-align: center; border-bottom: 0; padding: .8rem 1rem; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background-color: var(--paper);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 32px 32px;
  border-bottom: 1px solid var(--line);
  padding: clamp(3rem, 9vw, 6.5rem) 0 clamp(3rem, 8vw, 5.5rem);
}
.hero-grid { display: grid; gap: 2.5rem; align-items: end; }
.hero h1 { max-width: 19ch; }
.hero-lede { font-size: clamp(1.1rem, 2.2vw, 1.3rem); color: var(--muted); max-width: 40rem; margin-bottom: 2rem; }

/* Credentials as a drawing title block */
.title-block {
  background: var(--white); border: 2px solid var(--navy-ink); font-family: var(--font-head);
  display: grid; grid-template-columns: 1fr 1fr; max-width: 26rem; width: 100%;
}
.title-block div { padding: .75rem .9rem; border-bottom: 1px solid var(--navy-ink); }
.title-block div:first-child { border-right: 1px solid var(--navy-ink); }
.title-block div:last-child { border-bottom: 0; }
.title-block .wide { grid-column: 1 / -1; }
.title-block dt { font-size: .68rem; font-stretch: 112%; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: .2rem; }
.title-block dd { margin: 0; font-weight: 650; font-size: 1.02rem; color: var(--navy-ink); line-height: 1.3; }

@media (min-width: 60rem) {
  .hero-grid { grid-template-columns: 1.6fr 1fr; gap: 4rem; }
  .title-block { justify-self: end; }
}

/* ---------- Sections ---------- */
.section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.section-alt { background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 44rem; margin-bottom: 2.5rem; }
.section-head p { color: var(--muted); font-size: 1.1rem; }

/* Services */
.service-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.25rem; counter-reset: svc; }
@media (min-width: 40rem) { .service-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 64rem) { .service-grid { grid-template-columns: repeat(3, 1fr); } }

.service-card {
  position: relative; display: flex; flex-direction: column;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.6rem 1.5rem 1.4rem; counter-increment: svc;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.service-card:hover, .service-card:focus-within {
  border-color: var(--navy); box-shadow: 0 10px 28px rgba(13, 34, 48, .08);
}
@media (prefers-reduced-motion: no-preference) {
  .service-card:hover, .service-card:focus-within { transform: translateY(-2px); }
}
.service-card .icon { width: 2.5rem; height: 2.5rem; color: var(--navy); margin-bottom: 1.1rem; }
.service-card h3 { margin-bottom: .5rem; }
.service-card h3 a { color: inherit; text-decoration: none; }
/* whole card is clickable via the heading link */
.service-card h3 a::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
.service-card p { color: var(--muted); font-size: .98rem; flex-grow: 1; }
.card-more { font: 600 .92rem var(--font-head); color: var(--navy); }
.service-card:hover .card-more { color: var(--accent); }

/* Sectors */
.sector-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; border-top: 2px solid var(--navy-ink); }
@media (min-width: 48rem) { .sector-list { grid-template-columns: repeat(2, 1fr); column-gap: 3rem; } }
.sector-list li { padding: 1.3rem 0; border-bottom: 1px solid var(--line); }
.sector-list h3 { font-size: 1.1rem; margin-bottom: .35rem; }
.sector-list p { margin: 0; color: var(--muted); }

/* About */
.about-grid { display: grid; gap: 2.5rem; }
@media (min-width: 56rem) { .about-grid { grid-template-columns: 20rem 1fr; gap: 4rem; align-items: start; } }
.portrait {
  margin: 0; background: linear-gradient(180deg, #e3ebf0 0%, #cfdce5 100%);
  border-radius: var(--radius); overflow: hidden; max-width: 20rem;
  border-bottom: 4px solid var(--navy);
}
.portrait img { width: 100%; }
.portrait figcaption { background: var(--white); padding: .9rem 1rem; font-family: var(--font-head); border: 1px solid var(--line); border-top: 0; }
.portrait figcaption strong { display: block; color: var(--navy-ink); font-size: 1.05rem; }
.portrait figcaption span { color: var(--muted); font-size: .9rem; }

.project-list { list-style: none; margin: 1.5rem 0 0; padding: 0; }
.project-list li { position: relative; padding: .55rem 0 .55rem 1.6rem; border-bottom: 1px dashed var(--line); }
.project-list li::before { content: ""; position: absolute; left: 0; top: 1.15rem; width: .75rem; height: 2px; background: var(--accent); }

/* Why */
.why-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.25rem; counter-reset: why; }
@media (min-width: 48rem) { .why-list { grid-template-columns: repeat(2, 1fr); gap: 1.5rem 3rem; } }
.why-list li { counter-increment: why; padding-top: 1.1rem; border-top: 2px solid var(--navy-ink); }
.why-list p { color: var(--muted); margin: 0; }

/* Contact band */
.contact {
  background: var(--navy-ink); color: #dbe5ec;
  background-image:
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 32px 32px;
}
.contact h2 { color: var(--white); }
.contact .eyebrow { color: #f0b47a; }
.contact-grid { display: grid; gap: 2rem; align-items: center; }
@media (min-width: 56rem) { .contact-grid { grid-template-columns: 1.3fr 1fr; gap: 4rem; } }
.contact p { font-size: 1.1rem; max-width: 36rem; }
.contact .btn-primary { background: var(--white); color: var(--navy-ink); border-color: var(--white); }
.contact .btn-primary:hover { background: var(--accent-soft); border-color: var(--accent-soft); color: var(--navy-ink); }
.contact .btn-secondary { color: var(--white); border-color: rgba(255,255,255,.6); }
.contact .btn-secondary:hover { background: var(--white); color: var(--navy-ink); border-color: var(--white); }
.contact-details { margin: 0; display: grid; gap: .9rem; font-family: var(--font-head); }
.contact-details div { border-left: 2px solid #f0b47a; padding-left: 1rem; }
.contact-details dt { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: #9fb3c2; }
.contact-details dd { margin: 0; font-size: 1.15rem; color: var(--white); }
.contact-details a { color: var(--white); text-decoration: none; }
.contact-details a:hover { color: #f0b47a; text-decoration: underline; }

/* ---------- Service pages ---------- */
.page-hero { padding: clamp(2.5rem, 7vw, 5rem) 0 clamp(2.5rem, 6vw, 4rem); }
.page-hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); max-width: 20ch; }
.breadcrumb { font: 500 .9rem var(--font-head); margin-bottom: 1.5rem; }
.breadcrumb ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.breadcrumb li + li::before { content: "/"; margin-right: .4rem; color: var(--muted); }
.breadcrumb a { color: var(--muted); }

.prose { max-width: 44rem; }
.prose h2 { font-size: clamp(1.35rem, 2.6vw, 1.7rem); margin-top: 2.5rem; }
.prose h2:first-child { margin-top: 0; }

.detail-grid { display: grid; gap: 1.5rem; margin-top: 3rem; }
@media (min-width: 48rem) { .detail-grid { grid-template-columns: 1fr 1fr; } }
.detail-box { background: var(--white); border: 1px solid var(--line); border-top: 3px solid var(--navy); border-radius: var(--radius); padding: 1.5rem; }
.detail-box h2, .detail-box h3 { font-size: 1.2rem; }
.detail-box h3 + p { color: var(--muted); }
.detail-box p + h3 { margin-top: 1.5rem; }
.detail-box ul { margin: 0; padding: 0; list-style: none; }
.detail-box li { position: relative; padding: .45rem 0 .45rem 1.5rem; border-bottom: 1px dashed var(--line); }
.detail-box li:last-child { border-bottom: 0; }
.detail-box li::before { content: ""; position: absolute; left: 0; top: 1.05rem; width: .7rem; height: 2px; background: var(--accent); }
.detail-box strong { color: var(--navy-ink); }

.who-for { margin-top: 3rem; padding: 1.5rem; background: var(--accent-soft); border-radius: var(--radius); }
.who-for h2 { font-size: 1.15rem; margin-bottom: .4rem; }
.who-for p { margin: 0; }

.cta-band { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.25rem; margin-top: 3rem; padding-top: 2rem; border-top: 2px solid var(--navy-ink); }
.cta-band p { margin: 0; font: 600 1.25rem/1.3 var(--font-head); color: var(--navy-ink); }

.other-services { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; }
@media (min-width: 40rem) { .other-services { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 64rem) { .other-services { grid-template-columns: repeat(3, 1fr); } }
.other-services a {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; height: 100%;
  padding: 1rem 1.2rem; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  font: 600 1rem var(--font-head); color: var(--navy-ink); text-decoration: none;
}
.other-services a::after { content: "→"; color: var(--accent); }
.other-services a:hover { border-color: var(--navy); color: var(--navy); }

/* ---------- 404 ---------- */
.not-found { min-height: 55vh; display: flex; align-items: center; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-deep); color: #b6c6d2; font-size: .95rem; padding: 3rem 0 2rem; }
.footer-grid { display: grid; gap: 2rem; }
@media (min-width: 48rem) { .footer-grid { grid-template-columns: 1.2fr 1fr 1fr; } }
.site-footer img { width: 150px; margin-bottom: 1rem; }
.site-footer h2 { font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: #8fa6b6; margin-bottom: .8rem; font-stretch: 110%; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; }
.site-footer a { color: #e3ebf1; text-decoration: none; }
.site-footer a:hover { color: #f0b47a; text-decoration: underline; }
.site-footer p { margin: 0 0 .35rem; }
.footer-base { margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid rgba(255,255,255,.12); font-size: .85rem; color: #8fa6b6; }

@media print {
  .site-header, .nav-toggle, .site-footer, .btn-row { display: none !important; }
  .hero, .contact { background: none !important; color: #000; }
}
.not-found .btn-row { margin-bottom: 2rem; }

/* ---------- Five-page layout additions ---------- */
@media (min-width: 64rem) { .service-grid-4 { grid-template-columns: repeat(2, 1fr); } }

/* Home: selected work list */
.work-list { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--navy-ink); }
.work-list li { border-bottom: 1px solid var(--line); }
.work-list a { display: grid; gap: .25rem; padding: 1.2rem 2rem 1.2rem 0; position: relative; text-decoration: none; color: var(--ink); }
.work-list a::after { content: "\2192"; position: absolute; right: .25rem; top: 1.2rem; color: var(--accent); font-family: var(--font-head); }
.work-list strong { font: 650 1.12rem/1.3 var(--font-head); color: var(--navy-ink); }
.work-list span { color: var(--muted); }
.work-list a:hover strong { color: var(--navy); text-decoration: underline; text-underline-offset: .18em; }
.more-link { margin: 1.5rem 0 0; font: 600 1rem var(--font-head); }

/* Home: engagements */
.engage-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.25rem; }
@media (min-width: 48rem) { .engage-list { grid-template-columns: repeat(3, 1fr); gap: 2rem; } }
.engage-list li { padding-top: 1.1rem; border-top: 2px solid var(--navy-ink); }
.engage-list h3 { margin-bottom: .35rem; }
.engage-list p { margin: 0; color: var(--muted); }
.engage-note { margin: 2rem 0 0; max-width: 40rem; font-size: 1.1rem; }

/* Home: about teaser */
.about-teaser { display: grid; gap: 1.5rem; align-items: center; }
@media (min-width: 40rem) { .about-teaser { grid-template-columns: 10rem 1fr; gap: 2.5rem; } }
.teaser-photo { width: 10rem; border-radius: 50%; background: linear-gradient(180deg, #e3ebf0 0%, #cfdce5 100%); border: 3px solid var(--navy); }
.about-teaser p { max-width: 40rem; }
.more-link-inline { font: 600 1rem var(--font-head); }

/* Services */
.service-detail { display: grid; gap: 2rem; }
.service-intro .icon { width: 2.75rem; height: 2.75rem; color: var(--navy); margin-bottom: 1rem; }
.service-detail .detail-grid { margin-top: 0; }
.table-wrap { overflow-x: auto; }
.engage-table { border-collapse: collapse; width: 100%; min-width: 36rem; background: var(--white); font-size: 1rem; }
.engage-table th, .engage-table td { text-align: left; vertical-align: top; padding: .9rem 1rem; border-bottom: 1px solid var(--line); }
.engage-table thead th { font: 650 1.05rem var(--font-head); color: var(--navy-ink); border-bottom: 2px solid var(--navy-ink); }
.engage-table tbody th { font: 600 .78rem var(--font-head); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); width: 11rem; }
.faq { margin: 0; }
.faq dt { font: 650 1.12rem/1.3 var(--font-head); color: var(--navy-ink); margin-top: 1.75rem; }
.faq dt:first-child { margin-top: 0; }
.faq dd { margin: .4rem 0 0; color: var(--muted); }

/* Work */
.case-list { display: grid; gap: 3.5rem; min-width: 0; max-width: 56rem; }
.case { scroll-margin-top: 6rem; border-top: 2px solid var(--navy-ink); padding-top: 1.5rem; }
.case h2 { font-size: clamp(1.35rem, 2.6vw, 1.75rem); margin-bottom: .35rem; }
.case-meta { font: 500 .92rem var(--font-head); color: var(--accent); margin-bottom: 1.25rem; }
.case-body { margin: 0; display: grid; gap: 1rem; }
.case-body > div { display: grid; gap: .25rem; }
@media (min-width: 40rem) { .case-body > div { grid-template-columns: 8rem 1fr; gap: 1.5rem; } }
.case-body dt { font: 600 .78rem/1.9 var(--font-head); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.case-body dd { margin: 0; max-width: 44rem; }
.case-body dd p { margin: 0; }
.case-body dd ul { margin: 0; padding-left: 1.1rem; display: grid; gap: .6rem; }
.case-result dd { font-weight: 600; color: var(--navy-ink); }

/* About page */
.about-page h1 { font-size: clamp(1.9rem, 4.5vw, 2.8rem); }
.about-page .prose h2 { font-size: 1.25rem; margin-top: 2.25rem; }

/* Contact page */
.contact-page-grid { display: grid; gap: 2.5rem; align-items: start; }
@media (min-width: 56rem) { .contact-page-grid { grid-template-columns: 1.3fr 1fr; gap: 4rem; } }
.contact-card { margin: 0; background: var(--white); border: 2px solid var(--navy-ink); font-family: var(--font-head); }
.contact-card div { padding: 1.1rem 1.25rem; border-bottom: 1px solid var(--navy-ink); }
.contact-card div:last-child { border-bottom: 0; }
.contact-card dt { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: .2rem; }
.contact-card dd { margin: 0; font-size: 1.15rem; font-weight: 600; color: var(--navy-ink); overflow-wrap: anywhere; }
.contact-card a { color: var(--navy); text-decoration: none; }
.contact-card a:hover { color: var(--accent); text-decoration: underline; }
