/* ============================================================
   VIKING GRADING SOLUTIONS LLC — style.css
   Design system: "Forged, not flashy."
   Palette: Iron / Charcoal / Bone / Steel / Ember
   Type:    Big Shoulders Display (display) + Archivo (body)
   Motifs:  topographic contours, cut/fill hatch, notched blade corners
   ============================================================ */

/* ---------- 1. Tokens ---------- */
:root {
  /* color */
  --iron:    #16181D;   /* page dark */
  --iron-2:  #101216;   /* deepest — footer, hero overlay */
  --char:    #23262E;   /* surface */
  --char-2:  #2B2F39;   /* raised surface */
  --bone:    #EDE6DA;   /* light text / paper sections */
  --bone-2:  #E0D6C4;   /* paper shade */
  --steel:   #7A8B99;   /* muted secondary (AA on iron only) */
  --steel-lt:#8C9DAB;   /* lighter steel — AA (4.5:1+) on charcoal surfaces */
  --steel-2: #5C6B77;
  --ember:   #E8871E;   /* accent — CTAs, highlights */
  --ember-2: #C96F12;   /* accent hover */
  --line:    rgba(237, 230, 218, 0.14);
  --line-dk: rgba(22, 24, 29, 0.16);

  /* type */
  --f-disp: "Big Shoulders Display", "Arial Narrow", Impact, sans-serif;
  --f-body: "Archivo", "Segoe UI", Arial, sans-serif;

  /* fluid scale — rem+vw slope form (pure-vw overshot before capping);
     caps sit ~8% under visual target because desktop >=1200px runs zoom:1.1 */
  --fs-hero: clamp(3.25rem, 2.4rem + 5.4vw, 6.9rem);
  --fs-h1:   clamp(2.5rem, 1.9rem + 3vw, 4.25rem);
  --fs-h2:   clamp(1.9rem, 1.5rem + 1.9vw, 3rem);
  --fs-h3:   clamp(1.15rem, 1.05rem + 0.5vw, 1.4rem);
  --fs-body: clamp(1rem, 0.95rem + 0.28vw, 1.08rem);
  --fs-lede: clamp(1.05rem, 0.95rem + 0.55vw, 1.22rem);
  --fs-sm:   0.875rem;

  /* rhythm */
  --sec-pad: clamp(4.5rem, 9vw, 8rem);
  --gutter:  clamp(1.25rem, 4vw, 3rem);
  --maxw:    1200px;
  --maxw-wide: 1400px;

  /* misc */
  --notch: 14px;                       /* blade-cut corner size */
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- 2. Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Anchor jumps must clear the fixed header (header ≈ 92px mobile / 113px desktop). */
[id] { scroll-margin-top: 5.75rem; }
@media (min-width: 1200px) { [id] { scroll-margin-top: 8.5rem; } }

body {
  margin: 0;
  font-family: var(--f-body);
  font-size: var(--fs-body);
  line-height: 1.65;
  color: var(--bone);
  background: var(--iron);
  overflow-x: hidden;
}

/* Desktop renders 10% larger overall — bakes in the 110% browser-zoom look Guy prefers.
   CSS zoom scales text, images, spacing and layout together (like browser zoom) and
   reflows rather than clipping. Gated to wide desktops so the large nav/logo keep room;
   phones/tablets keep their own already-tuned sizing. */
@media (min-width: 1200px) {
  html { zoom: 1.1; }
}

img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button { font: inherit; cursor: pointer; }

h1, h2, h3, h4 {
  font-family: var(--f-disp);
  font-weight: 800;
  line-height: 1.02;
  margin: 0 0 0.6em;
  text-transform: uppercase;
  letter-spacing: 0.015em;
}
h1, h2 { text-wrap: balance; }

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

:focus-visible {
  outline: 2px solid var(--ember);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--ember); color: var(--iron-2);
  padding: 0.7rem 1.2rem; font-weight: 700;
}
.skip-link:focus { left: 0; }

/* ---------- 3. Layout primitives ---------- */
.wrap      { width: min(100% - 2 * var(--gutter), var(--maxw)); margin-inline: auto; }
.wrap-wide { width: min(100% - 2 * var(--gutter), var(--maxw-wide)); margin-inline: auto; }

.sec { padding-block: var(--sec-pad); position: relative; }

/* light "paper" band — alternates rhythm against iron */
.sec-paper {
  background:
    /* faint topo lines etched into the paper */
    repeating-radial-gradient(ellipse 120% 90% at 20% -10%,
      transparent 0 46px, rgba(22, 24, 29, 0.05) 46px 47px),
    repeating-radial-gradient(ellipse 100% 80% at 90% 110%,
      transparent 0 60px, rgba(22, 24, 29, 0.04) 60px 61px),
    var(--bone);
  color: var(--iron);
}
.sec-paper h2, .sec-paper h3 { color: var(--iron); }

.sec-char { background: var(--char); }

/* eyebrow kicker above headings */
.eyebrow {
  display: inline-flex; align-items: center; gap: 0.65rem;
  font-family: var(--f-body);
  font-size: 0.8rem; font-weight: 700;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--ember);
  margin-bottom: 1.1rem;
}
.eyebrow::before {
  content: ""; width: 26px; height: 2px; background: var(--ember);
}
.sec-paper .eyebrow { color: #9A5410; } /* darker burnt-ember: passes AA on bone */

.lede { font-size: var(--fs-lede); color: var(--steel); max-width: 46em; text-wrap: pretty; }
.sec-paper .lede { color: #4C5660; }
.sec-char .lede { color: var(--steel-lt); } /* steel fails AA on charcoal */
/* --steel-2 lands ~4.4:1 on bone (just shy of AA); use a darker ink for
   muted text specifically on paper/bone surfaces. */
.sec-paper .std p, .std p,
.sec-paper .trio figcaption p,
.review cite small { color: #4C5660; }

/* hazard divider — cut/fill stripe, used sparingly */
.hazard {
  height: 8px;
  background: repeating-linear-gradient(-45deg,
    var(--ember) 0 14px, var(--iron-2) 14px 28px);
}

/* surveyor divider family — quieter siblings of the hazard stripe */
.divider-laser {
  position: relative; height: 1px; margin: 0;
  background: linear-gradient(90deg, transparent, var(--line) 12%, var(--line) 88%, transparent);
}
.divider-laser::after { /* laser-level crosshair target */
  content: ""; position: absolute; left: 50%; top: 50%;
  width: 12px; height: 12px; transform: translate(-50%, -50%) rotate(45deg);
  border: 2px solid var(--ember); background: var(--iron);
}

/* proof band — count-up stats in the stroked-numeral language */
.proof-band {
  background: var(--iron-2); border-block: 1px solid var(--line);
  padding-block: 2.4rem;
}
.proof-in { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; text-align: center; }
.proof .num {
  font-family: var(--f-disp); font-weight: 800;
  font-size: clamp(2.6rem, 2rem + 2vw, 3.6rem);
  color: transparent; -webkit-text-stroke: 1.5px var(--ember);
  line-height: 1; font-variant-numeric: tabular-nums;
}
.proof .num [data-count] { display: inline-block; min-width: 1.1ch; }
.proof small {
  display: block; margin-top: 0.55rem; font-weight: 700; font-size: 0.75rem;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--steel);
}
@media (max-width: 700px) { .proof-in { grid-template-columns: 1fr 1fr; gap: 1.8rem 1rem; } }

/* ---------- 4. Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem;
  font-family: var(--f-disp); font-weight: 700; font-size: 1.05rem;
  letter-spacing: 0.09em; text-transform: uppercase;
  padding: 0.95rem 1.9rem;
  text-decoration: none; border: 0;
  /* blade-notched corner (top-right) */
  clip-path: polygon(0 0, calc(100% - var(--notch)) 0, 100% var(--notch), 100% 100%, 0 100%);
  transition: transform 0.18s var(--ease), background 0.18s, color 0.18s, box-shadow 0.18s;
}
.btn-primary { background: var(--ember); color: var(--iron-2); }
.btn-primary:hover { background: var(--ember-2); transform: translateY(-2px); }
.btn-ghost {
  background: transparent; color: var(--bone);
  box-shadow: inset 0 0 0 2px var(--line);
}
.btn-ghost:hover { box-shadow: inset 0 0 0 2px var(--ember); color: var(--ember); transform: translateY(-2px); }
.sec-paper .btn-ghost { color: var(--iron); box-shadow: inset 0 0 0 2px var(--line-dk); }
.sec-paper .btn-ghost:hover { color: var(--ember-2); box-shadow: inset 0 0 0 2px var(--ember-2); }
.btn-lg { font-size: 1.2rem; padding: 1.15rem 2.4rem; }

/* ---------- 5. Header / nav ---------- */
.site-head {
  position: fixed; inset: 0 0 auto 0; z-index: 60;
  transition: background 0.25s, box-shadow 0.25s;
}
.site-head.is-scrolled {
  background: rgba(16, 18, 22, 0.92);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 var(--line);
}
.head-in {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; padding-block: 0.9rem;
}
.brand {
  display: flex; align-items: center; gap: 0.75rem;
  text-decoration: none; color: var(--bone);
}
/* Jon's real logo lockup (bone-on-transparent). Sized by height; the wide
   2.56:1 aspect sets the width. Shrinks on scroll (see .is-scrolled below). */
.brand-logo { height: 84px; width: auto; display: block; transition: height 0.25s var(--ease); }
.foot-logo { height: 60px; }
/* taper the logo down on smaller screens so the header stays sane */
@media (max-width: 1199px) { .brand-logo { height: 70px; } }
@media (max-width: 600px)  { .brand-logo { height: 50px; } }
.site-head.is-scrolled .brand-logo { height: 58px; }

.nav { display: flex; align-items: center; gap: 1.5rem; }
.nav a {
  /* Fluid: never wraps at laptop widths; council-ruled ~1.2-1.35rem band */
  font-weight: 600; font-size: clamp(1.15rem, 0.55rem + 0.9vw, 1.35rem);
  letter-spacing: 0.04em; white-space: nowrap;
  text-decoration: none; color: var(--bone); opacity: 0.85;
  padding-block: 0.4rem; position: relative;
}
.nav a:hover, .nav a[aria-current="page"] { opacity: 1; color: var(--ember); }
.nav a[aria-current="page"]::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0;
  height: 2px; background: var(--ember);
}
.nav .btn { margin-left: 0.5rem; font-size: 1.05rem; padding: 0.65rem 1.3rem; }
/* The generic .nav a color rules above out-rank .btn-primary's own color
   (higher specificity), which would leave the header CTA text bone-on-ember
   or, with aria-current, invisible ember-on-ember. Restore dark button text. */
.nav a.btn-primary,
.nav a.btn-primary:hover,
.nav a.btn-primary[aria-current="page"] { color: var(--iron-2); opacity: 1; }
.nav a.btn-primary[aria-current="page"]::after { content: none; }

.nav-toggle {
  display: none; background: none; border: 0; padding: 0.7rem;
  color: var(--bone); position: relative; z-index: 61;
}
.nav-toggle .bar {
  display: block; width: 26px; height: 2px; background: currentColor;
  margin: 6px 0; transition: transform 0.3s var(--ease), opacity 0.2s;
}
/* hamburger morphs to an X while the overlay is open */
.nav-toggle[aria-expanded="true"] .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

@media (max-width: 1199px) {
  .nav-toggle { display: block; }
  .nav {
    position: fixed; inset: 0; z-index: 55;
    flex-direction: column; justify-content: center; gap: 2.2rem;
    background: rgba(16, 18, 22, 0.97);
    transform: translateY(-102%);
    /* visibility:hidden pulls the off-screen links out of the tab order and
       the a11y tree; delayed so it only flips after the slide-out finishes. */
    visibility: hidden;
    transition: transform 0.35s var(--ease), visibility 0s linear 0.35s;
  }
  .nav.is-open { transform: translateY(0); visibility: visible; transition-delay: 0s; }
  .nav a { font-family: var(--f-disp); font-size: 1.9rem; text-transform: uppercase; }
}

/* ---------- 6. Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex; align-items: center;
  padding-block: clamp(11rem, 18vh, 13rem) clamp(4rem, 10vh, 6rem); /* clears the taller header */
  background:
    radial-gradient(120% 90% at 70% 10%, rgba(232, 135, 30, 0.07), transparent 55%),
    linear-gradient(180deg, var(--iron-2), var(--iron));
  overflow: hidden;
}
/* real golden-hour job photo behind the animated contour lines */
.hero-photo {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 90% 40%; /* right: keep the scoop in frame; 40% vertical: drop the flag out below the logo */
  z-index: 0; pointer-events: none;
}
/* Hero service emblems (crucifix · U.S. Army · NC flag) — MOCKUP ONLY.
   Activated by adding class "emblem-mockup" to <body>; the live hero is untouched.
   Excavator is scaled down/left so a dark vertical bar opens on the right, and the
   three emblems sit raised in the top-right, clear of the arm and bucket. */
.hero-badges { display: none; }
@media (min-width: 900px) {
  body.emblem-mockup .hero-photo {
    width: 82%; height: 90%; inset: 5% auto auto 0; object-position: 50% 42%;
  }
  body.emblem-mockup .hero::before {
    content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none;
    background:
      linear-gradient(270deg, rgba(9,10,13,0.96) 0%, rgba(9,10,13,0.7) 13%, transparent 20%),
      linear-gradient(180deg, rgba(16,18,22,0.9) 0%, transparent 12%);
  }
  /* emblems centered — vertically and horizontally — inside the black bar on the right */
  /* emblems: 1.5x smaller, top-aligned, starting at the bottom of the header, centered in the bar */
  body.emblem-mockup .hero-badges {
    display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
    position: absolute; top: clamp(7.5rem, 6rem + 2vw, 9rem); bottom: auto; right: 0; width: 18%;
    /* below the header band at every width — the old 3.05rem collided with
       the "Get an Estimate" button at ~1280px viewports */
    z-index: 59; gap: clamp(1rem, 1.7vh, 1.9rem); pointer-events: none;
  }
  body.emblem-mockup .hero-badges .hb { width: clamp(120px, 8.7vw, 160px); height: auto; display: block;
    filter: drop-shadow(0 5px 13px rgba(0,0,0,0.7)); }
  body.emblem-mockup .hero-badges .hb-cross { width: clamp(94px, 6.7vw, 122px);
    filter: drop-shadow(0 0 20px rgba(150,80,220,0.8)) drop-shadow(0 4px 10px rgba(0,0,0,0.5)); }
  body.emblem-mockup .hero-badges .hb-flag { border-radius: 4px; outline: 1px solid rgba(255,255,255,0.18); outline-offset: -1px; }
}
#topo-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  z-index: 1; pointer-events: none;
}
.hero::after { /* settle the text zone — darker now that a photo sits under it */
  content: ""; position: absolute; inset: 0; z-index: 2;
  background:
    /* top scrim: keeps the transparent header's nav legible over bright sky */
    linear-gradient(180deg, rgba(16,18,22,0.55) 0%, transparent 17%),
    linear-gradient(90deg, rgba(16,18,22,0.92) 0%, rgba(16,18,22,0.62) 42%, rgba(16,18,22,0.20) 72%, transparent 100%),
    linear-gradient(0deg, rgba(16,18,22,0.85) 0%, transparent 34%);
  pointer-events: none;
}
.hero-in { position: relative; z-index: 3; }

.hero h1 {
  font-size: var(--fs-hero); font-weight: 800;
  letter-spacing: 0.01em; margin-bottom: 0.35em;
}
.hero h1 .ember { color: var(--ember); }
/* one-time "grade wipe": an ember light sweeps the word once on load,
   then settles to the flat fill. Static ember if unsupported/reduced-motion. */
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  @media (prefers-reduced-motion: no-preference) {
    .hero h1 .ember {
      background: linear-gradient(100deg,
        var(--ember) 0%, var(--ember) 38%, #FFC069 50%, var(--ember) 62%, var(--ember) 100%);
      background-size: 250% 100%;
      -webkit-background-clip: text; background-clip: text;
      -webkit-text-fill-color: transparent; color: transparent;
      animation: gradeWipe 1.1s var(--ease) 0.35s 1 both;
    }
  }
}
@keyframes gradeWipe {
  from { background-position: 115% 0; }
  to   { background-position: 0% 0; }
}
.hero .sub {
  max-width: 34em; font-size: clamp(1.05rem, 1.8vw, 1.3rem);
  color: #C8BFAF; margin-bottom: 2rem;
}
.hero-ctas { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 3.2rem; }

.hero-meta {
  display: flex; flex-wrap: wrap; gap: 0.6rem 2rem;
  font-size: 0.85rem; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--steel);
}
.hero-meta span { display: inline-flex; align-items: center; gap: 0.5rem; }
.hero-meta svg { width: 15px; height: 15px; color: var(--ember); }

.scroll-hint {
  position: absolute; bottom: 1.6rem; left: 50%; transform: translateX(-50%);
  z-index: 2; color: var(--steel); font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.3em; text-transform: uppercase; text-decoration: none;
  display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
}
.scroll-hint::after {
  content: ""; width: 2px; height: 34px;
  background: linear-gradient(var(--ember), transparent);
  animation: drip 2.2s var(--ease) infinite;
}
@keyframes drip { 0% { transform: scaleY(0); transform-origin: top; }
  55% { transform: scaleY(1); transform-origin: top; }
  100% { transform: scaleY(1); opacity: 0; } }

/* ---------- 7. Trust bar ---------- */
.trust {
  background: var(--iron-2); border-block: 1px solid var(--line);
  padding-block: 1.4rem;
}
.trust-in {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem;
}
.trust-item {
  display: flex; align-items: center; gap: 0.8rem;
  font-size: 0.86rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
}
.trust-item svg { width: 26px; height: 26px; color: var(--ember); flex: none; }
@media (max-width: 860px) { .trust-in { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .trust-in { grid-template-columns: 1fr; } }

/* ---------- 8. Services — simple list (Jon's call 2026-07-16: names, no jargon).
   Notched iron tiles, ember icons, each one a straight shot to the estimate form. */
.svc-list {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem;
  margin-top: 3rem;
}
.svc-item {
  display: flex; align-items: center; gap: 1rem;
  background: var(--char); border: 1px solid var(--line);
  clip-path: polygon(0 0, calc(100% - var(--notch)) 0, 100% var(--notch), 100% 100%, 0 100%);
  padding: 1.1rem 1.3rem; text-decoration: none; color: var(--bone);
  font-family: var(--f-disp); font-weight: 700;
  font-size: clamp(1.1rem, 1rem + 0.4vw, 1.3rem);
  letter-spacing: 0.05em; text-transform: uppercase; line-height: 1.1;
  transition: transform 0.2s var(--ease), border-color 0.2s, background 0.2s;
}
.svc-item svg { width: 30px; height: 30px; color: var(--ember); flex: none; }
.svc-item:hover, .svc-item:focus-visible {
  transform: translateY(-3px);
  border-color: rgba(232, 135, 30, 0.55); background: var(--char-2);
}
@media (max-width: 900px)  { .svc-list { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px)  { .svc-list { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .svc-item { transition: none; } }

/* ---------- 9. Viking Standard (promises) ---------- */
.std-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.4rem; margin-top: 3rem; }
@media (max-width: 1000px) { .std-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px)  { .std-grid { grid-template-columns: 1fr; } }
.std {
  border-left: 3px solid var(--ember); padding: 0.4rem 0 0.4rem 1.4rem;
}
.std .num {
  font-family: var(--f-disp); font-weight: 800; font-size: 2.6rem;
  color: transparent; -webkit-text-stroke: 1.5px var(--ember);
  line-height: 1; display: block; margin-bottom: 0.6rem;
  font-variant-numeric: tabular-nums;
}
.std h3 { font-size: 1.25rem; }
.std p { font-size: 0.95rem; } /* color comes from the #4C5660 paper-ink rule up top (AA) */

/* ---------- 10. Work / gallery ---------- */
.work-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 240px;
  gap: 1.1rem; margin-top: 3rem;
}
.work-grid .work-card:nth-child(1) { grid-row: span 2; }
.work-grid .work-card:nth-child(4) { grid-column: span 2; }
@media (max-width: 1000px) {
  .work-grid { grid-template-columns: 1fr 1fr; }
  .work-grid .work-card:nth-child(4) { grid-column: span 1; }
}
@media (max-width: 600px) { .work-grid { grid-template-columns: 1fr; grid-auto-rows: 260px; } }

.work-card {
  position: relative; overflow: hidden; display: block; text-decoration: none;
  background: var(--char); border: 1px solid var(--line);
  clip-path: polygon(0 0, calc(100% - var(--notch)) 0, 100% var(--notch), 100% 100%, 0 100%);
}
.work-card img, .work-card .ph {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; transition: transform 0.5s var(--ease);
}
.work-card:hover img, .work-card:hover .ph { transform: scale(1.045); }
/* Duotone unification: mismatched phone photos read art-directed by mapping
   them into iron/ember at rest; hover/focus reveals the real ground.
   Blend layers animate OPACITY only (compositor-safe, no filter deopt). */
.work-card::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(135deg, rgba(22, 24, 29, 0.9), rgba(232, 135, 30, 0.55));
  mix-blend-mode: color; opacity: 0.7;
  transition: opacity 0.45s var(--ease);
}
.work-card::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: rgba(22, 24, 29, 0.16); mix-blend-mode: multiply;
  transition: opacity 0.45s var(--ease);
}
.work-card:hover::before, .work-card:focus-within::before,
.work-card:hover::after,  .work-card:focus-within::after { opacity: 0; }
@media (prefers-reduced-motion: reduce) {
  .work-card::before, .work-card::after, .work-card img { transition: none; }
}
.work-card figcaption {
  position: absolute; inset: auto 0 0 0; z-index: 2;
  padding: 2.2rem 1.2rem 1rem;
  background: linear-gradient(transparent, rgba(16, 18, 22, 0.92));
  font-family: var(--f-disp); font-weight: 700; font-size: 1.05rem;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--bone);
}
.work-card figcaption small {
  display: block; font-family: var(--f-body); font-weight: 600;
  font-size: 0.72rem; letter-spacing: 0.18em; color: var(--ember);
}

/* gallery page — cascading masonry columns */
.cascade { columns: 3 320px; column-gap: 1.1rem; margin-top: 2.6rem; }
.cascade .work-card {
  break-inside: avoid; margin-bottom: 1.1rem; position: relative;
  height: auto;
}
.cascade .work-card .frame { position: relative; width: 100%; }
/* caption-less gallery: each frame is a real <button> that opens the lightbox */
.cascade .work-card button.frame {
  display: block; border: 0; padding: 0; background: none;
  cursor: zoom-in; line-height: 0;
}
.cascade .work-card img, .cascade .work-card .ph {
  position: relative; inset: auto; height: auto;
}

/* ---------- lightbox (gallery) ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 90;
  display: grid; place-items: center; padding: 2.5rem 1rem;
  background: rgba(16, 18, 22, 0.94);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  cursor: zoom-out;
}
.lightbox[hidden] { display: none; }
.lb-frame { position: relative; margin: 0; line-height: 0; }
.lb-frame img {
  max-width: min(92vw, 1200px); max-height: 86vh; width: auto; height: auto;
  border: 1px solid var(--line);
  clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 0 100%);
}
.lb-close {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  width: 44px; height: 44px; border: 0; cursor: pointer;
  background: var(--ember); color: var(--iron-2);
  font-family: var(--f-disp); font-weight: 800; font-size: 1.5rem; line-height: 1;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%);
}
.lb-close:hover { background: var(--ember-2); }
@media (prefers-reduced-motion: no-preference) {
  .lightbox { animation: lbIn 0.22s var(--ease); }
  @keyframes lbIn { from { opacity: 0; } to { opacity: 1; } }
  .lb-frame { animation: lbZoom 0.22s var(--ease); }
  @keyframes lbZoom { from { transform: scale(0.97); } to { transform: none; } }
}

/* filter buttons */
.filters { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 2rem; }
.filters button {
  background: transparent; border: 1px solid var(--line-dk); color: var(--iron);
  font-weight: 700; font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase;
  padding: 0.55rem 1.1rem; transition: 0.18s;
}
.page-hero .filters button { border-color: var(--line); color: var(--bone); }
.filters button:hover { border-color: var(--ember); color: var(--ember-2); }
.filters button[aria-pressed="true"] { background: var(--ember); border-color: var(--ember); color: var(--iron-2); }

/* placeholder tile art (until real job photos land) */
.ph { background: linear-gradient(145deg, var(--char), var(--char-2)); }

/* ---------- 11. Side cascade rails (ultrawide only) ---------- */
/* "Cascade the gallery in the open side spaces" — decorative rails of
   job-photo tiles drifting slowly on screens wide enough to have dead margins. */
.side-rail {
  display: none;
  position: fixed; top: 0; bottom: 0; z-index: 1;
  width: 375px; /* 2.5x larger cascade */
  pointer-events: none; overflow: hidden;
  -webkit-mask-image: linear-gradient(transparent, #000 16%, #000 84%, transparent);
  mask-image: linear-gradient(transparent, #000 16%, #000 84%, transparent);
  opacity: 0;                                  /* hidden over the hero... */
  transition: opacity 0.7s var(--ease);
}
.side-rail.left  { left: 0; }
.side-rail.right { right: 0; }
.side-rail .rail-track { display: grid; gap: 35px; } /* 2.5x gap */
.side-rail .rail-track > div {
  height: 425px; /* 2.5x taller tiles */
  background: var(--char-2);
  border: 1px solid var(--line);
  clip-path: polygon(0 0, calc(100% - 25px) 0, 100% 25px, 100% 100%, 0 100%);
  background-size: cover; background-position: center;
}
/* 2160px = 1400px wrap-wide + 2x375px rails + buffer — rails can never overlap content */
@media (min-width: 2160px) { .side-rail { display: block; } }
/* ...and fades in once the hero is scrolled past (class set in main.js) */
.rails-visible .side-rail { opacity: 0.5; }
@media (prefers-reduced-motion: no-preference) {
  .side-rail .rail-track { animation: railDrift 60s linear infinite; }
  .side-rail.right .rail-track { animation-duration: 74s; animation-direction: reverse; }
  @keyframes railDrift { to { transform: translateY(-50%); } }
}

/* ---------- 12. About / Jon ---------- */
.split { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }

.portrait-frame {
  position: relative; aspect-ratio: 4 / 5; overflow: hidden;
  background: var(--char); border: 1px solid var(--line);
  clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 0 100%);
}
.portrait-frame img, .portrait-frame .ph { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.portrait-frame::after { /* ember corner tab */
  content: ""; position: absolute; left: 0; bottom: 0; width: 64px; height: 8px;
  background: var(--ember);
}
.photo-note { font-size: 0.8rem; color: var(--steel); margin-top: 0.7rem; letter-spacing: 0.04em; }

/* Video showcase — portrait clip in an on-brand notched frame */
.video-showcase {
  max-width: 360px; margin: 2.8rem auto 0; position: relative;
  background: #000; border: 1px solid var(--line);
  clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 0 100%);
  overflow: hidden; line-height: 0;
}
.video-showcase video { display: block; width: 100%; height: auto; }
.video-showcase::after { /* ember corner tab, matches portrait-frame */
  content: ""; position: absolute; left: 0; bottom: 0; width: 64px; height: 8px;
  background: var(--ember); z-index: 2; pointer-events: none;
}

/* Built Different pair (was a trio until the Arena item was retired 2026-07-16) */
.trio { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.4rem; margin-top: 3rem; max-width: 920px; }
@media (max-width: 860px) { .trio { grid-template-columns: 1fr; } }
.trio figure { margin: 0; }
.trio .frame {
  aspect-ratio: 4 / 3; position: relative; overflow: hidden;
  background: var(--char-2); border: 1px solid var(--line);
  clip-path: polygon(0 0, calc(100% - var(--notch)) 0, 100% var(--notch), 100% 100%, 0 100%);
}
.trio .frame img, .trio .frame .ph { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.trio figcaption h3 { margin: 1.1rem 0 0.35rem; font-size: 1.3rem; }
.trio figcaption h3 span { color: var(--ember); }
.trio figcaption p { font-size: 0.93rem; color: var(--steel); }
/* on paper the #4C5660 ink rule up top applies (AA) */

/* values strip */
.values { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; margin-top: 2.6rem; }
@media (max-width: 900px) { .values { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .values { grid-template-columns: 1fr; } }
.value {
  border-top: 3px solid var(--ember); background: var(--char);
  padding: 1.2rem 1.2rem 1.1rem;
}
.value h3 { font-size: 1.05rem; margin-bottom: 0.3rem; }
.value p { font-size: 0.88rem; color: var(--steel-lt); margin: 0; }

/* ---------- 13. Reviews ---------- */
.reviews-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; margin-top: 3rem; }
@media (max-width: 960px) { .reviews-grid { grid-template-columns: 1fr; } }
.review {
  background: var(--bone); color: var(--iron);
  padding: 2rem 1.7rem 1.6rem; position: relative;
  clip-path: polygon(0 0, calc(100% - var(--notch)) 0, 100% var(--notch), 100% 100%, 0 100%);
}
.review .stars { display: flex; gap: 3px; margin-bottom: 1rem; }
.review .stars svg { width: 18px; height: 18px; color: var(--ember-2); }
.review blockquote { margin: 0 0 1.2rem; font-size: 0.98rem; line-height: 1.6; }
.review cite {
  font-style: normal; font-weight: 700; font-size: 0.85rem;
  letter-spacing: 0.08em; text-transform: uppercase;
}
.review cite small { display: block; font-weight: 600; letter-spacing: 0.12em; font-size: 0.7rem; } /* color: #4C5660 ink rule (AA on bone) */
/* Banked premium treatment — applies automatically to REAL reviews (any .review
   without .is-template): oversized ember quote glyph + ember corner tab. */
.review:not(.is-template) { padding-top: 3.1rem; }
.review:not(.is-template)::before {
  content: "\201C"; position: absolute; top: 0.4rem; left: 1.1rem;
  font-family: var(--f-disp); font-weight: 800; font-size: 4.2rem;
  color: var(--ember); line-height: 1; pointer-events: none;
}
.review:not(.is-template)::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 64px; height: 8px;
  background: var(--ember);
}

/* Interim public state: template cards are PREVIEW-ONLY (?reviews=1 sets
   body.reviews-preview, same pattern as the emblem gate). Public visitors see
   the honest strip instead — nothing placeholder ever ships by default. */
.reviews-grid.is-template-set { display: none; }
body.reviews-preview .reviews-grid.is-template-set { display: grid; }
.reviews-interim { margin-top: 2.4rem; display: flex; flex-wrap: wrap; align-items: center; gap: 1.4rem; }
.reviews-interim p { margin: 0; font-size: 1.02rem; color: var(--steel); }

/* template state — obviously a placeholder until real reviews are pasted in */
.review.is-template { background: repeating-linear-gradient(-45deg, var(--bone) 0 18px, var(--bone-2) 18px 36px); }
.review.is-template blockquote { color: var(--steel-2); font-style: italic; }
.review.is-template::after {
  content: "TEMPLATE — PASTE REAL REVIEW"; position: absolute; top: 10px; right: 12px;
  font-size: 0.58rem; font-weight: 800; letter-spacing: 0.14em; color: var(--ember-2);
}

/* ---------- 14. Service area ---------- */
.area-map { max-width: 760px; margin-top: 2.6rem; }
.area-map svg { display: block; width: 100%; height: auto; }
.area-tags { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 2rem; }
.area-tags span {
  border: 1px solid var(--line); padding: 0.55rem 1.1rem;
  font-family: var(--f-disp); font-weight: 700; font-size: 1rem;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--bone);
}
.area-tags span b { color: var(--ember); font-weight: 700; }
/* the section lives on paper — bone-on-bone is invisible; use dark ink there */
.sec-paper .area-tags span { color: var(--iron); border-color: var(--line-dk); }
.sec-paper .area-tags span b { color: var(--ember-2); }

/* ---------- 15. CTA band ---------- */
.cta-band {
  position: relative; overflow: hidden;
  background: linear-gradient(120deg, var(--iron-2) 30%, #2A2015 130%);
  border-block: 1px solid var(--line);
  text-align: center;
}
.cta-band h2 { font-size: var(--fs-h2); }
.cta-band .lede { margin-inline: auto; }
.cta-band .hero-ctas { justify-content: center; margin: 2.2rem 0 1rem; }
.cta-band .fine { font-size: 0.82rem; color: var(--steel); letter-spacing: 0.06em; }

/* ---------- 16. Forms (book.html) ---------- */
.panels { display: grid; grid-template-columns: 1.4fr 1fr; gap: 1.6rem; align-items: start; margin-top: 3rem; }
@media (max-width: 980px) { .panels { grid-template-columns: 1fr; } }
.panel {
  background: var(--char); border: 1px solid var(--line);
  padding: 2.2rem 2rem;
  clip-path: polygon(0 0, calc(100% - var(--notch)) 0, 100% var(--notch), 100% 100%, 0 100%);
}
.panel h2 { font-size: 1.7rem; }
.panel-stack { display: grid; gap: 1.6rem; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; margin-top: 1.6rem; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 560px) { .form-grid { grid-template-columns: 1fr; } }

label {
  display: block; font-size: 0.72rem; font-weight: 800;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--steel-lt);
  margin-bottom: 0.45rem;
}
input, select, textarea {
  width: 100%; background: var(--iron); color: var(--bone);
  border: 1px solid var(--line); padding: 0.85rem 1rem;
  font: inherit; font-size: 1rem; /* >=16px: prevents iOS focus auto-zoom */
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--ember); outline-offset: 0; border-color: var(--ember);
}
textarea { min-height: 132px; resize: vertical; }
.form-note { font-size: 0.8rem; color: var(--steel-lt); margin-top: 0.9rem; }

/* steps strip */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; margin-top: 3rem; counter-reset: step; }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }
.step { position: relative; padding-top: 0.4rem; }
.step::before {
  counter-increment: step; content: "0" counter(step);
  font-family: var(--f-disp); font-weight: 800; font-size: 2.4rem;
  color: transparent; -webkit-text-stroke: 1.5px var(--ember);
  display: block; line-height: 1; margin-bottom: 0.55rem;
}
.step h3 { font-size: 1.15rem; }
.step p { font-size: 0.9rem; color: var(--steel); }

/* FAQ */
.faq { margin-top: 2.6rem; display: grid; gap: 0.8rem; max-width: 860px; }
.faq details {
  background: var(--char); border: 1px solid var(--line);
}
.faq summary {
  cursor: pointer; list-style: none;
  font-family: var(--f-disp); font-weight: 700; font-size: 1.12rem;
  letter-spacing: 0.05em; text-transform: uppercase;
  padding: 1.1rem 3rem 1.1rem 1.4rem; position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 1.3rem; top: 50%;
  transform: translateY(-50%); color: var(--ember);
  font-size: 1.5rem; font-weight: 400; transition: transform 0.2s;
}
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { padding: 0 1.4rem 1.3rem; color: var(--steel-lt); font-size: 0.96rem; }

/* ---------- 17. Before / After slider ---------- */
.ba {
  position: relative; aspect-ratio: 16 / 9; overflow: hidden; margin-top: 2.6rem;
  border: 1px solid var(--line);
  clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 0 100%);
}
.ba img, .ba .ph { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ba .after-wrap { position: absolute; inset: 0; clip-path: inset(0 0 0 50%); }
.ba .ba-handle {
  position: absolute; top: 0; bottom: 0; left: 50%; width: 3px;
  background: var(--ember); z-index: 3; pointer-events: none;
}
.ba .ba-read { /* live "% graded" chip riding the divider */
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  background: var(--ember); color: var(--iron-2);
  font-size: 0.72rem; font-weight: 800; letter-spacing: 0.05em;
  padding: 0.5rem 0.6rem; white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.ba .ba-cta { /* turn admiration into a request */
  position: absolute; right: 14px; bottom: 14px; z-index: 5;
  font-size: 0.82rem; padding: 0.6rem 1rem;
}
@media (max-width: 600px) { .ba .ba-cta { font-size: 0.74rem; padding: 0.5rem 0.8rem; } }
.ba input[type="range"] {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0; cursor: ew-resize; z-index: 4; margin: 0;
  touch-action: pan-y; /* vertical thumb-scrolls pass through to the page */
}
/* the input itself is opacity:0, so draw keyboard focus on the widget frame */
.ba:focus-within { outline: 2px solid var(--ember); outline-offset: 3px; }
.ba .tag {
  position: absolute; top: 12px; z-index: 2;
  font-size: 0.66rem; font-weight: 800; letter-spacing: 0.18em;
  background: rgba(16, 18, 22, 0.8); color: var(--bone); padding: 0.35rem 0.7rem;
}
.ba .tag.before { left: 12px; }
.ba .tag.after { right: 12px; color: var(--ember); }

/* ---------- 18. Footer ---------- */
.site-foot {
  background: var(--iron-2); border-top: 1px solid var(--line);
  padding: 4rem 0 2.2rem; position: relative; overflow: hidden;
}
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2.4rem; }
@media (max-width: 960px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .foot-grid { grid-template-columns: 1fr; } }
.site-foot h4 { font-size: 0.95rem; letter-spacing: 0.16em; color: var(--steel); margin-bottom: 1rem; }
.site-foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.55rem; }
.site-foot a { color: var(--bone); text-decoration: none; font-size: 0.93rem; opacity: 0.85; }
.site-foot a:hover { color: var(--ember); opacity: 1; }
.foot-tag { color: var(--steel); font-size: 0.9rem; max-width: 30em; }
.foot-base {
  margin-top: 3rem; padding-top: 1.6rem; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between;
  font-size: 0.78rem; color: var(--steel);
}
.foot-mark {
  position: absolute; right: -1.5rem; bottom: -2.8rem; z-index: 0;
  font-family: var(--f-disp); font-weight: 800; font-size: clamp(6rem, 16vw, 13rem);
  letter-spacing: 0.02em; color: rgba(237, 230, 218, 0.035);
  text-transform: uppercase; pointer-events: none; line-height: 1; white-space: nowrap;
}

/* ---------- 19. Reveal-on-scroll (progressive enhancement) ---------- */
/* Content is fully visible without JS. main.js adds .rv-init only when
   IntersectionObserver is available, then .rv-in when each block enters. */
.rv-init .rv { opacity: 0; transform: translateY(26px); }
.rv-init .rv.rv-in {
  opacity: 1; transform: none;
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
@media (prefers-reduced-motion: reduce) {
  .rv-init .rv { opacity: 1; transform: none; transition: none; }
  .side-rail .rail-track { animation: none; }
  .scroll-hint::after { animation: none; }
}

/* ---------- 20. Page hero (inner pages) ---------- */
.page-hero {
  padding: clamp(12rem, 20vh, 14rem) 0 clamp(3rem, 7vh, 5rem); /* clears the taller header */
  background:
    radial-gradient(100% 120% at 85% 0%, rgba(232, 135, 30, 0.08), transparent 55%),
    linear-gradient(180deg, var(--iron-2), var(--iron));
  border-bottom: 1px solid var(--line);
}
.page-hero h1 { font-size: var(--fs-h1); }
.page-hero .lede { max-width: 52em; }

/* ---------- 20b. Sticky mobile action bar (injected by main.js) ---------- */
.mobile-cta { display: none; }
@media (max-width: 899px) {
  .mobile-cta {
    position: fixed; inset: auto 0 0 0; z-index: 70;
    display: flex; gap: 0.6rem;
    padding: 0.65rem 0.85rem calc(0.65rem + env(safe-area-inset-bottom));
    background: rgba(16, 18, 22, 0.96);
    -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
    border-top: 4px solid transparent; /* hazard-hatch trim edge */
    border-image: repeating-linear-gradient(-45deg, var(--ember) 0 12px, var(--iron-2) 12px 24px) 4;
    transition: transform 0.3s var(--ease);
  }
  .mobile-cta .btn { flex: 1; font-size: 0.98rem; padding: 0.8rem 0.5rem; }
  .mobile-cta.is-hidden { transform: translateY(115%); }
  body.has-mobile-cta .site-foot { padding-bottom: 6.5rem; }
}
@media (prefers-reduced-motion: reduce) { .mobile-cta { transition: none; } }

/* ---------- 21. Utility ---------- */
.center { text-align: center; }
.mt-3 { margin-top: 3rem; }
.tel-strong { color: var(--ember); text-decoration: none; font-weight: 800; white-space: nowrap; }
.tel-strong:hover { text-decoration: underline; }
.fine-print { font-size: 0.8rem; color: var(--steel); }
