/* =========================================================
   Tradesman Welding — site styles
   Colors, type and spacing are tokens below. Change a token
   once and it updates everywhere.
   ========================================================= */

:root {
  /* Brand palette — navy and red measured from the logo */
  --navy: #113247;         /* logo navy */
  --navy-deep: #0B2333;
  --red: #B23A2B;          /* logo red (#C1321F), slightly muted for text */
  --paper: #F4F2ED;        /* warm off-white page background */
  --white: #FFFFFF;
  --steel: #636D78;        /* secondary text, captions */
  --steel-line: #D5D8DC;   /* dividers, borders */
  --steel-band: #E6E6E2;   /* alternate section background */
  --ink: #1B2530;          /* body text */

  /* Type */
  --font-head: "Barlow Semi Condensed", "Arial Narrow", "Roboto Condensed", "Helvetica Neue", Arial, sans-serif;
  --font-label: "Barlow", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Source Sans 3", "Source Sans Pro", "Segoe UI", "Helvetica Neue", Arial, sans-serif;

  /* Spacing scale (8px base) */
  --s1: 8px;  --s2: 16px; --s3: 24px; --s4: 32px;
  --s5: 48px; --s6: 64px; --s7: 96px;

  --wrap: 1200px;
  --measure: 680px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--navy); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--red); }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
p { margin: 0 0 1em; }

h1, h2, h3 {
  font-family: var(--font-head);
  font-weight: 600;
  color: var(--navy);
  line-height: 1.12;
  margin: 0 0 0.5em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.25rem, 1.6rem + 2.6vw, 3.5rem); }
h2 { font-size: clamp(1.625rem, 1.3rem + 1.2vw, 2.125rem); }
h3 { font-size: 1.375rem; }

.label {
  font-family: var(--font-label);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--steel);
}

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--s3); }
@media (min-width: 900px) { .wrap { padding: 0 var(--s5); } }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--navy); color: var(--white); padding: var(--s1) var(--s2); z-index: 100;
}
.skip-link:focus { left: var(--s2); top: var(--s2); }

.text-link {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.125rem;
  color: var(--navy);
  text-decoration: none;
  border-bottom: 1px solid var(--steel-line);
  padding-bottom: 2px;
}
.text-link:hover { color: var(--red); border-bottom-color: var(--red); }

/* ---------- Header ---------- */
.site-header {
  background: var(--paper);
  border-bottom: 1px solid var(--steel-line);
  position: relative;
  z-index: 20;
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s3);
  padding-top: 12px; padding-bottom: 12px;
}
.brand { display: block; flex: none; }
.brand img { height: 76px; width: auto; }

.nav-toggle {
  display: none;
  align-items: center; gap: 10px;
  background: none; border: 1px solid var(--steel-line);
  font-family: var(--font-head); font-weight: 600; font-size: 1rem; color: var(--navy);
  padding: 8px 14px; cursor: pointer; border-radius: 2px;
}
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
  display: block; width: 18px; height: 2px; background: var(--navy); 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; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { top: 0; transform: rotate(-45deg); }

.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: var(--s4); }
.site-nav a {
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 1.0625rem;
  color: var(--navy);
  text-decoration: none;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--red); }
.site-nav a[aria-current] { border-bottom-color: var(--red); }

@media (max-width: 859px) {
  .site-header .wrap { padding-top: 10px; padding-bottom: 10px; }
  .brand img { height: 56px; }
  .js .nav-toggle { display: inline-flex; }
  .js .site-nav {
    display: none;
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--paper);
    border-bottom: 1px solid var(--steel-line);
    box-shadow: 0 12px 24px -16px rgba(11, 35, 51, 0.35);
  }
  .js .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; gap: 0; padding: var(--s1) var(--s3) var(--s2); }
  .site-nav li + li { border-top: 1px solid var(--steel-line); }
  .site-nav a { display: block; padding: 14px 0; font-size: 1.125rem; border-bottom: 0; }
  .site-nav a[aria-current] { color: var(--red); }
  /* Without JavaScript the links simply wrap under the logo */
  html:not(.js) .site-header .wrap { flex-wrap: wrap; }
  html:not(.js) .site-nav ul { flex-direction: row; flex-wrap: wrap; gap: var(--s2); padding: 0; }
  html:not(.js) .site-nav li + li { border-top: 0; }
}

/* ---------- Sections ---------- */
.section { padding: var(--s7) 0; }
.section--tight { padding: var(--s6) 0; }
.section--band { background: var(--steel-band); }
.section + .section:not(.section--band) { border-top: 1px solid var(--steel-line); }
@media (max-width: 699px) {
  .section { padding: var(--s6) 0; }
  .section--tight { padding: var(--s5) 0; }
}
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: var(--s3); flex-wrap: wrap;
  margin-bottom: var(--s4);
}
.section-head h2 { margin: 0; }
.prose { max-width: var(--measure); }
.muted { color: var(--steel); }

/* Page title band on inner pages */
.page-head { padding: var(--s6) 0 var(--s5); border-bottom: 1px solid var(--steel-line); }
.page-head h1 { margin-bottom: 0.25em; }
.page-head p { margin: 0; color: var(--steel); max-width: var(--measure); font-size: 1.125rem; }
.back-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-head); font-weight: 500; font-size: 1rem;
  text-decoration: none; margin-bottom: var(--s3);
}
.back-link svg { width: 16px; height: 16px; }

/* Double-rule photo frame, echoing the logo's border */
.frame { margin: 0; padding: 6px; border: 1px solid var(--navy); background: var(--white); }
.frame img { width: 100%; outline: 1px solid rgba(17, 50, 71, 0.2); }

/* ---------- Home ---------- */
.hero { padding: var(--s6) 0 var(--s7); }
.hero-grid { display: grid; gap: var(--s5); align-items: center; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 5fr 7fr; gap: var(--s6); } }
.hero h1 { margin-bottom: 0.2em; }
.hero-sub {
  font-family: var(--font-head);
  font-weight: 500;
  font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
  color: var(--red);
  margin: 0 0 var(--s3);
  line-height: 1.3;
}
.hero-line { font-size: 1.1875rem; max-width: 30em; margin-bottom: var(--s4); }
@media (max-width: 899px) {
  .hero { padding-top: var(--s5); }
  .hero-grid { gap: var(--s4); }
}

.intro-grid { display: grid; gap: var(--s3); }
@media (min-width: 900px) { .intro-grid { grid-template-columns: 5fr 7fr; gap: var(--s6); align-items: start; } }
.intro-grid h2 { margin: 0; }
.intro-grid p { font-size: 1.125rem; }

/* Homepage photo picks */
.picks { display: grid; gap: var(--s3) var(--s2); grid-template-columns: repeat(2, 1fr); }
@media (min-width: 560px) { .picks { gap: var(--s3); } }
@media (min-width: 1000px) { .picks { grid-template-columns: repeat(4, 1fr); } .picks--3 { grid-template-columns: repeat(3, 1fr); } }
.pick { text-decoration: none; color: inherit; display: block; }
.pick-img { aspect-ratio: 4 / 5; overflow: hidden; background: var(--steel-band); }
.picks--3 .pick-img { aspect-ratio: 4 / 3; }
.pick-img img { width: 100%; height: 100%; object-fit: cover; }
.pick .label { display: block; padding-top: 12px; color: var(--navy); }
.pick:hover .label { color: var(--red); }

/* ---------- Our Work: album tiles ---------- */
.tiles { display: grid; gap: var(--s4) var(--s3); grid-template-columns: 1fr; }
@media (min-width: 520px) { .tiles { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .tiles { grid-template-columns: repeat(3, 1fr); gap: var(--s5) var(--s4); } }
.tile {
  display: flex; flex-direction: column;
  text-decoration: none; color: inherit;
  background: var(--white);
  border: 1px solid var(--steel-line);
  transition: border-color 0.15s ease;
}
.tile:hover { border-color: var(--navy); color: inherit; }
.tile-img { aspect-ratio: 4 / 3; overflow: hidden; background: var(--steel-band); }
.tile-img img { width: 100%; height: 100%; object-fit: cover; }
.tile-img.is-empty {
  display: flex; align-items: center; justify-content: center;
  background:
    repeating-linear-gradient(135deg, transparent 0 14px, rgba(17, 50, 71, 0.035) 14px 15px),
    var(--steel-band);
  color: var(--steel); font-size: 0.9375rem;
}
.tile-body { padding: var(--s2) var(--s3) var(--s3); display: flex; flex-direction: column; flex: 1; }
.tile h2, .tile h3 { font-size: 1.375rem; margin: 0 0 4px; }
.tile p { margin: 0; color: var(--steel); font-size: 0.9875rem; }
.tile-open {
  margin-top: auto; padding-top: var(--s2);
  font-family: var(--font-head); font-weight: 600; color: var(--navy);
  display: inline-flex; align-items: center; gap: 6px;
}
.tile:hover .tile-open { color: var(--red); }
.tile-open svg { width: 16px; height: 16px; }

/* ---------- Album / project photos ---------- */
.photo-grid { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); align-items: start; }
@media (min-width: 700px) { .photo-grid { grid-template-columns: repeat(3, 1fr); gap: var(--s2); } }
@media (min-width: 1100px) { .photo-grid { gap: var(--s3); } }
@media (max-width: 379px) { .photo-grid { grid-template-columns: 1fr; } }
.photo { display: block; text-decoration: none; color: inherit; cursor: zoom-in; }
.photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--steel-band); }
.photo .cap { display: block; font-size: 0.875rem; color: var(--steel); padding-top: 6px; line-height: 1.4; }

.empty {
  border: 1px dashed #B9BEC5;
  padding: var(--s5) var(--s4);
  color: var(--steel);
  max-width: var(--measure);
}
.empty strong { display: block; font-family: var(--font-head); font-size: 1.25rem; color: var(--navy); margin-bottom: 4px; }
.empty p { margin: 0; }

/* Projects listed inside Major Repairs & Rebuilds */
.project-list { display: grid; gap: var(--s4); margin-bottom: var(--s6); }
.project-card {
  display: grid; text-decoration: none; color: inherit;
  background: var(--white); border: 1px solid var(--steel-line);
}
@media (min-width: 760px) { .project-card { grid-template-columns: 5fr 7fr; } }
.project-card:hover { border-color: var(--navy); color: inherit; }
.project-card .tile-body { padding: var(--s3) var(--s4); justify-content: center; }
.project-card h3 { font-size: 1.625rem; margin-bottom: 8px; }

/* Project stages are a real sequence, so they are numbered */
.stage + .stage { padding-top: var(--s5); }
.stage-head { display: flex; align-items: baseline; gap: var(--s2); margin-bottom: var(--s3); border-bottom: 1px solid var(--steel-line); padding-bottom: 12px; }
.stage-num {
  font-family: var(--font-head); font-weight: 600; font-size: 1rem;
  color: var(--white); background: var(--navy);
  width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; flex: none; transform: translateY(-2px);
}
.stage-head h2 { font-size: 1.5rem; margin: 0; }

/* ---------- Services ---------- */
.service { display: grid; gap: var(--s4); padding: var(--s6) 0; border-top: 1px solid var(--steel-line); }
.service:first-child { border-top: 0; padding-top: 0; }
.service-text { max-width: var(--measure); }
@media (min-width: 900px) { .service:has(figure) { grid-template-columns: 7fr 5fr; gap: var(--s6); align-items: start; } }
.service ul { list-style: none; padding: 0; margin: var(--s3) 0 0; border-top: 1px solid var(--steel-line); }
.service li { padding: 10px 0 10px 22px; border-bottom: 1px solid var(--steel-line); position: relative; }
.service li::before {
  content: ""; position: absolute; left: 2px; top: 1.05em;
  width: 9px; height: 2px; background: var(--red);
}
.service figure { margin: 0; }
.service figure img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }

/* ---------- About ---------- */
.about-intro { display: grid; gap: var(--s5); }
@media (min-width: 900px) { .about-intro { grid-template-columns: 7fr 5fr; gap: var(--s6); align-items: start; } }
.about-split { display: grid; gap: var(--s5); }
@media (min-width: 900px) {
  .about-split:has(figure) { grid-template-columns: 5fr 7fr; gap: var(--s6); align-items: start; }
}
.about-text p { font-size: 1.125rem; max-width: var(--measure); }
.signoff {
  display: inline-block;
  padding: var(--s3) var(--s4);
  border: 1px solid var(--navy);
  outline: 1px solid var(--navy); outline-offset: 5px;
  margin: var(--s3) 6px 6px;
  background: var(--white);
}
.signoff p { margin: 0; }
.signoff .name { font-family: var(--font-head); font-weight: 600; font-size: 1.5rem; color: var(--navy); line-height: 1.2; }
.signoff .line { color: var(--red); font-family: var(--font-head); font-weight: 500; font-size: 1.0625rem; }
.signoff .area { color: var(--steel); }

/* ---------- Contact ---------- */
.contact-grid { display: grid; gap: var(--s5); }
@media (min-width: 900px) { .contact-grid { grid-template-columns: 6fr 5fr; gap: var(--s6); align-items: start; } }
.contact-card {
  background: var(--white);
  border: 1px solid var(--navy);
  outline: 1px solid var(--navy); outline-offset: 5px;
  margin: 6px;
  padding: var(--s4);
  max-width: 560px;
}
.contact-card dl { margin: 0; }
.contact-row { padding: var(--s2) 0; border-bottom: 1px solid var(--steel-line); }
.contact-row:first-child { padding-top: 0; }
.contact-row:last-child { border-bottom: 0; padding-bottom: 0; }
.contact-row dt { margin-bottom: 2px; }
.contact-row dd { margin: 0; font-family: var(--font-head); font-weight: 600; font-size: 1.5rem; color: var(--navy); overflow-wrap: anywhere; }
.contact-row dd a { text-decoration: none; }
.contact-row dd a:hover { text-decoration: underline; }
.contact-row .hint { display: block; font-family: var(--font-body); font-weight: 400; font-size: 0.9375rem; color: var(--steel); }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: #D8DEE5; padding: var(--s6) 0 var(--s4); }
.site-footer a { color: var(--white); text-decoration: none; }
.site-footer a:hover { color: var(--white); text-decoration: underline; }
.footer-grid { display: grid; gap: var(--s5); }
@media (min-width: 800px) { .footer-grid { grid-template-columns: 5fr 4fr 3fr; } }
.footer-logo { display: inline-block; margin-bottom: var(--s2); }
.footer-logo img { width: 200px; }
.footer-tag { margin: 0; }
.site-footer .label { color: #A6B2C0; display: block; margin-bottom: 10px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { padding: 3px 0; }
.footer-base {
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  margin-top: var(--s5); padding-top: var(--s3);
  font-size: 0.875rem; color: #A6B2C0;
  display: flex; justify-content: space-between; gap: var(--s2); flex-wrap: wrap;
}

/* ---------- Photo viewer ---------- */
.lb {
  position: fixed; inset: 0; z-index: 1000;
  background: #0B1620;
  display: none;
  color: #E6EAF0;
  touch-action: pan-y;
}
.lb.is-open { display: grid; grid-template-rows: auto 1fr auto; }
.lb-top { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; }
.lb-count { font-family: var(--font-label); font-size: 0.875rem; letter-spacing: 0.06em; color: #AEB8C6; }
.lb-stage { position: relative; display: flex; align-items: center; justify-content: center; min-height: 0; padding: 0 72px; }
@media (max-width: 699px) { .lb-stage { padding: 0 8px; } }
.lb-img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; user-select: none; -webkit-user-drag: none; transition: opacity 0.18s ease; }
.lb-img.is-loading { opacity: 0; }
.lb-cap { padding: 14px 16px 20px; text-align: center; min-height: 56px; font-size: 1rem; max-width: 760px; margin: 0 auto; }
.lb-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--white);
  width: 48px; height: 48px;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; border-radius: 50%;
}
.lb-btn:hover { background: rgba(255, 255, 255, 0.18); }
.lb-btn svg { width: 22px; height: 22px; }
.lb-prev, .lb-next { position: absolute; top: 50%; transform: translateY(-50%); }
.lb-prev { left: 12px; }
.lb-next { right: 12px; }
@media (max-width: 699px) {
  .lb-prev, .lb-next { top: auto; bottom: -60px; transform: none; }
  .lb-prev { left: 16px; }
  .lb-next { right: 16px; }
  .lb-cap { padding: 14px 72px 20px; }
}
.lb-btn[hidden] { display: none; }
body.lb-locked { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
@media print {
  .site-nav, .nav-toggle, .lb { display: none !important; }
}

/* Hero is followed directly by a section: keep the gap even */
.hero + .section { border-top: 1px solid var(--steel-line); padding-top: var(--s6); }
.hero { padding-bottom: var(--s6); }

/* ---------- Home: full-width photo hero ---------- */
.hero-full {
  position: relative;
  background: var(--navy-deep);
  color: #E9E5DC;
  overflow: hidden;
}
.hero-media img { width: 100%; height: auto; }
.hero-full-inner { position: relative; z-index: 1; }
.hero-full-text { padding: var(--s4) 0 var(--s5); max-width: 34rem; }
.hero-full-text::before {
  content: ""; display: block;
  width: 48px; height: 3px; background: #C1321F;   /* logo red */
  margin-bottom: var(--s3);
}
.hero-full h1 { color: var(--white); margin-bottom: 0.2em; }
.hero-full .hero-sub { color: #E9E5DC; }
.hero-full .hero-line { color: #C9D2DC; font-size: 1.1875rem; margin-bottom: var(--s4); }
.hero-link {
  font-family: var(--font-head); font-weight: 600; font-size: 1.125rem;
  color: var(--white); text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.45);
  padding-bottom: 2px;
}
.hero-link:hover { color: var(--white); border-bottom-color: #C1321F; }

/* Phones and tablets: photo on top, uncropped, fading into the navy text block */
@media (max-width: 899px) {
  .hero-media { position: relative; }
  .hero-media::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 28%;
    background: linear-gradient(to bottom, rgba(11, 35, 51, 0), var(--navy-deep));
  }
  .hero-full-text { padding-top: var(--s2); }
}

/* Desktop: navy panel on the left for the text, photo filling the right side */
@media (min-width: 900px) {
  .hero-full { min-height: clamp(520px, 70vh, 720px); display: flex; align-items: center; }
  .hero-media { position: absolute; top: 0; bottom: 0; right: 0; width: 64%; }
  .hero-media img { height: 100%; object-fit: cover; object-position: 50% 40%; }
  .hero-media::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(90deg, var(--navy-deep) 0%, rgba(11, 35, 51, 0.55) 10%, rgba(11, 35, 51, 0) 24%);
  }
  .hero-full-inner { width: 100%; }
  .hero-full-text { padding: var(--s7) 0; max-width: min(30rem, 30vw); }
  .hero-full h1 { font-size: clamp(2.5rem, 1.8rem + 2vw, 3.5rem); }
}
@media (min-width: 1500px) { .hero-media { width: 66%; } }

/* Gentle fade-in on load (skipped when reduced motion is on) */
@media (prefers-reduced-motion: no-preference) {
  .hero-full-text { animation: hero-in 0.7s ease-out both; }
  @keyframes hero-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
}

.hero-full + .section { border-top: 0; }

/* ---------- Gallery additions ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.grid-heading { margin: 0 0 var(--s3); }
.tile .tile-count { margin-top: 6px; font-size: 0.9375rem; color: var(--steel); }
/* Our Work: the two repair albums lead, wider, then the rest three across */
@media (min-width: 1000px) {
  .tiles { grid-template-columns: repeat(6, 1fr); }
  .tile { grid-column: span 2; }
  .tile--wide { grid-column: span 3; }
  .tile--wide .tile-img { aspect-ratio: 16 / 10; }
}
/* Thumbnails: photo-grid images keep a tidy 4:3 crop; the viewer shows the whole photo */
.project-card .tile-img { aspect-ratio: 4 / 3; }

/* =========================================================
   Photo-to-navy treatment: album tiles, project cards,
   gallery page banners, homepage photo captions
   ========================================================= */

/* ---- Album tiles and project cards: photo on the left fading into navy ---- */
.tiles { grid-template-columns: 1fr; gap: var(--s3); }
@media (min-width: 760px) { .tiles { grid-template-columns: repeat(2, 1fr); } .tile--wide { grid-column: span 2; } }
@media (min-width: 1000px) {
  .tiles { grid-template-columns: repeat(2, 1fr); gap: var(--s4); }
  .tile { grid-column: auto; }
  .tile--wide { grid-column: span 2; }
  .tile--wide .tile-img { aspect-ratio: auto; }
}

.tile, .project-card {
  position: relative;
  display: flex;
  overflow: hidden;
  min-height: 220px;
  background: var(--navy-deep);
  border: 0;
  color: #fff;
  text-decoration: none;
  isolation: isolate;
}
.tile:hover, .project-card:hover { color: #fff; }
.tile .tile-img, .project-card .tile-img {
  position: absolute; top: 0; bottom: 0; left: 0;
  width: 64%;
  aspect-ratio: auto;
  background: var(--navy-deep);
  z-index: -1;
}
.tile .tile-img img, .project-card .tile-img img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.5s ease;
}
.tile:hover .tile-img img, .project-card:hover .tile-img img { transform: scale(1.04); }
.tile .tile-img::after, .project-card .tile-img::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg,
    rgba(11, 35, 51, 0) 0%,
    rgba(11, 35, 51, 0.1) 30%,
    rgba(11, 35, 51, 0.75) 68%,
    var(--navy-deep) 100%);
}
.tile .tile-body, .project-card .tile-body {
  margin-left: auto;
  width: 50%;
  padding: var(--s3) var(--s3) var(--s3) 0;
  display: flex; flex-direction: column; justify-content: center;
  background: none;
}
.tile h2, .project-card h3 {
  color: #fff; margin: 0 0 6px;
  font-size: clamp(1.375rem, 1.1rem + 0.8vw, 1.75rem);
}
.tile h2::before, .project-card h3::before {
  content: ""; display: block; width: 32px; height: 3px;
  background: #C1321F; margin-bottom: 12px;
}
.tile p, .project-card .muted { color: #C9D2DC; font-size: 0.9375rem; margin: 0; }
.tile .tile-count { color: #9FB0C2; margin-top: 8px; font-size: 0.875rem; }
.project-card .label { color: #9FB0C2; order: 2; margin-top: 8px; }
.project-card h3 { order: 1; }
.project-card .muted { order: 3; }
.tile .tile-open, .project-card .tile-open {
  order: 4;
  color: #fff; margin-top: var(--s2); padding-top: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.35);
  align-self: flex-start; padding-bottom: 2px;
}
.tile:hover .tile-open, .project-card:hover .tile-open { color: #fff; border-bottom-color: #C1321F; }
.tile:focus-visible, .project-card:focus-visible { outline: 3px solid #C1321F; outline-offset: 3px; }

/* The two lead albums and project cards run larger */
.tile--wide { min-height: 300px; }
.tile--wide .tile-img { width: 66%; }
.tile--wide .tile-body { width: 40%; padding-right: var(--s5); }
.project-card { min-height: 280px; }
@media (min-width: 760px) {
  .project-card .tile-img { width: 62%; }
  .project-card .tile-body { width: 42%; padding-right: var(--s5); }
}
.project-list { gap: var(--s3); }

/* Phones: keep the left-to-right fade, give the text a bit more room */
@media (max-width: 559px) {
  .tile, .project-card, .tile--wide { min-height: 190px; }
  .tile .tile-img, .project-card .tile-img, .tile--wide .tile-img { width: 70%; }
  .tile .tile-body, .project-card .tile-body, .tile--wide .tile-body { width: 56%; padding: var(--s2) var(--s2) var(--s2) 0; }
  .tile p:not(.tile-count) { display: none; }
  .tile h2, .project-card h3 { font-size: 1.25rem; }
  .tile h2::before, .project-card h3::before { margin-bottom: 8px; }
}

/* ---- Album and project page banners ---- */
.page-head--photo {
  position: relative;
  background: var(--navy-deep);
  border-bottom: 0;
  padding: 0;
  overflow: hidden;
  color: #E9E5DC;
}
.page-head-media img { width: 100%; height: 100%; object-fit: cover; }
.page-head--photo h1 { color: #fff; }
.page-head--photo p { color: #C9D2DC; }
.page-head--photo .back-link { color: #fff; }
.page-head--photo .back-link:hover { color: #fff; text-decoration: underline; }
.page-head-text { position: relative; padding: var(--s3) 0 var(--s5); }
.page-head-text h1::before {
  content: ""; display: block; width: 40px; height: 3px;
  background: #C1321F; margin-bottom: var(--s2);
}
@media (max-width: 759px) {
  .page-head-media { position: relative; aspect-ratio: 16 / 9; }
  .page-head-media::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 45%;
    background: linear-gradient(to bottom, rgba(11, 35, 51, 0), var(--navy-deep));
  }
}
@media (min-width: 760px) {
  .page-head--photo { min-height: 340px; display: flex; align-items: center; }
  .page-head-media { position: absolute; top: 0; bottom: 0; left: 0; width: 62%; }
  .page-head-media::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(90deg, rgba(11, 35, 51, 0) 0%, rgba(11, 35, 51, 0.15) 35%, rgba(11, 35, 51, 0.8) 75%, var(--navy-deep) 100%);
  }
  .page-head--photo .wrap { width: 100%; }
  .page-head-text { margin-left: auto; width: min(44%, 30rem); padding: var(--s6) 0; }
}

/* ---- Homepage photo captions: label over a navy fade at the bottom ---- */
.pick { position: relative; overflow: hidden; }
.pick .pick-img img { transition: transform 0.5s ease; }
.pick:hover .pick-img img { transform: scale(1.04); }
.pick .label {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 48px 14px 12px;
  background: linear-gradient(to bottom, rgba(11, 35, 51, 0), rgba(11, 35, 51, 0.9));
  color: #fff;
}
.pick:hover .label { color: #fff; }

@media (prefers-reduced-motion: reduce) {
  .tile:hover .tile-img img, .project-card:hover .tile-img img, .pick:hover .pick-img img { transform: none; }
}
.tile .tile-body, .project-card .tile-body { flex: 0 0 auto; }
@media (max-width: 759px) { .project-card .tile-body { width: 52%; } }

/* =========================================================
   Gallery pages on navy: tiles and photos blend into the page
   ========================================================= */
main:has(.tiles), main:has(.page-head--photo):not(:has(.about-first)) {
  background: var(--navy-deep);
  color: #C9D2DC;
}
main:has(.tiles) .page-head,
main:has(.page-head--photo) .page-head { border-bottom: 0; }
main:has(.tiles) .page-head { padding: var(--s5) 0 var(--s3); }
main:has(.tiles) .page-head h1 { color: #fff; }
main:has(.tiles) .page-head h1::before {
  content: ""; display: block; width: 40px; height: 3px; background: #C1321F; margin-bottom: var(--s2);
}
main:has(.tiles) .page-head p { color: #C9D2DC; }
main:has(.tiles) .section,
main:has(.page-head--photo):not(:has(.about-first)) .section {
  padding: var(--s3) 0 var(--s6);
  border-top: 0;
}
main:has(.tiles) .tiles { gap: var(--s2); }
@media (min-width: 1000px) { main:has(.tiles) .tiles { gap: var(--s3); } }
.project-list { gap: var(--s2); margin-bottom: var(--s5); }

/* photo grids and headings on navy */
main:has(.page-head--photo) .grid-heading { color: #fff; }
main:has(.page-head--photo):not(:has(.about-first)) .photo .cap { color: #9FB0C2; }
main:has(.page-head--photo):not(:has(.about-first)) .photo img { background: #13304A; }
main:has(.page-head--photo):not(:has(.about-first)) .empty { border-color: #36506A; color: #C9D2DC; }
main:has(.page-head--photo):not(:has(.about-first)) .empty strong { color: #fff; }
/* page banner and content read as one band */
.page-head--photo + .section { padding-top: var(--s3); }
/* footer sits directly below the navy page: a thin rule separates them */
main:has(.tiles) + .site-footer,
main:has(.page-head--photo):not(:has(.about-first)) + .site-footer { border-top: 1px solid rgba(255, 255, 255, 0.1); }

/* ---- About page ---- */
.about-banner .page-head-text p { font-family: var(--font-head); font-weight: 500; font-size: 1.125rem; color: #E9E5DC; }
.about-banner .page-head-media img { object-position: 50% 42%; }
.about-first { border-top: 0; padding-top: var(--s5); }
.about-first .about-text p:first-child { font-size: 1.3125rem; line-height: 1.5; color: var(--navy); }
.about-photo { margin: 0; }
.about-photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 55%; }
@media (min-width: 900px) {
  .about-split:has(figure) { grid-template-columns: 4fr 7fr; }
}
.page-head--photo + .section.about-first { padding-top: var(--s6); }
@media (min-width: 900px) {
  .about-first .about-text,
  .about-split:not(:has(figure)) .about-text {
    display: grid; grid-template-columns: 5fr 7fr; column-gap: var(--s6); align-items: start;
  }
  .about-first .about-text > p:first-child,
  .about-split:not(:has(figure)) .about-text > h2 { grid-column: 1; grid-row: 1 / span 3; }
  .about-first .about-text > p:not(:first-child),
  .about-split:not(:has(figure)) .about-text > p { grid-column: 2; }
  .about-first .about-text > p:first-child {
    font-family: var(--font-head); font-weight: 500;
    font-size: clamp(1.5rem, 1.2rem + 0.8vw, 1.875rem); line-height: 1.3;
  }
}

/* =========================================================
   About: helmet section as a navy band, photo fading in
   ========================================================= */
.about-craft {
  position: relative; overflow: hidden;
  background: var(--navy-deep);
  color: #C9D2DC;
  border-top: 0;
}
.section + .section.about-craft { border-top: 0; }
.about-craft h2 { color: #fff; }
.about-craft h2::before { content: ""; display: block; width: 40px; height: 3px; background: #C1321F; margin-bottom: var(--s2); }
.about-craft .about-text p { color: #C9D2DC; }
.about-craft .about-photo img { aspect-ratio: auto; }
.about-craft .signoff {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.55);
  outline-color: rgba(255, 255, 255, 0.55);
}
.about-craft .signoff .name { color: #fff; }
.about-craft .signoff .line { color: #E08A78; }
.about-craft .signoff .area { color: #A6B2C0; }
@media (max-width: 899px) {
  .about-craft { padding-top: 0; }
  .about-craft .about-split { gap: 0; }
  .about-craft .about-photo { position: relative; margin: 0 calc(-1 * var(--s3)); }
  .about-craft .about-photo img { aspect-ratio: 4 / 3; object-position: 50% 60%; }
  .about-craft .about-photo::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 40%;
    background: linear-gradient(to bottom, rgba(11, 35, 51, 0), var(--navy-deep));
  }
}
@media (min-width: 900px) {
  .about-craft { padding: var(--s7) 0; }
  .about-craft .about-split { display: block; }
  .about-craft .about-photo { position: absolute; top: 0; bottom: 0; left: 0; width: 44%; }
  .about-craft .about-photo img { height: 100%; object-fit: cover; object-position: 45% 60%; }
  .about-craft .about-photo::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(90deg, rgba(11, 35, 51, 0) 0%, rgba(11, 35, 51, 0.2) 45%, rgba(11, 35, 51, 0.85) 82%, var(--navy-deep) 100%);
  }
  .about-craft .about-text { position: relative; margin-left: 46%; }
}

/* =========================================================
   Homepage Selected work: navy band, mosaic of photos
   ========================================================= */
.selected-work { background: var(--navy-deep); }
.hero-full + .selected-work { padding-top: var(--s5); }
.selected-work .section-head h2 { color: #fff; }
.selected-work .section-head h2::before { content: ""; display: block; width: 40px; height: 3px; background: #C1321F; margin-bottom: var(--s2); }
.selected-work .text-link { color: #fff; border-bottom-color: rgba(255, 255, 255, 0.4); }
.selected-work .text-link:hover { color: #fff; border-bottom-color: #C1321F; }
.selected-work + .section { border-top: 0; }

.picks--mosaic { gap: var(--s2); }
.picks--mosaic .pick-img { aspect-ratio: 4 / 3; }
@media (min-width: 760px) {
  .picks--mosaic {
    grid-template-columns: 2fr 1fr 1fr;
    grid-template-rows: 1fr 1fr;
  }
  .picks--mosaic .pick:nth-child(1) { grid-column: 1; grid-row: 1 / span 2; }
  .picks--mosaic .pick:nth-child(2) { grid-column: 2 / span 2; grid-row: 1; }
  .picks--mosaic .pick:nth-child(3) { grid-column: 2; grid-row: 2; }
  .picks--mosaic .pick:nth-child(4) { grid-column: 3; grid-row: 2; }
  .picks--mosaic .pick, .picks--mosaic .pick-img { height: 100%; }
  .picks--mosaic .pick-img { aspect-ratio: auto; min-height: 210px; }
  .picks--mosaic .pick:nth-child(1) .pick-img { min-height: 436px; }
}
@media (max-width: 759px) {
  .picks--mosaic .pick:nth-child(1) { grid-column: 1 / -1; }
  .picks--mosaic .pick:nth-child(1) .pick-img { aspect-ratio: 16 / 11; }
}
/* larger captions, set in the heading face with a red rule */
.picks--mosaic .label,
.picks--3 .label {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.125rem;
  letter-spacing: 0;
  text-transform: none;
  padding: 56px 16px 14px;
}
.picks--mosaic .label::before,
.picks--3 .label::before { content: ""; display: block; width: 24px; height: 3px; background: #C1321F; margin-bottom: 8px; }
.picks--mosaic .pick:nth-child(1) .label { font-size: 1.5rem; padding: 80px 24px 20px; }
@media (min-width: 760px) {
  .picks--mosaic { grid-template-rows: repeat(2, clamp(190px, 19vw, 270px)); }
  .picks--mosaic .pick-img,
  .picks--mosaic .pick:nth-child(1) .pick-img { position: relative; min-height: 0; height: 100%; }
  .picks--mosaic .pick-img img { position: absolute; inset: 0; }
}
@media (max-width: 759px) {
  .picks--mosaic .pick:nth-child(4) { grid-column: 1 / -1; }
  .picks--mosaic .pick:nth-child(4) .pick-img { aspect-ratio: 16 / 9; }
}
@media (max-width: 999px) {
  .picks--3 .pick:nth-child(3) { grid-column: 1 / -1; }
  .picks--3 .pick:nth-child(3) .pick-img { aspect-ratio: 16 / 9; }
}

/* Helmet band: soft fade from the light page above into the photo and navy */
.about-craft::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0;
  height: 150px; z-index: 1; pointer-events: none;
  background: linear-gradient(to bottom, var(--paper) 0%, rgba(244, 242, 237, 0.6) 35%, rgba(244, 242, 237, 0) 100%);
}
.about-craft .about-photo { z-index: 0; }
.about-craft .about-text { position: relative; z-index: 2; }
@media (min-width: 900px) { .about-craft { padding-top: 168px; } }
@media (max-width: 899px) { .about-craft::before { height: 90px; } }
.about-craft::before {
  height: 240px;
  background: linear-gradient(to bottom,
    rgba(244, 242, 237, 1) 0%,
    rgba(244, 242, 237, 0.86) 12%,
    rgba(244, 242, 237, 0.62) 28%,
    rgba(244, 242, 237, 0.36) 46%,
    rgba(244, 242, 237, 0.16) 66%,
    rgba(244, 242, 237, 0.05) 84%,
    rgba(244, 242, 237, 0) 100%);
}
@media (min-width: 900px) { .about-craft { padding-top: 220px; } }
@media (max-width: 899px) { .about-craft::before { height: 140px; } }
.contact-row dd a.email { font-size: clamp(1.0625rem, 4.4vw, 1.5rem); overflow-wrap: normal; word-break: normal; }
.contact-row dd:has(a.email) { overflow-wrap: normal; }
.contact-row dd { line-height: 1.25; }
@media (max-width: 419px) { .contact-card { padding: var(--s3) 20px; } }
