/* =========================================================
   True Nest Roofing & Restoration — stylesheet
   ========================================================= */

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; font-size: 18px; }
body { min-height: 100vh; line-height: 1.5; -webkit-font-smoothing: antialiased; }
img, picture { max-width: 100%; display: block; }
input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* ---------- Design tokens ---------- */
:root {
  /* Brand */
  --brand-green: #9acd03;
  --brand-green-strong: #86b302;
  --accent-orange: #eba23f;
  --accent-orange-strong: #d98b26;
  --ink-strong: #0b1f1a;
  --on-brand: var(--ink-strong);

  /* Dark theme (default) */
  --bg: #0a0e0c;
  --surface: #131a15;
  --surface-2: #1a231c;
  --text: #f4f6f1;
  --text-muted: #b7ae9b;
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.22);
  --shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.6);

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

  --container: 1180px;
  --radius: 14px;
  --radius-sm: 8px;
}

:root[data-theme="light"] {
  --bg: #f7f6f0;
  --surface: #ffffff;
  --surface-2: #eeece2;
  --text: #10241f;
  --text-muted: #5a6660;
  --line: rgba(11, 61, 54, 0.13);
  --line-strong: rgba(11, 61, 54, 0.24);
  --shadow: 0 20px 50px -24px rgba(11, 36, 31, 0.28);
  --brand-green: #5c8300;
  --brand-green-strong: #4a6b00;
  --on-brand: #ffffff;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  transition: background-color 0.25s ease, color 0.25s ease;
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.01em;
}

h2 { font-size: clamp(1.7rem, 1.3rem + 1.6vw, 2.6rem); margin-bottom: 0.6em; }
h3 { font-size: clamp(1.05rem, 1rem + 0.4vw, 1.25rem); margin-bottom: 0.4em; }

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

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}

.icon { width: 1.15em; height: 1.15em; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.icon--solid { fill: currentColor; stroke: none; width: 1em; height: 1em; }

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--brand-green);
  color: var(--on-brand);
  padding: 0.75rem 1.25rem;
  z-index: 1000;
  border-radius: 0 0 8px 0;
  font-weight: 600;
}
.skip-link:focus { left: 0; }

.eyebrow {
  display: inline-block;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--brand-green);
  margin-bottom: 0.75rem;
}
.eyebrow--light,
:root[data-theme="light"] .eyebrow--light { color: #9acd03; }

.lede {
  font-size: clamp(1rem, 0.95rem + 0.3vw, 1.15rem);
  max-width: 62ch;
}

.section-head { max-width: 720px; margin-bottom: clamp(2rem, 4vw, 3rem); }

/* ---------- Scroll reveal ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.js .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.5rem;
  border-radius: 10px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.95rem;
  border: 2px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--brand-green);
  color: var(--on-brand);
}
.btn-primary:hover { background: var(--brand-green-strong); }

.btn-primary--hero,
:root[data-theme="light"] .btn-primary--hero {
  background: #9acd03;
  color: var(--ink-strong);
}
.btn-primary--hero:hover,
:root[data-theme="light"] .btn-primary--hero:hover {
  background: #86b302;
}

.btn-outline {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--text);
}
.btn-outline:hover { background: var(--surface-2); border-color: var(--brand-green); }

.btn-outline--hero { border-color: rgba(255, 255, 255, 0.5); color: #fff; }
.btn-outline--hero .icon { color: var(--accent-orange); }
.btn-outline--hero:hover { background: rgba(255, 255, 255, 0.12); border-color: #fff; }

.btn-lg { padding: 1rem 1.85rem; font-size: 1rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  height: 112px;
  transition: height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.site-header.is-scrolled .site-header__inner { height: 66px; }

/* Suppresses the header's height transition for one layout pass so JS can
   measure an anchor target's final position before the smooth scroll
   starts (see main.js) — without this, the header shrinking mid-scroll
   shifts the page underneath the animation and the scroll overshoots. */
.site-header.no-transition,
.site-header.no-transition * {
  transition: none !important;
}

.brand { display: flex; align-items: center; flex-shrink: 0; }
.brand__logo {
  height: 74px;
  width: auto;
  transition: height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.site-header.is-scrolled .brand__logo { height: 42px; }
.brand__logo--light { display: none; }
:root[data-theme="light"] .brand__logo--dark { display: none; }
:root[data-theme="light"] .brand__logo--light { display: block; }

.main-nav__list { display: flex; align-items: center; gap: clamp(1rem, 2vw, 1.75rem); }
.main-nav__list a {
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 1.12rem;
  color: var(--text);
  position: relative;
  padding: 0.35rem 0;
  transition: font-size 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.site-header.is-scrolled .main-nav__list a { font-size: 0.98rem; }
.main-nav__list a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: var(--brand-green);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}
.main-nav__list a:hover::after { transform: scaleX(1); }

.site-header__right { display: flex; align-items: center; gap: clamp(1rem, 2vw, 1.5rem); }

.theme-toggle {
  position: relative;
  background: transparent;
  border: none;
  width: 40px; height: 40px;
  flex-shrink: 0;
}
.theme-toggle__icon {
  position: absolute;
  top: 50%; left: 50%;
  width: 30px; height: 30px;
  transform: translate(-50%, -50%) rotate(0deg) scale(1);
  opacity: 1;
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.35s ease;
}
.theme-toggle__icon--moon {
  transform: translate(-50%, -50%) rotate(-100deg) scale(0.4);
  opacity: 0;
}
:root[data-theme="light"] .theme-toggle__icon--sun {
  transform: translate(-50%, -50%) rotate(100deg) scale(0.4);
  opacity: 0;
}
:root[data-theme="light"] .theme-toggle__icon--moon {
  transform: translate(-50%, -50%) rotate(0deg) scale(1);
  opacity: 1;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px; height: 40px;
  background: transparent;
  border: none;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.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); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  color: #fff;
}
.hero__bg {
  position: absolute; inset: 0; z-index: 0;
  animation: hero-bg-in 1.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.hero__bg img { width: 100%; height: 100%; object-fit: cover; }
.hero__scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(0deg, rgba(4, 7, 6, 0.97) 0%, rgba(4, 7, 6, 0.84) 42%, rgba(4, 7, 6, 0.6) 100%);
}
.hero__inner { position: relative; z-index: 1; padding-block: clamp(3rem, 7vw, 4.5rem) clamp(3rem, 7vw, 4.5rem); }
.hero__headline { font-size: clamp(2.7rem, 1.9rem + 4vw, 4.6rem); font-weight: 700; color: #fff; margin-bottom: 0.5em; }
.hero__sub { font-size: clamp(1.15rem, 1.05rem + 0.55vw, 1.45rem); color: #e8ebe4; font-weight: 500; max-width: 46ch; margin-bottom: 0.9em; }
.hero__body { font-size: clamp(1rem, 0.95rem + 0.25vw, 1.1rem); color: #c9cfc4; max-width: 58ch; margin-bottom: 2rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 1rem; }

@keyframes hero-bg-in {
  from { transform: scale(1.08); opacity: 0.6; }
  to { transform: scale(1); opacity: 1; }
}
@keyframes fade-up {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: translateY(0); }
}
.hero__inner > * {
  animation: fade-up 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.hero__inner > .eyebrow--light { animation-delay: 0.05s; }
.hero__inner > .hero__headline { animation-delay: 0.16s; }
.hero__inner > .hero__sub { animation-delay: 0.3s; }
.hero__inner > .hero__body { animation-delay: 0.42s; }
.hero__inner > .hero__actions { animation-delay: 0.54s; }

.btn-primary--hero {
  animation: cta-pulse 3.2s ease-in-out 1.4s infinite;
}
.btn-primary--hero:hover { animation-play-state: paused; }
@keyframes cta-pulse {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--brand-green) 45%, transparent); }
  50% { box-shadow: 0 0 0 10px color-mix(in srgb, var(--brand-green) 0%, transparent); }
}

/* ---------- Trust strip ---------- */
.trust-strip { background: var(--surface-2); border-bottom: 1px solid var(--line); }
.trust-strip__inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  padding-block: 1.5rem;
}
.trust-strip__item {
  display: flex; align-items: center; gap: 0.6rem;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.92rem;
  justify-content: center;
  text-align: center;
}
.trust-strip__item .icon { color: var(--brand-green); width: 1.4em; height: 1.4em; transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); }
.trust-strip__item:hover .icon { transform: scale(1.15) rotate(-6deg); }

/* ---------- Overview ---------- */
.overview { padding-block: clamp(2rem, 4.5vw, 3.5rem); }
.overview__inner {
  max-width: var(--container);
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.overview__media img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  aspect-ratio: 1 / 1;
  object-fit: cover;
}
.overview__chain {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 2rem;
}
.overview__chain li {
  background: var(--surface-2);
  border: 1px solid var(--line);
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.88rem;
}
.overview__chain li:not(:last-child)::after {
  content: "→";
  margin-left: 0.7rem;
  color: var(--brand-green);
}

/* ---------- Split sections (about / crew / insurance) ---------- */
.crew { padding-block: clamp(2rem, 4.5vw, 3.5rem); background: var(--surface-2); }
.crew__inner {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.crew__media img {
  border-radius: var(--radius);
  aspect-ratio: 4 / 3;
  object-fit: cover;
  box-shadow: var(--shadow);
}
.about__content p, .crew__content p, .insurance__content p { margin-bottom: 1em; }

/* ---------- About (full-bleed fade) ---------- */
.about {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  min-height: clamp(460px, 48vw, 640px);
  padding-block: clamp(1.5rem, 3vw, 2.25rem) clamp(2rem, 4.5vw, 3.5rem);
}
.about__bg {
  position: absolute;
  inset: 0;
  left: 40%;
  z-index: 0;
}
.about__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.4) 14%, #000 32%);
  mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.4) 14%, #000 32%);
}
.about__inner { position: relative; z-index: 1; max-width: none; margin-inline: 0; }
.about__content { max-width: 540px; }

/* ---------- Insurance (full-bleed fade, mirrored) ---------- */
.insurance {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  min-height: clamp(460px, 48vw, 640px);
  padding-block: clamp(2rem, 4.5vw, 3.5rem);
}
.insurance__bg {
  position: absolute;
  inset: 0;
  right: 44%;
  z-index: 0;
}
.insurance__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  -webkit-mask-image: linear-gradient(270deg, transparent 0%, rgba(0, 0, 0, 0.35) 24%, #000 50%);
  mask-image: linear-gradient(270deg, transparent 0%, rgba(0, 0, 0, 0.35) 24%, #000 50%);
}
.insurance__inner {
  position: relative;
  z-index: 1;
  max-width: none;
  margin-inline: 0;
  display: flex;
  justify-content: flex-end;
}
.insurance__content { max-width: 560px; }
.crew__quote {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--text);
  border-left: 3px solid var(--brand-green);
  padding-left: 1rem;
  margin-top: 1.5rem;
}

.check-list { margin: 1.25rem 0 1.5rem; display: flex; flex-direction: column; gap: 0.65rem; }
.check-list li {
  position: relative;
  padding-left: 1.75rem;
  color: var(--text);
  font-size: 0.96rem;
}
.check-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.25em;
  width: 1.1em; height: 1.1em;
  border-radius: 50%;
  background: var(--brand-green);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 13 4 4L19 7'/%3E%3C/svg%3E") center/60% no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 13 4 4L19 7'/%3E%3C/svg%3E") center/60% no-repeat;
}

/* ---------- Services ---------- */
.services { padding-block: clamp(2.25rem, 5vw, 4rem); background: var(--surface-2); }
.services__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}
.service-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease, box-shadow 0.3s ease;
}
.service-card:hover {
  transform: translateY(-6px);
  border-color: color-mix(in srgb, var(--brand-green) 45%, var(--line));
  box-shadow: var(--shadow);
}
.service-card__icon {
  display: flex; align-items: center; justify-content: center;
  width: 48px; height: 48px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--brand-green) 16%, transparent);
  color: var(--brand-green);
  margin-bottom: 1rem;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.service-card:hover .service-card__icon { transform: scale(1.1) rotate(-4deg); }
.service-card__icon svg { width: 22px; height: 22px; fill: currentColor; stroke: none; }
.service-card p { font-size: 0.92rem; }
.services__cta { text-align: center; margin-top: clamp(2rem, 4vw, 3rem); }

/* ---------- Pack-out steps ---------- */
.packout { padding-block: clamp(2.25rem, 5vw, 4rem); }
.packout__steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
.packout__step {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  font-family: var(--font-head);
  font-weight: 600;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.packout__step span {
  font-size: 1.5rem;
  color: var(--brand-green);
}

/* ---------- Process timeline ---------- */
.process { padding-block: clamp(2.25rem, 5vw, 4rem); background: var(--surface-2); }
.timeline {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1.25rem;
  position: relative;
}
.timeline::before {
  content: "";
  position: absolute;
  top: 21px;
  left: 5%; right: 5%;
  height: 2px;
  background: var(--line-strong);
  z-index: 0;
}
.timeline__item { position: relative; z-index: 1; }
.timeline__num {
  display: flex; align-items: center; justify-content: center;
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--brand-green);
  color: var(--on-brand);
  font-family: var(--font-head);
  font-weight: 700;
  margin-bottom: 1rem;
}
.timeline__item p { font-size: 0.88rem; }

/* ---------- Service area ---------- */
.service-area { padding-block: clamp(2.25rem, 5vw, 4rem); }
.service-area__inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.service-area__stats {
  display: flex;
  gap: clamp(1.25rem, 3vw, 2.5rem);
  margin-top: 2rem;
  flex-wrap: wrap;
}
.service-area__stats div { display: flex; flex-direction: column; gap: 0.2rem; }
.service-area__stats strong { font-family: var(--font-head); font-size: 1.3rem; }
.service-area__stats span { font-size: 0.82rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }

.service-area__visual { display: flex; align-items: center; justify-content: center; }
.radar { position: relative; width: 220px; height: 220px; display: flex; align-items: center; justify-content: center; }
.radar__ring {
  position: absolute;
  border-radius: 50%;
  border: 2px solid color-mix(in srgb, var(--brand-green) 45%, transparent);
  animation: radar-pulse 3.5s ease-out infinite;
}
.radar__ring--1 { width: 70px; height: 70px; animation-delay: 0s; }
.radar__ring--2 { width: 70px; height: 70px; animation-delay: 1.15s; }
.radar__ring--3 { width: 70px; height: 70px; animation-delay: 2.3s; }
@keyframes radar-pulse {
  0% { width: 60px; height: 60px; opacity: 0.9; }
  100% { width: 220px; height: 220px; opacity: 0; }
}
.radar__pin {
  position: relative;
  z-index: 1;
  width: 54px; height: 54px;
  border-radius: 50%;
  background: var(--brand-green);
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow);
}
.radar__pin svg { width: 26px; height: 26px; fill: var(--on-brand); }

/* ---------- Gallery ---------- */
.gallery { padding-block: clamp(2.25rem, 5vw, 4rem); background: var(--surface-2); }
.gallery__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 240px;
  gap: 1rem;
}
.gallery__item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
}
.gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.gallery__item:hover img { transform: scale(1.06); }
.gallery__item figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 0.9rem 1rem;
  background: linear-gradient(0deg, rgba(6,10,8,0.85), transparent);
  color: #fff;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.85rem;
}
.gallery__feature {
  position: relative;
  margin-top: 1rem;
  border-radius: var(--radius);
  overflow: hidden;
}
.gallery__feature img { width: 100%; height: auto; display: block; }
.gallery__feature figcaption {
  padding: 0.9rem 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: none;
  color: var(--text);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.9rem;
}
.gallery__cta { text-align: center; margin-top: clamp(2rem, 4vw, 3rem); }

/* ---------- Gallery page (gallery.html) ---------- */
.gallery-page { padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(3rem, 7vw, 5rem); }
.gallery-page__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: clamp(2rem, 4vw, 3rem);
}

/* ---------- Gallery lightbox ---------- */
body.lightbox-open { overflow: hidden; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 4vw, 3rem);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0s linear 0.3s;
}
.lightbox.is-open {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.3s ease, visibility 0s linear 0s;
}
.lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 7, 6, 0.88);
  backdrop-filter: blur(4px);
}
.lightbox__content {
  position: relative;
  z-index: 1;
  max-width: min(92vw, 1100px);
  max-height: 88vh;
  transform: scale(0.92) translateY(16px);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
}
.lightbox.is-open .lightbox__content {
  transform: scale(1) translateY(0);
  opacity: 1;
}
.lightbox__img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 88vh;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.lightbox__caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 1rem 1.1rem;
  background: linear-gradient(0deg, rgba(6, 10, 8, 0.85), transparent);
  color: #fff;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 0 0 var(--radius) var(--radius);
}
.lightbox__caption:empty { display: none; }
.lightbox__close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 2;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(4, 7, 6, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #fff;
  font-size: 1.4rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.lightbox__close:hover { background: rgba(4, 7, 6, 0.85); }

@media (max-width: 767px) {
  .lightbox__backdrop { background: transparent; backdrop-filter: none; }
}

/* ---------- Final CTA ---------- */
.final-cta {
  background: var(--ink-strong);
  color: #fff;
  padding-block: clamp(2.25rem, 5vw, 4rem);
  overflow: hidden;
}
.final-cta__inner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
}
.final-cta h2 { color: #fff; }
.final-cta p { color: #c9cfc4; margin-bottom: 1.75rem; max-width: 46ch; }
.final-cta__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1.5rem; }
.final-cta__mascot { width: 180px; height: auto; flex-shrink: 0; animation: mascot-float 4.5s ease-in-out infinite; }
@keyframes mascot-float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-10px) rotate(-1.5deg); }
}

/* ---------- Contact ---------- */
.contact { padding-block: clamp(2.25rem, 5vw, 4rem); }
.contact__inner {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: clamp(2rem, 5vw, 4rem);
}
.contact__info p { margin-bottom: 1.5rem; }
.contact__phone {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: var(--font-head); font-weight: 700; font-size: 1.4rem;
  color: var(--text);
  margin-bottom: 1.5rem;
}
.contact__phone .icon { color: var(--accent-orange); width: 1.3rem; height: 1.3rem; }
.contact__address { display: flex; gap: 0.6rem; color: var(--text-muted); }
.contact__address .icon { color: var(--brand-green); flex-shrink: 0; margin-top: 0.15rem; }

.contact__form {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}
.form-row { display: flex; flex-direction: column; gap: 0.4rem; }
.form-row--split { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.form-row--split > div { display: flex; flex-direction: column; gap: 0.4rem; }
.contact__form label { font-size: 0.85rem; font-weight: 600; font-family: var(--font-head); }
.contact__form input,
.contact__form select,
.contact__form textarea {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line-strong);
  border-radius: 0;
  padding: 0.6rem 0.1rem;
  color: var(--text);
  width: 100%;
}
.contact__form input::placeholder,
.contact__form textarea::placeholder {
  color: var(--text-muted);
  opacity: 0.7;
}
.contact__form input:focus,
.contact__form select:focus,
.contact__form textarea:focus {
  outline: none;
  border-bottom-color: var(--brand-green);
}
.contact__submit { margin-top: 0.5rem; }
.contact__status { font-size: 0.9rem; font-weight: 600; min-height: 1.2em; }
.contact__status[data-state="error"] { color: #e05252; }

.contact__form input:disabled,
.contact__form select:disabled,
.contact__form textarea:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.contact__form {
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.contact__form.is-leaving {
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
}

.contact__success {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.85rem;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.contact__success[hidden] {
  display: none;
}
.contact__success.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.contact__success h3 {
  font-family: var(--font-head);
  font-size: 1.5rem;
}
.contact__success p {
  color: var(--text-muted);
  max-width: 42ch;
}
.contact__success-icon {
  width: 60px;
  height: 60px;
}
.contact__success-circle {
  fill: none;
  stroke: var(--brand-green);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-dasharray: 151;
  stroke-dashoffset: 151;
}
.contact__success-check {
  fill: none;
  stroke: var(--brand-green);
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 34;
  stroke-dashoffset: 34;
}
.contact__success.is-visible .contact__success-circle {
  animation: contact-draw 0.6s ease forwards;
}
.contact__success.is-visible .contact__success-check {
  animation: contact-draw 0.35s ease 0.5s forwards;
}
@keyframes contact-draw {
  to { stroke-dashoffset: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .contact__form,
  .contact__success {
    transition: none;
  }
  .contact__success.is-visible .contact__success-circle,
  .contact__success.is-visible .contact__success-check {
    animation: none;
    stroke-dashoffset: 0;
  }
}

/* ---------- Legal pages ---------- */
.legal { padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(3rem, 7vw, 5rem); }
.legal__inner { max-width: 760px; }
.legal h1 { font-size: clamp(2rem, 1.6rem + 2vw, 3rem); margin-bottom: 0.4em; }
.legal__updated { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 2.5rem; }
.legal__body h2 { font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.6rem); margin-top: 2rem; margin-bottom: 0.6em; }
.legal__body h2:first-child { margin-top: 0; }
.legal__body p { margin-bottom: 1em; }
.legal__body ul { padding-left: 1.25rem; list-style: disc; margin-bottom: 1em; }
.legal__body li { margin-bottom: 0.4em; }
.legal__body a { color: var(--brand-green); text-decoration: underline; }

/* ---------- Footer ---------- */
.site-footer {
  --footer-text: #cfd6cf;
  --footer-text-muted: #9aa79f;
  --footer-text-strong: #fff;
  --footer-border: rgba(255, 255, 255, 0.12);
  --footer-bottom: #7d8a80;
  background: #000;
  color: var(--footer-text);
  padding-block: 3.5rem 1.5rem;
}
:root[data-theme="light"] .site-footer {
  --footer-text: #3f4a44;
  --footer-text-muted: #6b7570;
  --footer-text-strong: #10241f;
  --footer-border: rgba(11, 61, 54, 0.14);
  --footer-bottom: #7c867f;
  background: #f5f5f5;
}
.site-footer__inner {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--footer-border);
}
.site-footer__brand { max-width: 32ch; }
.site-footer__logo { height: 84px; width: auto; margin-bottom: 1rem; }
.site-footer__logo--light { display: none; }
:root[data-theme="light"] .site-footer__logo--dark { display: none; }
:root[data-theme="light"] .site-footer__logo--light { display: block; }
.site-footer__brand p { color: var(--footer-text-muted); font-size: 0.9rem; }
.site-footer__nav { display: flex; flex-direction: column; gap: 0.6rem; }
.site-footer__nav a { font-size: 0.92rem; color: var(--footer-text); }
.site-footer__nav a:hover { color: var(--brand-green); }
.site-footer__contact { display: flex; flex-direction: column; gap: 0.6rem; }
.site-footer__contact a { font-family: var(--font-head); font-weight: 700; color: var(--footer-text-strong); }
.site-footer__contact address { font-style: normal; color: var(--footer-text-muted); font-size: 0.9rem; }
.site-footer__bottom {
  padding-top: 1.5rem;
  font-size: 0.82rem;
  color: var(--footer-bottom);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.5rem;
}
.site-footer__legal { display: flex; flex-wrap: wrap; gap: 1.25rem; }
.site-footer__legal a { color: var(--footer-bottom); }
.site-footer__legal a:hover { color: var(--brand-green); }
.site-footer__credit { margin-left: auto; }
.site-footer__credit a { color: var(--footer-bottom); font-weight: 600; }
.site-footer__credit a:hover { color: var(--brand-green); }

/* ---------- Mobile mascot helper ---------- */
.mascot-helper {
  display: none;
}

@media (max-width: 767px) {
  .mascot-helper {
    display: flex;
    align-items: flex-end;
    gap: 0.6rem;
    position: fixed;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    z-index: 90;
    background: none;
    border: none;
    padding: 0;
  }
  .mascot-helper__bubble {
    flex: 1 1 auto;
    min-width: 0;
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 0.7rem 1rem;
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 0.85rem;
    line-height: 1.3;
    text-align: center;
    box-shadow: var(--shadow);
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.35s ease, transform 0.35s ease;
  }
  .mascot-helper__bubble.is-visible {
    opacity: 1;
    transform: translateY(0);
  }
  .mascot-helper__avatar {
    width: 58px;
    height: auto;
    border-radius: 50%;
    background: var(--surface);
    box-shadow: var(--shadow);
    border: 2px solid var(--brand-green);
    flex-shrink: 0;
    animation: mascot-helper-bounce 3.5s ease-in-out infinite;
  }
}
@keyframes mascot-helper-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
@media (prefers-reduced-motion: reduce) {
  .mascot-helper__avatar { animation: none; }
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1024px) {
  .services__grid { grid-template-columns: repeat(2, 1fr); }
  .timeline { grid-template-columns: repeat(3, 1fr); row-gap: 2rem; }
  .timeline::before { display: none; }
  .gallery__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 1030px) {
  .site-header__inner { height: 92px; }
  .site-header.is-scrolled .site-header__inner { height: 56px; }
  .brand__logo { height: 60px; }
  .site-header.is-scrolled .brand__logo { height: 34px; }

  .nav-toggle { display: flex; }

  .main-nav {
    display: block;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }
  .main-nav.is-open { max-height: 480px; }
  .main-nav__list { flex-direction: column; align-items: flex-start; gap: 0; padding: 0.5rem clamp(1.25rem, 4vw, 2.5rem) 1rem; }
  .main-nav__list li { width: 100%; }
  .main-nav__list a { display: block; padding: 0.85rem 0; border-bottom: 1px solid var(--line); }
  .main-nav__list li:last-child a { border-bottom: none; }
}

@media (max-width: 921px) {
  .crew__inner, .service-area__inner, .contact__inner, .overview__inner {
    grid-template-columns: 1fr;
  }
  .crew__media { order: -1; }
  .overview__inner { max-width: 780px; }
  .overview__media { display: none; }

  .about,
  .insurance {
    display: block;
    min-height: 0;
  }
  .insurance { padding-top: 0; }
  .about__bg,
  .insurance__bg {
    position: relative;
    inset: auto;
    left: auto;
    right: auto;
    height: 260px;
    margin-bottom: 1.75rem;
    overflow: hidden;
  }
  .about__bg { border-radius: var(--radius); }
  .about__bg img,
  .insurance__bg img {
    -webkit-mask-image: none;
    mask-image: none;
  }
  .about__content,
  .insurance__inner,
  .insurance__content { max-width: none; }
  .insurance__inner { display: block; }

  .trust-strip__inner { grid-template-columns: repeat(2, 1fr); }
  .packout__steps { grid-template-columns: repeat(2, 1fr); }

  .final-cta__inner { flex-direction: column; align-items: flex-start; }
  .final-cta__mascot { align-self: center; width: 150px; }

  .site-footer__inner { grid-template-columns: 1fr; gap: 2rem; }

}

@media (max-width: 640px) {
  .services__grid { grid-template-columns: 1fr; }
  .timeline { grid-template-columns: repeat(2, 1fr); }
  .gallery__grid { grid-template-columns: 1fr; grid-auto-rows: 220px; }
  .trust-strip__inner { grid-template-columns: 1fr; }
  .form-row--split { grid-template-columns: 1fr; }
  .hero__actions { flex-direction: column; align-items: stretch; }

  .site-footer__bottom { flex-direction: column; align-items: flex-start; }
  .site-footer__credit { margin-left: 0; }
}

/* =========================================================
   iOS Safari toolbar tint fix
   iOS 26 Safari ignores <meta name="theme-color"> and instead
   tints the browser chrome by sampling whatever fixed/sticky
   element sits at the viewport edge. Our sticky header uses a
   translucent/blurred background, which Safari can't resolve
   into a color, so the toolbar gets stuck on the theme that was
   active on load. Force a solid, theme-accurate background on
   iOS Safari only, so the tint updates when the user toggles theme.
   ========================================================= */
@supports (-webkit-touch-callout: none) {
  .site-header {
    background: var(--bg);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}
