/* ============================================================
   Papa Flooring — Design System
   ============================================================ */

:root {
  /* Color palette: Papa Flooring brand red + charcoal */
  --espresso: #1c1c1f;   /* charcoal (dark sections, headings) */
  --walnut: #3a3a40;
  --oak: #d92228;        /* brand red, used for details */
  --oak-dark: #b0171d;
  --tan: #ff9ea2;        /* light red for labels on dark backgrounds */
  --cream: #f3f3f1;
  --cream-2: #e9e9e6;
  --sand: #fafaf9;
  --ink: #18181b;
  --muted: #5d5e66;
  --line: #e2e2de;
  --white: #ffffff;
  --accent: #d92228;     /* brand red CTA */
  --accent-dark: #b0171d;
  --green: #2f7a4b;

  /* Typography */
  --font-head: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Spacing & shape */
  --radius: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 2px 8px rgba(18, 18, 20, 0.06);
  --shadow-md: 0 10px 30px rgba(18, 18, 20, 0.10);
  --shadow-lg: 0 24px 60px rgba(18, 18, 20, 0.16);
  --container: 1180px;
  --gutter: clamp(20px, 5vw, 48px);
  --section-y: clamp(64px, 9vw, 120px);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--sand);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
ul { list-style: none; padding: 0; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 600; line-height: 1.1; letter-spacing: -0.01em; color: var(--espresso); }
h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); }
h2 { font-size: clamp(1.9rem, 4vw, 2.9rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.45rem); }
p { color: var(--muted); }
.eyebrow {
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--oak-dark);
  display: inline-block;
  margin-bottom: 14px;
}

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section-y); }
.section--tint { background: var(--cream); }
.section--dark { background: var(--espresso); }
.center { text-align: center; }
.section-head { max-width: 640px; margin-inline: auto; margin-bottom: clamp(40px, 6vw, 64px); }
.section-head p { font-size: 1.05rem; margin-top: 12px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 28px; border-radius: 999px; font-weight: 600; font-size: 1rem;
  border: 2px solid transparent; transition: transform .15s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--accent); color: #fff; box-shadow: 0 8px 20px rgba(217,34,40,.30); }
.btn--primary:hover { background: var(--accent-dark); transform: translateY(-2px); box-shadow: 0 12px 26px rgba(217,34,40,.36); }
.btn--ghost { background: transparent; color: var(--espresso); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--oak); color: var(--oak-dark); }
.btn--light { background: #fff; color: var(--espresso); }
.btn--light:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn--outline-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.5); }
.btn--outline-light:hover { background: rgba(255,255,255,.12); border-color: #fff; }
.btn--lg { padding: 17px 34px; font-size: 1.05rem; }

/* ---------- Header ---------- */
.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(247, 241, 232, 0.85);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: box-shadow .25s ease, border-color .25s ease, background .25s ease;
}
.header.is-stuck { box-shadow: var(--shadow-sm); border-color: var(--line); background: rgba(247,241,232,.95); }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 76px; }
.brand { display: flex; align-items: center; gap: 12px; font-family: var(--font-head); font-weight: 600; font-size: 1.3rem; color: var(--espresso); line-height: 1.05; white-space: nowrap; }
.brand > span { display: flex; flex-direction: column; }
.brand__mark {
  width: 40px; height: 40px; border-radius: 10px;
  background: linear-gradient(135deg, var(--oak), var(--walnut));
  display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 1.1rem; box-shadow: var(--shadow-sm);
}
.brand small { display: block; font-family: var(--font-body); font-size: .62rem; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.nav__links { display: flex; align-items: center; gap: 30px; }
.nav__links a { font-weight: 500; font-size: .98rem; color: var(--walnut); position: relative; transition: color .2s; white-space: nowrap; }
.nav__links a::after { content:""; position:absolute; left:0; bottom:-6px; height:2px; width:0; background: var(--oak); transition: width .25s ease; }
.nav__links a:hover { color: var(--espresso); }
.nav__links a:hover::after { width: 100%; }
.nav__cta { display: flex; align-items: center; gap: 14px; }
.nav__phone { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--espresso); white-space: nowrap; }
.nav__phone svg { color: var(--oak-dark); }
.nav__toggle { display: none; background: none; border: 0; padding: 8px; color: var(--espresso); }

/* ---------- Hero ---------- */
.hero { position: relative; color: #fff; isolation: isolate; }
.hero__bg { position: absolute; inset: 0; z-index: -2; }
.hero__bg img { width: 100%; height: 100%; object-fit: cover; }
.hero::after {
  content:""; position:absolute; inset:0; z-index:-1;
  background: linear-gradient(180deg, rgba(18,18,20,.55) 0%, rgba(18,18,20,.55) 40%, rgba(18,18,20,.78) 100%);
}
.hero__inner { padding-block: clamp(90px, 16vw, 170px); max-width: 720px; }
.hero h1 { color: #fff; text-shadow: 0 2px 24px rgba(10,10,12,.55), 0 1px 4px rgba(10,10,12,.5); }
.hero__lead { color: rgba(255,255,255,.92); font-size: 1.2rem; margin-top: 22px; max-width: 560px; text-shadow: 0 1px 12px rgba(10,10,12,.6); }
.hero .eyebrow { text-shadow: 0 1px 10px rgba(10,10,12,.6); }
.hero__cta { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 36px; }
.hero__badges { display: flex; flex-wrap: wrap; gap: 26px; margin-top: 44px; }
.hero__badge { display: flex; align-items: center; gap: 10px; font-size: .95rem; color: rgba(255,255,255,.92); }
.hero__badge svg { color: var(--tan); flex: none; }

/* ---------- Trust bar ---------- */
.trust { background: var(--espresso); color: var(--cream); }
.trust__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; padding-block: 44px; text-align: center; }
.trust__num { font-family: var(--font-head); font-size: clamp(1.9rem, 4vw, 2.7rem); color: #fff; line-height: 1; }
.trust__label { font-size: .85rem; letter-spacing: .04em; color: var(--tan); margin-top: 8px; }

/* ---------- Value cards ---------- */
.values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.value {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 36px 30px; box-shadow: var(--shadow-sm); transition: transform .2s ease, box-shadow .2s ease;
}
.value:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.value__icon { width: 56px; height: 56px; border-radius: 14px; background: var(--cream-2); color: var(--oak-dark); display: grid; place-items: center; margin-bottom: 20px; }
.value h3 { margin-bottom: 10px; }
.value p { font-size: .98rem; }

/* ---------- Services ---------- */
.services { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.service {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-sm); transition: transform .2s ease, box-shadow .2s ease; display: flex; flex-direction: column;
}
.service:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.service__media { aspect-ratio: 16 / 11; overflow: hidden; }
.service__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.service:hover .service__media img { transform: scale(1.06); }
.service__body { padding: 26px 26px 28px; display: flex; flex-direction: column; flex: 1; }
.service h3 { margin-bottom: 8px; }
.service p { font-size: .96rem; flex: 1; }
.service__link { margin-top: 18px; font-weight: 600; color: var(--accent); display: inline-flex; align-items: center; gap: 8px; }
.service__link svg { transition: transform .2s ease; }
.service:hover .service__link svg { transform: translateX(4px); }

/* ---------- Process ---------- */
.process { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; counter-reset: step; }
.step { position: relative; padding-top: 8px; }
.step__num {
  font-family: var(--font-head); font-size: 2.4rem; color: var(--oak); line-height: 1;
  display: inline-block; margin-bottom: 14px;
}
.step h3 { font-size: 1.15rem; margin-bottom: 8px; }
.step p { font-size: .94rem; }

/* ---------- Gallery ---------- */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 200px; gap: 16px; }
.gallery a { border-radius: var(--radius); overflow: hidden; position: relative; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.gallery a:hover img { transform: scale(1.07); }
.gallery .tall { grid-row: span 2; }
.gallery .wide { grid-column: span 2; }

/* ---------- Testimonials ---------- */
.testimonials { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.tcard { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 30px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; }
.tcard__stars { color: #e8a838; letter-spacing: 2px; margin-bottom: 14px; }
.tcard__quote { color: var(--walnut); font-size: 1.02rem; flex: 1; }
.tcard__who { display: flex; align-items: center; gap: 12px; margin-top: 22px; }
.tcard__avatar { width: 46px; height: 46px; border-radius: 50%; background: linear-gradient(135deg, var(--tan), var(--oak)); color: #fff; display: grid; place-items: center; font-weight: 700; }
.tcard__name { font-weight: 700; color: var(--espresso); font-size: .98rem; }
.tcard__loc { font-size: .85rem; color: var(--muted); }

/* ---------- CTA band ---------- */
.ctaband { background: linear-gradient(135deg, var(--walnut), var(--espresso)); color: #fff; border-radius: var(--radius-lg); padding: clamp(40px, 6vw, 64px); text-align: center; }
.ctaband h2 { color: #fff; }
.ctaband p { color: rgba(255,255,255,.85); max-width: 540px; margin: 14px auto 28px; }
.ctaband__btns { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ---------- Contact ---------- */
.contact__grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(32px, 5vw, 64px); align-items: start; }
.contact__info h2 { margin-bottom: 16px; }
.contact__list { margin-top: 28px; display: grid; gap: 18px; }
.contact__item { display: flex; gap: 14px; align-items: flex-start; }
.contact__item .ic { width: 44px; height: 44px; border-radius: 12px; background: var(--cream-2); color: var(--oak-dark); display: grid; place-items: center; flex: none; }
.contact__item strong { display: block; color: var(--espresso); }
.contact__item span { color: var(--muted); font-size: .95rem; }
.form { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(26px, 4vw, 40px); box-shadow: var(--shadow-md); }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: .88rem; font-weight: 600; color: var(--walnut); margin-bottom: 7px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 13px 15px; border: 1.5px solid var(--line); border-radius: 11px;
  font-family: inherit; font-size: 1rem; color: var(--ink); background: var(--sand); transition: border-color .2s, box-shadow .2s;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--oak); box-shadow: 0 0 0 3px rgba(217,34,40,.18); background: #fff; }
.field textarea { resize: vertical; min-height: 110px; }
.form button { width: 100%; justify-content: center; margin-top: 6px; }
.form__note { font-size: .82rem; color: var(--muted); text-align: center; margin-top: 14px; }
.form__success { display: none; text-align: center; padding: 20px; background: #eef6f0; border: 1px solid #cfe6d8; border-radius: 12px; color: var(--green); font-weight: 600; margin-bottom: 18px; }
.form__success.show { display: block; }

/* ---------- Footer ---------- */
.footer { background: var(--espresso); color: rgba(255,255,255,.72); padding-block: 60px 30px; }
.footer__grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 36px; }
.footer h4 { color: #fff; font-family: var(--font-body); font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 18px; }
.footer a { color: rgba(255,255,255,.72); font-size: .95rem; line-height: 2; transition: color .2s; }
.footer a:hover { color: var(--tan); }
.footer__brand p { color: rgba(255,255,255,.6); font-size: .95rem; margin-top: 14px; max-width: 280px; }
.footer__bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 44px; padding-top: 24px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: .85rem; color: rgba(255,255,255,.5); }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(12px); transition: opacity .35s ease, transform .35s ease; }
.reveal.in { opacity: 1; transform: none; }

/* 3D flip-in reveal for card grids */
.values, .services, .industries, .projects { perspective: 1400px; }
.r3d { opacity: 0; transform: translateY(20px) rotateX(8deg); transform-origin: 50% 100%;
  transition: opacity .4s ease, transform .45s cubic-bezier(.2,.75,.2,1); }
.r3d.in { opacity: 1; transform: none; }

/* ---------- Floating call button (mobile) ---------- */
.fab { position: fixed; right: 18px; bottom: 18px; z-index: 60; display: none; }
.fab .btn { box-shadow: var(--shadow-lg); }

/* ============================================================
   Motion, 3D, Projects, Industries (commercial upgrade)
   ============================================================ */

/* Keyframes */
@keyframes floaty { 0%,100%{ transform: translateY(0) } 50%{ transform: translateY(-12px) } }
@keyframes gradientShift { 0%{ background-position: 0% 50% } 50%{ background-position: 100% 50% } 100%{ background-position: 0% 50% } }
@keyframes fadeUp { from{ opacity:0; transform: translateY(28px) } to{ opacity:1; transform:none } }
@keyframes shimmer { 0%{ transform: translateX(-100%) } 100%{ transform: translateX(100%) } }
@keyframes pulseRing { 0%{ box-shadow: 0 0 0 0 rgba(217,34,40,.5) } 70%{ box-shadow: 0 0 0 14px rgba(217,34,40,0) } 100%{ box-shadow: 0 0 0 0 rgba(217,34,40,0) } }

/* Hero 3D canvas */
.hero { min-height: 92vh; display: flex; align-items: center; }
#heroCanvas { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; display: block; pointer-events: none; }
.hero .container { position: relative; z-index: 2; }
.hero .scrollcue { z-index: 2; }
.hero__bg img { transform: scale(1.05); transition: transform 1.2s ease; }
.hero.ready .hero__bg img { transform: scale(1); }
.hero__inner > * { opacity: 0; animation: fadeUp .45s ease forwards; }
.hero__inner > *:nth-child(1){ animation-delay:0s } .hero__inner > *:nth-child(2){ animation-delay:.06s }
.hero__inner > *:nth-child(3){ animation-delay:.12s } .hero__inner > *:nth-child(4){ animation-delay:.18s }
.hero__inner > *:nth-child(5){ animation-delay:.24s }
.scrollcue { position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%); color: rgba(255,255,255,.8); display: grid; place-items: center; gap: 6px; font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; z-index: 1; }
.scrollcue .mouse { width: 24px; height: 38px; border: 2px solid rgba(255,255,255,.7); border-radius: 14px; position: relative; }
.scrollcue .mouse::after { content:""; position:absolute; left:50%; top:7px; width:4px; height:7px; background:#fff; border-radius:3px; transform: translateX(-50%); animation: floaty 1.4s ease-in-out infinite; }

/* Animated gradient on dark sections */
.section--gradient { background: linear-gradient(120deg, var(--espresso), var(--walnut), #2a2a2e, var(--espresso)); background-size: 300% 300%; animation: gradientShift 14s ease infinite; color: #fff; }

/* 3D tilt cards */
.tilt, .project, .industry { position: relative; transform-style: preserve-3d; transition: transform .25s cubic-bezier(.2,.7,.2,1), box-shadow .25s ease; will-change: transform; }
.tilt > * { transform: translateZ(28px); }
.tilt .service__media, .tilt .value__icon { transform: translateZ(45px); }
.project__overlay { transform: translateZ(40px); }
.industry__label { transform: translateZ(38px); }
.tilt::after, .project::after {
  content:""; position:absolute; inset:0; border-radius: inherit; pointer-events:none;
  background: radial-gradient(120% 120% at var(--mx,50%) var(--my,0%), rgba(255,255,255,.18), rgba(255,255,255,0) 45%);
  opacity:0; transition: opacity .25s ease; z-index: 3;
}
.tilt.glow::after, .project.glow::after { opacity: 1; }

/* Counter pop */
.trust__num { display: inline-block; }
.counting { background: linear-gradient(180deg,#fff,var(--tan)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

/* ---------- Industries ---------- */
.industries { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.industry {
  position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4/5; isolation: isolate;
  box-shadow: var(--shadow-sm); transition: transform .3s ease, box-shadow .3s ease;
}
.industry:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.industry img { width:100%; height:100%; object-fit: cover; transition: transform .6s ease; }
.industry:hover img { transform: scale(1.1); }
.industry::after { content:""; position:absolute; inset:0; background: linear-gradient(180deg, rgba(18,18,20,.05) 30%, rgba(18,18,20,.85)); z-index:1; }
.industry__label { position:absolute; left:16px; right:16px; bottom:16px; z-index:2; color:#fff; }
.industry__label strong { font-family: var(--font-head); font-size: 1.18rem; display:block; }
.industry__label span { font-size:.82rem; color: rgba(255,255,255,.8); }

/* ---------- Projects gallery ---------- */
.filters { display:flex; flex-wrap:wrap; gap:10px; justify-content:center; margin-bottom: 40px; }
.filter {
  padding: 10px 20px; border-radius: 999px; border: 1.5px solid var(--line); background:#fff; color: var(--walnut);
  font-weight:600; font-size:.92rem; transition: all .2s ease;
}
.filter:hover { border-color: var(--oak); color: var(--oak-dark); transform: translateY(-2px); }
.filter.active { background: var(--espresso); color:#fff; border-color: var(--espresso); }
.projects { display:grid; grid-template-columns: repeat(3,1fr); gap: 22px; }
.project {
  position:relative; border-radius: var(--radius-lg); overflow:hidden; cursor:pointer; background:#000;
  box-shadow: var(--shadow-sm); transition: transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s ease, opacity .35s ease;
  aspect-ratio: 4/3;
}
.project:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.project img { width:100%; height:100%; object-fit:cover; transition: transform .6s ease, opacity .4s ease; }
.project:hover img { transform: scale(1.08); opacity:.7; }
.project__overlay { position:absolute; inset:0; z-index:2; display:flex; flex-direction:column; justify-content:flex-end; padding: 22px; background: linear-gradient(180deg, rgba(18,18,20,0) 40%, rgba(18,18,20,.82)); }
.project__tag { align-self:flex-start; font-size:.72rem; letter-spacing:.12em; text-transform:uppercase; font-weight:700; color: var(--espresso); background: var(--tan); padding:5px 11px; border-radius:999px; margin-bottom: auto; }
.project__title { color:#fff; font-family: var(--font-head); font-size:1.25rem; margin-top: 12px; }
.project__meta { color: rgba(255,255,255,.82); font-size:.86rem; margin-top:4px; display:flex; align-items:center; gap:8px; }
.project__view { color: var(--tan); font-weight:600; font-size:.86rem; margin-top:12px; display:inline-flex; gap:6px; align-items:center; opacity:0; transform: translateY(8px); transition: all .3s ease; }
.project:hover .project__view { opacity:1; transform:none; }
.project.hide { display:none; }
.project.fade { opacity:0; transform: scale(.96); }

/* Project modal */
.modal { position: fixed; inset:0; z-index:100; display:none; align-items:center; justify-content:center; padding: 24px; }
.modal.open { display:flex; }
.modal__backdrop { position:absolute; inset:0; background: rgba(10,10,12,.7); backdrop-filter: blur(6px); animation: fadeUp .3s ease; }
.modal__panel {
  position:relative; z-index:1; background:#fff; border-radius: var(--radius-lg); max-width: 880px; width:100%;
  max-height: 90vh; overflow:auto; box-shadow: var(--shadow-lg); animation: fadeUp .35s ease;
}
.modal__img { width:100%; aspect-ratio: 16/9; object-fit: cover; display:block; }
.modal__body { padding: clamp(24px,4vw,40px); }
.modal__tag { font-size:.72rem; letter-spacing:.12em; text-transform:uppercase; font-weight:700; color: var(--oak-dark); }
.modal__body h3 { font-size: clamp(1.5rem,3vw,2rem); margin:8px 0 4px; }
.modal__facts { display:grid; grid-template-columns: repeat(3,1fr); gap:16px; margin: 20px 0; padding: 18px 0; border-block: 1px solid var(--line); }
.modal__fact span { display:block; font-size:.78rem; text-transform:uppercase; letter-spacing:.06em; color: var(--muted); }
.modal__fact strong { color: var(--espresso); font-size:1.02rem; }
.modal__close { position:absolute; top:14px; right:14px; z-index:2; width:42px; height:42px; border-radius:50%; border:0; background: rgba(255,255,255,.9); color: var(--espresso); display:grid; place-items:center; box-shadow: var(--shadow-sm); transition: transform .2s; }
.modal__close:hover { transform: rotate(90deg) scale(1.05); }

@media (max-width: 980px){
  .industries { grid-template-columns: repeat(2,1fr); }
  .projects { grid-template-columns: repeat(2,1fr); }
  .modal__facts { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px){
  .industries, .projects { grid-template-columns: 1fr; }
  .hero { min-height: 88vh; }
}

/* ---------- Service detail page ---------- */
.subhero { position: relative; color: #fff; isolation: isolate; }
.subhero__bg { position: absolute; inset: 0; z-index: -2; }
.subhero__bg img { width: 100%; height: 100%; object-fit: cover; }
.subhero::after { content:""; position:absolute; inset:0; z-index:-1; background: linear-gradient(180deg, rgba(18,18,20,.55), rgba(18,18,20,.78)); }
.subhero__inner { padding-block: clamp(70px, 12vw, 130px); max-width: 700px; }
.subhero h1 { color:#fff; font-size: clamp(2rem, 5vw, 3.4rem); }
.subhero p { color: rgba(255,255,255,.9); font-size: 1.12rem; margin-top: 16px; max-width: 560px; }
.crumbs { font-size: .88rem; color: rgba(255,255,255,.8); margin-bottom: 18px; }
.crumbs a { color: var(--tan); }

.detail { display: grid; grid-template-columns: 1.5fr 1fr; gap: clamp(32px, 5vw, 64px); align-items: start; }
.detail__body h2 { margin: 0 0 16px; }
.detail__body h3 { margin: 30px 0 10px; }
.detail__body p { margin-bottom: 16px; font-size: 1.04rem; }
.checklist { display: grid; gap: 12px; margin: 8px 0 8px; }
.checklist li { display: flex; gap: 12px; align-items: flex-start; color: var(--walnut); }
.checklist svg { color: var(--green); flex: none; margin-top: 3px; }
.aside { position: sticky; top: 100px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 30px; box-shadow: var(--shadow-md); }
.aside h3 { margin-bottom: 8px; }
.aside p { font-size: .96rem; margin-bottom: 18px; }
.aside .btn { width: 100%; justify-content: center; margin-bottom: 10px; }
.aside__phone { text-align: center; font-weight: 700; color: var(--espresso); display: block; margin-top: 6px; }
.otherservices { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.otherservices a { font-size: .9rem; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; color: var(--walnut); transition: all .2s; }
.otherservices a:hover { border-color: var(--oak); color: var(--oak-dark); }

@media (max-width: 1000px) {
  .detail { grid-template-columns: 1fr; }
  .aside { position: static; }
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 980px) {
  .values, .services, .testimonials { grid-template-columns: repeat(2, 1fr); }
  .process { grid-template-columns: repeat(2, 1fr); }
  .trust__grid { grid-template-columns: repeat(2, 1fr); gap: 32px; }
  .contact__grid { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 1140px) {
  .nav__links, .nav__phone { display: none; }
  .nav__toggle { display: inline-flex; }
  .nav.is-open .nav__links {
    display: flex; position: absolute; top: 76px; left: 0; right: 0; flex-direction: column; align-items: flex-start;
    background: var(--cream); padding: 20px var(--gutter); gap: 18px; border-bottom: 1px solid var(--line); box-shadow: var(--shadow-md);
  }
  .nav.is-open .nav__links a::after { display: none; }
  .fab { display: block; }
}
@media (max-width: 600px) {
  .nav__cta .btn--primary { display: none; }
}
@media (max-width: 720px) {
  .values, .services, .testimonials, .footer__grid { grid-template-columns: 1fr; }
  .form__row { grid-template-columns: 1fr; }
  body { font-size: 16px; }
}
@media (max-width: 460px) {
  .gallery { grid-template-columns: 1fr; }
  .gallery .wide { grid-column: span 1; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ============================================================
   Multi-page site additions (Oct 2026)
   ============================================================ */
.skip { position: absolute; left: -9999px; top: 8px; z-index: 200; background: var(--espresso); color: #fff; padding: 10px 16px; border-radius: 8px; }
.skip:focus { left: 12px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.eyebrow--light { color: var(--tan); }
.on-dark { color: #fff; }
.nav__links a[aria-current="page"] { color: var(--espresso); }
.nav__links a[aria-current="page"]::after { width: 100%; }
.nav__links { gap: 24px; }
@media (max-width: 1320px) { .nav__links { gap: 20px; } .nav__links a { font-size: .94rem; } .nav__phone span { display: none; } }

/* Systems strip under hero */
.systems { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 28px; padding-block: 26px; }
.systems a { color: var(--tan); font-weight: 600; letter-spacing: .02em; font-size: .98rem; }
.systems a:hover { color: #fff; }

/* Card links: whole card clickable */
.service { position: relative; }
.service h2, .service h3 { font-size: clamp(1.2rem, 2vw, 1.45rem); margin-bottom: 8px; }
.stretched::before { content: ""; position: absolute; inset: 0; z-index: 4; }
.service__link { pointer-events: none; }
a.industry { display: block; color: #fff; }
.industry--cta { background: linear-gradient(135deg, var(--walnut), var(--espresso)); }
.industry--cta::after { display: none; }

/* Prose (long-form pages) */
.prose { min-width: 0; }
.prose h2 { margin: 40px 0 14px; font-size: clamp(1.5rem, 3vw, 2rem); }
.prose > h2:first-child { margin-top: 0; }
.prose h3 { margin: 26px 0 10px; }
.prose p { margin-bottom: 16px; font-size: 1.04rem; max-width: 70ch; }
.prose a { color: var(--accent-dark); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.prose a:hover { color: var(--accent); }
.prose .checklist { margin: 8px 0 20px; }
.prose .bullets { list-style: disc; padding-left: 1.3rem; margin: 6px 0 20px; display: grid; gap: 8px; color: var(--walnut); max-width: 70ch; }
.table-wrap { overflow-x: auto; margin: 10px 0 24px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.spec { width: 100%; border-collapse: collapse; font-size: .95rem; min-width: 520px; }
.spec th { text-align: left; background: var(--cream); color: var(--espresso); font-weight: 700; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.spec td { padding: 12px 14px; border-bottom: 1px solid var(--line); color: var(--walnut); vertical-align: top; }
.spec tr:last-child td { border-bottom: 0; }
.callout { background: var(--cream); border-left: 4px solid var(--oak); border-radius: 0 var(--radius) var(--radius) 0; padding: 18px 22px; margin: 18px 0 24px; }
.callout p { margin: 0; color: var(--walnut); }
.faqs { display: grid; gap: 10px; margin-top: 10px; }
.faq { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.faq summary { cursor: pointer; padding: 16px 48px 16px 20px; font-weight: 600; color: var(--espresso); list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 20px; top: 50%; transform: translateY(-50%); font-size: 1.4rem; color: var(--oak-dark); transition: transform .2s; }
.faq[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq p { padding: 0 20px 18px; margin: 0; }

/* Aside */
.aside__h { font-size: clamp(1.2rem, 2vw, 1.45rem); margin-bottom: 8px; }
.aside__list { display: grid; gap: 8px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); font-size: .92rem; color: var(--walnut); }
.aside__list li { display: flex; gap: 8px; align-items: flex-start; }
.aside__list svg { color: var(--green); flex: none; margin-top: 2px; width: 18px; height: 18px; }

/* Related links */
.related { padding-block: clamp(48px, 6vw, 72px); }
.related__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.related__h { font-family: var(--font-body); font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--oak-dark); margin-bottom: 12px; }
.otherservices a { background: #fff; }
.otherservices--center { justify-content: center; }
@media (max-width: 880px) { .related__grid { grid-template-columns: 1fr; gap: 24px; } }

/* Areas hub */
.areas { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.areacard { display: flex; flex-direction: column; gap: 8px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 26px; box-shadow: var(--shadow-sm); transition: transform .2s, box-shadow .2s; }
.areacard:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.areacard__city { font-family: var(--font-head); font-size: 1.4rem; color: var(--espresso); }
.areacard__text { color: var(--muted); font-size: .96rem; flex: 1; }
.areas__note { text-align: center; margin-top: 32px; }
.areas__note a { color: var(--accent-dark); font-weight: 600; }
@media (max-width: 980px) { .areas { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .areas { grid-template-columns: 1fr; } }

/* Projects */
a.project { display: block; color: #fff; }
.empty-state { max-width: 680px; margin-inline: auto; text-align: center; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(28px, 5vw, 48px); }
.empty-state h2 { margin-bottom: 14px; font-size: clamp(1.5rem, 3vw, 2rem); }
.empty-state p { margin-bottom: 24px; }
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; padding: 22px 0; margin-bottom: 40px; border-block: 1px solid var(--line); }
.facts span { display: block; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.facts strong { color: var(--espresso); }
@media (max-width: 720px) { .facts { grid-template-columns: 1fr 1fr; } }
.pquote { margin: 24px 0; padding: 22px 26px; background: var(--cream); border-radius: var(--radius); }
.pquote p { font-family: var(--font-head); font-size: 1.25rem; color: var(--espresso); margin-bottom: 8px; }
.pquote cite { font-style: normal; color: var(--muted); font-size: .92rem; }
.pgallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 24px 0; }
.pgallery img { border-radius: var(--radius); width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.sub { font-size: .92rem; }

/* Contact */
.contact__item a { color: var(--accent-dark); font-weight: 600; }
.contact__sub { margin: 30px 0 8px; }
.contact__info > p a { color: var(--accent-dark); font-weight: 600; }
.form__error { color: var(--accent-dark); font-weight: 600; margin-bottom: 12px; font-size: .95rem; }
.form__note a { color: var(--accent); font-weight: 600; }
.reviews__lead { max-width: 560px; margin: 12px auto 24px; }
.reviews__more { margin-top: 32px; }
.notfound { padding-block: clamp(80px, 12vw, 140px); }
.notfound h1 { margin-bottom: 14px; }
.notfound p { margin-bottom: 24px; }

/* Footer (5 columns) */
.footer__grid { grid-template-columns: 1.5fr 1fr 1fr 1fr 1fr; }
.footer ul { display: grid; gap: 2px; }
.footer__h { color: #fff; font-family: var(--font-body); font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 14px; }
.footer .brand { color: #fff; }
.footer .brand small { color: rgba(255,255,255,.55); }
.footer__contact { line-height: 2; }
.footer__contact span { color: rgba(255,255,255,.6); font-size: .9rem; }
@media (max-width: 1100px) { .footer__grid { grid-template-columns: 1fr 1fr 1fr; } .footer__brand { grid-column: 1 / -1; } }
@media (max-width: 600px) { .footer__grid { grid-template-columns: 1fr 1fr; } }
.hero, .subhero { overflow: hidden; }
.resband { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 18px 32px; align-items: center; justify-content: space-between; background: #fff; border: 1px dashed var(--oak); border-radius: var(--radius-lg); padding: 24px 28px; }
.resband > div { flex: 1 1 320px; min-width: 0; }
.resband .eyebrow { margin-bottom: 6px; }
.resband h3 { margin-bottom: 6px; }

/* ---------- Brand header (dark bar so the logo reads correctly) ---------- */
.header, .header.is-stuck { background: rgba(24,24,27,.96); border-color: rgba(255,255,255,.06); }
.brand img { height: 48px; width: auto; display: block; }
.nav__links a { color: rgba(255,255,255,.82); }
.nav__links a:hover, .nav__links a[aria-current="page"] { color: #fff; }
.nav__links a::after { background: var(--accent); }
.nav__phone, .nav__toggle { color: #fff; }
.nav__phone svg { color: var(--tan); }
@media (max-width: 1140px) { .nav.is-open .nav__links { background: #1f1f23; border-color: rgba(255,255,255,.08); } }
.footer .brand img { height: 56px; }
.eyebrow { color: var(--accent-dark); }
.eyebrow--light, .hero .eyebrow { color: var(--tan); }
.step__num { color: var(--accent); }
#heroCanvas { opacity: .7; }
@media (min-width: 1101px) { .services { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; } .service__body { padding: 22px; } }
