/* =========================================================
   Ponderosa Trail Systems — shared design system

   Lettering: Archivo (display, variable width) for headlines,
              Figtree for text, Caveat Brush for the signature only.
   Shape:     "leaf" corners (one large and one small radius on
              opposite corners, taken from the logo's diamond),
              pill-shaped buttons and chips, and angular ridge-line
              edges between sections instead of hard horizontal rules.
   ========================================================= */

:root {
  /* surfaces */
  --night: #0A0F0B;
  --pine: #12271B;
  --forest: #1B3A2A;
  --forest-hi: #24492F;
  --moss: #3D6B4A;
  --sage: #9DBA9A;

  /* light surfaces (default) */
  --paper: #090d0a;
  --mist: #0f1812;

  /* text: dark ink on light, flipped inside .on-dark areas below */
  --bone: #F1EEE4;
  --bone-dim: #B4BAB1;
  --tint: rgba(236, 232, 220, 0.1);

  /* accent */
  --copper: #A9692F;
  --copper-hi: #D39A5E;

  --line: rgba(236, 232, 220, 0.14);

  /* type */
  --font-display: 'Archivo', 'Arial Narrow', Arial, sans-serif;
  --font-text: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-hand: 'Caveat Brush', 'Brush Script MT', cursive;

  /* shape */
  --leaf-sm: 4px 18px 4px 18px;
  --leaf: 6px 32px 6px 32px;
  --leaf-lg: 8px 52px 8px 52px;
  --ridge-h: 84px;

  /* motion: critically damped spring feel (damping 1.0, no bounce) */
  --ease-spring: cubic-bezier(0.22, 1, 0.36, 1);
  --t-ui: 0.35s;

  /* current surface (set by .surface-night / .surface-pine) */
  --surface: var(--paper);
  --card: #121b15;

  /* aliases kept so older inline references keep working */
  --black: var(--night);
  --panel: var(--pine);
  --off-white: var(--bone);
  --off-white-dim: var(--bone-dim);
  --copper-light: var(--copper-hi);
  --forest-light: var(--forest-hi);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
}

body {
  background: var(--paper);
  color: var(--bone);
  font-family: var(--font-text);
  font-size: 17px;
  line-height: 1.6;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--bone);
  text-wrap: balance;
}

h1 {
  font-weight: 650;
  font-stretch: 100%;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  line-height: 1.02;
  font-size: clamp(2.3rem, 5.6vw, 4.4rem);
}

h2 {
  font-weight: 600;
  font-stretch: 100%;
  text-transform: uppercase;
  letter-spacing: 0.015em;
  line-height: 1.1;
  font-size: clamp(1.85rem, 3.8vw, 2.9rem);
}

h3 {
  font-weight: 650;
  font-stretch: 100%;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.22;
  font-size: 1.15rem;
}

p { max-width: 64ch; }

a { color: inherit; }

img, svg, video { display: block; max-width: 100%; }

:focus-visible {
  outline: 2px solid var(--copper-hi);
  outline-offset: 3px;
}

.wrap {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 32px;
}

section { padding: 112px 0; }

/* ---------- Surfaces and ridge-line edges ---------- */

.surface-night { --surface: var(--paper); --card: #121b15; background: var(--surface); }
.surface-pine  { --surface: var(--mist);  --card: #0a110c; background: var(--surface); }

/* Dark areas (photo heroes, header, footer, forest panels) use light text */
header, .hero, .systems-hero, .about-hero, #systems, footer, .contact-info, .consult-callout {
  --bone: #F1EEE4;
  --bone-dim: #B9BFB6;
  --line: rgba(236, 232, 220, 0.16);
  --tint: rgba(236, 232, 220, 0.1);
}

/* A ridge line drawn in the section's own colour, rising over whatever sits above it */
.ridge-top { position: relative; }

.ridge-top::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(100% - 1px);
  height: var(--ridge-h);
  background: var(--surface);
  pointer-events: none;
  clip-path: polygon(0 100%, 0 62%, 9% 48%, 17% 58%, 29% 30%, 38% 44%, 50% 14%, 61% 40%, 72% 26%, 84% 52%, 92% 40%, 100% 56%, 100% 100%);
}

.ridge-b::before {
  clip-path: polygon(0 100%, 0 44%, 12% 58%, 24% 36%, 35% 52%, 47% 28%, 58% 46%, 69% 20%, 80% 42%, 90% 30%, 100% 46%, 100% 100%);
}

/* ---------- Header: a floating capsule ---------- */

header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  padding: 14px 20px 0;
  pointer-events: none;
}

.nav {
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  max-width: 1320px;
  margin: 0 auto;
  padding: 9px 10px 9px 16px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  transition: background 0.3s ease, border-color 0.3s ease;
}

header.scrolled .nav {
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  background: rgba(9, 13, 10, 0.82);
  border-color: var(--line);
}

.brand {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  display: flex;
  align-items: center;
  gap: 11px;
  font-family: var(--font-display);
  font-weight: 700;
  font-stretch: 108%;
  font-size: 0.82rem;
  text-decoration: none;
  color: var(--bone);
  white-space: nowrap;
}

.brand-mark,
.footer-mark {
  flex-shrink: 0;
  border-radius: 50%;
  object-fit: cover;
  background: var(--night);
}

.brand-mark { width: 36px; height: 36px; }
.footer-mark { width: 32px; height: 32px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-links a {
  text-decoration: none;
  color: var(--bone-dim);
  font-weight: 500;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  padding: 8px 14px;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease, transform var(--t-ui) var(--ease-spring);
}

.nav-links a:active { transform: scale(0.96); transition-duration: 0.1s; }

.nav-links a:hover { color: var(--bone); background: rgba(236, 232, 220, 0.08); }
.nav-links a[aria-current="page"] { color: var(--bone); background: rgba(236, 232, 220, 0.12); }

.nav-cta {
  text-decoration: none;
  background: var(--copper);
  color: #fff;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 10px 20px;
  border-radius: 999px;
  white-space: nowrap;
  transition: background 0.2s ease, transform var(--t-ui) var(--ease-spring);
}

.nav-cta:hover { background: var(--copper-hi); }

.menu-toggle {
  display: none;
  position: relative;
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: transparent;
  cursor: pointer;
}

.menu-toggle span {
  position: absolute;
  left: 12px;
  right: 12px;
  height: 2px;
  border-radius: 2px;
  background: var(--bone);
  transition: transform 0.2s ease, top 0.2s ease;
}

.menu-toggle span:nth-child(1) { top: 16px; }
.menu-toggle span:nth-child(2) { top: 24px; }

header.menu-open .menu-toggle span:nth-child(1) { top: 20px; transform: rotate(45deg); }
header.menu-open .menu-toggle span:nth-child(2) { top: 20px; transform: rotate(-45deg); }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: 999px;
  border: 1.5px solid transparent;
  font-family: var(--font-text);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.2s ease, border-color 0.2s ease, transform var(--t-ui) var(--ease-spring);
}

.btn:active, .nav-cta:active { transform: scale(0.96); transition-duration: 0.1s; }

.btn-primary { background: var(--copper); color: #fff; }
.btn-primary:hover { background: var(--copper-hi); }

.btn-secondary { border-color: var(--bone); color: var(--bone); }
.btn-secondary:hover { background: var(--tint); }

/* ---------- Page heroes (home, systems, about, blog) ---------- */

.hero,
.systems-hero,
.about-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 160px 0 120px;
  background-image:
    linear-gradient(90deg, rgba(10, 15, 11, 0.74) 0%, rgba(10, 15, 11, 0.38) 55%, rgba(10, 15, 11, 0.08) 100%),
    linear-gradient(180deg, rgba(10, 15, 11, 0.35) 0%, rgba(10, 15, 11, 0.15) 50%, rgba(10, 15, 11, 0.6) 100%),
    url('hero-photo.jpg');
  background-size: cover;
  background-position: center;
}

.contour-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0.22;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1160px;
}

.hero h1 {
  font-size: clamp(2.6rem, 7.2vw, 6rem);
  margin-bottom: 26px;
  text-shadow: 0 2px 22px rgba(0, 0, 0, 0.5);
}

.hero p {
  font-size: 1.15rem;
  color: var(--bone);
  opacity: 0.9;
  max-width: 34rem;
  margin-bottom: 38px;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.55);
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* ---------- Spec rail (home) ---------- */

.stat-strip { padding: 40px 0 56px; }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.stat {
  padding: 8px 32px;
  border-left: 1px solid var(--line);
}

.stat:first-child { border-left: none; padding-left: 0; }

.stat-number {
  font-family: var(--font-display);
  font-weight: 800;
  font-stretch: 112%;
  font-size: 2.4rem;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--bone);
}

.stat-label {
  margin-top: 10px;
  font-size: 0.92rem;
  color: var(--bone-dim);
  max-width: 24ch;
}

/* ---------- Shared section heading ---------- */

.section-head {
  max-width: 580px;
  margin-bottom: 56px;
}

.section-head h2 { margin-bottom: 16px; }

.section-head p {
  color: var(--bone-dim);
  font-size: 1.05rem;
}

/* ---------- Home: what we're building ---------- */

#systems {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.systems-video-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.systems-video-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(10, 15, 11, 0.4) 0%, rgba(10, 15, 11, 0.22) 50%, rgba(10, 15, 11, 0.5) 100%);
}

#systems .wrap { position: relative; z-index: 2; }

.plates {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.plate, .item-tile, .post-card, .value-item {
  transition: transform var(--t-ui) var(--ease-spring), border-color 0.2s ease;
}

.post-card:hover, .item-tile:hover, .value-item:hover { transform: translateY(-3px); }
.post-card:active { transform: scale(0.985); transition-duration: 0.1s; }

.plate {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 36px 30px 30px;
  border-radius: var(--leaf);
  border: 1px solid var(--line);
  background: var(--card);
  box-shadow: none;
}

.plate-icon {
  width: 40px;
  height: 40px;
  margin-bottom: 22px;
  color: var(--sage);
}

.plate h3 { margin-bottom: 12px; font-size: 1.5rem; }

.plate p {
  color: var(--bone-dim);
  font-size: 0.98rem;
  margin-bottom: 20px;
}

.plate-status,
.item-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 13px;
  border-radius: 999px;
  background: rgba(157, 186, 154, 0.16);
  color: var(--sage);
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.2;
}

.plate-status.live,
.item-status.live {
  background: rgba(211, 154, 94, 0.2);
  color: var(--copper-hi);
}

#systems .plate {
  background: rgba(10, 20, 14, 0.62);
  box-shadow: none;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.plate-list {
  list-style: none;
  flex: 1;
  margin-bottom: 26px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.plate-list li {
  position: relative;
  padding-left: 20px;
  font-size: 0.95rem;
  line-height: 1.45;
  color: var(--bone-dim);
}

.plate-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--copper);
}

.plate-status { text-decoration: none; }

#systems .plate-status { background: rgba(157, 186, 154, 0.18); color: var(--sage); }
#systems .plate-status.live { background: rgba(211, 154, 94, 0.2); color: var(--copper-hi); }
#systems .section-head h2, #systems .section-head p { text-shadow: 0 2px 16px rgba(0, 0, 0, 0.5); }

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

.section-cta {
  margin-top: 44px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
}


/* ---------- Home: photo gallery ---------- */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: 250px;
  gap: 18px;
}

.gallery-grid figure {
  overflow: hidden;
  border-radius: var(--leaf);
  background: var(--mist);
}

.gallery-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease-spring);
  will-change: transform;
}

.gallery-grid figure:hover img { transform: scale(1.04); }

.g-a { grid-column: span 4; grid-row: span 2; }
.g-b { grid-column: span 2; grid-row: span 2; }
.g-c, .g-d, .g-e { grid-column: span 2; }
.g-d img { object-position: center 70%; }

/* ---------- Home: why Ponderosa ---------- */

.why-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 72px;
  align-items: center;
}

.why-image {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: var(--leaf-lg);
}

.why-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.why-text .section-head { margin-bottom: 40px; }

.why-list {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.why-item { display: flex; gap: 18px; }

.why-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  margin-top: 3px;
  color: var(--copper);
}

.why-item h3 { font-size: 1.15rem; margin-bottom: 6px; }

.why-item p {
  color: var(--bone-dim);
  font-size: 0.98rem;
}

/* ---------- Contact panel ---------- */

.contact-info {
  max-width: 860px;
  margin: 0 auto;
  padding: 72px clamp(24px, 6vw, 72px);
  text-align: center;
  background: var(--forest);
  border-radius: var(--leaf-lg);
}

.contact-info h2 { margin-bottom: 16px; }

.contact-info p {
  margin: 0 auto 32px;
  color: var(--bone);
  opacity: 0.82;
  font-size: 1.08rem;
}

.contact-detail {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  font-size: 0.98rem;
  color: var(--bone);
}

.contact-detail svg { width: 18px; height: 18px; color: var(--sage); flex-shrink: 0; }

.contact-info .btn { margin-top: 28px; }

/* ---------- Footer ---------- */

footer {
  padding: 36px 0;
  background: var(--night);
  color: var(--bone);
}

.footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-family: var(--font-display);
  font-weight: 700;
  font-stretch: 108%;
  font-size: 1rem;
}

.footer-meta {
  font-size: 0.85rem;
  color: var(--bone-dim);
}

/* ---------- Systems page ---------- */

.systems-hero {
  min-height: 85vh;
  display: flex;
  align-items: center;
  padding: 190px 0 150px;
}

.systems-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 25%;
}

.systems-hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(10, 15, 11, 0.25) 0%, rgba(10, 15, 11, 0.38) 55%, rgba(10, 15, 11, 0.6) 100%);
}

.systems-hero .wrap { position: relative; z-index: 2; }

.systems-hero h1 {
  margin-bottom: 20px;
  max-width: 16ch;
  text-shadow: 0 2px 22px rgba(0, 0, 0, 0.5);
}

.systems-hero p {
  font-size: 1.15rem;
  color: var(--bone);
  opacity: 0.9;
  max-width: 34rem;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.55);
}

.consult-section { padding: 88px 0 72px; }

.consult-callout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px 40px;
  flex-wrap: wrap;
  padding: 44px 48px;
  background: var(--forest);
  border-radius: var(--leaf-lg);
}

.consult-callout h3 {
  font-size: 1.7rem;
  font-weight: 760;
  font-stretch: 106%;
  margin-bottom: 8px;
}

.consult-callout p {
  color: var(--bone);
  opacity: 0.82;
  font-size: 1rem;
  max-width: 34rem;
}

.category-block { padding: 96px 0; }

.category-banner {
  width: 100%;
  aspect-ratio: 3 / 1;
  max-height: 280px;
  overflow: hidden;
  border-radius: var(--leaf-lg);
  margin-bottom: 40px;
}

.category-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 48px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}

.category-head p {
  color: var(--bone-dim);
  font-size: 1rem;
  max-width: 40ch;
}

.category-items {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.item-tile {
  box-shadow: none;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 28px 26px 24px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--leaf-sm);
}

.item-tile h3 { font-size: 1.2rem; margin-bottom: 10px; }

.item-tile p {
  flex: 1;
  color: var(--bone-dim);
  font-size: 0.95rem;
  margin-bottom: 20px;
}

/* ---------- About page ---------- */

.about-hero { padding: 190px 0 140px; }

.about-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(10, 15, 11, 0.72) 0%, rgba(10, 15, 11, 0.35) 60%, rgba(10, 15, 11, 0.1) 100%),
    linear-gradient(180deg, rgba(10, 15, 11, 0.3) 0%, rgba(10, 15, 11, 0.6) 100%);
}

.about-hero .wrap { position: relative; z-index: 2; }

.about-hero h1 {
  margin-bottom: 20px;
  max-width: 15ch;
  text-shadow: 0 2px 22px rgba(0, 0, 0, 0.5);
}

.about-hero p {
  font-size: 1.15rem;
  color: var(--bone);
  opacity: 0.9;
  max-width: 34rem;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.55);
}

.about-body {
  max-width: 720px;
  margin: 0 auto;
}

.about-body p {
  color: var(--bone-dim);
  font-size: 1.12rem;
  margin-bottom: 24px;
}

.signature {
  font-family: var(--font-hand);
  font-size: 2.4rem;
  line-height: 1;
  color: var(--bone);
  margin-top: 36px;
}

.signature-title {
  margin-top: 8px;
  font-size: 0.92rem;
  color: var(--copper-hi);
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.value-item {
  box-shadow: none;
  padding: 34px 28px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--leaf);
}

.value-item h3 { font-size: 1.25rem; margin-bottom: 12px; }

.value-item p {
  color: var(--bone-dim);
  font-size: 0.98rem;
}

/* ---------- Blog ---------- */

.blog-hero { padding: 190px 0 112px; }

.blog-hero h1 { margin-bottom: 20px; max-width: 14ch; }

.blog-hero p {
  font-size: 1.15rem;
  color: var(--bone-dim);
  max-width: 34rem;
}

.post-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.post-card {
  box-shadow: none;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 30px 28px 26px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--leaf);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s ease;
}

.post-card:hover { border-color: var(--moss); }

.post-tag {
  display: inline-block;
  padding: 4px 12px;
  margin-bottom: 18px;
  border-radius: 999px;
  background: rgba(157, 186, 154, 0.16);
  color: var(--sage);
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.3;
}

.post-card h3 { font-size: 1.4rem; margin-bottom: 12px; }

.post-card p {
  flex: 1;
  color: var(--bone-dim);
  font-size: 0.97rem;
  margin-bottom: 20px;
}

.post-read-more {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--copper-hi);
}

.post-full {
  max-width: 720px;
  margin: 0 auto;
  padding: 96px 32px;
  border-top: 1px solid var(--line);
}

.post-full h2 { margin-bottom: 28px; }

.post-full p {
  color: var(--bone-dim);
  font-size: 1.08rem;
  margin-bottom: 22px;
}

.post-full h3 {
  font-size: 1.4rem;
  margin: 38px 0 14px;
}

.post-full ul {
  color: var(--bone-dim);
  font-size: 1.08rem;
  margin: 0 0 22px 22px;
}

.post-full ul li { margin-bottom: 10px; }

.back-to-top {
  display: inline-block;
  margin-top: 12px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--copper-hi);
  text-decoration: none;
}

.back-to-top:hover { text-decoration: underline; }

/* ---------- Motion ---------- */

.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.7s ease, transform 0.8s var(--ease-spring);
}

.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { transform: none; transition: opacity 0.4s ease; }
  .gallery-grid figure:hover img, .post-card:hover, .item-tile:hover, .value-item:hover { transform: none; }
  .btn:active, .nav-cta:active, .nav-links a:active, .post-card:active { transform: none; }
}

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
  :root { --ridge-h: 44px; }

  section { padding: 76px 0; }

  header { padding: 12px 14px 0; }
  .nav { padding: 8px 8px 8px 14px; }
  .menu-toggle { display: inline-block; }

  .nav-links {
    position: absolute;
    top: 74px;
    left: 14px;
    right: 14px;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 12px;
    border-radius: var(--leaf);
    border: 1px solid var(--line);
    background: rgba(10, 15, 11, 0.96);
    display: flex;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-8px) scale(0.97);
    transform-origin: top center;
    transition: opacity 0.25s ease, transform var(--t-ui) var(--ease-spring), visibility 0s linear 0.35s;
  }

  header.menu-open .nav-links {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
    transition-delay: 0s;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    position: absolute;
    top: 74px;
    left: 14px;
    right: 14px;
    padding: 12px;
    border-radius: var(--leaf);
    border: 1px solid var(--line);
    background: rgba(10, 15, 11, 0.96);
  }

  header.menu-open .nav-links a { padding: 12px 16px; font-size: 1rem; }

  .hero { padding: 150px 0 110px; }
  .systems-hero { padding: 140px 0 100px; min-height: 70vh; }
  .about-hero { padding: 140px 0 100px; }
  .blog-hero { padding: 140px 0 76px; }

  .stat-grid { grid-template-columns: 1fr; }
  .stat { border-left: none; border-top: 1px solid var(--line); padding: 20px 0; }
  .stat:first-child { border-top: none; }

  .plates { grid-template-columns: 1fr; }

  .gallery-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 180px; gap: 12px; }
  .g-a { grid-column: span 2; grid-row: span 2; }
  .g-b { grid-column: span 1; grid-row: span 2; }
  .g-c, .g-d { grid-column: span 1; }
  .g-e { grid-column: span 2; }

  .why-grid { grid-template-columns: 1fr; gap: 40px; }
  .why-image { aspect-ratio: 16 / 10; }

  .consult-section { padding: 64px 0 56px; }
  .consult-callout { padding: 32px 26px; }
  .category-block { padding: 68px 0; }
  .category-banner { aspect-ratio: 16 / 9; max-height: 220px; }

  .values-grid { grid-template-columns: 1fr; }
  .post-list { grid-template-columns: 1fr; }
  .post-full { padding: 68px 20px; }
}

@media (max-width: 560px) {
  .wrap { padding: 0 20px; }
  .nav-cta { display: none; }
  .contact-info { padding: 52px 24px; }
}

/* ---------- Added photography ---------- */

.post-card { overflow: hidden; }

.post-thumb {
  width: calc(100% + 56px);
  max-width: none;
  height: 190px;
  margin: -30px -28px 22px;
  object-fit: cover;
}

.about-photos { padding: 0 0 104px; }

.photo-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  max-width: 820px;
  margin: 0 auto;
}

.photo-pair figure {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: var(--leaf);
}


.photo-pair img { width: 100%; height: 100%; object-fit: cover; }

@media (max-width: 560px) {
  .photo-pair { gap: 12px; }
}

/* ---------- Accessibility: materials and contrast ---------- */

@media (prefers-reduced-transparency: reduce) {
  .nav, header.scrolled .nav { background: #0a0f0b; -webkit-backdrop-filter: none; backdrop-filter: none; }
  #systems .plate { background: #0f1a13; -webkit-backdrop-filter: none; backdrop-filter: none; }
  header.menu-open .nav-links { background: #0a0f0b; }
}

@media (prefers-contrast: more) {
  :root { --line: rgba(236, 232, 220, 0.5); --bone-dim: #e2dfd5; }
  header, .hero, .systems-hero, .about-hero, #systems, footer, .contact-info, .consult-callout { --line: rgba(236, 232, 220, 0.5); --bone-dim: #e2dfd5; }
  .btn-secondary { border-width: 2px; }
}

/* ---------- Cinematic details ---------- */

.btn-arrow::after {
  content: '\2192';
  margin-left: 12px;
  font-size: 1.1em;
  letter-spacing: 0;
  transition: transform var(--t-ui) var(--ease-spring);
}

.btn-arrow:hover::after { transform: translateX(4px); }

/* vertical scroll cue, bottom-left of the hero */
.scroll-cue {
  position: absolute;
  left: 32px;
  bottom: 56px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 14px;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: 0.68rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--bone-dim);
}

.scroll-cue::after {
  content: '';
  width: 1px;
  height: 56px;
  background: linear-gradient(180deg, transparent, var(--bone));
}

/* numbered side indicator */
.dot-nav {
  position: fixed;
  right: 22px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 14px;
}

.dot-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--bone-dim);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
}

.dot-nav a span { opacity: 0; transform: translateX(6px); transition: opacity 0.3s ease, transform var(--t-ui) var(--ease-spring); }
.dot-nav a::after {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(236, 232, 220, 0.4);
  transition: background 0.3s ease, transform var(--t-ui) var(--ease-spring);
}

.dot-nav a:hover span, .dot-nav a.active span { opacity: 1; transform: none; }
.dot-nav a.active { color: var(--copper-hi); }
.dot-nav a.active::after { background: var(--copper-hi); transform: scale(1.5); }

/* ghost section numerals */
.section-head[data-num] { position: relative; }

.section-head[data-num]::before {
  content: attr(data-num);
  position: absolute;
  left: -6px;
  top: -62px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 6.5rem;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(236, 232, 220, 0.16);
  pointer-events: none;
}

.section-head[data-num] h2 { position: relative; }

/* quick-link strip under the hero */
.quick-strip { padding: 0; }

.quick-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.quick-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 34px 28px;
  text-decoration: none;
  border-left: 1px solid var(--line);
  transition: background 0.3s ease;
}

.quick-item:first-child { border-left: none; padding-left: 0; }
.quick-item:hover { background: var(--tint); }
.quick-item:first-child:hover { background: transparent; }

.quick-label {
  font-family: var(--font-display);
  font-weight: 650;
  font-size: 0.95rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.quick-label::after { content: '\2192'; margin-left: 10px; color: var(--copper-hi); }
.quick-sub { color: var(--bone-dim); font-size: 0.9rem; }

@media (max-width: 1100px) { .dot-nav { display: none; } }

@media (max-width: 860px) {
  .scroll-cue { display: none; }
  .quick-grid { grid-template-columns: 1fr 1fr; }
  .quick-item { padding: 22px 16px; border-left: none; border-top: 1px solid var(--line); }
  .quick-item:first-child { padding-left: 16px; }
  .section-head[data-num]::before { font-size: 4.5rem; top: -44px; }
  .hero { padding: 130px 0 90px; }
}

/* long reading titles stay in sentence case */
.post-card h3, .post-full h2, .post-full h3, .consult-callout h3 {
  text-transform: none;
  letter-spacing: -0.01em;
  font-weight: 700;
}

/* ---------- Mobile polish ---------- */

@media (max-width: 860px) {
  /* hero: photo sits at its natural scale in the upper part, text rests on a solid fade */
  .hero {
    min-height: 92svh;
    align-items: flex-end;
    padding: 120px 0 56px;
    background-color: var(--night);
    background-image:
      linear-gradient(180deg, rgba(9, 13, 10, 0.5) 0%, rgba(9, 13, 10, 0) 22%, rgba(9, 13, 10, 0.78) 52%, #090d0a 72%),
      url('hero-photo.jpg');
    background-size: 100% 100%, auto 68%;
    background-position: center, center top;
    background-repeat: no-repeat;
  }

  .hero h1 { font-size: clamp(1.9rem, 8.4vw, 3rem); }
  .hero p { font-size: 1.02rem; }

  /* skip the heavy video on phones: solid dark section with a soft glow */
  .systems-video-bg { display: none; }
  .systems-video-overlay { background: radial-gradient(120% 60% at 50% 0%, #13241a 0%, #0b120d 70%); }

  /* gallery: one calm column at natural proportions */
  .gallery-grid { grid-template-columns: 1fr; grid-auto-rows: auto; gap: 14px; }
  .gallery-grid figure, .g-a, .g-b, .g-c, .g-d, .g-e { grid-column: auto; grid-row: auto; aspect-ratio: 4 / 3; }
  .g-b { aspect-ratio: 4 / 5; }

  .section-head[data-num] { padding-top: 34px; }
  .section-head[data-num]::before { top: -6px; left: -2px; }
  .why-image { aspect-ratio: 4 / 3; margin-bottom: 8px; }

  .category-banner { aspect-ratio: 4 / 3; max-height: none; }
  .photo-pair { grid-template-columns: 1fr 1fr; }
  .post-thumb { height: 170px; }
}

@media (max-width: 560px) {
  .brand { font-size: 0.7rem; letter-spacing: 0.06em; gap: 9px; }
  .brand-mark { width: 32px; height: 32px; }
  .hero-actions .btn { width: 100%; }
  .wrap { padding: 0 20px; }
}

.contact-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 14px; margin-top: 28px; }
.contact-info .contact-actions .btn { margin-top: 0; }
.contact-detail a { text-decoration: none; }
.contact-detail a:hover { text-decoration: underline; }
@media (max-width: 560px) { .contact-actions .btn { width: 100%; } }

.reveal-phone {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.reveal-phone:hover { color: var(--copper-hi); }
