/* CTNE homepage prototype — Concept 2.1 (Clean Corporate / Professional Industrial Engineering)
   Palette taken from the CTNE logo (indigo #110E76, green #22906C) and the live
   ctne-child theme tokens (#142A5E, #1F9E6D, #16855C, #F5F7FA, #DFE4EC). */

:root {
  --indigo: #110e76;        /* logo mark */
  --navy: #142a5e;          /* live theme primary */
  --navy-900: #0c1a3d;      /* dark sections */
  --green: #1f9e6d;         /* live theme accent */
  --green-700: #137a54;     /* accent text/buttons: theme #16855C darkened for AA on #F5F7FA */
  --logo-green: #22906c;
  --ink: #16213a;
  --text: #43506a;
  --muted: #5d6880;
  --line: #dfe4ec;
  --surface: #f5f7fa;
  --surface-2: #eef1f6;
  --white: #ffffff;

  --font-head: "Montserrat", "Segoe UI", Arial, sans-serif;
  --font-body: "Inter", "Segoe UI", Arial, sans-serif;

  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 1px 2px rgba(16, 28, 61, .06), 0 6px 20px rgba(16, 28, 61, .07);
  --shadow-hover: 0 2px 4px rgba(16, 28, 61, .08), 0 14px 32px rgba(16, 28, 61, .13);
  --container: 1320px;
  --gutter: clamp(16px, 4vw, 40px);
  --section: clamp(60px, 7.5vw, 112px);
  --header-h: 88px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--white);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); }
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--ink); line-height: 1.18; margin: 0 0 .6em; letter-spacing: -.01em; text-wrap: balance; }
h1 { font-size: clamp(2.3rem, 1.25rem + 3.6vw, 4.1rem); font-weight: 800; letter-spacing: -.02em; }
h2 { font-size: clamp(1.75rem, 1.15rem + 2vw, 2.75rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 700; }
h4 { font-size: 1.05rem; font-weight: 700; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }
address { font-style: normal; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon, .value-icon, .service-icon, .industry-icon {
  fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.icon { width: 1.1em; height: 1.1em; flex: none; }

.container { width: 100%; max-width: calc(var(--container) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: var(--section) 0; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Focus */
:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; border-radius: 4px; }
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 1000; padding: 10px 16px;
  background: var(--navy); color: var(--white); font-weight: 600; border-radius: var(--radius-sm);
}
.skip-link:focus { top: 12px; }

/* Prototype notice */
.proto-bar {
  background: #fff7e0; color: #5b4500; border-bottom: 1px solid #f0dca0;
  font-size: .82rem; line-height: 1.45; text-align: center; padding: 7px var(--gutter);
}

/* Eyebrow / section heads */
.eyebrow {
  font-family: var(--font-body); font-size: .8rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--green-700); margin: 0 0 .9rem;
  display: inline-flex; align-items: center; gap: .6rem;
}
.eyebrow::before { content: ""; width: 28px; height: 2px; background: currentColor; }
.section-head { max-width: 760px; margin-bottom: clamp(32px, 4vw, 52px); }
.section-head h2 { margin-bottom: 0; }
.section-head .eyebrow + h2 { margin-top: 0; }
.section-head > .section-intro { margin-top: 14px; }
.section-head--split {
  max-width: none; display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 48px; flex-wrap: wrap;
}
.section-head--split .section-intro { max-width: 520px; margin: 0; }
.section-intro { font-size: 1.08rem; color: var(--muted); margin: 0; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 46px; padding: 11px 22px; border-radius: var(--radius-sm);
  font-family: var(--font-body); font-weight: 600; font-size: .97rem; line-height: 1.2;
  text-decoration: none; border: 2px solid transparent; cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s, box-shadow .15s;
}
.btn-lg { min-height: 54px; padding: 14px 28px; font-size: 1.02rem; }
.btn-block { width: 100%; }
.btn-primary { background: var(--green-700); color: var(--white); }
.btn-primary:hover { background: #0f6646; }
.btn-outline { border-color: var(--navy); color: var(--navy); background: transparent; }
.btn-outline:hover { background: var(--navy); color: var(--white); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 32px 0 0; }

.text-link {
  display: inline-flex; align-items: center; gap: .4rem; font-weight: 600; color: var(--navy);
  text-decoration: none; border-bottom: 2px solid transparent; padding: 4px 0;
}
.text-link:hover { border-bottom-color: currentColor; }
.text-link--light { color: #8fe0bd; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100; background: rgba(255, 255, 255, .97);
  border-bottom: 1px solid var(--line);
  backdrop-filter: saturate(140%) blur(6px);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: var(--header-h); }
.brand { display: inline-flex; align-items: center; text-decoration: none; flex: none; padding: 6px 0; }
.brand-mark { width: 104px; height: auto; }
.site-nav { display: flex; align-items: center; gap: 22px; }
.nav-list { display: flex; align-items: center; gap: 2px; }
.nav-list > li { position: relative; display: flex; align-items: center; }
.nav-list a {
  display: block; padding: 10px 13px; color: var(--ink); font-weight: 500; font-size: .98rem;
  text-decoration: none; border-radius: var(--radius-sm);
}
.nav-list a:hover { color: var(--green-700); }
.nav-list a[aria-current="page"] { color: var(--navy); box-shadow: inset 0 -2px 0 var(--green); border-radius: 0; }
.sub-toggle {
  display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 44px;
  margin-left: -8px; padding: 0; background: none; border: 0; color: var(--ink); cursor: pointer; border-radius: var(--radius-sm);
}
.sub-toggle .icon { transition: transform .15s; }
.sub-toggle[aria-expanded="true"] .icon { transform: rotate(180deg); }
.sub-menu {
  position: absolute; top: calc(100% + 6px); left: 0; min-width: 260px; padding: 8px;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-hover); display: none;
}
.sub-menu a { padding: 10px 12px; }
.sub-menu a:hover { background: var(--surface); }
.has-sub.is-open > .sub-menu { display: block; }
@media (hover: hover) and (min-width: 1024px) {
  .has-sub:hover > .sub-menu { display: block; }
  .has-sub::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 10px; }
}
.nav-toggle {
  display: none; align-items: center; gap: 8px; min-height: 44px; padding: 8px 14px;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-sm);
  color: var(--navy); font: 600 .95rem var(--font-body); cursor: pointer;
}
.nav-toggle .icon { width: 22px; height: 22px; }
.header-quote { display: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative; padding: clamp(44px, 5.5vw, 84px) 0 clamp(52px, 6vw, 92px);
  background: linear-gradient(180deg, var(--surface) 0%, var(--white) 100%);
  overflow: hidden;
}
.hero::before { /* restrained brand arc echoing the logo's C */
  content: ""; position: absolute; width: 820px; height: 820px; right: -280px; top: -320px;
  border-radius: 50%; border: 56px solid rgba(17, 14, 118, .045); pointer-events: none;
}
.hero-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); gap: clamp(36px, 5vw, 80px); align-items: center; }
.hero h1 { color: var(--indigo); margin-bottom: .4em; max-width: 15ch; }
.lead { font-size: clamp(1.08rem, 1rem + .35vw, 1.22rem); line-height: 1.6; color: var(--text); max-width: 600px; margin: 0; }
.hero-note {
  margin: 30px 0 0; padding-top: 20px; border-top: 1px solid var(--line); max-width: 560px;
  font-size: .9rem; color: var(--muted);
}

.hero-media {
  display: grid; grid-template-columns: 1.15fr 1fr; grid-template-rows: 1fr 1fr; gap: 14px;
  aspect-ratio: 1 / .98; max-height: 620px;
}
.hero-photo { position: relative; margin: 0; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: var(--surface-2); min-height: 0; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.hero-photo--main { grid-row: 1 / span 2; }
.hero-photo--main img { object-position: 50% 36%; }
.hero-photo--top img { object-position: 50% 45%; }
.hero-photo--bottom img { object-position: 50% 64%; }
.hero-photo figcaption {
  position: absolute; left: 10px; bottom: 10px; right: 10px; width: fit-content; max-width: calc(100% - 20px);
  padding: 5px 10px; border-radius: 4px; background: rgba(12, 26, 61, .82); color: var(--white);
  font-size: .76rem; font-weight: 600; line-height: 1.3;
}

/* ---------- About (directly after the hero) ---------- */
.about { background: var(--white); }
.about-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(36px, 5vw, 80px); align-items: center; }
.about-photo { margin: 0; }
.about-photo img { width: 100%; aspect-ratio: 5 / 3; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow); }
.about-photo figcaption { margin-top: 10px; font-size: .85rem; color: var(--muted); }
.about-copy h2 { color: var(--indigo); margin-bottom: .5em; }
.about-lead { font-size: 1.14rem; color: var(--ink); }
.check-list { display: grid; gap: 10px; margin: 22px 0 30px; }
.check-list li { display: flex; gap: 10px; align-items: flex-start; color: var(--ink); font-weight: 500; font-size: 1rem; }
.check-list .icon { width: 22px; height: 22px; padding: 3px; margin-top: 2px; border-radius: 50%; background: var(--green-700); color: var(--white); stroke-width: 2.6; }

.value-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0;
  margin-top: clamp(44px, 5vw, 72px); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
}
.value { display: flex; gap: 14px; align-items: flex-start; padding: 26px 24px; border-left: 1px solid var(--line); }
.value:first-child { border-left: 0; }
.value-icon { width: 32px; height: 32px; flex: none; color: var(--green-700); }
.value h4 { margin: 2px 0 .3em; font-size: 1.02rem; }
.value p { font-size: .92rem; margin: 0; line-height: 1.5; }

/* ---------- Services ---------- */
.services { background: var(--surface); border-top: 1px solid var(--line); }
.service-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.service-card {
  position: relative; display: flex; flex-direction: column; background: var(--white);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); transition: box-shadow .2s, transform .2s;
}
.service-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.service-card--feature { grid-column: span 2; flex-direction: row; }
.service-media { position: relative; display: block; aspect-ratio: 16 / 10; background: var(--surface-2); overflow: hidden; }
.service-media img { width: 100%; height: 100%; object-fit: cover; }
.service-card--feature .service-media { aspect-ratio: auto; flex: 0 0 46%; min-height: 340px; }
.service-card--feature .service-media img { position: absolute; inset: 0; object-position: 50% 94%; }
.service-media--panel {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  background:
    radial-gradient(circle at 85% 15%, rgba(31, 158, 109, .22), transparent 55%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, .035) 0 2px, transparent 2px 14px),
    linear-gradient(135deg, var(--navy) 0%, var(--indigo) 100%);
}
.service-icon { width: 58px; height: 58px; color: var(--white); stroke-width: 1.4; opacity: .95; }
.panel-label { color: rgba(255, 255, 255, .78); font-size: .78rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.photo-tag {
  position: absolute; left: 10px; bottom: 10px; padding: 3px 8px; border-radius: 4px;
  background: rgba(12, 26, 61, .72); color: #e7ecf5; font-size: .7rem; font-weight: 600; letter-spacing: .02em;
}
.service-body { display: flex; flex-direction: column; padding: 24px 24px 26px; flex: 1; }
.service-card--feature .service-body { padding: clamp(28px, 3.2vw, 44px); justify-content: center; }
.service-card--feature h3 { font-size: clamp(1.45rem, 1.15rem + .9vw, 1.95rem); }
.service-card--feature p { font-size: 1.04rem; max-width: 46ch; }
.service-body p { font-size: .97rem; }
.card-link { color: var(--ink); text-decoration: none; }
.card-link::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.card-link:focus-visible { outline: none; }
.card-link:focus-visible::after { outline: 3px solid var(--green); outline-offset: -3px; border-radius: var(--radius); }
.service-card:hover .card-link { color: var(--navy); }
.more { margin-top: auto; display: inline-flex; align-items: center; gap: .4rem; font-weight: 600; font-size: .93rem; color: var(--green-700); }
.service-cta { position: relative; z-index: 2; align-self: flex-start; margin-top: 10px; }
.services-cta {
  display: flex; align-items: center; justify-content: space-between; gap: 16px 32px; flex-wrap: wrap;
  margin-top: 32px; padding: 22px 28px; border-radius: var(--radius); background: var(--white); border: 1px solid var(--line);
}
.services-cta p { margin: 0; color: var(--text); max-width: 760px; }
.services-cta strong { color: var(--ink); }

/* ---------- NDT methods ---------- */
.methods { background: var(--white); }
.method-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.method {
  position: relative; display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 16px; align-items: start;
  padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white);
  transition: border-color .15s, box-shadow .15s;
}
.method:hover { border-color: #b9c4d6; box-shadow: var(--shadow); }
.method img { width: 96px; height: 96px; object-fit: cover; border-radius: var(--radius-sm); background: var(--surface-2); }
.method h3 { margin: 2px 0 6px; font-size: 1rem; }
.method p { font-size: .88rem; line-height: 1.5; margin: 0; color: var(--muted); }
.method--cta { display: flex; flex-direction: column; justify-content: center; gap: 8px; background: var(--navy); border-color: var(--navy); color: #c9d3e6; padding: 20px; }
.method--cta h3 { color: var(--white); margin: 0; }
.method--cta p { color: #c9d3e6; }
.method--cta .card-link { color: var(--white); }
.method--cta .more { color: #8fe0bd; margin-top: 4px; }

/* ---------- Equipment ---------- */
.equipment { background: var(--navy-900); color: #c9d3e6; }
.section-head--light h2 { color: var(--white); }
.section-head--light .eyebrow { color: #4fd19c; }
.section-head--light .section-intro { color: #b4c0d8; }
.equip-feature { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.equip-card { background: #13244f; border: 1px solid rgba(255, 255, 255, .08); border-radius: var(--radius); overflow: hidden; }
.equip-card--lg { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); }
.equip-img { position: relative; display: block; background: #0a1531; overflow: hidden; }
.equip-img img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 3 / 4; transition: transform .35s; }
.equip-img:hover img { transform: scale(1.03); }
.zoom-badge {
  position: absolute; right: 10px; bottom: 10px; display: grid; place-items: center; width: 40px; height: 40px;
  border-radius: 50%; background: rgba(255, 255, 255, .92); color: var(--navy);
}
.zoom-badge .icon { width: 20px; height: 20px; stroke-width: 2.2; }
.equip-body { padding: 28px 26px; display: flex; flex-direction: column; justify-content: center; }
.equip-body h3 { color: var(--white); font-size: 1.25rem; margin-bottom: .5em; }
.equip-body p { font-size: .95rem; }
.equip-method { font-size: .74rem !important; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #4fd19c; margin: 0 0 .55rem; }
.equip-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-top: 24px; }
.equip-row .equip-card { display: grid; grid-template-columns: 124px minmax(0, 1fr); align-items: stretch; }
.equip-row .equip-img img { aspect-ratio: auto; min-height: 100%; }
.equip-row .equip-body { padding: 16px 18px; }
.equip-row .equip-body h3 { font-size: 1.02rem; margin: 0 0 .35em; }
.equip-row .equip-body p { font-size: .86rem; line-height: 1.45; margin: 0; color: #b4c0d8; }
.equip-row .equip-method { font-size: .7rem !important; margin-bottom: .35rem; }

/* ---------- Industries ---------- */
.industries { background: var(--surface); border-top: 1px solid var(--line); }
.industry-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.industry-grid li {
  display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 30px 14px; text-align: center;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--white);
  font-family: var(--font-head); font-weight: 700; color: var(--ink); font-size: 1rem;
}
.industry-icon { width: 44px; height: 44px; color: var(--navy); stroke-width: 1.5; }

/* ---------- Quote ---------- */
.quote { background: linear-gradient(180deg, var(--white) 0%, var(--surface-2) 100%); border-top: 1px solid var(--line); }
.quote-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(36px, 5vw, 80px); align-items: start; }
.quote-copy h2 { color: var(--indigo); }
.contact-list { display: grid; gap: 14px; margin-top: 28px; }
.contact-list li { display: flex; gap: 12px; align-items: flex-start; color: var(--ink); }
.contact-list .icon { width: 40px; height: 40px; padding: 10px; border-radius: 50%; background: var(--white); border: 1px solid var(--line); color: var(--green-700); }
.contact-list a, .contact-list span { padding-top: 8px; font-weight: 600; text-decoration: none; color: var(--ink); overflow-wrap: anywhere; }
.contact-list span { font-weight: 500; padding-top: 8px; line-height: 1.5; }
.contact-list a:hover { color: var(--green-700); text-decoration: underline; }
.quote-form {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(22px, 3vw, 38px); box-shadow: var(--shadow);
}
.form-proto-note {
  font-size: .84rem; line-height: 1.5; padding: 10px 12px; margin-bottom: 20px; border-radius: var(--radius-sm);
  background: #fff7e0; border: 1px solid #f0dca0; color: #5b4500;
}
.form-proto-note a { color: #5b4500; font-weight: 600; }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.field { display: flex; flex-direction: column; margin-bottom: 16px; }
.field label { font-weight: 600; font-size: .92rem; color: var(--ink); margin-bottom: 6px; }
.req { color: #b42318; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 10px 12px; border: 1px solid #c3ccda; border-radius: var(--radius-sm);
  font: inherit; font-size: 1rem; color: var(--ink); background: var(--white);
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline-offset: 0; border-color: var(--green-700); }
.field [aria-invalid="true"] { border-color: #b42318; }
.form-consent { font-size: .85rem; color: var(--muted); }
.form-status { margin: 12px 0 0; font-size: .92rem; font-weight: 600; color: var(--navy); min-height: 1.4em; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-900); color: #b4c0d8; font-size: .94rem; }
.footer-grid { display: grid; grid-template-columns: 1.35fr 1fr 1fr 1.3fr; gap: 48px; padding-top: 72px; padding-bottom: 52px; }
.footer-brand img { width: 168px; height: auto; margin-bottom: 20px; }
.footer-brand p { max-width: 330px; }
.footer-title { font-family: var(--font-body); font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; color: var(--white); margin-bottom: 18px; }
.footer-col ul { display: grid; gap: 4px; }
.site-footer a { color: #d9e1f0; text-decoration: none; display: inline-block; padding: 4px 0; }
.site-footer a:hover { color: #8fe0bd; text-decoration: underline; }
.site-footer address { margin-bottom: 12px; line-height: 1.6; max-width: 300px; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .1); font-size: .85rem; }
.footer-bottom .container { display: flex; justify-content: space-between; align-items: center; gap: 8px 24px; flex-wrap: wrap; padding-top: 18px; padding-bottom: 18px; }
.footer-bottom p { margin: 0; }
.footer-credit { color: #8a97b3; }
.footer-bottom a { padding: 10px 0; margin: -10px 0; }

/* ---------- Photo viewer ---------- */
.viewer {
  max-width: min(92vw, 820px); max-height: 92vh; padding: 0; border: 0; border-radius: var(--radius);
  background: #0a1531; color: var(--white); overflow: hidden;
}
.viewer::backdrop { background: rgba(5, 10, 25, .82); }
.viewer img { max-height: calc(92vh - 60px); width: auto; margin: 0 auto; }
.viewer-caption { margin: 0; padding: 12px 56px 14px 16px; font-size: .9rem; }
.viewer-close {
  position: absolute; top: 8px; right: 8px; width: 44px; height: 44px; display: grid; place-items: center;
  border: 0; border-radius: 50%; background: rgba(255, 255, 255, .92); color: var(--navy); cursor: pointer;
}
.viewer-close .icon { width: 22px; height: 22px; stroke-width: 2.4; }

/* ---------- Responsive ---------- */
@media (max-width: 1240px) {
  .method-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .value-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .value:nth-child(3) { border-left: 0; }
  .value:nth-child(n+3) { border-top: 1px solid var(--line); }
}

@media (max-width: 1100px) {
  .nav-list a { padding: 10px 9px; }
  .site-nav { gap: 14px; }
  .brand-mark { width: 92px; }
  .hero-media { max-height: 540px; }
  .service-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .service-card--feature { grid-column: span 2; }
  .equip-card--lg { grid-template-columns: 1fr; }
  .equip-card--lg .equip-img img { aspect-ratio: 4 / 3; }
  .industry-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 1023px) {
  :root { --header-h: 72px; }
  .brand-mark { width: 84px; }
  .nav-toggle { display: inline-flex; }
  .header-inner { gap: 10px; }
  .header-quote { display: inline-flex; margin-left: auto; padding: 8px 14px; }
  .site-nav {
    position: absolute; left: 0; right: 0; top: 100%; display: none; flex-direction: column; align-items: stretch;
    gap: 12px; padding: 12px var(--gutter) 20px; background: var(--white); border-bottom: 1px solid var(--line);
    box-shadow: 0 12px 24px rgba(16, 28, 61, .1); max-height: calc(100vh - var(--header-h)); overflow-y: auto;
  }
  .site-nav.is-open { display: flex; }
  .nav-list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav-list > li { flex-wrap: wrap; border-bottom: 1px solid var(--line); }
  .nav-list > li > a { flex: 1; padding: 13px 4px; font-size: 1rem; }
  .nav-list a[aria-current="page"] { box-shadow: none; color: var(--green-700); }
  .sub-toggle { width: 48px; height: 48px; margin: 0; }
  .sub-menu { position: static; flex-basis: 100%; min-width: 0; border: 0; box-shadow: none; padding: 0 0 8px 12px; background: transparent; }
  .nav-cta { width: 100%; min-height: 50px; }
}

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero h1 { max-width: 15ch; }
  .hero-media { max-height: none; aspect-ratio: 16 / 11; }
  .about-grid, .quote-grid { grid-template-columns: 1fr; }
  /* 2.1d: on narrow screens introduce CAST (heading + copy) before its photo */
  .about-grid { gap: 28px; }
  .about-copy { order: -1; }
  .service-card--feature { flex-direction: column; }
  .service-card--feature .service-media { aspect-ratio: 16 / 9; flex: none; min-height: 0; }
  .method-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .equip-row { grid-template-columns: 1fr; gap: 14px; }
}

@media (max-width: 640px) {
  body { font-size: 1rem; }
  .brand-mark { width: 74px; }
  /* 2.1d: compact hero so About CAST starts sooner on phones */
  .hero { padding: 26px 0 34px; }
  .lead { font-size: 1.04rem; }
  .btn-row { margin-top: 24px; }
  .hero-note { margin-top: 20px; padding-top: 14px; }
  .hero-media { grid-template-columns: 1.6fr 1fr; grid-template-rows: 1fr 1fr; gap: 8px; aspect-ratio: 16 / 10.5; }
  .hero-photo--main { grid-row: 1 / span 2; }
  .hero-photo--main img { object-position: 50% 40%; }
  .hero-photo--top figcaption, .hero-photo--bottom figcaption { display: none; }
  .hero-photo figcaption { left: 8px; bottom: 8px; font-size: .72rem; }
  .about { padding-top: 40px; }
  .about-copy h2 { font-size: clamp(1.9rem, 1.4rem + 2.4vw, 2.2rem); }
  .about-lead { font-size: 1.08rem; }
  .btn-row .btn { flex: 1 1 100%; }
  .value-grid { grid-template-columns: 1fr; }
  .value, .value:nth-child(3) { border-left: 0; }
  .value:nth-child(n+2) { border-top: 1px solid var(--line); }
  .service-grid { grid-template-columns: 1fr; }
  .service-card--feature { grid-column: auto; }
  .service-cta { align-self: stretch; }
  .services-cta { padding: 20px; }
  .services-cta .btn { width: 100%; }
  .method-grid { grid-template-columns: 1fr; }
  .equip-feature { grid-template-columns: 1fr; }
  .industry-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .industry-grid li:last-child { grid-column: 1 / -1; }
  .field-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; padding-top: 52px; }
}

@media (max-width: 360px) {
  .brand-mark { width: 62px; }
  .nav-toggle-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .nav-toggle { padding: 8px 11px; }
  .equip-row .equip-card { grid-template-columns: 92px minmax(0, 1fr); }
  .method { grid-template-columns: 72px minmax(0, 1fr); }
  .method img { width: 72px; height: 72px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .service-card:hover { transform: none; }
  .equip-img:hover img { transform: none; }
}
