/* Hammock Plumbing Co — Direction A: Trade Editorial
   Libre Bodoni (display serif) + Public Sans (body/UI).
   Warm paper palette, magazine-index structure, documentary photography. */

@import url('https://fonts.googleapis.com/css2?family=Libre+Bodoni:ital,wght@0,400;0,500;0,600;0,700;1,400&family=Public+Sans:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root{
  /* Five-colour brand kit, all load-bearing (not just bg + one accent):
     paper/ink are the neutral pair; rust, verdigris and ochre are the three
     hues the palette actually generates, each with its own job below. */
  --paper: #F6F1E7;
  --paper-2: #EFE7D6;
  --ink: #211C15;
  --ink-soft: #4A4237;
  --rule: #D8CDB4;
  --rust: #A8471E;
  --rust-deep: #7E3315;
  --rust-tint: #F5E6DC;
  --brass: #6B5228; /* darkened from #8A6D3B: at 4.2-4.3:1 against the header's paper backgrounds, this was a WCAG AA near-miss (needs 4.5:1) — same hue, deepened for a confirmed pass with margin */
  --verdigris: #3E6B5E;
  --verdigris-tint: #E7EFEA;
  --ochre: #C89B3C;
  --ochre-text: #6B4E19; /* --ochre itself (2.1:1 on tint) is only ever safe as a background/tint colour, not as text — this darker sibling is for the cases where the hue is used as foreground text (e.g. .arrow) */
  --ochre-tint: #F5EAD3;
  --cream-card: #FCFAF3;
  --max: 1240px;
  --gutter: clamp(20px, 5vw, 64px);
}

*,*::before,*::after{ box-sizing:border-box; }
html{ scroll-behavior:auto; }
@media (prefers-reduced-motion: reduce){ html{ scroll-behavior:auto; } *{ animation-duration:0.001ms !important; animation-iteration-count:1 !important; transition-duration:0.001ms !important; } }

body{
  margin:0;
  background:var(--paper);
  color:var(--ink);
  font-family:'Public Sans', system-ui, sans-serif;
  font-size:16px;
  line-height:1.6;
  -webkit-font-smoothing:antialiased;
  position:relative;
}

/* Paper grain — a page this warm reads as flat without one. Cheap: a single
   tiled SVG-turbulence data-URI, no canvas, no per-frame JS. The slow pan
   is neutralised to a static grain under prefers-reduced-motion by the
   global rule above. */
body::before{
  content:""; position:fixed; inset:0; z-index:2000; pointer-events:none;
  opacity:.05; mix-blend-mode:multiply;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size:180px 180px;
  animation:grain-drift 9s steps(8) infinite;
}
@keyframes grain-drift{ from{ background-position:0 0; } to{ background-position:360px 180px; } }

img{ max-width:100%; display:block; }
a{ color:inherit; }
h1,h2,h3,h4{ font-family:'Libre Bodoni', Georgia, serif; font-weight:600; line-height:1.05; margin:0; }

.wrap{ max-width:var(--max); margin:0 auto; padding:0 var(--gutter); }

.eyebrow{
  font-family:'JetBrains Mono', monospace;
  font-size:12px;
  letter-spacing:.14em;
  text-transform:uppercase;
  color:var(--rust-deep);
  font-weight:500;
}

/* ---------- Header ---------- */
.masthead{
  position:sticky; top:0; z-index:50;
  background:rgba(246,241,231,.92);
  backdrop-filter: blur(6px);
  border-bottom:1px solid var(--rule);
}
.masthead-inner{
  display:flex; align-items:center; justify-content:space-between;
  padding:18px var(--gutter);
  max-width:var(--max); margin:0 auto;
}
.brand{
  font-family:'Libre Bodoni', serif;
  font-size:20px;
  font-weight:700;
  letter-spacing:.01em;
  text-decoration:none;
}
.brand small{ display:block; font-family:'JetBrains Mono', monospace; font-size:10px; letter-spacing:.16em; color:var(--brass); font-weight:500; margin-top:2px; }

.nav-links{ display:flex; align-items:center; gap:32px; }
.nav-links a{ text-decoration:none; font-size:14px; letter-spacing:.02em; color:var(--ink); position:relative; padding:4px 0; }
.nav-links a:not(.call)::after{ content:""; position:absolute; left:0; right:0; bottom:0; height:1px; background:var(--rust); transform:scaleX(0); transform-origin:right; transition:transform .25s ease; }
.nav-links a:not(.call):hover::after{ transform:scaleX(1); transform-origin:left; }
.nav-links a.call{
  background:var(--rust); color:var(--cream-card); padding:9px 18px; border-radius:2px; font-weight:600;
  transition:background .2s ease, transform .15s ease;
}
.nav-links a.call:hover{ background:var(--rust-deep); transform:translateY(-1px); }
.nav-links a.call:active{ transform:translateY(0) scale(.96); }
.mobile-panel a{ transition:background-color .15s ease, padding-left .15s ease; }
.mobile-panel a:active{ background:var(--rust-tint); padding-left:14px; }

.nav-toggle{ display:none; background:none; border:1px solid var(--ink); border-radius:2px; width:44px; height:44px; cursor:pointer; position:relative; }
.nav-toggle span{ display:block; width:18px; height:1.5px; background:var(--ink); margin:4px auto; transition:transform .25s ease, opacity .25s ease; }
.nav-toggle.is-open span:nth-child(1){ transform:translateY(5.5px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2){ opacity:0; }
.nav-toggle.is-open span:nth-child(3){ transform:translateY(-5.5px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero{
  position:relative; overflow:hidden;
  padding:clamp(48px,9vw,104px) var(--gutter) clamp(40px,6vw,72px);
  max-width:var(--max); margin:0 auto;
  display:grid; grid-template-columns: 1.35fr .9fr; gap:56px; align-items:end;
}
/* Living gradient wash — slow drift, two brand hues, well under the paper
   tone so type stays readable. Frozen by the reduced-motion rule above. */
.hero::before{
  content:""; position:absolute; inset:-20%; z-index:0; pointer-events:none;
  background:
    radial-gradient(closest-side, rgba(168,71,30,.10), transparent 70%) 15% 20%/55% 55% no-repeat,
    radial-gradient(closest-side, rgba(62,107,94,.09), transparent 70%) 85% 75%/50% 50% no-repeat;
  animation:hero-drift 22s ease-in-out infinite alternate;
}
@keyframes hero-drift{
  from{ transform:translate(0,0) scale(1); }
  to{ transform:translate(-3%,2%) scale(1.06); }
}
.hero-head, .hero-stat{ position:relative; z-index:1; }
.hero-head h1{
  font-size:clamp(42px, 6.4vw, 88px);
  letter-spacing:-.01em;
}
.hero-head .eyebrow{ margin-bottom:18px; display:inline-block; }
.hero-head p.lede{
  margin-top:22px; max-width:46ch; font-size:18px; color:var(--ink-soft);
}
.hero-cta{ margin-top:34px; display:flex; gap:16px; flex-wrap:wrap; align-items:center; }
.btn{
  display:inline-flex; align-items:center; gap:10px;
  padding:14px 26px; text-decoration:none; font-weight:600; font-size:15px;
  border-radius:2px; transition: all .2s ease;
}
.btn-primary{ background:var(--ink); color:var(--paper); }
.btn-primary:hover{ background:var(--rust-deep); transform:translateY(-2px); box-shadow:0 8px 20px -8px rgba(33,28,21,.4); }
.btn-primary:active{ background:var(--rust-deep); transform:translateY(0) scale(.97); box-shadow:none; }
.btn-ghost{ border:1px solid var(--ink); color:var(--ink); }
.btn-ghost:hover{ background:var(--ink); color:var(--paper); transform:translateY(-2px); }
.btn-ghost:active{ transform:translateY(0) scale(.97); }

.hero-stat{
  border-left:1px solid var(--rule); padding-left:32px;
  display:flex; flex-direction:column; gap:18px;
}
.stat-row{ display:flex; align-items:baseline; gap:12px; }
.stat-num{ font-family:'Libre Bodoni', serif; font-size:46px; font-weight:700; color:var(--rust); }
.stat-label{ font-size:14px; color:var(--ink-soft); max-width:20ch; }
.stars{ letter-spacing:2px; color:var(--rust); font-size:18px; }

@media (max-width:900px){
  .hero{ grid-template-columns:1fr; }
  .hero-stat{ border-left:none; border-top:1px solid var(--rule); padding-left:0; padding-top:24px; flex-direction:row; flex-wrap:wrap; gap:32px; }
}

/* ---------- Photo break ---------- */
.photo-break{ position:relative; margin:clamp(40px,7vw,100px) 0; overflow:hidden; }
.photo-break img{ width:100%; height:clamp(280px,46vw,560px); object-fit:cover; filter:saturate(1.05) contrast(1.03); }
/* Colour-grade toward the brand palette (rust shadows, verdigris highlights)
   rather than dropping the photo in untouched. Note: the img itself is
   scale-animated by GSAP's scroll parallax (script.js) via inline transform
   — this overlay is a separate element so it never fights that transform. */
.photo-break::after{
  content:""; position:absolute; inset:0; pointer-events:none;
  background:linear-gradient(160deg, rgba(168,71,30,.22) 0%, transparent 45%, rgba(62,107,94,.20) 100%);
  mix-blend-mode:multiply;
}
.photo-caption{
  position:absolute; left:var(--gutter); bottom:18px;
  background:var(--ink); color:var(--paper);
  padding:10px 16px; font-family:'JetBrains Mono',monospace; font-size:11.5px; letter-spacing:.05em;
  max-width:340px;
}

/* ---------- Why section ---------- */
.section{ padding:clamp(48px,7vw,88px) var(--gutter); max-width:var(--max); margin:0 auto; }
.section-head{ display:flex; justify-content:space-between; align-items:flex-end; gap:24px; margin-bottom:44px; border-bottom:1px solid var(--rule); padding-bottom:22px; flex-wrap:wrap; }
.section-head h2{ font-size:clamp(30px,4vw,46px); }
.section-head .eyebrow{ margin-bottom:10px; display:block; }

.why-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:40px; }
.why-item{ padding:18px; margin:-18px; border-radius:4px; transition:background-color .3s ease, transform .2s ease; }
.why-item:hover{ background:rgba(62,107,94,.08); transform:translateY(-3px); }
.why-item:active{ transform:translateY(0) scale(.98); }
.why-item .num{ font-family:'JetBrains Mono',monospace; color:var(--verdigris); font-size:13px; margin-bottom:14px; display:block; }
.why-item h3{ font-size:22px; margin-bottom:12px; }
.why-item p{ color:var(--ink-soft); font-size:15px; }
@media (max-width:800px){ .why-grid{ grid-template-columns:1fr; gap:32px; } }

/* ---------- Colour zones ----------
   Flat, opaque fallback colour per section (what no-JS and
   prefers-reduced-motion visitors always get — the page already reads as
   more than one flat tone with zero JS). When motion is allowed, script.js
   adds .bg-scroll-live to <html>, which makes each zone transparent so a
   GSAP-scrubbed <body> background can cross-fade smoothly between them as
   you scroll — a section-to-section colour journey through the actual
   5-colour palette, not just paper-with-one-accent. */
.zone-why{ background:var(--verdigris-tint); }
.zone-services{ background:var(--ochre-tint); }
.zone-contact{ background:var(--rust-tint); }
/* zone-services and zone-contact are deliberately NOT included below: on
   every page that has a .review-band, one of them sits immediately before
   it and the other immediately after (DOM order varies by page — see
   script.js's zone-chain sort), so one of the two body-crossfade segments
   touching each of them runs all the way to/from --review-band's
   near-black #211C15. That segment's scroll range is exactly where that
   zone's own text is scrolling into (or still visible while scrolling out
   of) the viewport — a crossfade that wide necessarily passes through a
   mid-grey where dark text (sized and coloured for the pale end state)
   drops under 4.5:1, confirmed by scripts/audit-contrast.ts on both
   zones. zone-why never sits next to .review-band on any page, so its
   crossfades stay pale-to-pale and it's the only one still safe to leave
   transparent. */
html.bg-scroll-live .zone-why{ background:transparent; }

/* ---------- Services index (home preview + full page) ---------- */
.svc-index{ border-top:1px solid var(--rule); }
.svc-row{
  display:grid; grid-template-columns:80px 1fr auto; gap:28px; align-items:center;
  padding:28px 18px; margin:0 -18px; border-bottom:1px solid var(--rule);
  text-decoration:none; color:inherit; border-radius:4px;
  transition:background-color .25s ease, transform .15s ease;
}
.svc-row .num{ font-family:'Libre Bodoni',serif; font-size:34px; color:var(--ink-soft); font-weight:600; transition:color .25s ease; } /* was var(--rule): 1.05-1.33:1 against the zone tint, a rule-line colour never meant to carry text contrast */
.svc-row h3{ font-size:24px; margin-bottom:6px; }
.svc-row p{ color:var(--ink-soft); font-size:14.5px; max-width:56ch; margin:0; }
.svc-row .arrow{ font-size:22px; color:var(--ochre-text); transition:transform .2s ease; } /* was var(--ochre): 1.7-2.16:1 against the zone tint */
a.svc-row:hover{ background:rgba(200,155,60,.09); }
a.svc-row:hover .arrow{ transform:translateX(6px); }
a.svc-row:hover .num{ color:var(--ochre); }
a.svc-row:active{ transform:scale(.99); background:rgba(200,155,60,.16); }

/* full services page detail spreads */
.svc-spread{
  display:grid; grid-template-columns:120px 1fr; gap:36px;
  padding:44px 0; border-bottom:1px solid var(--rule);
}
.svc-spread .num{ font-family:'Libre Bodoni',serif; font-size:56px; color:var(--rust); font-weight:700; }
.svc-spread h3{ font-size:clamp(26px,3vw,34px); margin-bottom:14px; }
.svc-spread p{ color:var(--ink-soft); max-width:64ch; font-size:16px; }
.svc-spread .tags{ margin-top:16px; display:flex; gap:10px; flex-wrap:wrap; }
.svc-spread .tags span{ font-family:'JetBrains Mono',monospace; font-size:11px; letter-spacing:.06em; color:var(--brass); border:1px solid var(--rule); padding:5px 10px; border-radius:2px; }
.svc-spread.with-photo{ grid-template-columns:120px 1fr 260px; }
.svc-spread.with-photo .photo-wrap{ position:relative; overflow:hidden; }
.svc-spread.with-photo img{ width:100%; height:180px; object-fit:cover; }
.svc-spread.with-photo .photo-wrap::after{
  content:""; position:absolute; inset:0; pointer-events:none;
  background:linear-gradient(160deg, rgba(168,71,30,.22), rgba(62,107,94,.18));
  mix-blend-mode:multiply;
}
@media (max-width:860px){
  .svc-spread, .svc-spread.with-photo{ grid-template-columns:60px 1fr; }
  .svc-spread.with-photo .photo-wrap{ grid-column:1/-1; margin-top:12px; order:3; }
  .svc-spread.with-photo .photo-wrap img{ height:220px; }
}

/* ---------- Reviews statement ---------- */
.review-band{ background:var(--ink); color:var(--paper); padding:clamp(56px,9vw,110px) var(--gutter); text-align:center; }
.review-band .stars{ color:var(--ochre); font-size:28px; }
.review-band h2{ font-size:clamp(36px,6vw,72px); margin:18px 0 10px; }
.review-band p{ font-family:'JetBrains Mono',monospace; font-size:13px; letter-spacing:.1em; text-transform:uppercase; color:#C9BEA6; }

/* ---------- Contact band ---------- */
.contact-grid{ display:grid; grid-template-columns:1.1fr .9fr; gap:56px; }
.contact-grid h2{ font-size:clamp(32px,4.5vw,52px); margin-bottom:20px; }
.hours-table{ width:100%; border-collapse:collapse; margin-top:24px; }
.hours-table td{ padding:9px 0; border-bottom:1px solid var(--rule); font-size:14.5px; }
.hours-table td:last-child{ text-align:right; color:var(--ink-soft); }
.hours-table tr.today td{ color:var(--rust); font-weight:600; }
.contact-card{ background:var(--cream-card); border:1px solid var(--rule); padding:36px; transition:box-shadow .3s ease, transform .3s ease; }
.contact-card:hover{ box-shadow:0 16px 40px -20px rgba(168,71,30,.35); transform:translateY(-2px); }
.contact-card .row{ display:flex; gap:14px; padding:14px 0; border-bottom:1px solid var(--rule); font-size:15px; }
.contact-card .row:last-child{ border-bottom:none; }
.contact-card .row a{ transition:color .2s ease; }
.contact-card .row a:hover{ color:var(--rust); }
.contact-card .row a:active{ color:var(--rust-deep); }
.contact-card .label{ font-family:'JetBrains Mono',monospace; font-size:11px; letter-spacing:.08em; color:var(--brass); min-width:80px; text-transform:uppercase; padding-top:2px; }
@media (max-width:860px){ .contact-grid{ grid-template-columns:1fr; } }

/* ---------- Map ---------- */
.map-frame{ position:relative; width:100%; height:clamp(280px,42vw,460px); border:1px solid var(--rule); overflow:hidden; filter:sepia(.12) saturate(.9) contrast(1.02); }
.map-frame iframe{ width:100%; height:100%; border:0; }

/* ---------- Footer ---------- */
footer{ border-top:1px solid var(--rule); padding:44px var(--gutter) 30px; }
.footer-inner{ max-width:var(--max); margin:0 auto; display:flex; justify-content:space-between; gap:24px; flex-wrap:wrap; }
footer .brand{ font-size:17px; }
footer .fmeta{ font-size:12.5px; color:var(--ink-soft); max-width:44ch; }
.credits{ max-width:var(--max); margin:22px auto 0; font-size:11px; color:#6E6555; font-family:'JetBrains Mono',monospace; line-height:1.8; } /* was #9C917C: 2.6-2.8:1, well under the 4.5:1 a Pexels photo credit is required to hit */
.credits a{ color:#6E6555; }

/* reveal-on-scroll: GSAP sets the hidden state via JS right before animating,
   so content stays visible by default (no-JS / slow-JS fallback) instead of
   being permanently stuck invisible if a ScrollTrigger never fires. */
.reveal{ opacity:1; }

/* count-up targets: reserve width so the layout doesn't jump as digits animate */
.count-up{ font-variant-numeric:tabular-nums; }

/* ---------- Mobile nav panel ----------
   Deliberately a sibling of <header>, NOT nested inside it — .masthead uses
   backdrop-filter, and a backdrop-filter/filter/transform ancestor creates a
   new containing block for position:fixed descendants. Nesting this panel
   inside .masthead silently shrank its "fixed" box down to the ~64px header
   bar instead of the viewport, which is why it read as a transparent sliver
   instead of a real full-screen menu. Keeping it outside avoids that trap. */
.mobile-panel{ display:none; }
@media (max-width:760px){
  .nav-links{ display:none; }
  .nav-toggle{ display:block; }
  .mobile-panel{
    display:none; position:fixed; inset:0; z-index:300;
    background:var(--paper); flex-direction:column;
    opacity:0; transition:opacity .25s ease;
  }
  .mobile-panel.open{ display:flex; opacity:1; }
  .mobile-panel-head{
    display:flex; align-items:center; justify-content:space-between;
    padding:18px var(--gutter); border-bottom:1px solid var(--rule);
  }
  .mobile-panel-close{
    background:none; border:1px solid var(--ink); border-radius:2px;
    width:44px; height:44px; font-size:20px; line-height:1; cursor:pointer; color:var(--ink);
  }
  .mobile-panel-links{ display:flex; flex-direction:column; padding:8px var(--gutter) 24px; overflow-y:auto; }
  .mobile-panel a{
    padding:18px 4px; border-bottom:1px solid var(--rule); text-decoration:none;
    color:var(--ink); font-size:20px; font-family:'Libre Bodoni',serif; min-height:44px;
    display:flex; align-items:center;
  }
  .mobile-panel a.call{ color:var(--rust); font-weight:700; }
}
html.nav-locked{ overflow:hidden; }
