/* ============================================================
   Rocha Plumbing Inc. — Home
   Font: Inter
   ============================================================ */

:root {
  --green-900: #1B3121;   /* primary dark green */
  --green-800: #22402B;   /* slightly lighter dark */
  --olive:     #4F683B;   /* accent / panel green */
  --olive-700: #455c34;
  --cream:     #FAFAF8;   /* page background */
  --tile:      #ECEEE9;   /* light card / icon tile */
  --tile-line: #E2E4DE;   /* hairline on cream */
  --white:     #FFFFFF;
  --ink:       #1B3121;   /* dark text */
  --muted:     #6B7066;   /* muted body text on light */
  --muted-2:   #8A8F86;   /* lighter muted */
  --on-dark:   rgba(255,255,255,0.72); /* body text on dark */
  --on-dark-2: rgba(255,255,255,0.55);

  --maxw: 1286px;
  --radius: 16px;
  --radius-sm: 12px;

  --header-h: 96px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: hidden; }
body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--cream);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -0.02em; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 32px;
}

.section { padding: 112px 0; }

/* ---------- Eyebrow / labels ---------- */
.eyebrow {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--olive);
  margin: 0;
}
.eyebrow-light { color: rgba(255,255,255,0.78); }
.eyebrow-rule {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.eyebrow-rule::after {
  content: "";
  width: 56px;
  height: 1px;
  background: currentColor;
  opacity: 0.4;
}
.eyebrow-on-dark { color: rgba(255,255,255,0.65); }

/* ---------- Headings ---------- */
.display-lg {
  font-size: clamp(28px, 3vw, 41px);
  line-height: 1.22;
  font-weight: 600;
  letter-spacing: -0.022em;
  color: var(--ink);
}
.heading-lg {
  font-size: clamp(28px, 3.1vw, 40px);
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--ink);
}
.on-dark { color: var(--white); }

.text-muted { color: var(--muted); }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 15.54px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0;
  text-align: center;
  border-radius: 999px;
  padding: 14px 26px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background .2s ease, color .2s ease, border-color .2s ease, transform .2s ease;
  white-space: nowrap;
}
.btn .arrow {
  font-size: 19px;
  line-height: 1;
  transition: transform .25s ease;
}
.btn:hover .arrow { transform: translate(2px, -2px); }

.btn-pill {                /* solid white pill */
  background: var(--white);
  color: var(--green-900);
}
.btn-pill:hover {
  background: #eef0ea;
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

.btn-ghost {               /* outlined on photo (light text) */
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.45);
}
.btn-ghost:hover { background: rgba(255,255,255,0.12); }

.btn-ghost-dark {          /* outlined on dark-green sections */
  border-color: rgba(255,255,255,0.35);
  color: var(--white);
}

/* ============================================================
   Header
   ============================================================ */
.site-header {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 50;
  height: var(--header-h);
  transition: background .3s ease, box-shadow .3s ease, height .3s ease;
}
.site-header.scrolled {
  position: fixed;
  height: 76px;
  background: rgba(20, 36, 25, 0.95);
  backdrop-filter: blur(8px);
  box-shadow: 0 1px 0 rgba(255,255,255,0.06);
}
.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.main-nav {
  display: flex;
  gap: 38px;
  margin: 0 auto;
}
.main-nav a {
  color: rgba(255,255,255,0.72);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
  transition: color .2s ease;
}
.main-nav a:hover { color: #fff; }
.main-nav a.active { color: #fff; }

.header-cta { padding: 11px 22px; }

/* ---------- Logo ---------- */
.logo-link { display: inline-flex; align-items: center; }
.logo-img { height: 52px; width: auto; display: block; }
.logo-footer .logo-img { height: 50px; }

.logo {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  border: 1.5px solid rgba(255,255,255,0.85);
  padding: 9px 16px 7px;
  color: #fff;
}
.logo-name {
  font-size: 21px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-indent: 0.22em;
  line-height: 1;
}
.logo-rule {
  width: 100%;
  height: 1px;
  background: rgba(255,255,255,0.85);
}
.logo-sub {
  font-size: 7.5px;
  font-weight: 600;
  letter-spacing: 0.34em;
  text-indent: 0.34em;
  line-height: 1;
}

/* ---------- Mobile nav toggle ---------- */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px; height: 42px;
  background: transparent;
  border: 0;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 2px; width: 24px;
  background: #fff;
  transition: transform .25s ease, opacity .25s ease;
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative;
  z-index: 2;
  background: url("assets/hero-rocha.png") center center / cover no-repeat;
}
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, #1B3121 0%, rgba(27, 49, 33, 0.5) 47.6%, #1B3121 100%);
}
.hero-inner {
  position: relative;
  z-index: 2;
  min-height: 900px;                    /* fallback for browsers without min()/svh */
  min-height: min(1000px, 100svh);      /* a touch taller, but never exceeds the screen */
  padding-top: calc(var(--header-h) + 70px);
  padding-bottom: 56px;
  display: flex;
  flex-direction: column;
  justify-content: center;   /* center content vertically so it isn't clustered at the bottom */
}
.hero-top { margin-bottom: 76px; }

.hero-eyebrow {
  margin: 0;
  font-size: 18px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.8);
}
.hero-title {
  margin: 26px 0 0;
  color: #fff;
  font-size: 80px;
  line-height: 83px;
  font-weight: 600;
  letter-spacing: 0;
}
.hero-title em { font-style: italic; font-weight: 400; }

.hero-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 56px;
  margin-top: 42px;
}
.hero-lede {
  margin: 0;
  color: #ffffff;
  font-size: 18px;
  font-weight: 300;
  line-height: 30px;
  letter-spacing: 0;
  max-width: 620px;
}
.hero-actions { display: flex; gap: 14px; flex-shrink: 0; }

/* ---------- Stats bar ---------- */
.stats {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: rgba(22, 38, 27, 0.82);
  backdrop-filter: blur(3px);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: var(--radius);
  z-index: 4;
}
.stat {
  padding: 30px 38px;
  position: relative;
}
.stat + .stat::before {
  content: "";
  position: absolute;
  left: 0; top: 26px; bottom: 26px;
  width: 1px;
  background: rgba(255,255,255,0.14);
}
.stat-num {
  display: block;
  color: #ffffff;
  font-size: 35px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 30px;
}
.stat-label {
  display: block;
  margin-top: 10px;
  color: rgba(255,255,255,0.5);
  font-size: 14px;
  font-weight: 400;
  line-height: 30px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ============================================================
   Mission
   ============================================================ */
.mission { position: relative; z-index: 1; background: #FAFAF8; }
.mission-grid {
  display: grid;
  grid-template-columns: 282px 1fr;
  gap: 40px;
  align-items: start;
}
/* Mission "OUR MISSION" label */
.mission .eyebrow {
  align-items: flex-start;
  text-align: left;
  font-size: 18px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #1B3121;
}
.mission .eyebrow-rule::after {
  width: 56px;
  height: 0;
  background: none;
  border-bottom: 1px solid rgba(27, 49, 33, 0.30);
  opacity: 1;
}
/* Mission heading */
.mission .display-lg {
  margin-top: -8px;     /* align first line with the OUR MISSION label */
  font-size: 50px;
  line-height: 65px;
  font-weight: 600;
  letter-spacing: 0;
  color: #1B3121;
}
.mission-body {
  margin: 40px 0 0;
  color: #1B3121;
  font-size: 18px;
  font-weight: 300;
  line-height: 30px;
  letter-spacing: 0;
}

/* ============================================================
   Capabilities
   ============================================================ */
.capabilities { background: #FFFFFF; }
.capabilities-grid {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: 72px;
  align-items: stretch;
}
.capabilities-media {
  position: relative;
  min-height: 540px;
}
.capabilities-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 25px;
}
/* "CAPABILITIES" label — same as OUR MISSION */
.capabilities-content .eyebrow {
  align-items: flex-start;
  text-align: left;
  font-size: 18px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #1B3121;
}
.capabilities-content .eyebrow-rule::after {
  width: 56px;
  height: 0;
  background: none;
  border-bottom: 1px solid rgba(27, 49, 33, 0.30);
  opacity: 1;
}
.capabilities-content .eyebrow-rule { margin-bottom: 26px; }

/* Heading — same as the Our Mission heading */
.capabilities-content .heading-lg {
  font-size: 50px;
  line-height: 65px;
  font-weight: 600;
  letter-spacing: 0;
  color: #1B3121;
}
/* Subtext — same as the Our Mission body */
.capabilities-lede {
  margin: 24px 0 40px;
  color: #1B3121;
  font-size: 18px;
  font-weight: 300;
  line-height: 30px;
  letter-spacing: 0;
  max-width: none;
}

.cap-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.cap-card {
  display: flex;
  gap: 16px;
  align-items: center;
  background: #FAFAF8;
  border: none;
  border-radius: 25px;
  padding: 18px 20px;
}
.cap-icon {
  flex: none;
  width: 44px; height: 44px;
  display: grid;
  place-items: center;
  background: #4F683B1A;
  border-radius: 20%;
  color: var(--olive);
}
.cap-icon svg { width: 22px; height: 22px; }
.cap-card h3 {
  font-size: 18px;
  font-weight: 600;
  line-height: 18px;
  letter-spacing: 0;
  color: #1B3121;
  margin-bottom: 7px;
}
.cap-card p {
  margin: 0;
  color: #1B3121;
  font-size: 12px;
  font-weight: 300;
  line-height: 15px;
  letter-spacing: 0;
}

/* ============================================================
   Our Story (dark green)
   ============================================================ */
.story {
  background: var(--green-900);
  position: relative;
  overflow: hidden;
}
.story-grid {
  position: relative;
}
/* "OUR STORY" label — Mission sizing, white text, 30% white underline */
.story-content .eyebrow {
  align-items: flex-start;
  text-align: left;
  font-size: 18px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #FFFFFF;
}
.story-content .eyebrow-rule::after {
  width: 56px;
  height: 0;
  background: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.30);
  opacity: 1;
}
.story-content .eyebrow-rule { margin-bottom: 26px; }
/* Text column — widened so heading & body each break to 3 lines */
.story-content {
  max-width: 800px;
}
.story-content .heading-lg {
  font-size: 50px;
  line-height: 65px;
  font-weight: 600;
  letter-spacing: 0;
  color: #FFFFFF;
  max-width: 720px;
}
/* Body — Mission body sizing, white */
.story-body {
  margin: 24px 0 34px;
  color: #FFFFFF;
  font-size: 18px;
  font-weight: 300;
  line-height: 30px;
  letter-spacing: 0;
  max-width: none;
}

/* Portrait: single composite image (founder + olive panel),
   stuck to the section bottom, top aligned with the OUR STORY label. */
.story-media {
  position: absolute;
  right: 0;
  bottom: -112px;        /* reach the section bottom (cancels .section padding) */
  width: 620px;
}
.story-figure {
  display: block;
  width: 100%;
  height: auto;
}

/* ============================================================
   Credentials
   ============================================================ */
.credentials { padding-bottom: 60px; }
.projects { padding-top: 60px; }
.credentials-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 56px;
  align-items: center;
}
/* "LICENSED · BONDED · CERTIFIED" label — same as other sections */
.credentials-head .eyebrow {
  align-items: flex-start;
  text-align: left;
  font-size: 18px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #1B3121;
}
.credentials-head .eyebrow-rule::after {
  width: 56px;
  height: 0;
  background: none;
  border-bottom: 1px solid rgba(27, 49, 33, 0.30);
  opacity: 1;
}
.credentials-head .eyebrow-rule { margin-bottom: 26px; }
/* Heading — matches the "Projects Completed" size, widened to 3 rows */
.credentials-head .heading-lg {
  font-size: 45px;
  line-height: 56px;
  font-weight: 600;
  letter-spacing: 0;
  color: #1B3121;
  max-width: none;
}

.cred-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-auto-rows: 1fr;     /* equal-height rows so the + is centered */
  gap: 0;
}
.cred-list li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 28px 0;         /* even vertical padding */
  font-family: "Inter", sans-serif;
  font-weight: 300;
  font-size: 16px;
  line-height: 15px;
  letter-spacing: 0;
  color: #1B3121;
}
/* only the inner cross (+) — even arms (top/bottom/left/right) */
.cred-list li:nth-child(1),
.cred-list li:nth-child(2) { border-bottom: 1px solid var(--tile-line); }
.cred-list li:nth-child(odd) { border-right: 1px solid var(--tile-line); padding-right: 28px; }
.cred-list li:nth-child(even) { padding-left: 28px; }
.cred-list svg {
  flex: none;
  width: 20px; height: 20px;
}

/* ============================================================
   Projects
   ============================================================ */
/* "PROJECTS" label — same as the other sections */
.projects .eyebrow {
  align-items: flex-start;
  text-align: left;
  font-size: 18px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #1B3121;
}
.projects .eyebrow-rule::after {
  width: 56px;
  height: 0;
  background: none;
  border-bottom: 1px solid rgba(27, 49, 33, 0.30);
  opacity: 1;
}
.projects .eyebrow-rule { margin-bottom: 26px; }
.projects-title {
  margin: 0 0 48px;
  font-size: 45px;
  line-height: 56px;
  font-weight: 600;
  letter-spacing: 0;
  color: #1B3121;
}
.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}
.project-media {
  border-radius: 25px;
  overflow: hidden;
  margin-bottom: 24px;
}
.project-media img {
  width: 100%;
  aspect-ratio: 533 / 325;   /* keep the 533×325 proportion, fill the column */
  height: auto;
  object-fit: cover;
  display: block;
  transition: transform .5s ease;
}
.project-card:hover .project-media img { transform: scale(1.04); }
.project-card h3 {
  font-size: 20px;
  font-weight: 600;
  line-height: 26px;
  letter-spacing: 0;
  color: #1B3121;
  margin-bottom: 12px;
}
.project-card p {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 300;
  line-height: 1.6;
}
.project-meta {
  margin: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 14px;
  row-gap: 8px;
  padding-top: 18px;
  border-top: 1px solid var(--tile-line);
}
.project-meta dt {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--olive);
  align-self: center;
}
.project-meta dd {
  margin: 0;
  font-size: 14.5px;
  font-weight: 400;
  line-height: 1.4;
  color: #1B3121;
}

/* ============================================================
   CTA
   ============================================================ */
.cta {
  position: relative;
  background: url("assets/building-chicago.jpg") center center / cover no-repeat;
  overflow: hidden;
}
.cta-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(27, 49, 33, 0.5) 0%, #1B3121 100%);
}
.cta-inner {
  position: relative;
  z-index: 2;
  padding: 132px 32px;
}
.cta .eyebrow-light {
  margin: 0;
  font-size: 18px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.80);   /* #FFFFFFCC */
}
.cta-title {
  margin: 22px 0 34px;
  color: #ffffff;
  font-size: 80px;
  line-height: 83px;
  font-weight: 600;
  letter-spacing: 0;
}
.cta-title em { font-style: italic; font-weight: 400; }

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  background: var(--green-900);
  color: rgba(255,255,255,0.7);
  padding: 78px 0 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2.2fr 0.9fr 1.6fr 1.2fr;
  gap: 40px;
}
.footer-brand p {
  margin: 26px 0 0;
  font-weight: 300;
  font-size: 14px;
  line-height: 25px;
  letter-spacing: 0;
  color: #FFFFFF;
  max-width: 430px;
}
.logo-footer { align-self: flex-start; }

.footer-col h4 {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 22px;
}
.footer-col ul { display: flex; flex-direction: column; gap: 0; }
.footer-col li, .footer-col a {
  font-weight: 300;
  font-size: 14px;
  line-height: 28px;
  letter-spacing: 0;
  color: rgba(255,255,255,0.80);   /* #FFFFFFCC */
  transition: color .2s ease;
}
.footer-col a:hover { color: #fff; }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  margin-top: 56px;
  padding-top: 26px;
  border-top: 1px solid rgba(255,255,255,0.12);
  font-weight: 300;
  font-size: 14px;
  line-height: 25px;
  letter-spacing: 0;
  color: #FFFFFF;
}

/* ============================================================
   Our Story Modal
   ============================================================ */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal.open { display: flex; }
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(13, 22, 16, 0.62);
  backdrop-filter: blur(3px);
  animation: modalFade .25s ease;
}
.modal-dialog {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 720px;
  min-width: 0;
  max-height: 88vh;
  overflow-y: auto;
  background: var(--cream);
  border-radius: 25px;
  padding: 56px 56px 48px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
  animation: modalPop .28s cubic-bezier(0.2, 0.7, 0.3, 1);
}
.modal-close {
  position: absolute;
  top: 22px;
  right: 22px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 999px;
  background: rgba(27, 49, 33, 0.06);
  color: var(--green-900);
  cursor: pointer;
  transition: background .2s ease;
}
.modal-close:hover { background: rgba(27, 49, 33, 0.14); }
.modal-close svg { width: 20px; height: 20px; }

.modal-eyebrow {
  margin: 0 0 14px;
  font-size: 18px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--olive);
}
.modal-title {
  margin: 0 0 28px;
  max-width: 540px;
  font-size: 34px;
  line-height: 42px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #1B3121;
}
.modal-quote {
  margin: 0 0 28px;
  padding: 22px 26px;
  border-left: 3px solid var(--olive);
  background: rgba(79, 104, 59, 0.07);
  border-radius: 0 12px 12px 0;
  font-size: 18px;
  font-style: italic;
  font-weight: 400;
  line-height: 28px;
  color: #1B3121;
}
.modal-quote cite {
  display: block;
  margin-top: 12px;
  font-size: 14px;
  font-style: normal;
  font-weight: 500;
  color: var(--olive);
}
.modal-body p {
  margin: 0 0 18px;
  font-size: 16px;
  font-weight: 300;
  line-height: 27px;
  letter-spacing: 0;
  color: #1B3121;
}
.modal-body p:last-child { margin-bottom: 0; }

@keyframes modalFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalPop {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
body.modal-open { overflow: hidden; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1024px) {
  .section { padding: 88px 0; }
  .capabilities-grid { gap: 44px; }
  .story-grid { gap: 48px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .main-nav {
    position: fixed;
    inset: 0 0 auto 0;
    top: 0;
    flex-direction: column;
    gap: 8px;
    background: rgba(20,33,24,0.98);
    padding: 100px 32px 40px;
    margin: 0;
    transform: translateY(-100%);
    transition: transform .3s ease;
    z-index: 40;
  }
  .main-nav.open { transform: translateY(0); }
  .main-nav a { font-size: 20px; padding: 10px 0; }
  .header-cta { display: none; }

  .stats { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(3)::before, .stat:nth-child(1)::before { display: none; }
  .stat:nth-child(3), .stat:nth-child(4) { border-top: 1px solid rgba(255,255,255,0.14); }

  /* Content is taller than the screen here, so flow it from the top
     (below the header) instead of anchoring to the bottom — otherwise
     flex-end pushes the eyebrow up under the header. */
  .hero-inner { justify-content: flex-start; }
  .hero-title { font-size: 56px; line-height: 1.05; }
  .hero-row { flex-direction: column; align-items: flex-start; gap: 28px; }
  .hero-top { margin-bottom: 56px; }
  .cta-title { font-size: 52px; line-height: 1.06; }

  .mission-grid { grid-template-columns: 1fr; gap: 24px; }
  .mission .eyebrow { align-items: flex-start; text-align: left; }
  .mission .display-lg { font-size: 36px; line-height: 1.25; }
  .mission-body { margin-top: 36px; }
  .capabilities-grid { grid-template-columns: 1fr; }
  .capabilities-media img { min-height: 320px; }
  .cap-cards { grid-template-columns: 1fr; }
  .story-content { max-width: none; }
  .story-media {
    position: static;
    width: 100%;
    max-width: 440px;
    margin-top: 36px;
  }
  .credentials-grid { grid-template-columns: 1fr; gap: 36px; }
  .modal-dialog { padding: 48px 40px 40px; }
  .modal-title { font-size: 30px; line-height: 38px; }
  .project-grid { grid-template-columns: 1fr; }
  .project-media img { height: 220px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 540px) {
  /* Horizontal only — the padding shorthand would reset .hero-inner's padding-top */
  .container { padding-left: 20px; padding-right: 20px; }
  .section { padding: 64px 0; }
  .hero-inner { min-height: 640px; }
  .hero-title { font-size: 42px; line-height: 1.06; }
  .cta-title { font-size: 40px; line-height: 1.07; }
  .hero-actions { flex-wrap: wrap; }
  .stats { grid-template-columns: 1fr; }
  .stat + .stat::before { display: none; }
  .stat { border-top: 1px solid rgba(255,255,255,0.14); }
  .stat:first-child { border-top: 0; }
  .cred-list { grid-template-columns: 1fr; }
  .cred-list li:nth-child(odd) { border-right: 0; padding-right: 0; }
  .cred-list li:nth-child(even) { padding-left: 0; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 10px; }

  .modal { padding: 16px; }
  .modal-dialog { max-height: 92vh; border-radius: 18px; padding: 30px 22px 28px; }
  .modal-close { top: 14px; right: 14px; width: 36px; height: 36px; }
  .modal-eyebrow { font-size: 16px; }
  .modal-title { font-size: 25px; line-height: 32px; margin-bottom: 22px; }
  .modal-quote { font-size: 16px; line-height: 25px; padding: 16px 18px; }
  .modal-body p { font-size: 15px; line-height: 25px; }
}

/* ============================================================
   Motion & interaction (progressive enhancement)
   Only active when the .js class is present; fully disabled
   under prefers-reduced-motion. See script.js.
   ============================================================ */

/* Offset smooth-scroll anchors so the sticky header doesn't cover them */
.section[id], .hero, .cta { scroll-margin-top: 96px; }

/* ---------- Scroll reveal ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s cubic-bezier(.2,.7,.3,1),
              transform .7s cubic-bezier(.2,.7,.3,1);
  will-change: opacity, transform;
}
.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- Hero entrance ---------- */
.js .hero-eyebrow,
.js .hero-title,
.js .hero-row,
.js .stats { opacity: 0; }

@keyframes heroRise {
  from { opacity: 0; transform: translateY(26px); }
  to   { opacity: 1; transform: none; }
}
.js .hero-eyebrow { animation: heroRise .8s cubic-bezier(.2,.7,.3,1) .05s forwards; }
.js .hero-title   { animation: heroRise .9s cubic-bezier(.2,.7,.3,1) .18s forwards; }
.js .hero-row     { animation: heroRise .9s cubic-bezier(.2,.7,.3,1) .34s forwards; }
.js .stats        { animation: heroRise .9s cubic-bezier(.2,.7,.3,1) .50s forwards; }

/* ---------- Scroll-progress bar ---------- */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 100%;
  transform: scaleX(0);
  transform-origin: left center;
  background: linear-gradient(90deg, var(--olive), #7d9a5e);
  z-index: 60;
  pointer-events: none;
}

/* ---------- Animated nav underline + scroll-spy ---------- */
.main-nav a { position: relative; }
.main-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -7px;
  height: 1.5px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .3s cubic-bezier(.2,.7,.3,1);
  opacity: .9;
}
.main-nav a:hover::after,
.main-nav a.active::after { transform: scaleX(1); }

/* ---------- Card hover lift ---------- */
.cap-card {
  transition: transform .3s ease, box-shadow .3s ease, background .3s ease;
}
.cap-card:hover {
  transform: translateY(-4px);
  background: #fff;
  box-shadow: 0 14px 30px rgba(27, 49, 33, 0.10);
}
.project-card { transition: transform .3s ease; }
.project-card:hover { transform: translateY(-4px); }

/* ---------- Hamburger → X ---------- */
.nav-toggle span { transform-origin: center; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Respect reduced-motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  .js .hero-eyebrow,
  .js .hero-title,
  .js .hero-row,
  .js .stats { opacity: 1 !important; animation: none !important; }
  .cap-card, .project-card, .main-nav a::after { transition: none !important; }
  .scroll-progress { display: none; }
}
