/* ==========================================================================
   duane.media: base layout shared by every design option.
   Colors, type and effects live in theme.css.
   Layout uses container queries on .site, so it responds to the page width:
     mobile < 640px, tablet 640-1023px, desktop >= 1024px
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; }
button, input, select, textarea { font: inherit; color: inherit; }

.site {
  container: site / inline-size;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-size: 1rem;
  line-height: 1.6;
}
main { flex: 1; }
main:focus { outline: none; }

.wrap { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: 20px; }
@container site (min-width: 640px)  { .wrap { padding-inline: 32px; } }
@container site (min-width: 1024px) { .wrap { padding-inline: 48px; } }

/* ---------- Accessibility helpers ---------- */
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 16px; top: -200px; z-index: 1000;
  padding: 12px 18px; background: #1a1a1a; color: #fff; font-weight: 700; text-decoration: none; border-radius: 6px;
}
.skip-link:focus { top: 16px; }
:focus-visible { outline: 3px solid var(--focus, #094BA6); outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* ---------- Header ---------- */
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 76px; padding-block: 12px; }
.brand { display: inline-flex; flex: none; }
.brand img { height: 44px; width: auto; }
.brand .brand-wide { display: none; }
@container site (min-width: 640px) {
  .header-inner { min-height: 96px; }
  .brand .brand-square { display: none; }
  .brand .brand-wide { display: block; height: 44px; }
}
@container site (min-width: 1024px) { .brand .brand-wide { height: 52px; } }
.nav { list-style: none; display: flex; align-items: center; gap: 2px; flex-wrap: wrap; justify-content: flex-end; }
.nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 9px; white-space: nowrap; text-decoration: none; font-weight: 500; }
@container site (min-width: 640px) { .nav { gap: 8px; } .nav a { padding-inline: 16px; } }

/* ---------- Services drop-down ---------- */
.header-inner { position: relative; }
.has-sub { display: flex; align-items: center; }
.sub-toggle { display: inline-flex; align-items: center; justify-content: center; width: 28px; min-height: 44px;
  margin-left: -4px; padding: 0; background: none; border: 0; border-radius: 6px; color: inherit; cursor: pointer; }
.sub-toggle svg { transition: transform .2s ease; }
.has-sub.open .sub-toggle svg, .has-sub:hover .sub-toggle svg { transform: rotate(180deg); }
.sub { display: none; position: absolute; z-index: 50; top: 100%; left: 16px; right: 16px; list-style: none;
  padding: 8px; background: #fff; border: 1px solid #8F8F8F; border-radius: 10px; box-shadow: 0 14px 30px rgba(0, 0, 0, .14); }
.has-sub:hover .sub, .has-sub.open .sub { display: block; }
html:not(.js) .has-sub:focus-within .sub { display: block; }
.has-sub.dismissed .sub { display: none; }
.has-sub.dismissed .sub-toggle svg { transform: none; }
@container site (min-width: 640px) {
  .has-sub { position: relative; }
  .sub { left: 0; right: auto; min-width: 300px; }
}
.nav .sub a { display: flex; width: 100%; min-height: 44px; padding: 10px 14px; border-radius: 6px; color: #1F1F1F;
  font-family: Roboto, "Helvetica Neue", Arial, sans-serif; font-size: 1rem; font-weight: 500; text-transform: none; letter-spacing: 0; box-shadow: none; }
.nav .sub a:hover, .nav .sub a:focus-visible { background: #EEF3FB; color: #094BA6; }
.nav .sub a[aria-current="page"] { color: #094BA6; font-weight: 700; box-shadow: inset 3px 0 0 #094BA6; border-radius: 0 6px 6px 0; }

/* ---------- Hero ---------- */
.hero { padding-block: 40px 32px; }
@container site (min-width: 1024px) { .hero { padding-block: 64px 48px; } }
.eyebrow { font-size: .875rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 12px; }
.lede { font-size: 1.0625rem; max-width: 70ch; }
@container site (min-width: 640px) { .lede { font-size: 1.125rem; } }

/* ---------- Image tiles ---------- */
.tiles { list-style: none; display: grid; grid-template-columns: repeat(2, 1fr); }
@container site (min-width: 768px) { .tiles { grid-template-columns: repeat(4, 1fr); } }
.tile { position: relative; display: block; overflow: hidden; text-decoration: none; height: 100%; }
.tile-media { display: block; height: 100%; overflow: hidden; }
.tile img { width: 100%; height: 100%; object-fit: cover; }
.tile-label { position: absolute; }

/* ---------- Service cards ---------- */
.services { padding-block: 48px 64px; }
.section-title { margin-bottom: 24px; }
.cards { list-style: none; display: grid; grid-template-columns: 1fr; gap: 24px; }
@container site (min-width: 640px)  { .cards { grid-template-columns: repeat(2, 1fr); } }
@container site (min-width: 1024px) { .cards { gap: 40px 48px; } }
.card { display: flex; flex-direction: column; padding: 28px 24px; }
@container site (min-width: 1024px) { .card { padding: 36px 44px; } }
.card-title { font-size: 1.375rem; line-height: 1.3; }
@container site (min-width: 1024px) { .card-title { font-size: 1.625rem; } }
.card-sub { margin-top: 4px; font-size: 1.0625rem; }
.card-text { margin-top: 16px; margin-bottom: 24px; }
.card .btn { margin-top: auto; align-self: flex-start; }
.badge { display: inline-block; vertical-align: middle; font-size: .75rem; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; padding: 3px 10px; border-radius: 999px; line-height: 1.5; white-space: nowrap; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 10px 24px;
  font-weight: 700; text-decoration: none; cursor: pointer; border: 2px solid transparent; }

/* ---------- Service template ---------- */
.breadcrumb { padding-top: 20px; font-size: .9375rem; }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 0; }
.breadcrumb li + li::before { content: "/"; padding-inline: 10px; opacity: .7; }
.breadcrumb a { display: inline-block; padding-block: 4px; }
.breadcrumb [aria-current] { text-decoration: none; }
.svc-hero { padding-block: 32px 48px; }
.svc-hero-inner { display: grid; gap: 32px; align-items: center; }
@container site (min-width: 1024px) { .svc-hero-inner { grid-template-columns: 1.1fr .9fr; gap: 64px; } .svc-hero { padding-block: 48px 72px; } }
.svc-hero h1 { margin-bottom: 8px; }
.svc-sub { font-size: 1.125rem; margin-bottom: 8px; }
.svc-hero .lede { margin-block: 16px 28px; }
.svc-media { overflow: hidden; aspect-ratio: 4 / 3; }
.svc-media img { width: 100%; height: 100%; object-fit: cover; }
.svc-media--brand { display: grid; place-items: center; }
.mono { font-family: Georgia, "Times New Roman", serif; font-style: italic; font-size: clamp(4rem, 12cqi, 9rem); line-height: 1; }
.svc-body { padding-block: 56px; }
.svc-grid { display: grid; gap: 48px; }
@container site (min-width: 1024px) { .svc-grid { grid-template-columns: 1fr 1fr; gap: 72px; } }
.checklist { list-style: none; display: grid; gap: 14px; }
.checklist li { position: relative; padding-left: 36px; }
.checklist li::before { content: ""; position: absolute; left: 0; top: .3em; width: 22px; height: 22px; border-radius: 50%; }
.checklist li::after { content: ""; position: absolute; left: 7px; top: calc(.3em + 5px); width: 6px; height: 10px; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }
.steps { list-style: none; counter-reset: step; display: grid; gap: 24px; }
.steps li { counter-increment: step; position: relative; padding-left: 60px; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 42px; height: 42px; display: grid; place-items: center; font-weight: 700; border-radius: 50%; }
.steps h3 { font-size: 1.125rem; margin-bottom: 2px; }
.cta-band { padding-block: 56px; text-align: center; }
.cta-band h2 { margin-bottom: 8px; }
.cta-band p { margin: 0 auto 24px; max-width: 56ch; }

/* ---------- Contact ---------- */
.contact-hero { padding-bottom: 24px; }
.contact-body { padding-block: 0 72px; }
.contact-grid { display: grid; gap: 48px; }
@container site (min-width: 1024px) { .contact-grid { grid-template-columns: 1.4fr 1fr; gap: 72px; align-items: start; } }
.contact-form { display: grid; gap: 20px; }
.form-note { font-size: .9375rem; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 700; }
.field input, .field select, .field textarea { width: 100%; min-height: 48px; padding: 10px 14px; border-radius: 6px; border: 2px solid; }
.field textarea { resize: vertical; }
.contact-form .btn { justify-self: start; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.contact-info dl { display: grid; gap: 4px; margin-bottom: 24px; }
.contact-info dt { font-weight: 700; margin-top: 12px; }
.contact-info dd a { display: inline-block; padding-block: 4px; }

/* ---------- Footer ---------- */
.site-footer { padding-top: 48px; font-size: .9375rem; }
.footer-grid { display: grid; gap: 32px; padding-bottom: 32px; }
@container site (min-width: 640px)  { .footer-grid { grid-template-columns: 1fr 1fr; } }
@container site (min-width: 1024px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.footer-brand img { height: 64px; width: auto; margin-bottom: 12px; }
.footer-title { font-size: 1rem; margin-bottom: 10px; }
.site-footer ul { list-style: none; display: grid; gap: 2px; }
.site-footer li a { display: inline-block; padding-block: 5px; }
.footer-bottom { padding-block: 20px; font-size: .875rem; }
.footer-bottom span { display: block; }
@container site (min-width: 640px) { .footer-bottom span { display: inline; } }
.tagline { font-family: Georgia, "Times New Roman", serif; font-style: italic; }
