/* =========================================================
   COOPER STONE — Design System
   Dual aesthetic controlled by [data-mode] on <html>:
     data-mode="luxury"     -> Traditional / Architectural / Landscape (gold)
     data-mode="industrial" -> Crushed Stone (orange)
   ========================================================= */

:root {
  /* Luxury (gold) — default */
  --gold: #C8A55E;
  --gold-soft: #D9BE82;
  --gold-deep: #A68440;
  --ink: #1B1814;
  --ink-soft: #2A2520;
  --muted: #7A7268;
  --line: #E5DFD3;
  --cream: #F5F1EA;
  --cream-deep: #ECE5D6;
  --paper: #FAF7F2;
  --white: #FFFFFF;

  /* Industrial (orange) */
  --orange: #DE8D27;
  --orange-bright: #F2A23A;
  --orange-deep: #B57315;
  --asphalt: #0E0E0E;
  --asphalt-soft: #1A1A1A;
  --concrete: #6B6B6B;
  --concrete-light: #A5A29C;
  --steel: #2A2A2A;

  /* Theme tokens (default = luxury) */
  --accent: var(--gold);
  --accent-soft: var(--gold-soft);
  --accent-deep: var(--gold-deep);
  --bg: var(--paper);
  --bg-alt: var(--cream);
  --bg-deep: var(--ink);
  --text: var(--ink-soft);
  --text-on-deep: var(--cream);
  --text-muted: var(--muted);
  --border: var(--line);

  /* Type */
  --font-display: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Menlo, monospace;

  /* Spacing & radius */
  --radius: 2px;
  --radius-lg: 6px;
  --shadow-1: 0 1px 3px rgba(27, 24, 20, 0.06), 0 4px 14px rgba(27, 24, 20, 0.04);
  --shadow-2: 0 10px 40px rgba(27, 24, 20, 0.12);

  --container: 1280px;
  --pad: clamp(20px, 4vw, 56px);
}

[data-mode="industrial"] {
  --accent: var(--orange);
  --accent-soft: var(--orange-bright);
  --accent-deep: var(--orange-deep);
  --bg: var(--asphalt);
  --bg-alt: var(--asphalt-soft);
  --bg-deep: #000;
  --text: #EDEAE4;
  --text-on-deep: #FFFFFF;
  --text-muted: var(--concrete-light);
  --border: #2E2E2E;

  --font-display: 'Barlow Condensed', 'Oswald', 'Inter', sans-serif;
  --radius: 0px;
  --radius-lg: 0px;
}

/* ============= Reset ============= */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; overflow-x: hidden; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color .4s ease, color .4s ease;
  overflow-wrap: break-word;
}
img, svg, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }

/* ============= Typography ============= */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.08;
  margin: 0;
  letter-spacing: -0.01em;
  color: var(--text);
}
[data-mode="industrial"] h1,
[data-mode="industrial"] h2,
[data-mode="industrial"] h3,
[data-mode="industrial"] h4 {
  font-weight: 600;
  letter-spacing: 0.005em;
  text-transform: none;
}

.h-display { font-size: clamp(48px, 7vw, 104px); letter-spacing: -0.02em; }
.h-1 { font-size: clamp(36px, 5vw, 64px); }
.h-2 { font-size: clamp(28px, 3.6vw, 44px); }
.h-3 { font-size: clamp(22px, 2.4vw, 30px); }

.eyebrow {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  display: inline-block;
  width: 28px;
  height: 1px;
  background: var(--accent);
}
[data-mode="industrial"] .eyebrow {
  font-weight: 700;
  letter-spacing: 0.28em;
}

p { margin: 0 0 1em; }
.lead { font-size: clamp(17px, 1.4vw, 20px); color: var(--text-muted); max-width: 60ch; }

/* ============= Layout primitives ============= */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--pad);
}
.section {
  padding: clamp(64px, 9vw, 140px) 0;
}
.section--tight { padding: clamp(48px, 6vw, 96px) 0; }
.section--dark {
  background: var(--bg-deep);
  color: var(--text-on-deep);
}
.section--dark .lead { color: rgba(255,255,255,0.7); }
.section--alt { background: var(--bg-alt); }

.grid { display: grid; gap: clamp(16px, 2vw, 32px); }
.two-col { grid-template-columns: repeat(2, 1fr); }
.three-col { grid-template-columns: repeat(3, 1fr); }
.four-col { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) {
  .two-col, .three-col, .four-col { grid-template-columns: 1fr; }
}

/* ============= Buttons ============= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  border: 1px solid var(--accent);
  color: var(--accent);
  background: transparent;
  border-radius: var(--radius);
  transition: all .25s ease;
  cursor: pointer;
}
.btn:hover {
  background: var(--accent);
  color: var(--bg-deep);
}
.btn--solid {
  background: var(--accent);
  color: var(--bg-deep);
}
.btn--solid:hover {
  background: var(--accent-deep);
  border-color: var(--accent-deep);
  color: #fff;
}
.btn--ghost { border-color: currentColor; opacity: 0.85; }
.btn--lg { padding: 18px 36px; font-size: 14px; }

.arrow-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  transition: gap .25s ease;
}
.arrow-link:hover { gap: 16px; }
.arrow-link::after { content: "→"; }

/* ============= Header / Nav ============= */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  padding: 18px var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background-color .35s ease, padding .35s ease, border-color .35s ease;
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled,
.site-header.is-solid {
  background: rgba(250, 247, 242, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 12px var(--pad);
  border-bottom-color: var(--border);
}
[data-mode="industrial"] .site-header.is-scrolled,
[data-mode="industrial"] .site-header.is-solid {
  background: rgba(14, 14, 14, 0.94);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  height: 64px;
  /* Guarantees breathing room between logo and first nav link, even at
     narrow desktop widths. */
  margin-right: clamp(28px, 5vw, 72px);
  transition: height .35s ease;
}
.brand img { height: 100%; width: auto; display: block; }
/* Slightly smaller logo once the header docks (on scroll / solid pages) */
.site-header.is-scrolled .brand,
.site-header.is-solid .brand { height: 52px; }

@media (max-width: 720px) {
  .brand { height: 56px; }
  .site-header.is-scrolled .brand,
  .site-header.is-solid .brand { height: 44px; }
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(20px, 3vw, 44px);
}
.nav a {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text);
  position: relative;
  padding: 6px 0;
  transition: color .2s ease;
}
.site-header:not(.is-scrolled):not(.is-solid) .nav a,
.site-header:not(.is-scrolled):not(.is-solid) .brand {
  color: #fff;
}
.site-header:not(.is-scrolled):not(.is-solid) .nav a { color: rgba(255,255,255,0.92); }
.nav a:hover { color: var(--accent); }
.nav a.is-industrial { color: var(--orange); }
.site-header:not(.is-scrolled):not(.is-solid) .nav a.is-industrial { color: var(--orange-bright); }
.nav a.is-industrial:hover { color: var(--orange-bright); }

.nav-cta {
  padding: 10px 20px;
  font-size: 11px;
  letter-spacing: 0.18em;
}

.menu-toggle {
  display: none;
  font-size: 22px;
  line-height: 1;
}

@media (max-width: 900px) {
  /* Hide desktop nav on mobile */
  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px var(--pad) 20px;
    /* Fully opaque dark backdrop for high contrast */
    background: #14110d;
    border-top: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  }
  /* Show nav when menu is open */
  .site-header.is-menu-open .nav { display: flex; }
  /* When menu is open, the header bar matches the dropdown so it reads as one panel */
  .site-header.is-menu-open,
  .site-header.is-menu-open.is-scrolled,
  .site-header.is-menu-open.is-solid {
    background: #14110d !important;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-bottom-color: rgba(255,255,255,0.06);
  }
  .site-header.is-menu-open .menu-toggle { color: var(--gold); }
  [data-mode="industrial"] .site-header.is-menu-open .menu-toggle { color: var(--orange); }

  /* Stacked nav links inside the dropdown — gold on dark by default */
  .nav a {
    padding: 14px 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    font-size: 13px;
    color: var(--gold) !important;
  }
  .nav a:last-child { border-bottom: none; }
  /* Crushed link stays orange */
  .nav a.is-industrial { color: var(--orange) !important; }
  /* Order Samples CTA — gold pill on dark */
  .nav .nav-cta {
    margin-top: 14px;
    align-self: flex-start;
    padding: 12px 22px;
    border-color: var(--gold);
    color: var(--gold) !important;
  }
  /* Hover brightens */
  .nav a:hover { color: var(--gold-soft) !important; }
  .nav a.is-industrial:hover { color: var(--orange-bright) !important; }

  /* Hamburger button */
  .menu-toggle {
    display: inline-flex;
    width: 44px; height: 44px;
    align-items: center;
    justify-content: center;
    border: 1px solid currentColor;
    border-radius: var(--radius);
    z-index: 102;
  }
}

/* ============= Hero ============= */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: flex-end;
  color: #fff;
  overflow: hidden;
  background: #1B1814;
}
.hero__media {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}
/* Both video and poster image are layered absolutely on top of each other */
.hero__media video,
.hero__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
/* Slow Ken-Burns motion on hero poster image (works even if video is absent) */
.hero__media img {
  z-index: 0;
  animation: kenburns 28s ease-in-out infinite alternate;
  transform-origin: 55% 45%;
}
@keyframes kenburns {
  0%   { transform: scale(1.05) translate(0, 0); }
  100% { transform: scale(1.18) translate(-2%, 1.5%); }
}
/* If a video is present, it sits on top of the animated poster */
.hero__media video { z-index: 1; }
.hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(180deg, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.15) 35%, rgba(0,0,0,0.85) 100%);
}
/* hero__content keeps vertical padding from its own rule AND the horizontal
   padding inherited from .container — DO NOT overwrite all 4 sides here */
.hero__content {
  position: relative;
  z-index: 2;
  padding-top: clamp(80px, 12vh, 160px);
  padding-bottom: clamp(64px, 10vh, 120px);
  width: 100%;
}
.hero__eyebrow {
  color: var(--gold);
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  margin-bottom: 28px;
}
.hero__eyebrow::before {
  content: "";
  width: 40px;
  height: 1px;
  background: var(--gold);
  display: inline-block;
}
.hero__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(48px, 8vw, 120px);
  line-height: 0.98;
  letter-spacing: -0.02em;
  color: #fff;
  margin: 0 0 28px;
  max-width: 16ch;
}
.hero__title em {
  font-style: italic;
  color: var(--gold);
  font-weight: 400;
}
.hero__sub {
  font-size: clamp(15px, 1.3vw, 18px);
  color: rgba(255,255,255,0.86);
  max-width: 48ch;
  margin: 0 0 40px;
}
.hero__actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.hero__actions .btn {
  color: #fff;
  border-color: rgba(255,255,255,0.8);
}
.hero__actions .btn--solid {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--ink);
}
.hero__actions .btn--solid:hover {
  background: #fff;
  border-color: #fff;
}

.hero__scroll {
  position: absolute;
  bottom: 28px;
  left: clamp(20px, 3vw, 44px);
  z-index: 2;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--orange-bright, #F2A23A);
  writing-mode: vertical-rl;
  display: flex;
  align-items: center;
  gap: 10px;
  text-shadow: 0 1px 4px rgba(0,0,0,0.4);
}
.hero__scroll::after {
  content: "";
  width: 1px;
  height: 50px;
  background: linear-gradient(180deg, var(--orange-bright, #F2A23A), transparent);
}

/* Heritage strip */
.heritage {
  background: var(--bg-alt);
  padding: clamp(56px, 8vw, 96px) 0;
  border-bottom: 1px solid var(--border);
}
.heritage__grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1fr;
  align-items: center;
  gap: clamp(24px, 4vw, 56px);
}
.heritage__grid--three { grid-template-columns: 1.6fr 1fr 1fr; }
@media (max-width: 900px) {
  .heritage__grid,
  .heritage__grid--three { grid-template-columns: 1fr 1fr; }
}
.heritage__lede h2 {
  font-size: clamp(24px, 2.4vw, 32px);
  margin: 12px 0 0;
}
.stat { border-left: 1px solid var(--border); padding: 8px 0 8px 24px; }
.stat__num {
  font-family: var(--font-display);
  font-size: clamp(40px, 5vw, 56px);
  line-height: 1;
  color: var(--accent);
}
.stat__label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 8px;
}

/* ============= Industry Firsts ============= */
.firsts {
  padding: clamp(40px, 5vw, 72px) 0;
  background: var(--bg);
}
.firsts__head {
  max-width: 720px;
  margin-bottom: clamp(24px, 3vw, 40px);
}
.firsts__head .lead { font-size: 15px; }
.firsts__list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--border);
}
.firsts__row {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: clamp(16px, 2vw, 32px);
  align-items: baseline;
  padding: clamp(14px, 1.8vw, 22px) 0;
  border-bottom: 1px solid var(--border);
  transition: background-color .25s ease;
  position: relative;
}
.firsts__row::before {
  content: "";
  position: absolute;
  left: 0; top: 0;
  width: 0; height: 2px;
  background: var(--accent);
  transition: width .35s ease;
}
.firsts__row:hover::before { width: 100%; }
.firsts__num {
  font-family: var(--font-display);
  font-size: clamp(28px, 3vw, 44px);
  font-weight: 400;
  line-height: 1;
  color: var(--accent);
  font-feature-settings: "lnum";
}
.firsts__body { max-width: 64ch; }
.firsts__title {
  font-family: var(--font-display);
  font-size: clamp(18px, 1.8vw, 24px);
  font-weight: 500;
  line-height: 1.2;
  margin: 0 0 4px;
  letter-spacing: -0.005em;
}
.firsts__desc {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}
@media (max-width: 700px) {
  .firsts__row {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .firsts__num { font-size: 28px; }
}

/* ============= Category showcase ============= */
.cat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(16px, 2vw, 28px);
}
@media (max-width: 700px) { .cat-grid { grid-template-columns: 1fr; } }

.cat-tile {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: #1B1814;
  border-radius: var(--radius-lg);
  isolation: isolate;
  transition: transform .5s ease;
}
.cat-tile:hover { transform: translateY(-4px); }
.cat-tile__img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 1.2s ease;
}
.cat-tile:hover .cat-tile__img { transform: scale(1.06); }
.cat-tile::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 35%, rgba(0,0,0,0.85) 100%);
  z-index: 1;
}
.cat-tile__body {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: clamp(20px, 3vw, 36px);
  z-index: 2;
  color: #fff;
}
.cat-tile__tag {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold-soft);
  margin-bottom: 10px;
  display: inline-block;
}
.cat-tile__title {
  font-family: var(--font-display);
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1;
  margin: 0 0 12px;
  color: #fff;
}
.cat-tile__desc {
  font-size: 14px;
  color: rgba(255,255,255,0.78);
  max-width: 42ch;
  margin: 0 0 18px;
}
.cat-tile__cta {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--gold);
}

/* Industrial-styled tile within luxury context */
.cat-tile--industrial { background: var(--asphalt); }
.cat-tile--industrial .cat-tile__tag { color: var(--orange-bright); }
.cat-tile--industrial .cat-tile__cta { color: var(--orange); }
.cat-tile--industrial .cat-tile__title {
  font-family: 'Barlow Condensed', 'Oswald', sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.cat-tile--industrial::before {
  content: "INDUSTRIAL DIVISION";
  position: absolute;
  top: 24px; left: 24px;
  z-index: 2;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.3em;
  color: var(--orange);
  padding: 6px 10px;
  border: 1px solid var(--orange);
  background: rgba(0,0,0,0.4);
}

/* ============= Project gallery =============
   First item is featured (spans 2 rows in column 1). All other items
   auto-flow through the remaining cells. The grid grows naturally to
   accommodate as many items as you add — each implicit row picks up
   `grid-auto-rows` so additional rows get the same height.
   ============================================================ */
.gallery {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  grid-auto-rows: clamp(200px, 24vw, 320px);
  gap: clamp(8px, 1vw, 14px);
}
.gallery > * { overflow: hidden; border-radius: var(--radius-lg); }
.gallery__item { position: relative; }
.gallery__item img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 1.2s ease;
}
.gallery__item:hover img { transform: scale(1.04); }
/* Featured (first) item is twice as tall as a normal row */
.gallery__item:nth-child(1) { grid-row: span 2; grid-column: 1; }
@media (max-width: 700px) {
  .gallery { grid-template-columns: 1fr; grid-auto-rows: auto; }
  .gallery__item:nth-child(1) { grid-row: auto; aspect-ratio: 4/3; }
  .gallery__item { aspect-ratio: 4/3; }
}

/* ============= Resources (spec sheets) ============= */
.resource-card {
  border: 1px solid var(--border);
  padding: clamp(20px, 2.4vw, 32px);
  background: var(--white);
  display: flex;
  flex-direction: column;
  gap: 18px;
  transition: border-color .25s ease, transform .25s ease;
}
.resource-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.resource-card__icon {
  width: 44px; height: 44px;
  border: 1px solid var(--accent);
  color: var(--accent);
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  font-weight: 600;
}
.resource-card__title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  line-height: 1.2;
}
.resource-card__meta {
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

[data-mode="industrial"] .resource-card { background: var(--asphalt-soft); }

/* ============= Hours block (contact section) ============= */
.hours {
  margin: 20px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.hours__row {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 18px;
  padding: 14px 0;
  border-top: 1px solid var(--border);
}
.hours__row:last-child { border-bottom: 1px solid var(--border); }
.hours dt {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  line-height: 1.4;
  padding-top: 2px;
}
.hours dd {
  margin: 0;
  font-size: 15px;
  color: var(--text);
  line-height: 1.5;
}
.hours__note {
  display: inline-block;
  margin-top: 2px;
  font-size: 13px;
  color: var(--text-muted);
  font-style: italic;
}
@media (max-width: 600px) {
  .hours__row { grid-template-columns: 1fr; gap: 4px; }
}

/* ============= Footer ============= */
.site-footer {
  background: var(--bg-deep);
  color: rgba(255,255,255,0.72);
  padding: clamp(64px, 8vw, 96px) 0 28px;
}
.site-footer h4 {
  color: #fff;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  margin: 0 0 18px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: clamp(24px, 4vw, 56px);
}
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.site-footer a {
  display: block;
  padding: 4px 0;
  color: rgba(255,255,255,0.66);
  font-size: 14px;
}
.site-footer a:hover { color: var(--accent); }
.footer-bottom {
  margin-top: clamp(40px, 6vw, 72px);
  padding-top: 28px;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 12px;
  color: rgba(255,255,255,0.5);
}
.footer-brand {
  max-width: 320px;
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255,255,255,0.6);
}
.footer-brand img {
  height: 32px;
  width: auto;
  margin-bottom: 18px;
}

/* ============= Category page (template) ============= */
.cat-hero {
  padding: 200px 0 80px;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
}
.cat-hero__breadcrumb {
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 20px;
}
.cat-hero__breadcrumb a:hover { color: var(--accent); }
.cat-hero__title {
  font-size: clamp(48px, 7vw, 96px);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1;
  margin: 0 0 24px;
}
.cat-hero__lede {
  font-size: clamp(16px, 1.3vw, 19px);
  color: var(--text-muted);
  max-width: 60ch;
}

.filter-bar {
  display: flex;
  gap: 12px;
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.chip {
  padding: 10px 18px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: 999px;
  transition: all .2s ease;
}
[data-mode="industrial"] .chip { border-radius: 0; }
.chip:hover { color: var(--text); border-color: var(--text); }
.chip.is-active { background: var(--accent); color: var(--bg-deep); border-color: var(--accent); }

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(16px, 2vw, 32px);
}
@media (max-width: 900px) { .product-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .product-grid { grid-template-columns: 1fr; } }
.product {
  display: flex; flex-direction: column;
  background: var(--white);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: border-color .25s ease, transform .25s ease;
}
[data-mode="industrial"] .product { background: var(--asphalt-soft); }
.product:hover { border-color: var(--accent); transform: translateY(-3px); }
.product__img {
  aspect-ratio: 4/3;
  object-fit: cover;
  transition: transform 1.2s ease;
  width: 100%;
}
.product:hover .product__img { transform: scale(1.04); }

/* ===== Hover/tap reveal: placecard on top, real photo behind ===== */
/* Use padding-bottom hack for aspect ratio so it works on every mobile browser
   (some older WebKits silently ignore the modern aspect-ratio property). */
.product--reveal-photo .product__media {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 0;
  padding-bottom: 75%; /* 4:3 aspect ratio */
  aspect-ratio: 4/3;   /* progressive enhancement for modern browsers */
}
.product--reveal-photo .product__img {
  position: absolute !important;
  top: 0; left: 0; right: 0; bottom: 0;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  aspect-ratio: auto;
  display: block;
}
.product--reveal-photo .product__img--photo {
  opacity: 0;
  transform: scale(1);
  transition: opacity .55s ease, transform 1.2s ease;
  z-index: 1;
}
/* When revealed, the photo fades in AND slowly zooms — same motion the
   other product cards use on hover. */
.product--reveal-photo:hover .product__img--photo,
.product--reveal-photo.is-active .product__img--photo {
  opacity: 1;
  transform: scale(1.04);
}
/* Suppress the default scale-up on the placecard underneath so it doesn't
   look like both layers are zooming together. */
.product--reveal-photo:hover .product__img--card,
.product--reveal-photo.is-active .product__img--card {
  transform: none;
}
.product__body { padding: clamp(16px, 2vw, 24px); }
.product__name {
  font-family: var(--font-display);
  font-size: clamp(20px, 1.8vw, 26px);
  font-weight: 500;
  margin: 0 0 6px;
}
[data-mode="industrial"] .product__name {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.product__cat {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}
.product__meta {
  display: flex;
  justify-content: space-between;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-muted);
}
.product__meta strong { color: var(--text); font-weight: 600; }

/* ============= Spec table (industrial) ============= */
.spec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.spec-table th, .spec-table td {
  text-align: left;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
}
.spec-table th {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(0,0,0,0.2);
}
.spec-table tbody tr:hover { background: rgba(222,141,39,0.06); }
.spec-table td:first-child {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 600;
  font-size: 18px;
  letter-spacing: 0.04em;
}

/* ============= Utility ============= */
.center { text-align: center; }
.mx-auto { margin-left: auto; margin-right: auto; }
.mb-0 { margin-bottom: 0; }
.mb-3 { margin-bottom: 24px; }
.mb-5 { margin-bottom: 48px; }
.max-w-prose { max-width: 60ch; }

.divider {
  width: 60px; height: 1px;
  background: var(--accent);
  margin: 32px 0;
}

/* Subtle stone texture overlay (decorative) */
.tex {
  background-image:
    radial-gradient(circle at 20% 30%, rgba(0,0,0,0.06) 0, transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(0,0,0,0.04) 0, transparent 50%);
}

/* Animations */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .8s ease, transform .8s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* =============================================================
   Lightbox — click any zoomable image to inspect it large.
   Desktop / tablet only (>= 768px). On smaller screens the cards
   stay tap-passive so smartphone users aren't dragged into a
   modal accidentally.
   ============================================================= */
@media (min-width: 768px) {
  /* The product cards and project tiles get a zoom cursor so users
     know they're clickable. Reveal-photo cards keep their own cursor. */
  .product:not(.product--reveal-photo) .product__img,
  .gallery__item img {
    cursor: zoom-in;
  }
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: clamp(20px, 4vw, 64px);
  background: rgba(10, 9, 7, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity .35s ease;
}
.lightbox.is-open {
  display: flex;
  opacity: 1;
}
.lightbox__img {
  max-width: min(92vw, 1600px);
  max-height: 88vh;
  width: auto;
  height: auto;
  display: block;
  object-fit: contain;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  transform: scale(0.98);
  transition: transform .4s ease;
  cursor: zoom-out;
}
.lightbox.is-open .lightbox__img { transform: scale(1); }
.lightbox__close {
  position: absolute;
  top: clamp(16px, 2vw, 28px);
  right: clamp(16px, 2vw, 28px);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  font-size: 22px;
  font-weight: 300;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}
.lightbox__close:hover {
  background: rgba(0, 0, 0, 0.6);
  border-color: var(--accent, #c8a96a);
  color: var(--accent, #c8a96a);
}
/* Prev / next arrows — desktop and tablet only (lightbox itself is disabled below 768px) */
.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  font-size: 32px;
  font-weight: 300;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease;
  z-index: 2;
}
.lightbox__nav--prev { left: clamp(16px, 2vw, 32px); }
.lightbox__nav--next { right: clamp(16px, 2vw, 32px); }
.lightbox__nav:hover {
  background: rgba(0, 0, 0, 0.6);
  border-color: var(--accent, #c8a96a);
  color: var(--accent, #c8a96a);
}
@media (max-width: 767px) {
  .lightbox__nav { display: none; }
}
.lightbox__caption {
  position: absolute;
  bottom: clamp(20px, 3vw, 36px);
  left: clamp(20px, 4vw, 56px);
  right: clamp(20px, 4vw, 56px);
  text-align: center;
  font-size: 14px;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.92);
  font-family: var(--font-sans, Inter, sans-serif);
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
/* The reference code, like "image aw3" — visually distinct so customers can
   quote it back to us. */
.lightbox__code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent, #c8a96a);
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 6px 12px;
}
.lightbox__desc {
  font-size: 14px;
  line-height: 1.4;
  max-width: 760px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}
@media (max-width: 600px) {
  .lightbox__desc { font-size: 13px; }
  .lightbox__caption { bottom: 16px; }
}

/* On-card image reference code — a small monospaced badge below the meta */
.product__code {
  margin-top: 10px;
  display: inline-block;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent, #c8a96a);
  border: 1px solid var(--border, rgba(0, 0, 0, 0.12));
  border-radius: 999px;
  padding: 3px 10px;
}
[data-mode="industrial"] .product__code { color: var(--orange-bright, #f08a3e); }

/* Body scroll lock when lightbox is open */
body.lightbox-open { overflow: hidden; }

/* ============= Search bar (used on /search/) ============= */
.search-bar {
  margin: clamp(24px, 4vw, 36px) 0 0;
}
.search-bar input[type="search"] {
  display: block;
  width: 100%;
  max-width: 720px;
  font-family: var(--font-sans, Inter, sans-serif);
  font-size: clamp(16px, 1.5vw, 19px);
  padding: 16px 22px;
  border-radius: 999px;
  border: 1px solid var(--border, rgba(0,0,0,0.12));
  background: #fff;
  color: var(--text, #1a1a1a);
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.search-bar input[type="search"]:focus {
  border-color: var(--accent, #c8a96a);
  box-shadow: 0 0 0 4px rgba(200, 169, 106, 0.15);
}
.search-meta {
  margin-top: 12px;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted, #6b6b6b);
}
.search-empty {
  text-align: center;
  padding: 40px 0;
}
/* Result badges (Project / Product) shown inside .product__cat on /search/ */
.result-badge {
  display: inline-block;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 999px;
  margin-right: 8px;
  font-weight: 600;
  vertical-align: middle;
}
.result-badge--project {
  background: var(--accent, #c8a96a);
  color: #1a1a1a;
}
.result-badge--product {
  background: rgba(0, 0, 0, 0.08);
  color: var(--text, #1a1a1a);
}

/* ============= Apply Now form (bilingual) ============= */
/* Language toggle visibility — driven by body[data-lang] */
body[data-lang="en"] .lang-es { display: none; }
body[data-lang="es"] .lang-en { display: none; }
body:not([data-lang]) .lang-es { display: none; } /* default to English */

.apply-form { display: flex; flex-direction: column; gap: 28px; }
.form-section {
  border: 1px solid var(--border, rgba(0,0,0,0.12));
  border-radius: var(--radius-lg, 14px);
  padding: clamp(18px, 2.4vw, 28px);
  margin: 0;
}
.form-section legend {
  font-family: var(--font-serif, 'Cormorant Garamond', serif);
  font-size: clamp(20px, 2vw, 26px);
  font-weight: 600;
  padding: 0 10px;
  color: var(--text, #1a1a1a);
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1 1 220px;
  margin-bottom: 14px;
  font-size: 14px;
  color: var(--text, #1a1a1a);
}
.field > input,
.field > textarea {
  font-family: var(--font-sans, Inter, sans-serif);
  font-size: 15px;
  padding: 10px 12px;
  border: 1px solid var(--border, rgba(0,0,0,0.12));
  border-radius: 8px;
  background: #fff;
  color: var(--text, #1a1a1a);
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.field > input:focus,
.field > textarea:focus {
  border-color: var(--accent, #c8a96a);
  box-shadow: 0 0 0 3px rgba(200, 169, 106, 0.18);
}
.form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: flex-start;
}
.form-yesno {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: center;
  margin: 14px 0;
  font-size: 14px;
}
.form-yesno__q { flex: 1 1 100%; font-weight: 500; }
.form-yesno label { display: inline-flex; align-items: center; gap: 6px; }
/* Honeypot — invisible to humans */
.hp { position: absolute; left: -9999px; }

/* Bilingual button (used in homepage hero for Apply Now / Aplicar Ahora)
   Fits two lines of text inside the same outer dimensions as a single-line
   btn--lg sibling by tightening the line height and slightly reducing
   vertical padding. */
.btn--bilingual {
  line-height: 1.05;
  padding-top: clamp(8px, 1.1vw, 14px);
  padding-bottom: clamp(8px, 1.1vw, 14px);
}
.btn--bilingual .btn__primary {
  display: block;
}
.btn--bilingual .btn__secondary {
  display: block;
  font-size: 0.78em;
  opacity: 0.78;
  letter-spacing: 0.06em;
  margin-top: 2px;
  font-weight: 500;
}

/* ============= Order Status page ============= */
.os-results { margin-top: 12px; }
.os-summary {
  border-bottom: 1px solid var(--border, rgba(0,0,0,0.12));
  padding-bottom: 16px;
  margin-bottom: 28px;
}
.os-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.os-line {
  border: 1px solid var(--border, rgba(0,0,0,0.12));
  border-radius: var(--radius-lg, 14px);
  padding: clamp(16px, 2vw, 22px);
  background: var(--bg, #fff);
}
.os-line__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}
.os-line__id {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 15px;
}
.os-line__po {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 12px;
  color: var(--text-muted, #6b6b6b);
  letter-spacing: 0.08em;
}
.os-line__desc {
  margin: 12px 0 0;
  color: var(--text-muted, #444);
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-line;
}
.os-line__meta {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 13px;
  color: var(--text, #1a1a1a);
}
.os-empty {
  border: 1px dashed var(--border, rgba(0,0,0,0.18));
  border-radius: var(--radius-lg, 14px);
  padding: clamp(20px, 3vw, 32px);
  text-align: center;
  background: var(--bg-alt, #fafafa);
}

/* Status pills */
.status-pill {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 999px;
  white-space: nowrap;
  border: 1px solid currentColor;
}
.status-pill--complete    { color: #2c7a3a; background: rgba(44,122,58,0.10); }
.status-pill--ready       { color: var(--orange-deep, #B57315); background: rgba(222,141,39,0.12); }
.status-pill--in-progress { color: #8a5a00; background: rgba(255,200,80,0.18); }
.status-pill--not-started { color: var(--text-muted, #6b6b6b); background: rgba(0,0,0,0.06); }
.status-pill--unknown     { color: var(--text-muted, #6b6b6b); background: rgba(0,0,0,0.06); }
@media (max-width: 600px) {
  .form-row > .field { flex-basis: 100%; }
}
