/* ════════════════════════════════════════════════════════════════════
   Self-hosted fonts — no third-party requests, ever.
   Both are OFL (open licence), subset to the glyphs this site actually
   uses and compressed to woff2: 24 KB + 12 KB total.
     WWD West — Rye. A genuine western display face, for the brand name only.
     WWD Slab — Zilla Slab Bold. A sturdy slab serif for headings: western
                in feel without tipping into wanted-poster pastiche.
   font-display: swap means text paints immediately in the fallback and
   upgrades when the font arrives — never an invisible headline.
   ════════════════════════════════════════════════════════════════════ */
@font-face {
  font-family: 'WWD West';
  src: url('../assets/fonts/rye.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'WWD Slab';
  src: url('../assets/fonts/zillaslab-bold.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}

/* ════════════════════════════════════════════════════════════════════
   WILD WEST DRYWALL — site styles
   1. Reset & tokens   2. Base           3. Header/nav
   4. Hero             5. Sections/cards 6. Contact/form
   7. Footer           8. Responsive
   ════════════════════════════════════════════════════════════════════ */

/* 1. Reset & tokens */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  /* Palette taken from the logo: a gold horse on near-black navy (#000018).
     Bright neutral surfaces, deep navy for the contrast bands, and the logo gold as the
     single accent. The original warm browns were replaced — they fought the logo and read
     as muddy rather than professional. */
  --navy:        #101923;   /* deep navy — dark bands, headings on light */
  --navy-soft:   #1c2836;   /* lifted navy for gradients */
  --navy-line:   #2b3a4b;   /* hairlines on dark */
  --cream:       #f6efdd;   /* bright cream — the accent on navy. 15.5:1 on navy */
  --cream-deep:  #e9dcc0;   /* deeper cream — borders and tints on light surfaces */
  --sky:         #6cc4ff;   /* bright sky — header surface */
  --blue-deep:   #0d3b66;   /* dark blue — nav text on sky. 5.98:1 on sky */
  --blue-darker: #082a4a;   /* nav hover */   /* vivid sky — brand name on navy */
  --bronze:      #7d5f33;   /* warm readable accent for text on light — 5.2:1 on eggshell */
  --page:        #faf9f6;   /* page — soft warm white ("eggshell") */
  --eggshell:    #f2f0ea;   /* alternating bands, a shade deeper than the page */
  --line:        #e6e3dc;   /* hairlines on light */
  --surface:     #ffffff;   /* cards sit pure white on the light page */
  --ink:         #101923;
  --muted:       #5c6673;
  --white:       #ffffff;
  --shadow:      0 1px 2px rgba(16, 25, 35, .05), 0 10px 30px rgba(16, 25, 35, .07);
  --radius:      12px;
}
html { scroll-behavior: smooth; }

/* 2. Base */
body {
  font-family: 'Segoe UI', Arial, sans-serif;
  font-size: 18px; line-height: 1.65;
  color: var(--ink); background: var(--page);
}
.container { max-width: 1080px; margin: 0 auto; padding: 0 22px; }
img { max-width: 100%; display: block; }
a { color: var(--navy-soft); }
a:hover { color: var(--muted); }
h1, h2, h3 { line-height: 1.2; font-family: 'WWD Slab', Georgia, 'Times New Roman', serif; }

/* 3. Header / nav */
.site-header {
  background: var(--sky); position: sticky; top: 0; z-index: 100;
  border-bottom: 3px solid var(--navy);
}
.nav-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 22px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-logo { width: 52px; height: 52px; border-radius: 8px; }
.brand-name {
  font-family: 'WWD West', Georgia, serif; font-size: 25px; font-weight: 400; letter-spacing: .5px;
  color: var(--blue-deep); text-transform: uppercase; letter-spacing: 1px;
}
.brand-name em { font-style: normal; color: var(--blue-deep); }
.site-nav { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.site-nav a { color: var(--blue-deep); text-decoration: none; font-size: 16.5px; font-weight: 600; letter-spacing: .4px; }
.site-nav a:hover { color: var(--blue-darker); }
.site-nav .nav-cta {
  background: var(--blue-deep); color: var(--cream); padding: 9px 18px;
  border-radius: 6px; font-weight: 700;
}
.site-nav .nav-cta:hover { background: var(--blue-darker); color: #fffaf0; }
.nav-toggle { display: none; background: none; border: none; color: var(--blue-deep); font-size: 26px; cursor: pointer; }

/* 4. Hero */
.hero {
  background:
    radial-gradient(1200px 500px at 80% -10%, rgba(232, 201, 122, .18), transparent 60%),
    linear-gradient(160deg, var(--navy) 0%, var(--navy-soft) 70%, #241708 100%);
  color: var(--white); text-align: center; padding: 84px 22px 96px;
}
.hero-inner { max-width: 780px; margin: 0 auto; position: relative; z-index: 2; }
.hero-photo { position: relative; overflow: hidden; }
/* <picture> has to fill the hero so the img inside keeps its absolute positioning */
.hero-media { position: absolute; inset: 0; display: block; }
.hero-bg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center 42%; z-index: 0;
}
/* the portrait crop is already composed for a phone, so centre it */
@media (max-width: 700px) {
  .hero-bg { object-position: center 50%; }
  /* On a phone the headline and body both sit over the middle of the photo, so the
     ramp needs to hold up across more of the frame than it does on desktop. */
  .hero-photo::after {
    background: linear-gradient(180deg,
      rgba(16, 25, 35, .50) 0%,
      rgba(16, 25, 35, .66) 22%,
      rgba(16, 25, 35, .72) 50%,
      rgba(16, 25, 35, .62) 72%,
      rgba(16, 25, 35, .84) 100%);
  }
}
.hero-photo::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  /* Lighter than the first pass: the photo is the product, so it should actually read.
     The text stays legible because of its own shadow plus the darker ends of the ramp. */
  /* Overlay tuned so the photo reads while the text stays legible: darkest at the
     top and bottom where the text sits, lightest through the middle. */
  /* Navy, not the old brown: the brown overlay was a leftover from the previous
     palette and made the photo read as muddy next to the blue header. */
  /* Sky blue is a LIGHT colour, so the headline needs a genuinely dark backdrop to sit on.
     Measured at only 2.8:1 before this — below even the large-text minimum. */
  /* Full width, so it can never read as a box. Darkest through the band the headline
     and body copy occupy, lighter above and below so the photograph still shows. */
  background: linear-gradient(180deg,
    rgba(16, 25, 35, .42) 0%,
    rgba(16, 25, 35, .60) 18%,
    rgba(16, 25, 35, .68) 42%,
    rgba(16, 25, 35, .58) 62%,
    rgba(16, 25, 35, .80) 100%);
}
.hero-kicker {
  color: var(--cream); letter-spacing: 3px; text-transform: uppercase;
  font-size: 14.5px; font-weight: 700; margin-bottom: 18px;
  text-shadow: 0 1px 6px rgba(0, 0, 0, .60);
}
.hero h1 {
  font-size: 56px; font-weight: 700; text-transform: uppercase; letter-spacing: 2px;
  color: var(--sky);
  /* Layered halo: the wide soft pass darkens the photo immediately behind the glyphs,
     the tight pass keeps the edges crisp. This is what makes light-on-photo work. */
  text-shadow: 0 0 18px rgba(0, 0, 0, .42), 0 2px 8px rgba(0, 0, 0, .62), 0 1px 2px rgba(0, 0, 0, .85);
}
.hero-sub {
  font-size: 20px; color: #f2ece2; margin: 18px auto 28px; max-width: 620px;
  text-shadow: 0 1px 6px rgba(0, 0, 0, .60);
}
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero-phone { margin-top: 26px; }
.hero-phone a { color: var(--cream); font-size: 26px; font-weight: 700; text-decoration: none; letter-spacing: 1px; }
.hero-phone a:hover { color: #fffaf0; }

.btn {
  display: inline-block; padding: 14px 30px; border-radius: 6px;
  font-weight: 700; font-size: 17px; letter-spacing: .6px;
  text-decoration: none; border: 2px solid transparent; cursor: pointer;
}
.btn-gold { background: var(--cream); color: var(--navy); border-color: var(--cream-deep); }
.btn-gold:hover { background: #fffaf0; color: var(--navy); }
/* On the white form the cream button has almost no contrast against its own
   background, and "Send Request" is the one thing we most want clicked. Invert it
   there: navy fill, cream label. Same palette, correct emphasis per context. */
.quote-form .btn-gold {
  background: var(--navy); color: var(--cream); border-color: var(--navy);
}
.quote-form .btn-gold:hover { background: var(--navy-soft); color: #fffaf0; }
.btn-outline { border-color: var(--bronze); color: var(--bronze); }
/* Over the hero photo the button must be cream, or bronze disappears into the image. */
.hero .btn-outline { border-color: var(--cream); color: var(--cream); }
.hero .btn-outline:hover { background: rgba(246, 239, 221, .14); color: #fffaf0; }
.btn-outline:hover { background: rgba(232, 201, 122, .12); }
.btn-block { width: 100%; }

/* 5. Sections & cards */
.section { padding: 72px 0; }
.section-dark { background: var(--eggshell); color: var(--ink); }
.section-kicker {
  color: var(--muted); text-transform: uppercase; letter-spacing: 3px;
  font-size: 13.5px; font-weight: 700; text-align: center; margin-bottom: 8px;
}
.section-dark .section-kicker { color: var(--bronze); }
.section-title { text-align: center; font-size: 40px; color: var(--navy-soft); margin-bottom: 40px; }
.section-dark .section-title { color: var(--navy); }
.grid { display: grid; gap: 22px; }

.services-grid { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.card {
  background: var(--white); border: 1px solid #e4dcd0; border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow); border-top: 4px solid var(--cream-deep);
}
.card-icon { font-size: 32px; margin-bottom: 10px; min-height: 200px; display: flex; align-items: center; justify-content: center; }
.card h3 { color: var(--navy-soft); font-size: 22px; margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 16.5px; }

/* Card photos — flush to the card's top edge, above the gold rule */
.card { overflow: hidden; }
.card-photo {
  width: calc(100% + 52px); margin: -26px -26px 18px;
  height: 200px; object-fit: cover; background: #eee9df;
  border-bottom: 3px solid var(--cream-deep);
}

/* Work gallery */
.gallery-grid { grid-template-columns: repeat(3, 1fr); }
.shot {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
}
.shot img { width: 100%; height: 230px; object-fit: cover; object-position: center; }
.shot figcaption { padding: 12px 15px; font-size: 13.5px; color: #cfc7ba; }

.why-grid { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.why-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.why-item h3 { color: var(--navy); font-size: 20px; margin-bottom: 6px; }
.why-item p { color: var(--muted); font-size: 16.5px; }

/* 6. Service area + contact */
.area-wrap { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: center; }
.area-wrap .section-title, .area-wrap .section-kicker { text-align: left; }
.area-wrap p { color: var(--muted); margin-bottom: 12px; }
.area-callout {
  background: var(--surface); border: 1px solid #e4dcd0; border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow); border-left: 6px solid var(--cream-deep);
}
.area-callout-title { font-family: 'WWD Slab', Georgia, serif; font-size: 23px; color: var(--navy-soft); font-weight: 700; }

.contact-grid { grid-template-columns: 1fr 1.2fr; gap: 44px; align-items: start; }
.contact-info h3 { color: var(--navy); font-size: 26px; margin-bottom: 14px; }
.contact-info p { color: var(--muted); margin-bottom: 8px; }
.contact-line a { color: var(--bronze); text-decoration: none; font-weight: 600; }
.contact-line a:hover { color: var(--navy); }
.contact-note { font-style: italic; color: #b7ae9f !important; margin-top: 16px; font-size: 15.5px; }

.quote-form {
  background: var(--white); color: var(--ink); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow);
}
.quote-form label { display: block; font-weight: 700; font-size: 13.5px; letter-spacing: .5px; text-transform: uppercase; color: var(--navy-soft); margin: 14px 0 5px; }
.quote-form input, .quote-form select, .quote-form textarea {
  width: 100%; padding: 11px 12px; font-size: 17px; font-family: inherit;
  border: 1px solid #d8cfc0; border-radius: 6px; background: #fffdf8; color: var(--ink);
}
.quote-form input:focus, .quote-form select:focus, .quote-form textarea:focus {
  outline: none; border-color: var(--bronze); box-shadow: 0 0 0 3px rgba(125, 95, 51, .18);
}
.quote-form .btn { margin-top: 18px; }
.form-hint { font-size: 14.5px; color: var(--muted); margin-top: 10px; }

/* Honeypot: hidden from people, still present for bots. Deliberately not display:none —
   some bots skip hidden fields, so this is moved off-screen and shrunk instead. */
.hp-field {
  position: absolute; left: -9999px; width: 1px; height: 1px;
  overflow: hidden; opacity: 0;
}

/* 7. Footer */
.site-footer { background: var(--navy); color: #c8cfd8; padding: 40px 0 22px; border-top: 3px solid var(--cream); }
.footer-row { display: flex; justify-content: space-between; gap: 26px; flex-wrap: wrap; align-items: center; }
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-logo { width: 44px; height: 44px; border-radius: 6px; }
.footer-brand em { color: var(--cream); }
.footer-links a { color: #c8cfd8; text-decoration: none; display: inline-block; margin-right: 16px; font-size: 15px; }
.footer-links a:hover { color: var(--cream); }
.footer-contact a { color: #c8cfd8; text-decoration: none; }
.footer-contact a:hover { color: var(--cream); }
.footer-legal { text-align: center; margin-top: 24px; font-size: 14.5px; color: #8b97a6; }

/* 8. Responsive */
@media (max-width: 860px) {
  .area-wrap, .contact-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 44px; }
  .nav-toggle { display: block; }
  .site-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--sky); flex-direction: column; gap: 4px;
    padding: 12px 22px 20px; border-bottom: 3px solid var(--navy);
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 10px 0; width: 100%; border-bottom: 1px solid rgba(16,25,35,.14); }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .gallery-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 36px; }
  .card-photo, .card-icon { min-height: 180px; height: 180px; }
}

/* ════════════════════════════════════════════════════════════════════
   9. Motion, depth & polish  (added 2026-10-03)
   ────────────────────────────────────────────────────────────────────
   Everything here degrades gracefully: with JavaScript off the content is
   fully visible, and with reduced-motion on there is no movement at all.
   ════════════════════════════════════════════════════════════════════ */

/* --- Scroll reveal -------------------------------------------------- */
/* Default state is VISIBLE. JS opts elements into the animated state by adding
   .reveal-ready, so a broken script can never hide the site. */
.reveal { opacity: 1; }
.reveal-ready .reveal {
  opacity: 0; transform: translateY(26px);
  transition: opacity .7s cubic-bezier(.22,.61,.36,1),
              transform .7s cubic-bezier(.22,.61,.36,1);
  will-change: opacity, transform;
}
.reveal-ready .reveal.is-visible { opacity: 1; transform: none; }

/* Stagger siblings so grids cascade instead of popping in together */
.reveal-ready .services-grid .reveal:nth-child(2),
.reveal-ready .gallery-grid  .reveal:nth-child(2),
.reveal-ready .why-grid      .reveal:nth-child(2) { transition-delay: .07s; }
.reveal-ready .services-grid .reveal:nth-child(3),
.reveal-ready .gallery-grid  .reveal:nth-child(3),
.reveal-ready .why-grid      .reveal:nth-child(3) { transition-delay: .14s; }
.reveal-ready .services-grid .reveal:nth-child(4),
.reveal-ready .gallery-grid  .reveal:nth-child(4),
.reveal-ready .why-grid      .reveal:nth-child(4) { transition-delay: .21s; }
.reveal-ready .services-grid .reveal:nth-child(5),
.reveal-ready .gallery-grid  .reveal:nth-child(5),
.reveal-ready .why-grid      .reveal:nth-child(5) { transition-delay: .28s; }
.reveal-ready .services-grid .reveal:nth-child(6),
.reveal-ready .gallery-grid  .reveal:nth-child(6),
.reveal-ready .why-grid      .reveal:nth-child(6) { transition-delay: .35s; }

/* --- Header that reacts to scrolling -------------------------------- */
.site-header { transition: padding .25s ease, box-shadow .25s ease; }
.site-header.is-scrolled { box-shadow: 0 4px 24px rgba(0, 0, 0, .45); }
.site-header.is-scrolled .brand-logo { width: 42px; height: 42px; }
.brand-logo { transition: width .25s ease, height .25s ease; }

/* --- Hero: slow drift on the background photo ----------------------- */
@keyframes heroDrift {
  from { transform: scale(1.06) translateY(0); }
  to   { transform: scale(1.12) translateY(-10px); }
}
.hero-bg { animation: heroDrift 26s ease-in-out infinite alternate; }

/* --- Counters ------------------------------------------------------- */
.stat-band {
  background: var(--eggshell);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: 52px 0;
}
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; text-align: center; }
.stat-num {
  font-family: 'WWD Slab', Georgia, serif; font-size: 46px; font-weight: 700;
  color: var(--navy); line-height: 1; display: block;
}
.stat-num .stat-suffix { font-size: .6em; }
.stat-label {
  display: block; margin-top: 8px; font-size: 14.5px; letter-spacing: 1.6px;
  text-transform: uppercase; color: var(--muted);
}

/* --- Gallery: click to enlarge -------------------------------------- */
.shot { cursor: zoom-in; }
.shot img { transition: transform .6s cubic-bezier(.22,.61,.36,1); }
.shot:hover img { transform: scale(1.05); }
.shot:focus-visible { outline: 3px solid var(--bronze); outline-offset: 3px; }

.lightbox {
  position: fixed; inset: 0; z-index: 500; display: none;
  align-items: center; justify-content: center;
  background: rgba(12, 9, 5, .94); padding: 24px;
}
.lightbox.is-open { display: flex; }
.lightbox img { max-width: 100%; max-height: 88vh; border-radius: 8px; }
.lightbox-cap { position: absolute; bottom: 26px; left: 0; right: 0; text-align: center;
  color: #d8d2c6; font-size: 15.5px; padding: 0 20px; }
.lightbox-close {
  position: absolute; top: 18px; right: 22px; background: none; border: 0;
  color: var(--cream); font-size: 40px; line-height: 1; cursor: pointer;
}

/* --- Nicer link hovers ---------------------------------------------- */
.contact-line a, .footer-contact a { transition: color .2s ease; }

/* --- Respect the user's motion preference --------------------------- */
@media (prefers-reduced-motion: reduce) {
  .reveal-ready .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  .hero-bg { animation: none !important; }
  .shot img { transition: none !important; }
  .shot:hover img { transform: none !important; }
  html { scroll-behavior: auto; }
  .site-header, .brand-logo { transition: none !important; }
}

@media (max-width: 860px) {
  .stat-row { grid-template-columns: repeat(2, 1fr); gap: 26px; }
  .stat-num { font-size: 36px; }
}

/* ════════════════════════════════════════════════════════════════════
   10. Hero entrance — the main text rises in, staggered
   ────────────────────────────────────────────────────────────────────
   Pure CSS, runs on load. Disabled entirely under prefers-reduced-motion,
   and because every element ends at opacity 1 the text is always readable
   even if the animation never runs.
   ════════════════════════════════════════════════════════════════════ */
@keyframes heroRise {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero-kicker,
.hero h1,
.hero-sub,
.hero-actions,
.hero-phone {
  animation: heroRise .95s cubic-bezier(.22, .61, .36, 1) both;
}
.hero-kicker  { animation-delay: .05s; }
.hero h1      { animation-delay: .18s; }
.hero-sub     { animation-delay: .34s; }
.hero-actions { animation-delay: .48s; }
.hero-phone   { animation-delay: .62s; }

@media (prefers-reduced-motion: reduce) {
  .hero-kicker, .hero h1, .hero-sub, .hero-actions, .hero-phone {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ── Hero headline: word-by-word reveal ──────────────────────────────
   Each word sits in an overflow-hidden mask and slides up from below it,
   staggered, so the line assembles itself. Pure CSS. Under reduced motion
   the words are simply present — no motion, no hidden text. */
.hero-title { line-height: 1.06; }
.hero-title .w {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  padding-bottom: .06em;   /* stops descenders being clipped by the mask */
}
.hero-title .w > span {
  display: inline-block;
  transform: translateY(105%);
  animation: wordUp .95s cubic-bezier(.22, .61, .36, 1) forwards;
}
.hero-title .w:nth-child(1) > span { animation-delay: .20s; }
.hero-title .w:nth-child(2) > span { animation-delay: .36s; }
.hero-title .w:nth-child(3) > span { animation-delay: .52s; }

@keyframes wordUp {
  from { transform: translateY(105%); }
  to   { transform: translateY(0); }
}

/* The old whole-headline rise would fight the word reveal — replace it. */
.hero h1 { animation: none; }

@media (prefers-reduced-motion: reduce) {
  .hero-title .w > span { animation: none !important; transform: none !important; }
}
