/* ============================================================
   JOEY OUELLETTE CONSTRUCTION — Stylesheet
   Design system: "Quiet Monumental"
   Dark architectural ink · warm limestone · bronze accent
   Fraunces (display serif) · Archivo (grotesque body)
   ============================================================ */

/* ── Design Tokens ─────────────────────────────────────────── */
:root {
  /* Ink — the dark family */
  --ink:        #101114;
  --ink-2:      #16181C;
  --ink-3:      #1D2025;
  --ink-deep:   #0B0C0E;

  /* Limestone — the light family */
  --bone:       #F1EEE7;
  --bone-2:     #E8E4DA;
  --paper:      #FAF8F4;

  /* Bronze accent */
  --bronze:        #C08A4E;
  --bronze-bright: #D8A967;
  --bronze-deep:   #96692F;
  --bronze-glow:   rgba(192, 138, 78, 0.28);

  /* Text */
  --t-on-dark:       #EDEAE2;
  --t-on-dark-muted: rgba(237, 234, 226, 0.56);
  --t-on-light:      #191A1D;
  --t-on-light-muted:#6E6A61;

  /* Lines */
  --line-dark:  rgba(237, 234, 226, 0.10);
  --line-light: rgba(25, 26, 29, 0.12);

  /* Type */
  --font-display: 'Fraunces', Georgia, serif;
  --font-body:    'Archivo', 'Helvetica Neue', sans-serif;

  /* Rhythm */
  --nav-h: 84px;
  --container: 1240px;
  --sect: clamp(5.5rem, 10vw, 9rem);

  /* Motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --tr-fast: 0.18s var(--ease-out);
  --tr-base: 0.4s var(--ease-out);
  --tr-slow: 0.9s var(--ease-out);
}

/* ── Reset & Base ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background: var(--ink);
  color: var(--t-on-dark);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { display: block; max-width: 100%; height: auto; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; color: inherit; }
input, textarea, select { font-family: inherit; }
::selection { background: var(--bronze); color: var(--ink-deep); }

/* ── Typography ────────────────────────────────────────────── */
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: -0.015em;
}

h2 { font-size: clamp(2.4rem, 4.6vw, 3.9rem); }

h2 em, h1 em {
  font-style: italic;
  font-weight: 400;
  color: var(--bronze);
}

h4, h5 {
  font-family: var(--font-body);
  font-weight: 600;
  letter-spacing: 0.01em;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 3rem);
}

/* Section label — small caps hairline kicker */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--bronze);
  margin-bottom: 1.5rem;
}

.section-label::before {
  content: '';
  display: block;
  width: 34px;
  height: 1px;
  background: var(--bronze);
}

.section-head { margin-bottom: clamp(3rem, 6vw, 5rem); }
.section-head.centered { text-align: center; }
.section-head.centered .section-label { justify-content: center; }
.section-head.centered .section-label::before { display: none; }

.section-lede {
  margin-top: 1.5rem;
  max-width: 560px;
  font-size: 1.05rem;
  color: var(--t-on-light-muted);
}

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 1rem 2.1rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border-radius: 2px;
  transition: background var(--tr-fast), color var(--tr-fast), border-color var(--tr-fast), transform var(--tr-fast), box-shadow var(--tr-fast);
  white-space: nowrap;
}

.btn-lg { padding: 1.15rem 2.6rem; font-size: 0.84rem; }

.btn-bronze {
  background: var(--bronze);
  color: var(--ink-deep);
}
.btn-bronze:hover {
  background: var(--bronze-bright);
  transform: translateY(-1px);
  box-shadow: 0 12px 32px -8px var(--bronze-glow);
}

.btn-ghost {
  background: transparent;
  color: var(--t-on-dark);
  border: 1px solid rgba(237, 234, 226, 0.35);
}
.btn-ghost:hover {
  border-color: var(--bronze);
  color: var(--bronze-bright);
}

.btn-dark {
  background: var(--ink);
  color: var(--t-on-dark);
}
.btn-dark:hover { background: var(--ink-3); }

/* ── Reveal animation ──────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity var(--tr-slow), transform var(--tr-slow);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ══════════════════════════════════════════════════════════
   NAVBAR
══════════════════════════════════════════════════════════ */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--nav-h);
  background: transparent;
  border-bottom: 1px solid transparent;
  overflow: visible;
  transition: background var(--tr-base), border-color var(--tr-base), box-shadow var(--tr-base);
}

#navbar.scrolled {
  background: rgba(11, 12, 14, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--line-dark);
}

.nav-container {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0 clamp(1.25rem, 4vw, 3rem) 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  overflow: visible;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  flex-shrink: 0;
  padding-left: clamp(0.75rem, 2vw, 1.5rem);
  /* Break out of vertical center so we can manually push it down from the absolute top */
  align-self: flex-start;
  margin-top: 15px;
}

.nav-logo-img {
  height: 150px;
  width: 150px;
  object-fit: contain;
}

.nav-wordmark {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.nav-wordmark-name {
  font-family: var(--font-display);
  font-size: 1.06rem;
  letter-spacing: 0.015em;
  color: var(--t-on-dark);
}

.nav-wordmark-sub {
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--bronze);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2.4rem;
  margin-left: auto;
}

.nav-links a {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--t-on-dark-muted);
  padding: 0.4rem 0;
  position: relative;
  transition: color var(--tr-fast);
}

.nav-links a:hover { color: var(--t-on-dark); }

.nav-links a[data-section]::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--bronze);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--tr-base);
}

.nav-links a[data-section].active { color: var(--t-on-dark); }
.nav-links a[data-section].active::after,
.nav-links a[data-section]:hover::after { transform: scaleX(1); }

.nav-cta {
  border: 1px solid var(--bronze);
  color: var(--bronze-bright) !important;
  padding: 0.65rem 1.4rem !important;
  border-radius: 2px;
  transition: background var(--tr-fast), color var(--tr-fast) !important;
}
.nav-cta:hover {
  background: var(--bronze);
  color: var(--ink-deep) !important;
}

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 7px;
  padding: 0.5rem;
}
.nav-hamburger span {
  display: block;
  width: 26px;
  height: 1.5px;
  background: var(--t-on-dark);
  transition: transform var(--tr-base), opacity var(--tr-base);
  transform-origin: center;
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(4.25px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { transform: translateY(-4.25px) rotate(-45deg); }

/* Mobile menu */
.mobile-menu {
  position: fixed;
  inset: 0;
  background: rgba(11, 12, 14, 0.97);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 0 clamp(2rem, 8vw, 4rem);
  gap: 1.6rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--tr-base);
}
.mobile-menu.open { opacity: 1; pointer-events: all; }

.mobile-link {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 7vw, 2.6rem);
  color: var(--t-on-dark);
  display: flex;
  align-items: baseline;
  gap: 1rem;
  transition: color var(--tr-fast);
}
.mobile-link em {
  font-family: var(--font-body);
  font-style: normal;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  color: var(--bronze);
}
.mobile-link:hover { color: var(--bronze-bright); }

.mobile-link-cta {
  margin-top: 1rem;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-deep);
  background: var(--bronze);
  padding: 1rem 2rem;
  border-radius: 2px;
}
.mobile-link-cta:hover { color: var(--ink-deep); background: var(--bronze-bright); }

.mobile-menu-meta {
  margin-top: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.85rem;
  color: var(--t-on-dark-muted);
}
.mobile-menu-meta a { color: var(--bronze-bright); }

/* Floating CTA */
.floating-cta {
  position: fixed;
  bottom: 1.6rem;
  right: 1.6rem;
  z-index: 900;
  opacity: 0;
  transform: translateY(14px);
  pointer-events: none;
  transition: opacity var(--tr-base), transform var(--tr-base);
}
.floating-cta.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}
.floating-cta a {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--bronze);
  color: var(--ink-deep);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.9rem 1.5rem;
  border-radius: 999px;
  box-shadow: 0 16px 40px -10px rgba(0, 0, 0, 0.5);
  transition: background var(--tr-fast);
}
.floating-cta a:hover { background: var(--bronze-bright); }

/* ══════════════════════════════════════════════════════════
   HERO
══════════════════════════════════════════════════════════ */
#hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
}

.hero-bg { position: absolute; inset: 0; z-index: 0; }

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 38%;
  transform: scale(1.04);
  animation: heroSettle 2.4s var(--ease-out) forwards;
}

@keyframes heroSettle {
  to { transform: scale(1); }
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(11, 12, 14, 0.96) 0%, rgba(11, 12, 14, 0.45) 42%, rgba(11, 12, 14, 0.55) 100%),
    linear-gradient(to right, rgba(11, 12, 14, 0.62) 0%, transparent 65%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: calc(var(--nav-h) + 4rem) clamp(1.25rem, 4vw, 3rem) 4rem;
}

.hero-kicker {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--bronze-bright);
  margin-bottom: 2rem;
  opacity: 0;
  animation: fadeSlideUp 1s var(--ease-out) 0.2s forwards;
}

.hero-kicker-rule {
  display: block;
  width: 44px;
  height: 1px;
  background: var(--bronze);
}

.hero-content h1 {
  font-size: clamp(3.2rem, 9vw, 7.2rem);
  color: var(--t-on-dark);
  max-width: 12ch;
  margin-bottom: 2rem;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeSlideUp 1.1s var(--ease-out) 0.35s forwards;
}

.hero-sub {
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  color: var(--t-on-dark-muted);
  max-width: 520px;
  margin-bottom: 2.8rem;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeSlideUp 1.1s var(--ease-out) 0.55s forwards;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeSlideUp 1.1s var(--ease-out) 0.75s forwards;
}

@keyframes fadeSlideUp {
  to { opacity: 1; transform: translateY(0); }
}

/* Hero ledger — stat strip at the base */
.hero-ledger {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 3rem);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line-dark);
  opacity: 0;
  animation: fadeIn 1.4s ease 1.1s forwards;
}

@keyframes fadeIn { to { opacity: 1; } }

.hero-ledger-item {
  padding: 1.8rem 1.5rem 2.2rem 0;
}
.hero-ledger-item + .hero-ledger-item {
  border-left: 1px solid var(--line-dark);
  padding-left: 1.5rem;
}

.hero-ledger-num {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  color: var(--t-on-dark);
  line-height: 1;
  margin-bottom: 0.45rem;
}
.hero-ledger-num .ledger-unit {
  font-size: 0.6em;
  color: var(--bronze);
  margin-left: 0.15em;
}

.hero-ledger-label {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--t-on-dark-muted);
}

.hero-scroll {
  position: absolute;
  right: clamp(1.25rem, 4vw, 3rem);
  bottom: 8.5rem;
  z-index: 2;
  width: 1px;
  height: 64px;
  background: var(--line-dark);
  overflow: hidden;
}
.hero-scroll span {
  position: absolute;
  top: -40%;
  left: 0;
  width: 100%;
  height: 40%;
  background: var(--bronze);
  animation: scrollDrip 2.2s ease-in-out infinite;
}
@keyframes scrollDrip {
  0%   { top: -40%; }
  100% { top: 110%; }
}

/* ══════════════════════════════════════════════════════════
   SERVICES — editorial index (limestone)
══════════════════════════════════════════════════════════ */
#services {
  background: var(--bone);
  color: var(--t-on-light);
  padding: var(--sect) 0;
}

#services .section-head h2 { color: var(--t-on-light); }

.service-index {
  border-top: 1px solid var(--line-light);
}

.service-row {
  display: grid;
  grid-template-columns: 90px 1fr 380px;
  gap: clamp(1.5rem, 4vw, 4rem);
  padding: clamp(2.5rem, 5vw, 4rem) 0;
  border-bottom: 1px solid var(--line-light);
  align-items: start;
}

.service-row-num {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.35rem;
  color: var(--bronze);
  padding-top: 0.4rem;
}

.service-row-body h3 {
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  color: var(--t-on-light);
  margin-bottom: 1.1rem;
}

.service-row-body > p {
  color: var(--t-on-light-muted);
  max-width: 54ch;
  margin-bottom: 1.6rem;
}

.service-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.8rem;
}

.service-specs li {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--t-on-light);
  border: 1px solid var(--line-light);
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.4);
}

.service-row-link {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--t-on-light);
  border-bottom: 1px solid var(--bronze);
  padding-bottom: 0.35rem;
  transition: color var(--tr-fast), gap var(--tr-fast);
}
.service-row-link:hover { color: var(--bronze-deep); gap: 0.9rem; }

.service-row-media {
  overflow: hidden;
  border-radius: 2px;
  aspect-ratio: 4 / 3;
  background: var(--bone-2);
}
.service-row-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.92);
  transition: transform 1.2s var(--ease-out), filter 1.2s var(--ease-out);
}
.service-row:hover .service-row-media img {
  transform: scale(1.05);
  filter: saturate(1);
}

/* ══════════════════════════════════════════════════════════
   SUPERFOAM — dark spotlight
══════════════════════════════════════════════════════════ */
#superfoam {
  background: var(--ink-2);
  padding: var(--sect) 0;
  border-top: 1px solid var(--line-dark);
  border-bottom: 1px solid var(--line-dark);
}

.superfoam-layout {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: start;
}

.superfoam-media {
  position: sticky;
  top: calc(var(--nav-h) + 2rem);
}

.superfoam-media figure {
  border: 1px solid var(--line-dark);
  border-radius: 2px;
  overflow: hidden;
  background: var(--ink-3);
}
.superfoam-media img { width: 100%; }
.superfoam-media figcaption {
  font-size: 0.78rem;
  color: var(--t-on-dark-muted);
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--line-dark);
  line-height: 1.5;
}

.superfoam-content h2 { color: var(--t-on-dark); margin-bottom: 1.6rem; }

.superfoam-lede {
  color: var(--t-on-dark-muted);
  font-size: 1.02rem;
  max-width: 58ch;
  margin-bottom: 2.8rem;
}

.foam-benefits {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line-dark);
  margin-bottom: 3rem;
}

.foam-benefit {
  display: grid;
  gap: 0.35rem;
  padding: 1.4rem 0;
  border-bottom: 1px solid var(--line-dark);
}
.foam-benefit strong {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.15rem;
  color: var(--t-on-dark);
}
.foam-benefit span {
  font-size: 0.92rem;
  color: var(--t-on-dark-muted);
  max-width: 60ch;
}

.foam-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line-dark);
  border: 1px solid var(--line-dark);
  border-radius: 2px;
  overflow: hidden;
}

.foam-stat {
  background: var(--ink-2);
  padding: 1.4rem 1rem;
  text-align: center;
}
.foam-stat b {
  display: block;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.5rem;
  color: var(--bronze-bright);
  line-height: 1;
  margin-bottom: 0.4rem;
}
.foam-stat i {
  font-style: normal;
  font-size: 0.64rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--t-on-dark-muted);
}

/* ══════════════════════════════════════════════════════════
   GALLERY — limestone
══════════════════════════════════════════════════════════ */
#gallery {
  background: var(--bone);
  color: var(--t-on-light);
  padding: var(--sect) 0;
}

#gallery .section-head h2 { color: var(--t-on-light); }

.gallery-filters {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.4rem 2rem;
  margin-bottom: 3rem;
}

.filter-btn {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--t-on-light-muted);
  padding: 0.6rem 0.2rem;
  position: relative;
  transition: color var(--tr-fast);
}
.filter-btn::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--bronze);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--tr-base);
}
.filter-btn:hover { color: var(--t-on-light); }
.filter-btn.active { color: var(--t-on-light); }
.filter-btn.active::after { transform: scaleX(1); }

.admin-btn {
  color: rgba(25, 26, 29, 0.28);
  padding: 0.6rem 0.4rem;
  transition: color var(--tr-fast);
}
.admin-btn:hover { color: var(--bronze-deep); }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.1rem;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 2px;
  aspect-ratio: 4 / 3;
  cursor: pointer;
  background: var(--bone-2);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.1s var(--ease-out), filter 1.1s var(--ease-out);
  filter: saturate(0.9);
}

.gallery-item:hover img {
  transform: scale(1.06);
  filter: saturate(1);
}

.gallery-item-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.4rem;
  background: linear-gradient(to top, rgba(11, 12, 14, 0.82) 0%, rgba(11, 12, 14, 0.2) 45%, transparent 70%);
  opacity: 0;
  transition: opacity var(--tr-base);
}
.gallery-item:hover .gallery-item-overlay { opacity: 1; }

.gallery-item-tag {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--bronze-bright);
  margin-bottom: 0.35rem;
}

.gallery-item-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--t-on-dark);
  line-height: 1.2;
}

.gallery-item-loc {
  font-size: 0.74rem;
  color: var(--t-on-dark-muted);
  margin-top: 0.3rem;
}

/* Supabase-injected items reuse the same classes */
.gallery-item.remote-photo .gallery-image-thumbnail {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.admin-delete-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 10;
  background: #B3372E;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.4rem 0.7rem;
  border-radius: 2px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

/* ══════════════════════════════════════════════════════════
   THE STANDARD — limestone continuation
══════════════════════════════════════════════════════════ */
#trust {
  background: var(--bone);
  color: var(--t-on-light);
  padding: var(--sect) 0;
  border-top: 1px solid var(--line-light);
}

.standard-layout {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: start;
}

#trust .section-head { margin-bottom: 0; position: sticky; top: calc(var(--nav-h) + 2rem); }
#trust .section-head h2 { color: var(--t-on-light); }

.standard-pillars { border-top: 1px solid var(--line-light); }

.standard-pillar {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  column-gap: 1.5rem;
  row-gap: 0.6rem;
  padding: 2.2rem 0;
  border-bottom: 1px solid var(--line-light);
}

.standard-pillar-index {
  grid-column: 1;
  grid-row: 1;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.3rem;
  color: var(--bronze);
}

.standard-pillar h4 {
  grid-column: 2;
  grid-row: 1;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.35rem;
  color: var(--t-on-light);
}

.standard-pillar p {
  grid-column: 2;
  grid-row: 2;
  color: var(--t-on-light-muted);
  font-size: 0.95rem;
  max-width: 58ch;
}

/* ══════════════════════════════════════════════════════════
   QUOTE — dark closing chamber
══════════════════════════════════════════════════════════ */
#quote {
  background: var(--ink);
  padding: var(--sect) 0;
}

.quote-layout {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: start;
}

.quote-left h2 { color: var(--t-on-dark); margin-bottom: 1.4rem; }

.quote-left > p {
  color: var(--t-on-dark-muted);
  max-width: 46ch;
  margin-bottom: 2.4rem;
}

.quote-assurances {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line-dark);
  margin-bottom: 2.6rem;
}
.quote-assurances li {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.95rem 0;
  border-bottom: 1px solid var(--line-dark);
  font-size: 0.92rem;
  color: var(--t-on-dark);
}
.quote-assurances li::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--bronze);
  flex-shrink: 0;
}

.quote-direct {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.quote-direct span {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--t-on-dark-muted);
}
.quote-direct a {
  font-family: var(--font-display);
  font-size: 1.7rem;
  color: var(--bronze-bright);
  transition: color var(--tr-fast);
}
.quote-direct a:hover { color: var(--bronze); }

/* Wizard card */
.wizard-card {
  background: var(--paper);
  color: var(--t-on-light);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.6);
}

.wizard-header {
  padding: 1.8rem 2.2rem 0;
}

.wizard-steps {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1.4rem;
}

.wizard-step {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-shrink: 0;
}

.wizard-step-circle {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--line-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--t-on-light-muted);
  transition: all var(--tr-base);
}

.wizard-step.active .wizard-step-circle {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bone);
}

.wizard-step.done .wizard-step-circle {
  background: var(--bronze);
  border-color: var(--bronze);
  color: var(--ink-deep);
}

.wizard-step-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--t-on-light-muted);
}
.wizard-step.active .wizard-step-label { color: var(--t-on-light); }

.wizard-step-line {
  flex: 1;
  height: 1px;
  background: var(--line-light);
  min-width: 12px;
}

.wizard-progress-bar {
  height: 2px;
  background: var(--line-light);
  border-radius: 2px;
  overflow: hidden;
}
.wizard-progress-fill {
  height: 100%;
  background: var(--bronze);
  transition: width 0.5s var(--ease-out);
}

.wizard-body { padding: 2rem 2.2rem 2.4rem; }

.wizard-panel { display: none; }
.wizard-panel.active { display: block; animation: panelIn 0.45s var(--ease-out); }

@keyframes panelIn {
  from { opacity: 0; transform: translateX(14px); }
  to   { opacity: 1; transform: translateX(0); }
}

.wizard-panel h3 {
  font-size: 1.6rem;
  color: var(--t-on-light);
  margin-bottom: 0.4rem;
}
.wizard-panel > p {
  font-size: 0.9rem;
  color: var(--t-on-light-muted);
  margin-bottom: 1.6rem;
}

/* Service select cards */
.service-select-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
  margin-bottom: 1.8rem;
}

.service-select-card {
  border: 1px solid var(--line-light);
  border-radius: 3px;
  padding: 1.2rem 1.3rem;
  cursor: pointer;
  transition: border-color var(--tr-fast), background var(--tr-fast), box-shadow var(--tr-fast);
  display: grid;
  gap: 0.25rem;
}
.service-select-card:hover { border-color: var(--bronze); }

.service-select-card.selected {
  border-color: var(--bronze);
  background: rgba(192, 138, 78, 0.08);
  box-shadow: inset 0 0 0 1px var(--bronze);
}

.service-select-card strong {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--t-on-light);
}
.service-select-card span {
  font-size: 0.78rem;
  color: var(--t-on-light-muted);
}

/* Forms */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-group { margin-bottom: 1.1rem; }

.form-group label {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--t-on-light-muted);
  margin-bottom: 0.45rem;
}
.form-group label small { text-transform: none; letter-spacing: 0; font-weight: 400; }

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  font-size: 0.95rem;
  color: var(--t-on-light);
  background: #fff;
  border: 1px solid var(--line-light);
  border-radius: 3px;
  outline: none;
  transition: border-color var(--tr-fast), box-shadow var(--tr-fast);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--bronze);
  box-shadow: 0 0 0 3px rgba(192, 138, 78, 0.15);
}

.form-group textarea { min-height: 110px; resize: vertical; }

/* Upload zone */
.upload-zone {
  position: relative;
  border: 1.5px dashed var(--line-light);
  border-radius: 3px;
  padding: 1.6rem 1rem;
  text-align: center;
  color: var(--t-on-light-muted);
  transition: border-color var(--tr-fast), background var(--tr-fast);
}
.upload-zone:hover, .upload-zone.drag-over {
  border-color: var(--bronze);
  background: rgba(192, 138, 78, 0.05);
}
.upload-zone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.upload-zone svg { margin: 0 auto 0.5rem; color: var(--bronze); }
.upload-zone p { font-size: 0.88rem; font-weight: 500; color: var(--t-on-light); }
.upload-zone span { font-size: 0.72rem; }

/* Wizard nav */
.wizard-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1.6rem;
}

.btn-prev {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--t-on-light-muted);
  padding: 0.6rem 0;
  transition: color var(--tr-fast);
}
.btn-prev:hover { color: var(--t-on-light); }

/* Success */
.wizard-success {
  text-align: center;
  padding: 2rem 1rem;
}
.success-icon {
  width: 62px;
  height: 62px;
  margin: 0 auto 1.4rem;
  border-radius: 50%;
  background: rgba(192, 138, 78, 0.12);
  border: 1px solid var(--bronze);
  color: var(--bronze-deep);
  display: flex;
  align-items: center;
  justify-content: center;
}
.success-icon svg { width: 26px; height: 26px; }
.wizard-success h3 { margin-bottom: 0.6rem; }
.wizard-success p {
  color: var(--t-on-light-muted);
  font-size: 0.92rem;
  max-width: 40ch;
  margin: 0 auto 1.6rem;
}

/* ══════════════════════════════════════════════════════════
   FOOTER
══════════════════════════════════════════════════════════ */
#footer {
  background: var(--ink-deep);
  border-top: 1px solid var(--line-dark);
  padding: clamp(3.5rem, 7vw, 6rem) 0 2rem;
}

.footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
  padding-bottom: 3rem;
  margin-bottom: 3rem;
  border-bottom: 1px solid var(--line-dark);
}

.footer-logo-img {
  height: 96px;
  width: auto;
  mix-blend-mode: screen;
  margin-bottom: 0.8rem;
}

.footer-tag {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--t-on-dark-muted);
}

.footer-cta { text-align: right; }
.footer-cta h3 {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  color: var(--t-on-dark);
  margin-bottom: 1.2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
  padding-bottom: 3rem;
}

.footer-col h5 {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--bronze);
  margin-bottom: 1.2rem;
}

.footer-col ul { display: grid; gap: 0.55rem; }

.footer-col a, .footer-col span {
  font-size: 0.9rem;
  color: var(--t-on-dark-muted);
  transition: color var(--tr-fast);
}
.footer-col a:hover { color: var(--t-on-dark); }

.footer-contact a { color: var(--t-on-dark); }
.footer-contact a:hover { color: var(--bronze-bright); }

.footer-social { margin-top: 1.4rem; display: flex; gap: 0.8rem; }
.footer-social a {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line-dark);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--t-on-dark-muted);
  transition: color var(--tr-fast), border-color var(--tr-fast);
}
.footer-social a:hover { color: var(--bronze-bright); border-color: var(--bronze); }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding-top: 1.6rem;
  border-top: 1px solid var(--line-dark);
}
.footer-bottom p {
  font-size: 0.78rem;
  color: var(--t-on-dark-muted);
}
.footer-fine { letter-spacing: 0.08em; }

/* ══════════════════════════════════════════════════════════
   LIGHTBOX
══════════════════════════════════════════════════════════ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(11, 12, 14, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--tr-base);
}
.lightbox.open { opacity: 1; pointer-events: all; }

.lightbox-content {
  position: relative;
  max-width: min(1100px, 92vw);
  max-height: 88vh;
}

.lightbox-img {
  max-width: 100%;
  max-height: 88vh;
  object-fit: contain;
  border-radius: 3px;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.6);
}

.lightbox-close {
  position: absolute;
  top: -3rem;
  right: 0;
  color: var(--t-on-dark);
  padding: 0.5rem;
  transition: color var(--tr-fast), transform var(--tr-fast);
}
.lightbox-close:hover { color: var(--bronze-bright); transform: rotate(90deg); }

/* ══════════════════════════════════════════════════════════
   ADMIN MODAL
══════════════════════════════════════════════════════════ */
.admin-modal {
  position: fixed;
  inset: 0;
  z-index: 3000;
  background: rgba(11, 12, 14, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.admin-box {
  position: relative;
  background: var(--paper);
  color: var(--t-on-light);
  border-radius: 4px;
  padding: 2.4rem 2.2rem 2.2rem;
  width: min(420px, 100%);
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.5);
}

.admin-close {
  position: absolute;
  top: 0.8rem;
  right: 1.1rem;
  font-size: 1.7rem;
  line-height: 1;
  color: var(--t-on-light-muted);
  transition: color var(--tr-fast);
}
.admin-close:hover { color: var(--t-on-light); }

.admin-box h3 {
  font-size: 1.5rem;
  margin-bottom: 0.4rem;
}
.admin-box p {
  font-size: 0.85rem;
  color: var(--t-on-light-muted);
}

.admin-box input[type="password"],
.admin-box input[type="text"],
.admin-box select {
  width: 100%;
  padding: 0.85rem 1rem;
  margin: 0.9rem 0 0;
  font-size: 0.95rem;
  color: var(--t-on-light);
  background: #fff;
  border: 1px solid var(--line-light);
  border-radius: 3px;
  outline: none;
  transition: border-color var(--tr-fast), box-shadow var(--tr-fast);
}
.admin-box input:focus, .admin-box select:focus {
  border-color: var(--bronze);
  box-shadow: 0 0 0 3px rgba(192, 138, 78, 0.15);
}

.admin-box input[type="file"] {
  width: 100%;
  margin: 1rem 0 0;
  font-size: 0.85rem;
  color: var(--t-on-light-muted);
}

.admin-full-btn { width: 100%; margin-top: 1.2rem; }

.admin-error {
  color: #B3372E !important;
  font-weight: 500;
  margin-top: 0.8rem;
}

#uploadStatus { margin-top: 0.9rem; font-size: 0.88rem; }

/* ══════════════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .service-row {
    grid-template-columns: 60px 1fr;
  }
  .service-row-media {
    grid-column: 2;
    max-width: 520px;
  }
  .superfoam-layout { grid-template-columns: 1fr; }
  .superfoam-media { position: static; max-width: 560px; }
  .standard-layout { grid-template-columns: 1fr; }
  #trust .section-head { position: static; margin-bottom: 2.5rem; }
  .quote-layout { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  /* Scale logo down on tablet/mobile */
  .nav-logo-img { height: 64px; width: 64px; }
  .hero-ledger { grid-template-columns: 1fr 1fr; }
  .hero-ledger-item { padding: 1.3rem 1rem 1.3rem 0; }
  .hero-ledger-item:nth-child(3) { border-left: none; padding-left: 0; border-top: 1px solid var(--line-dark); }
  .hero-ledger-item:nth-child(4) { border-top: 1px solid var(--line-dark); }
  .hero-scroll { display: none; }
  .footer-cta { text-align: left; }
}

@media (max-width: 640px) {
  .standard-pillar { grid-template-columns: 1fr; row-gap: 0.4rem; }
  .standard-pillar-index,
  .standard-pillar h4,
  .standard-pillar p { grid-column: 1; grid-row: auto; }
  .service-row { grid-template-columns: 1fr; gap: 1.4rem; }
  .service-row-num { padding-top: 0; }
  .service-row-media { grid-column: 1; }
  .gallery-grid { grid-template-columns: 1fr; }
  .foam-stats { grid-template-columns: 1fr 1fr; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .service-select-grid { grid-template-columns: 1fr; }
  .wizard-header { padding: 1.4rem 1.4rem 0; }
  .wizard-body { padding: 1.5rem 1.4rem 1.8rem; }
  .wizard-step-label { display: none; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .hero-content h1 { font-size: clamp(2.7rem, 12vw, 3.6rem); }
  .floating-cta { bottom: 1rem; right: 1rem; }
}

/* ══════════════════════════════════════════════════════════
   VIDEO MODAL
══════════════════════════════════════════════════════════ */
.video-modal {
  position: fixed;
  inset: 0;
  z-index: 3500;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  transition: opacity 0.35s ease;
}

.video-modal.open {
  opacity: 1;
}

.video-modal-content {
  position: relative;
  width: min(1000px, 92vw);
  max-height: 80vh;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 4px;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}

.video-modal-content video {
  width: 100%;
  height: 100%;
  border-radius: 4px;
  object-fit: contain;
}

.video-modal-close {
  position: absolute;
  top: -2.5rem;
  right: 0;
  background: transparent;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 0.5rem;
  transition: color 0.2s ease, transform 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-modal-close:hover {
  color: var(--bronze-bright, #c08a4e);
  transform: rotate(90deg);
}

@media (max-width: 640px) {
  .video-modal {
    padding: 1rem;
  }
  .video-modal-close {
    top: -2.5rem;
    right: 0;
  }
}


/* ══════════════════════════════════════════════════════════
   WATERFALL MIST — one-shot intro FX (additive, self-removing)
   Soft mist rising off the gorge on the left of the hero photo,
   fully faded out by 5s. Compositor-only properties (opacity +
   translate3d/scale) so it stays off the main thread at 60fps.
══════════════════════════════════════════════════════════ */

.waterfall-mist-overlay {
  position: absolute;
  top: 18%;
  bottom: 0;
  left: 0;
  width: 55%;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
  contain: strict;
}

.waterfall-mist-overlay::before,
.waterfall-mist-overlay::after {
  content: "";
  position: absolute;
  inset: -12%;
  opacity: 0;
  will-change: transform, opacity;
  animation: riseAndFade 5s ease-out forwards;
}

/* Lower plume — hugs the crash zone at the base of the falls */
.waterfall-mist-overlay::before {
  background:
    radial-gradient(ellipse 46% 38% at 30% 78%, rgba(255, 255, 255, 0.10), transparent 70%),
    radial-gradient(ellipse 34% 30% at 52% 88%, rgba(226, 231, 236, 0.07), transparent 68%);
}

/* Upper drift — thinner haze carried up and to the right */
.waterfall-mist-overlay::after {
  background:
    radial-gradient(ellipse 40% 32% at 42% 58%, rgba(240, 244, 248, 0.06), transparent 72%),
    radial-gradient(ellipse 28% 24% at 62% 70%, rgba(255, 255, 255, 0.05), transparent 65%);
  animation-delay: -0.6s; /* finishes early, offsets the layers so they don't move in lockstep */
}

@keyframes riseAndFade {
  0% {
    opacity: 0;
    transform: translate3d(0, 4%, 0) scale(1);
  }
  18% {
    opacity: 1;
  }
  62% {
    opacity: 0.7;
  }
  100% {
    opacity: 0;
    transform: translate3d(5%, -9%, 0) scale(1.1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .waterfall-mist-overlay {
    display: none;
  }
}
