/* =========================================================
   DUCTSAFE PRO — GLOBAL STYLE SHEET (Optimized)
   - Grouped by feature/section
   - Duplicate rules merged
   - Animation + responsive tuned
========================================================= */

/* ==============================
   0) THEME TOKENS (custom props)
============================== */
:root {
  --brand-dark: #001933;
  --brand-black: #000000;
  --brand-orange: #ff6600;
  --brand-accent: #5a6d73;
  --text: #333;
  --text-strong: #111;
  --muted: #888;
  --card: #f4f4f4;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  --radius: 8px;
  --container-pad: 80px;

  /* Fonts */
  --font-heading: 'Montserrat', sans-serif;
  --font-body: 'Roboto', sans-serif;
  --font-accent: 'Bebas Neue', sans-serif;

  /* Font Weights */
  --weight-light: 300;
  --weight-regular: 400;
  --weight-medium: 500;
  --weight-bold: 700;
  --weight-extrabold: 900;
}

/* ==============================
   1) RESET + BASE
============================== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { overflow-x: hidden; }
body {
  font-family: var(--font-body);
  font-weight: var(--weight-regular);
  line-height: 1.6;
  background-color: var(--brand-black);
  color: var(--text);
}

/* Headings and buttons */
h1, h2, h3, h4, h5, h6,
.cta-button,
.nav-list a {
  font-family: var(--font-heading);
  font-weight: var(--weight-bold);
}

/* ==============================
   2) GLOBAL UTILITIES
============================== */
.text-center { text-align: center; }
.heading-lg { font-size: 28px; margin: 40px 0 10px; color: #001f3f; }
.text-subtle { font-size: 16px; color: #333; margin: -10px 0 20px; }
.text-orange { color: var(--brand-orange); font-weight: bold; }
.divider { width: 100%; height: 1px; background: var(--brand-accent); border: 0; margin: 10px 0 10px; }
.white-space { background-color: #f4f4f4; padding: 40px 0; text-align: center; }

/* ==============================
   3) HEADER + NAV
============================== */
.site-header { position: fixed; top: 0; width: 100%; z-index: 999;
  display: flex; justify-content: space-between; align-items: center; padding: 20px var(--container-pad);
  background: linear-gradient(to bottom, var(--brand-dark) 0%, #000 100%); color: white; transition: all 0.3s ease; 
}
.site-header.shrunk { padding: 10px 20px; box-shadow: 0 4px 12px rgba(0,0,0,0.2); }
.logo img { height: 120px; width: auto; transition: height 0.3s ease; }
.site-header.shrunk .logo img { height: 60px; }
.site-main { padding-top: 120px; }

.desktop-nav { display: flex; }
@media (max-width: 900px){ .desktop-nav { display: none; } }

.nav-list {
  display: flex; gap: 50px; align-items: center; margin-right: 40px; list-style: none;
}
.nav-list a {
  text-decoration: none; font-family: var(--font-heading); font-weight: var(--weight-bold); color: var(--card); font-size: 16px; transition: color 0.3s ease;
}
.nav-list a:hover { color: var(--brand-orange); }

.nav-block-container {
	display: flex; flex-direction: column; align-items: flex-end; justify-content: center;
	text-align: right; padding-right: 20px; gap: 40px; transition: all 0.3s ease; 
}

.site-header.shrunk .nav-block-container {
	gap: 10px; /* tighter spacing when shrunk */
	padding-right: 10px;
	margin-top: -4px; /* optional: move it up a touch */
}

.announcement-bar h2 { font-family: var(--font-heading); font-size: 1rem; margin: 0; margin-right: 40px; color: var(--card); line-height: 1.4; }
@media (max-width: 768px){ .announcement-bar h2 { font-size: .9rem; margin-bottom: 4px; } }

/* --- Mobile menu toggle --- */
#mobile-menu-toggle {
  display: none; position: fixed; top: 1rem; right: 1rem; font-size: 2rem; color: var(--card); z-index: 10001;
  cursor: pointer; text-shadow: 1px 1px 4px rgba(0,0,0,.6);
}
@media (max-width: 900px){ #mobile-menu-toggle { display: block; } }

/* --- Mobile menu panel --- */
.mobile-menu {
  display: none; position: fixed; top: 0; right: 0; width: auto; max-width: 200px; height: auto;
  background: linear-gradient(to left, rgba(0,0,0,.95), rgba(0,0,0,.6));
  backdrop-filter: blur(10px); padding: 4rem 2rem;
  box-shadow: -10px 0 30px rgba(0,0,0,.7);
  transform: translateX(100%); transition: transform .4s ease; z-index: 10000;
  border-radius: 0 0 0 15px; flex-direction: column; justify-content: center;
}
.mobile-menu ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; justify-content: space-evenly; height: 100%; }
.mobile-menu li { font-size: 1.3rem; padding: .8rem 0; text-align: right; cursor: pointer; transition: color .3s ease, transform .2s ease; }
.mobile-menu a { color: var(--card); text-decoration: none; font-weight: bold; }
.mobile-menu a:hover { color: var(--brand-orange); transform: translateX(6px); }
.mobile-menu.show { transform: translateX(0); display: flex; }
@media (max-width: 1024px){ .mobile-menu.show { display: flex; } }



/* --- Tagline overlayed into the logo's empty space --- */
.logo { position: relative; display: inline-block; }    
.logo-link { display: block; }                           

.logo-tagline{ position: absolute; left: var(--tagline-left, 110px); bottom: var(--tagline-bottom, 2px); color: var(--card);
  font-family: var(--font-heading); font-weight: var(--weight-bold); font-size: 18px; line-height: 1; white-space: nowrap;
  text-shadow: 1px 1px 4px rgba(0,0,0,.45); pointer-events: none; z-index: 1;                        
}

/* when header shrinks, tighten size/position */
.site-header.shrunk .logo-tagline{
  font-size: 12px; left: var(--tagline-left-shrunk, 60px); bottom: var(--tagline-bottom-shrunk, 2px); }

/* hide on small screens to keep header tidy */
@media (max-width: 900px){ .logo-tagline{ display: none; } }

/* Current page highlight */
.nav-list a.active,
.nav-list a[aria-current="page"],
.mobile-menu a.active,
.mobile-menu a[aria-current="page"] {
  color: var(--brand-orange);
}

/* Optional underline on desktop nav */
.nav-list a {
  position: relative;
}
.nav-list a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 3px;
  background: var(--brand-orange);
  border-radius: 2px;
  transform: scaleX(0);
  transition: transform .25s ease;
  pointer-events: none;
}
.nav-list a:hover::after,
.nav-list a[aria-current="page"]::after,
.nav-list a.active::after {
  transform: scaleX(1);
}


/* ==============================
   4) HERO IMAGE
============================== */
.image-block img { max-width: 100vw; height: auto; display: block; margin: 0 auto;}

/* ==============================
   6) FEATURE MODULES
   - Shared 3-card row (homepage)
   - Flip entrance animation hooks
============================== */
.feature-module {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 40px;
  max-width: 2560px; margin: 60px auto 0; padding: 0 20px;
  perspective: 800px; /* enables 3D flip depth */
}
.feature-item { flex: 1 1 300px; text-align: center; }
.feature-item img {
  width: 100%; max-width: 300px; border-radius: var(--radius);
  box-shadow: 0 4px 12px rgba(0,0,0,.15);
}
.feature-item p { margin-top: 16px; font-size: 1rem; color: #222; }

/* ===========================
   Sizes carousel — 3-up conveyor
=========================== */
.sizes-carousel{
  position: relative; max-width: 1400px; margin: 0 auto; --card-w: 380px; --spread: calc(var(--card-w) * 0.50); 
  padding: 0 16px; perspective: 1400px; overflow: visible;
}

.sizes-track{ position: relative; height: 480px; padding: 48px 0 34px; transform-style: preserve-3d; overflow: visible; }

/* Base card (centered/hidden) */
.sizes-track .feature-item{
  position: absolute; top: 0; left: 50%; width: var(--card-w); max-width: var(--card-w); transform: translateX(-50%) scale(.92);
  opacity: 0; pointer-events: none; transition: transform .5s ease, opacity .5s ease, filter .5s ease, box-shadow .5s ease;
  transform-origin: center center; z-index: 1; display: none; will-change: transform, opacity;
}

/* kill generic hover/shadows on images inside the carousel */
.sizes-track .feature-item img{ box-shadow: none; }
.sizes-track .feature-item:hover img{ transform:none; box-shadow:none; }

/* anchor acts as the visual tile we skew/clip */
.sizes-track .feature-item > a{
  display:block;
  transition: inherit;
  /* ensure the wedge isn't clipped inside the card */
  overflow: visible;
}

/* roles */
.sizes-track .feature-item.is-left,
.sizes-track .feature-item.is-center,
.sizes-track .feature-item.is-right{ display:block; }

.sizes-track .feature-item.is-center{
  opacity: 1;
  transform: translateX(-50%) rotateY(0) translateZ(0) scale(1.08);
  z-index: 3;
}
.sizes-track .feature-item.is-center > a img{
  filter: drop-shadow(0 12px 32px rgba(0,0,0,.18));
}

/* Side positions (no big rotate on the container; we rotate the anchor for a wedge) */
.sizes-track .feature-item.is-left{
  opacity: .40;
  transform: translateX(calc(-50% - var(--spread))) translateZ(-60px) scale(.96);
  z-index: 2;
}
.sizes-track .feature-item.is-right{
  opacity: .40;
  transform: translateX(calc(-50% + var(--spread))) translateZ(-60px) scale(.96);
  z-index: 2;
}

/* WEDGE SHAPE + pivot from inner edge for real 3D illusion */
.sizes-track .feature-item.is-left > a{
  pointer-events:none;                  /* not clickable */
  transform-origin: 88% 50%;            /* pivot near the inner (right) edge */
  transform: perspective(1400px) rotateY(32deg) skewX(-8deg) scaleX(.98);
  clip-path: polygon(20% 0, 100% 0, 84% 100%, 0 100%); /* trapezoid */
}
.sizes-track .feature-item.is-right > a{
  pointer-events:none;                  /* not clickable */
  transform-origin: 12% 50%;            /* pivot near the inner (left) edge */
  transform: perspective(1400px) rotateY(-32deg) skewX(8deg) scaleX(.98);
  clip-path: polygon(0 0, 80% 0, 100% 100%, 16% 100%);
}

/* dim captions on side tiles */
.sizes-track .feature-item.is-left p,
.sizes-track .feature-item.is-left h2,
.sizes-track .feature-item.is-right p,
.sizes-track .feature-item.is-right h2{ opacity:.45; }

/* arrows tucked close to center card edge */
.sizes-arrow{
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid rgba(0,0,0,.15); background: #fff;
  box-shadow: var(--shadow); display: grid; place-items: center;
  cursor: pointer; z-index: 5;
}
.sizes-prev{ left: calc(50% - var(--spread) - 18px); }
.sizes-next{ right: calc(50% - var(--spread) - 18px); }
.sizes-arrow:hover{ background:#f0f0f0; }

/* Mobile */
@media (max-width: 900px){
  .sizes-carousel{
    --card-w: 300px;
    --spread: calc(var(--card-w) * 0.48);
  }
  .sizes-track{ height: 420px; padding-top: 42px; }
  .sizes-prev{ left: calc(50% - var(--spread) - 16px); }
  .sizes-next{ right: calc(50% - var(--spread) - 16px); }
}

/* ==============================
   Feature card hover upgrades
============================== */
.feature-item img {
  transition: transform .1s cubic-bezier(.2,.7,.2,1), box-shadow .1s ease, filter .1s ease;
}

/* lift + subtle tilt on hover */
.feature-item:hover img {
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 14px 30px rgba(0,0,0,.28);
  filter: saturate(1.08);
}

/* sizes grid: keep hover neat on dense layouts */
.sizes-grid .feature-item:hover img { transform: translateY(-1px) scale(1.03); }

/* ==============================
   7) CTA BUTTON
============================== */
.cta-button-wrapper { padding: 60px 0; text-align: center; }
.cta-button {
  background-color: var(--brand-orange); color: white; padding: 14px 28px;
  font-size: 1.1rem; font-weight: bold; border: none; border-radius: 6px;
  text-decoration: none; transition: background .3s ease, transform .2s ease;
  box-shadow: var(--shadow); cursor: pointer;
}
.cta-button:hover { background-color: var(--brand-accent); transform: scale(1.05); }

/* Header quote CTA (scoped, won't affect other buttons) */
.nav-quote-cta {
	font-size: 14px;          /* smaller than default */
	padding: 8px 14px;        /* tighter */
	line-height: 1.2; 
	border-radius: 12px;      /* keep your brand roundness, a bit smaller */
	white-space: nowrap;      /* prevent wrap on desktop */
}

/* Slightly smaller on tablet */
@media (max-width: 1024px) {
	.nav-quote-cta {
		font-size: 13px;
		padding: 7px 12px;
	}
}

/* On mobile: place centered beneath the announcement line */
@media (max-width: 768px) {
	.nav-quote-cta {
		display: block;
		width: fit-content;
		margin: 8px auto 0;   /* center under the text */
		white-space: normal;  /* allow wrap if needed on very small screens */
	}
}



/* ==============================
   8) VIDEO WRAPPER
============================== */
.video-wrapper { display: flex; justify-content: center; margin-top: 40px; }
.video-wrapper video { max-width: 100%; width: 840px; border-radius: 10px; box-shadow: var(--shadow); }

/* ==============================
   9) GRADIENT SECTIONS
============================== */
.gradient-section {
	position: relative;
	background: linear-gradient(to bottom, #e0e0e0, var(--card), #e0e0e0);
	padding: 60px var(--container-pad);
	width: 100%;
	box-shadow: inset 0 20px 20px -20px rgba(0, 0, 0, 0.25),
				inset 0 -20px 20px -20px rgba(0, 0, 0, 0.25);
}
.gradient-content { max-width: 1200px; margin: 0 auto; color: var(--text-strong); }
.gradient-content h2 { font-size: 2rem; margin-bottom: 20px; color: var(--brand-dark); }
.gradient-content p { font-size: 1.1rem; line-height: 1.7; }

/* ==============================
   10) SKYLINE (homepage)
============================== */
.skyline-section {
  position: relative; width: 100%; height: 400px;
  background: url("Media/Auckland Skyline.jpg") center/cover no-repeat;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow);
}
.skyline-overlay {
  position: absolute; text-align: center; color: var(--card); padding: 20px 40px; border-radius: 12px;
  text-shadow: 2px 2px 8px rgba(0,0,0,.7);
}
.skyline-heading { font-size: 2.2rem; margin-bottom: 10px; }
.skyline-subtext { font-size: 1.2rem; padding: 0 80px; }

/* ==============================
   11) MAILING LIST BLOCK
============================== */
.mailing-list-section {
  background: linear-gradient(to bottom, #000 0%, var(--brand-dark) 100%);
  color: #fff; text-align: center; padding: 60px 20px; border-radius: 15px; box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
}
.mailing-list-form { margin-top: 20px; display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; }
.mailing-list-form input[type="email"] {
  padding: 12px 16px; font-size: 16px; border: none; border-radius: 6px; width: 280px; max-width: 90%;
}
.mailing-list-form button {
  padding: 12px 24px; font-size: 16px; background: var(--brand-orange); color: #111;
  border: none; border-radius: 6px; cursor: pointer; transition: background .3s ease;
}
.mailing-list-form button:hover { background: var(--brand-accent); }

/* ==============================
   12) SPLIT CONTENT (About/HIW/Contact)
============================== */
.content-split-section {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 20px;
  padding: 200px 60px 0; background: var(--card); color: var(--text-strong); margin: 0 auto;
}
.split-text-block { flex: 1 1 500px; max-width: 800px; padding: 20px 100px 20px 200px; }
.split-text-block h2 { font-size: 3rem; line-height: 1.2; margin-bottom: 20px; }
.brand-text { color: var(--brand-dark); }
.split-intro-text { font-size: 1.1rem; font-weight: bold; margin-bottom: 16px; }
.split-text-block p { margin-bottom: 16px; font-size: 1rem; line-height: 1.6; }
.split-feature-list { padding-left: 20px; margin-bottom: 16px; }
.split-feature-list li { margin-bottom: 10px; list-style-type: disc; font-size: 1rem; }
.split-tagline { font-size: 1.1rem; font-weight: bold; margin-top: 20px; }

.split-image-block { flex: 1 1 400px; text-align: center; max-width: 600px; }
.split-image-block img { max-width: 100%; max-height: 800px; height: auto; border-radius: 12px; }

/* hero variant that reuses the split layout */
.content-split-section.hero-split {
  background: url("Media/SDC.jpg") center/cover no-repeat;
  color: #fff;                         /* white text */
  padding: 160px var(--container-pad) 60px;  /* top padding clears fixed header */
  position: relative;
}

/* optional dark veil for readability */
.content-split-section.hero-split::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(to right, rgba(0,0,0,.65) 0%, rgba(0,0,0,.25) 60%, rgba(0,0,0,0) 100%);
  pointer-events: none;
}

/* lift text above veil */
.hero-split .split-text-block,
.hero-split .split-image-block { position: relative; z-index: 1; }

/* tighten the default split text padding for hero */
.hero-split .split-text-block { padding: 20px 40px; max-width: 680px; }

/* headline + copy styles (white) */
.hero-split h1 {
  color: #f4f4f4;
  font-weight: 900;
  font-size: clamp(4rem, 5vw, 3.4rem);
  line-height: 1.05;
  margin-bottom: 16px;
  text-shadow: 0 2px 8px rgba(0,0,0,.35);
}
.hero-split .hero-subtitle {
  color: #f4f4f4;
  font-size: clamp(2.1rem, 2.2vw, 1.6rem);
  line-height: 1.35;
  font-weight: 500;
  margin-bottom: 22px;
  text-shadow: 0 1px 6px rgba(0,0,0,.35);
}
.hero-split .hero-smallprint {
  color: #f4f4f4;
  font-size: .98rem;
  border-top: 2px solid var(--brand-orange);
  padding-top: 16px;
  max-width: 46ch;
}

/* image column keeps the blade big but responsive */
.hero-split .split-image-block img {
  width: 100%;
  height: auto;
  max-width: 720px;
}

/* mobile: your existing media rules already stack, this just nudges spacing */
@media (max-width: 768px){
  .content-split-section.hero-split { padding: 80px 20px 30px; }
  .hero-split .split-text-block { padding: 0; }
}

@media (max-width: 768px) {
  /* tighten hero on mobile */
  .content-split-section.hero-split {
    padding: 80px 20px 30px;   /* reduce top/bottom */
  }

  .hero-split .split-text-block {
    padding: 0;                /* remove extra side padding */
    margin-bottom: 20px;       /* just a small gap above the image */
    text-align: center;        /* center-align text for mobile */
  }

  .hero-split .split-image-block {
    margin-top: 0;             /* kill the big top gap */
  }

  .hero-split .hero-smallprint {
    margin-bottom: 10px;       /* reduce spacing below smallprint */
  }
}


/* ==============================
   13) MODEL VIEWER (HIW)
============================== */
.model-viewer-section {
  background: var(--card); margin: 0 auto; padding: 30px; box-shadow: 0 0 20px rgba(0,0,0,.1); text-align: center;
}
#viewer-container {
  position: relative; width: 100%; max-width: 700px; aspect-ratio: 1 / 1; background: transparent;
  display: block; padding: 0; margin: 0 auto; box-shadow: 0 4px 12px rgba(0,0,0,.2);
}
canvas { width: 100% !important; height: 100% !important; display: block; }

#load-model-btn {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 10;
}
.spinner {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  border: 8px solid #eee; border-top: 8px solid var(--brand-orange); border-radius: 50%;
  width: 60px; height: 60px; animation: spin 1s linear infinite; z-index: 11;
}
@keyframes spin { 0% { transform: translate(-50%, -50%) rotate(0deg);} 100% { transform: translate(-50%, -50%) rotate(360deg);} }

.fullscreen-btn {
  position: absolute; bottom: 10px; right: 10px; padding: 10px 16px; font-size: 14px;
  background: var(--brand-dark); color: #fff; border: none; border-radius: 6px; cursor: pointer; z-index: 10;
  opacity: 0.9; transition: all .3s ease;
}
.fullscreen-btn:hover { background: #003366; transform: scale(1.05); }

/* ==============================
   14) ANIMATIONS: reveal-on-scroll
============================== */
/* slide from left */
.reveal-left {
  opacity: 0; transform: translateX(-100px);
  transition: transform 600ms ease, opacity 600ms ease; will-change: transform, opacity;
}
.reveal-left.is-visible { opacity: 1; transform: translateX(0); }

/* slide from right (used on Contact image) */
.reveal-right {
  opacity: 0; transform: translateX(100px);
  transition: transform 600ms ease, opacity 600ms ease; will-change: transform, opacity;
}
.reveal-right.is-visible { opacity: 1; transform: translateX(0); }

/* flip-up (used by .reveal-flip images) */
.reveal-flip {
  opacity: 0; transform: translateY(30px) rotateX(-70deg);
  transform-origin: center bottom; backface-visibility: hidden;
  transition: transform .7s cubic-bezier(.2,.7,.2,1), opacity .7s ease; will-change: transform, opacity;
}
.reveal-flip.is-visible { opacity: 1; transform: translateY(0) rotateX(0deg); }

/* stagger across up to 6 feature items */
.feature-item:nth-child(1) .reveal-flip:not(.revealed) { transition-delay: 0ms; }
.feature-item:nth-child(2) .reveal-flip:not(.revealed) { transition-delay: 60ms; }
.feature-item:nth-child(3) .reveal-flip:not(.revealed) { transition-delay: 120ms; }
.feature-item:nth-child(4) .reveal-flip:not(.revealed) { transition-delay: 180ms; }
.feature-item:nth-child(5) .reveal-flip:not(.revealed) { transition-delay: 240ms; }
.feature-item:nth-child(6) .reveal-flip:not(.revealed) { transition-delay: 300ms; }

/* after first reveal, never delay again (kills hover-enter/exit lag) */
.reveal-flip.revealed { transition-delay: 0s !important; }

/* ==============================
   15) CONTACT FORM
============================== */
.contact-form-section { padding: 80px 20px; background-color: #fff; text-align: center; }
.contact-form-wrapper { max-width: 640px; margin: 0 auto; }
.contact-form-wrapper h2 { font-size: 2.4rem; margin-bottom: 20px; }
.contact-form-wrapper p { font-size: 1rem; margin-bottom: 30px; color: #444; }
.contact-form { display: flex; flex-direction: column; gap: 14px; width: 100%; }
.contact-form input, .contact-form textarea {
  font-size: 16px; padding: 12px 16px; border-radius: 6px; border: 1px solid #ddd; width: 100%;
}
.contact-form textarea { resize: vertical; }
.contact-form button {
  background-color: var(--brand-orange); color: #fff; font-weight: bold; padding: 12px 16px;
  border: none; border-radius: 6px; cursor: pointer; transition: background-color .2s ease;
}
.contact-form button:hover { background-color: var(--brand-accent); }
.form-status { margin-top: 10px; font-weight: 600; }

/* ==============================
   16) FOOTER
============================== */
.footer {
  background: linear-gradient(to top, var(--brand-dark), var(--brand-black));
  color: white; padding: 40px; font-size: 14px;
}
.footer-top {
  display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 2rem;    
}
.logo-text-block { display: flex; align-items: center; gap: 40px; }
.footer-text-lines p { margin: 8px 0; font-size: 24px; line-height: 1.5; }
.footer-links { list-style: none; display: flex; gap: 20px; margin: 0; padding: 0; }
.footer-links a { color: white; text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; color: var(--muted); font-size: 12px; padding-top: 8px; }
.footer-left, .footer-right { margin-top: 8px; }

/* ==============================
   17) RESPONSIVE
============================== */
@media screen and (max-width: 768px){
  .site-main { padding-top: 0; }

  /* header layout */
  .site-header { flex-direction: column; align-items: center; padding: 20px; position: relative; }
  .logo { display: flex; justify-content: center; width: 100%; }
  .logo img { height: 80px; margin-bottom: 10px; }

  /* feature module (homepage) stacks */
  .feature-module { flex-direction: column; align-items: center; }
  .feature-item { max-width: 90%; }

  /* footer stack */
  .footer-top { flex-direction: column; align-items: center; text-align: center; gap: 20px; }
  .footer-bottom { flex-direction: column; align-items: center; text-align: center; gap: 8px; }
  .logo-text-block { flex-direction: column; align-items: center; text-align: center; }
  .footer-links { flex-direction: column; align-items: center; gap: .5rem; }

  /* content split */
  .content-split-section { flex-direction: column; text-align: left; padding: 40px 20px; }
  .split-text-block { padding: 20px 80px; }
  .split-text-block h2 { font-size: 2.2rem; }
  .split-image-block { margin-top: 30px; }

  /* model viewer spacing */
  .model-viewer-section { padding: 10px !important; }
  #viewer-container { padding: 0 !important; width: 100% !important; max-width: 100% !important; height: auto; }
  canvas { width: 100% !important; height: auto !important; }
}

/* ==============================
   LIGHTBOX (vanilla, accessible)
============================== */
:root {
  --lb-bg: rgba(0,0,0,.9);
  --lb-btn: rgba(255,255,255,.08);
  --lb-btn-hover: rgba(255,255,255,.18);
}

body.lb-open { overflow: hidden; }

.lightbox-overlay {
  position: fixed; inset: 0; background: var(--lb-bg);
  display: none; align-items: center; justify-content: center; z-index: 100000;
}
.lightbox-overlay.show { display: flex; animation: lbFade .18s ease-out; }

.lightbox-dialog {
  position: relative; max-width: 92vw; max-height: 92vh;
  display: grid; grid-template-rows: 1fr auto; gap: 10px;
  outline: none;
  justify-items: center;
}

.lightbox-media {
  display: grid; place-items: center; width: 92vw; max-width: 1000px; max-height: 82vh;
}
.lightbox-media img {
  max-width: 100%; max-height: 82vh; width: auto; height: auto;
  border-radius: 10px; box-shadow: 0 8px 40px rgba(0,0,0,.6);
}

.lightbox-caption {
  text-align: center;
  align-items: center;
  opacity: 1;
  padding: 12px 20px;
  max-width: min(92vw, 1000px);
}
 
.lightbox-caption .caption-label {
  display: block;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 400;
  color: #ccc;
  margin-bottom: 4px;
}

.lightbox-caption .caption-value {
  display: block;
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 700;
  color: #fff;
}

.lightbox-close, .lightbox-prev, .lightbox-next {
  position: absolute; display: grid; place-items: center;
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--lb-btn); color: #f4f4f4; border: 1px solid rgba(255,255,255,.22);
  cursor: pointer; transition: background .2s ease, transform .1s ease;
  user-select: none;
}
.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover { background: var(--lb-btn-hover); }
.lightbox-close:active, .lightbox-prev:active, .lightbox-next:active { transform: scale(.96); }

.lightbox-close { top: -16px; right: -16px; }
.lightbox-prev  { top: 50%; left: -56px; transform: translateY(-50%); }
.lightbox-next  { top: 50%; right: -56px; transform: translateY(-50%); }

@media (max-width: 900px){
  .lightbox-prev { left: 8px; }
  .lightbox-next { right: 8px; }
  .lightbox-close { top: 8px; right: 8px; }
}

.lightbox-icon {
  width: 22px; height: 22px; display: inline-block;
}

@keyframes lbFade { from { opacity: 0 } to { opacity: 1 } }

/* Optional: subtle zoom-in on open */
.lightbox-media img { animation: lbZoom .18s ease-out; }
@keyframes lbZoom { from { transform: scale(.985) } to { transform: scale(1) } }

/* ============================================
   DUCTSAFE — APNG Runner (right → left on reveal)
   ============================================ */

/* container: nothing fancy; just don’t clip the moving image */
.apng-run { position: relative; overflow: visible; }

/* size the APNG once here (you already set 80px, keep or change) */
.apng-image { width: 80px; height: auto; display: block; pointer-events: none; }

/* start the IMAGE off-screen right so it can cross the viewport */
.apng-run .apng-image {
  transform: translateX(110vw);
  will-change: transform;
}

/* when your existing reveal adds .is-visible, run across to the left */
.apng-run.reveal-flip.is-visible .apng-image {
  animation: runAcross 8s linear forwards;
}

/* movement uses transform (no position/right needed) */
@keyframes runAcross {
  to { transform: translateX(-120vw); }
}

/* Reusable policy/terms styling */
.policy-section {
	margin-top: 3rem; /* extra space above heading (more than divider) */
  margin-bottom: 3rem;
}

.policy-body {
	margin-left: 2rem;  /* indent text under heading */
	margin-top: 1rem;   /* breathing room between heading and text */
}

.policy-body ul {
  list-style-type: none;
	margin-left: 2rem; /* pushes bullets in further */
	margin-top: 0.5rem;
}

.policy-body li {
	margin-bottom: 0.5rem; /* adds breathing room between list items */
}


/* ===== Quote page (scoped, no global overrides) ===== */
.quote-page .quote-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 16px;
}

.quote-page .quote-card {
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 16px;
	padding: 12px;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.quote-page .quote-img {
	width: 100%;
	height: auto;              /* show full image */
	object-fit: contain;       /* no cropping */
	background: #fff;
	border-radius: 12px;
	display: block;
}

.quote-page .quote-input {
	width: 120px;
	padding: 10px;
	border: 1px solid #e5e7eb;
	border-radius: 10px;
	font-weight: 600;
}

.quote-page .quote-actions {
	margin-top: 16px;
	display: flex;
	justify-content: center;
}

.quote-page .quote-basket {
	background: #fafafa;
	border: 1px solid #e5e7eb;
	border-radius: 16px;
	padding: 12px;
}

.quote-page .quote-basket-item {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 8px 0;
	border-bottom: 1px dashed #e5e7eb;
}
.quote-page .quote-basket-item:last-child { border-bottom: 0; }

.quote-page .quote-size-pill {
	display: inline-block;
	padding: 4px 10px;
	border: 1px solid #e5e7eb;
	border-radius: 9999px;
	font-size: 12px;
	margin-left: 8px;
	background: #eef6ff;
}

.quote-page .quote-remove {
	background: transparent;
	border: 0;
	text-decoration: underline;
	cursor: pointer;
}

.quote-page .quote-form {
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 16px;
	padding: 12px;
	display: grid;
	gap: 12px;
}
.quote-page .quote-row {
	display: flex;
	gap: 12px;
	align-items: center;
	flex-wrap: wrap;
}
.quote-page .quote-row--end { justify-content: flex-end; }

.quote-page .quote-form input[type="text"],
.quote-page .quote-form input[type="email"],
.quote-page .quote-form input[type="tel"],
.quote-page .quote-form textarea {
	width: 100%;
	padding: 10px;
	border: 1px solid #e5e7eb;
	border-radius: 10px;
}
.quote-page .quote-form textarea { min-height: 110px; }

.quote-page .quote-b2b { display: inline-flex; gap: 8px; align-items: center; }

.quote-page .quote-status { margin-left: auto; }
.quote-page .quote-status.error { color: #b91c1c; font-weight: 600; }
.quote-page .quote-status.success { color: #15803d; font-weight: 600; }

@media (max-width: 480px) {
	.quote-page .quote-input { width: 100px; }
}

/* =========================================================
   PHONES (≤600px)
   DUCTSAFE PRO — Mobile refinements (annotated)
   Only spacing/layout/size changes. No colors altered.
========================================================= */
@media (max-width: 600px) {

  /* [A] LIGHTER GLOBAL SECTION PADDING (phones)
     - Tightens left/right gutters site-wide
     - Use these first if you still see too much empty space */
  .gradient-section,
  .content-split-section,
  .white-space {
    padding-left: 10px;
    padding-right: 10px;
  }

  /* [B] GENERIC SPLIT SECTIONS (text + image) ON PHONES
     - Stacks columns
     - Shrinks vertical gaps
     - Removes any leftover inner padding/margins */
  .content-split-section {
    display: grid;                 /* safe even if a page used flex */
    grid-template-columns: 1fr;
    gap: 10px;                     /* tighten vertical rhythm */
    padding: 10px 8px 0;           /* hug edges a bit more */
  }
  .content-split-section .split-text-block,
  .content-split-section .split-image-block {
    margin: 0;
    padding: 0;
    max-width: none;
  }
  .content-split-section .split-image-block img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
  }
  /* Typography inside split sections */
  .content-split-section h1,
  .content-split-section h2 {
    font-size: clamp(1.35rem, 4.6vw, 1.7rem);
    line-height: 1.15;
    margin-bottom: 6px;
  }
  .split-intro-text { font-size: 0.95rem; line-height: 1.5; margin: 4px 0 8px; }
  .content-split-section p { margin: 8px 0; }
  .content-split-section ul { padding-left: 16px; }  /* proper bullet indent */

  /* [C] HOME HERO (Index) — YOUR 3 REQUESTS
     1) Bigger “Safer Duct Cutting”
     2) Image stacks UNDER the text
     3) Slightly tighter spacing */
  .hero-split {
    display: grid;                 /* force grid so we can order children */
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .hero-split .split-text-block { order: 1; }         /* text first */
  .hero-split .split-image-block { order: 2; margin-top: 6px; } /* image under */
  .hero-split h1 {
    /* >>> TWEAK HERE to change main opening headline size on phones <<< */
    font-size: clamp(2.0rem, 7vw, 2.4rem);            /* larger than other h1s */
    line-height: 1.1;
    margin-bottom: 6px;
  }
  .hero-split .hero-subtitle { font-size: 1rem; line-height: 1.4; }
  .hero-split .hero-smallprint { font-size: .9rem; line-height: 1.35; }

  /* [D] SKYLINE SECTION (image banner with text overlay)
     - Makes the heading + paragraph smaller and lets them use full width
     - ONLY affects elements you give these optional classes to */
  .skyline-section { height: 340px; }                  /* shorten on phones */
  .skyline-overlay { padding: 10px 8px; }              /* internal padding */
  .skyline-heading {
    /* >>> TWEAK HERE for skyline heading size <<< */
    font-size: clamp(1.1rem, 5vw, 1.4rem);
    margin-bottom: 6px;
    line-height: 1.15;
  }
  .skyline-subtext {
    /* >>> TWEAK HERE for skyline paragraph size <<< */
    font-size: 0.98rem;
    line-height: 1.45;
    padding: 0 8px !important;                         /* kills big side padding */
  }

  /* [E] SMALL PANELS (newsletter / quote cards / contact form)
     - Edge-to-edge feel and lighter look on phones */
  .gradient-section .mailing-list-section,
  .gradient-section .quote-card,
  .contact-form-wrapper {
    max-width: 100%;
    margin: 0 auto;
    padding: 16px !important;
    box-shadow: none;
    border-radius: 12px;
  }

  /* [G] CTA BUTTON */
  .cta-button { padding: 10px 16px; font-size: 0.95rem; }

  /* [H] SIZES CAROUSEL COMPACT */
  .sizes-carousel { --card-w: 250px; }   /* tile width on phones */
  .sizes-track { height: 340px; }        /* track height on phones */
}

