/* ==========================================================================
   VeltHaven — Base styles
   Loads after tokens.css. Mobile-first. Floors: 16px / 4.5:1 / 48px touch.
   ========================================================================== */

/* ---- Self-hosted fonts (latin + latin-ext; TranslatePress/Polish-ready) ---- */
@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-variable-latin-ext.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
                 U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF,
                 U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-variable-latin.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                 U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
                 U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-variable-latin-ext.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
                 U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF,
                 U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-variable-latin.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                 U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
                 U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--lh-body);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
svg { display: block; }

/* ---- Typography ---- */
h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 650;
  line-height: var(--lh-tight);
  letter-spacing: var(--track-head);
  color: var(--ink);
  margin: 0 0 var(--sp-2);
}
h1 { font-size: var(--fs-h1); max-width: 22ch; }
h2 { font-size: var(--fs-h2); max-width: 26ch; }
h3 { font-size: var(--fs-h3); }
p  { margin: 0 0 var(--sp-2); max-width: 68ch; }
a  { color: var(--accent-600); }
ul, ol { padding-left: 1.25rem; }
li { margin-bottom: .4rem; }
.price, .tabular { font-variant-numeric: tabular-nums; }

/* ---- Accessibility ---- */
:focus-visible {
  outline: 3px solid var(--accent-600);
  outline-offset: 2px;
  border-radius: 4px;
}
.section--dark :focus-visible,
.hero :focus-visible,
.estimate-bar :focus-visible { outline-color: var(--accent-on-dark); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1 !important; transform: none !important; }
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 200;
  background: var(--anthracite);
  color: #fff;
  padding: .75rem 1rem;
  border-radius: 0 0 var(--radius-sm) 0;
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { left: 0; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---- Layout ---- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
@media (min-width: 1024px) { .container { padding-inline: 2rem; } }

.section { padding-block: var(--sp-6); }
@media (min-width: 768px) { .section { padding-block: var(--sp-7); } }

.section--alt  { background: var(--bg-2); }
.section--dark { background: var(--anthracite); color: var(--ink-on-dark); }
.section--dark h1,
.section--dark h2,
.section--dark h3 { color: #fff; }
.section--dark p   { color: var(--ink-on-dark-2); }

.center { text-align: center; }
.center h1, .center h2, .center p { margin-inline: auto; }
.measure { max-width: 60ch; margin-inline: auto; }

/* ---- Typography utilities ---- */
.eyebrow {
  font-family: var(--font-body);
  font-size: .8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: var(--track-caps);
  color: var(--accent-600);
  margin: 0 0 var(--sp-2);
}
.section--dark .eyebrow, .hero .eyebrow { color: var(--accent-on-dark); }
.hero .eyebrow { text-shadow: 0 1px 6px rgba(0,0,0,.65); } /* gold on photo/dark bg needs dark halo */
@media (min-width: 768px) { .hero .eyebrow { white-space: nowrap; } } /* keep "Steel Garages · Garden Rooms" on one line */
.lead { font-size: var(--fs-lg); color: var(--ink-2); }
.section--dark .lead { color: var(--ink-on-dark-2); }

/* ---- Grid utilities ---- */
.grid { display: grid; gap: var(--sp-3); }
/* Grid items default to min-width:auto, which refuses to shrink below their
   content's intrinsic size — a min-width:420px spec table in a grid cell then
   forces horizontal page overflow on mobile. min-width:0 lets the cell shrink
   so inner .table-wrap (overflow-x:auto) scrolls instead. */
.grid > * { min-width: 0; }
@media (min-width: 700px)  {
  .grid--2 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1000px) {
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1080px) {
  .grid--4 { grid-template-columns: repeat(4, 1fr); }
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-height: var(--tap-comfort);
  padding: .75rem 1.5rem;
  font-family: var(--font-body);
  font-size: var(--fs-base);
  font-weight: 600;
  line-height: 1.1;
  border-radius: var(--radius-sm);
  border: 1.5px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition:
    background-color var(--dur-fast) var(--ease-out),
    border-color     var(--dur-fast) var(--ease-out),
    box-shadow       var(--dur-fast) var(--ease-out),
    transform        var(--dur-fast) var(--ease-out);
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--anthracite); color: #fff; }
.btn--primary:hover { background: var(--anthracite-soft); box-shadow: var(--shadow-sm); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--anthracite); }
.btn--on-dark { background: #fff; color: var(--anthracite); }
.btn--on-dark:hover { background: var(--bg-3); }
.btn--ghost-on-dark { background: transparent; color: #fff; border-color: rgba(255,255,255,.55); }
.btn--ghost-on-dark:hover { border-color: #fff; }
.btn--block { width: 100%; }
.cta-note {
  display: block;
  font-size: var(--fs-sm);
  color: var(--ink-2);
  margin-top: .6rem;
}
.section--dark .cta-note, .hero .cta-note { color: var(--ink-on-dark-2); }

/* ---- Header ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.97);
  border-bottom: 1px solid var(--line);
  backdrop-filter: saturate(120%) blur(8px);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: flex-start; /* logo + links left; actions pushed right by auto margin */
  gap: var(--sp-3);
  min-height: 58px;
}
.brand {
  color: var(--anthracite);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}
/* Pull the wordmark toward the left edge. On mobile/tablet keep it inside the
   container gutter so the V / roof-chevron never clips off-screen; on desktop,
   where the gutter is wider, pull it tighter to the edge. */
.site-header .brand { margin-left: -0.5rem; }
@media (min-width: 1024px) { .site-header .brand { margin-left: -2.2rem; } }
/* Header wordmark size (tunable here, not in PHP). */
.site-header .brand svg { height: 28px; width: auto; }
.nav-links {
  display: none;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: nowrap;
  gap: clamp(0.75rem, 1vw, 1.5rem); /* more room now logo sits further left */
}
/* Nav items inherit the global li bottom-margin, which pushed the menu ~3px
   above the logo's centre. Zero it so the menu and logo share the row centre. */
.nav-links li { margin: 0; }
.nav-links a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: var(--fs-sm); /* compact nav label (UI, not body copy) — Apple-style density */
  padding: .5rem 0;
  display: inline-flex;
  min-height: var(--tap);
  align-items: center;
  white-space: nowrap; /* Apple rule: a nav label never breaks onto two lines */
  transition: color var(--dur-fast) var(--ease-out);
}
.nav-links a:hover,
.nav-links .current-menu-item > a,
.nav-links a[aria-current="page"] {
  color: var(--anthracite);
  box-shadow: inset 0 -2px 0 var(--accent-400);
}
/* F7 — split product nav (left) from utility nav (right): a thin separator
   before the first utility item, and lighter weight on About/Contact so the
   product pages read as primary. */
.nav-links .nav-links__divide {
  border-left: 1px solid var(--line);
  padding-left: clamp(0.75rem, 1vw, 2rem); /* tracks the fluid nav gap */
}
.nav-links .nav-links__util a {
  color: var(--ink-2);
  font-weight: 500;
}
.nav-links .nav-links__util a:hover {
  color: var(--anthracite);
}
.nav-phone {
  display: none;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  min-height: var(--tap);
  align-items: center;
  font-variant-numeric: tabular-nums;
  font-size: var(--fs-sm);
}
.nav-phone:hover { text-decoration: underline; }
/* Right-hand header group (phone + CTAs). Hidden on mobile (its children were
   already hidden there); becomes a right-aligned flex column ≥1024px, which is
   what pins the CTAs to the right — see the 3-column layout in the media query. */
.nav-end {
  display: none;
}
/* Two/three-tier CTA cluster inside .nav-end; individual items revealed at the
   breakpoints below. */
.nav-actions {
  display: none;
  align-items: center;
  gap: .5rem;
  flex-shrink: 0;
}
/* Header CTAs are desktop-only (≥1100px, pointer — mobile uses the full-size
   menu buttons), so they run slimmer than the 48px touch default to suit the
   nav bar. */
.nav-cta--primary,
.nav-cta--ghost { min-height: 40px; padding-block: .4rem; font-size: var(--fs-sm); }
/* "Get a price" — primary, compact padding */
.nav-cta--primary { white-space: nowrap; padding-inline: 1.1rem; }
/* "Speak to the team" — ghost, compact */
.nav-cta--ghost   { white-space: nowrap; padding-inline: .9rem; }
.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  margin-left: auto; /* push the hamburger to the right edge on mobile/tablet (was packing left after the logo) */
  min-width: var(--tap-comfort);
  min-height: var(--tap-comfort);
  border: 1px solid var(--line);
  background: #fff;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: var(--fs-base);
  font-weight: 600;
  padding: 0 .9rem;
  color: var(--ink);
  font-family: var(--font-body);
  transition: border-color var(--dur-fast) var(--ease-out);
}
.nav-toggle:hover { border-color: var(--anthracite); }

/* Desktop nav breakpoints.
   1024px: nav links + nav-actions (logo narrower now so links fit earlier).
   1340px: "Speak to the team" ghost button + phone number also appear —
   raised from 1280px (2026-07-17): nav-end needs ~55-65px more room than the
   1200px container gives it at that width, causing a hard-cliff overflow from
   1280px up to ~1315px; 1340px is the first round breakpoint clear of that
   window with margin, verified via scrollWidth checks at every width in between. */
@media (min-width: 1024px) {
  .nav-links  { display: flex; }
  .nav-toggle { display: none; }
  .nav-end    { display: flex; }
  .nav-actions { display: flex; }
  /* Only "Get a price" at this size; ghost hidden until 1280px */
  .nav-cta--ghost { display: none; }
  /* Centre the primary nav links: a 3-column flex row — brand (left) · nav
     (centre) · nav-end (right). Equal flex on the two side columns keeps the
     nav centred, and because everything stays in normal flow it can never
     overlap the side groups (the old absolute-centred nav did — it ignored
     their widths, so the phone collided with it at 1280–1400px). */
  .brand   { flex: 1 1 0; }
  .nav-end { flex: 1 1 0; justify-content: flex-end; align-items: center; gap: .5rem; }
}
@media (min-width: 1340px) {
  .nav-cta--ghost { display: inline-flex; }
  .nav-phone      { display: inline-flex; }
}

/* Mobile nav panel */
#m-nav {
  border-top: 1px solid var(--line);
  background: var(--bg);
}
#m-nav ul {
  display: flex;
  flex-direction: column;
  gap: 0;
  list-style: none;
  padding: 0 0 var(--sp-3);
  margin: 0;
}
#m-nav a {
  display: flex;
  align-items: center;
  min-height: var(--tap-comfort);
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px solid var(--line);
  transition: color var(--dur-fast) var(--ease-out);
}
#m-nav a:hover { color: var(--accent-600); }
#m-nav .btn {
  border-bottom: 0;
  justify-content: center;
}
/* Two stacked CTAs in mobile nav */
.m-nav__actions {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  padding-block: var(--sp-2);
}
.m-nav__actions .btn--ghost { color: var(--anthracite); }
.m-nav__actions .btn--primary { color: #fff; }

/* ---- Footer — brand masthead / link columns / legal strip ----
   Mobile-first: centred + compact. Desktop (≥900px) switches to the row layout. */
.site-footer {
  background: var(--anthracite-deep);
  color: var(--ink-on-dark-2);
  padding-block: var(--sp-5) var(--sp-4);
}
@media (min-width: 900px) { .site-footer { padding-block: var(--sp-6) var(--sp-4); } }
.site-footer .brand { color: #fff; }

/* Brand masthead: centred stack on mobile; logo+copy left / contact card right on desktop */
.footer-brand {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  padding-bottom: var(--sp-4);
  border-bottom: 1px solid rgba(255,255,255,.12);
  text-align: center;
}
.footer-brand__about .brand { display: inline-block; } /* lets text-align centre the logo on mobile */
@media (min-width: 900px) {
  .footer-brand {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--sp-5);
    padding-bottom: var(--sp-5);
    text-align: left;
  }
  .footer-brand__about { flex: 1; max-width: 60ch; }
}
.footer-brand__desc {
  margin: var(--sp-3) auto 0;
  max-width: 56ch;
  color: var(--ink-on-dark-2);
  line-height: 1.65;
  font-size: var(--fs-sm);
}
@media (min-width: 900px) { .footer-brand__desc { margin-inline: 0; } }
/* <address> contact block: postal address only (phone lives in the connect card) */
.footer-brand__contact {
  font-style: normal; /* override browser italic on <address> */
  margin-top: var(--sp-3);
  font-size: var(--fs-sm);
  color: var(--ink-on-dark-2);
}

/* Contact card: heading + big phone + note + social icons. Bordered panel
   on desktop so the right column reads as intentional, not empty space. */
.footer-connect {
  display: flex;
  flex-direction: column;
  align-items: center; /* centre children on mobile */
  gap: var(--sp-2);
  flex-shrink: 0;
}
@media (min-width: 900px) {
  .footer-connect {
    align-items: flex-start;
    width: 320px;
    padding: var(--sp-4);
    border: 1px solid rgba(255,255,255,.14);
    border-radius: var(--radius);
    background: rgba(255,255,255,.04);
  }
}
.footer-connect__head {
  margin: 0;
  color: var(--ink-on-dark-2);
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.footer-connect__tel {
  color: #fff;
  font-family: var(--font-head);
  font-size: clamp(1.5rem, 1.2rem + 1.4vw, 1.875rem);
  font-weight: 600;
  line-height: 1.1;
  text-decoration: none;
}
.footer-connect__tel:hover { text-decoration: underline; }
.footer-connect__note {
  margin: 0;
  font-size: var(--fs-sm);
  color: var(--ink-on-dark-2);
  line-height: 1.5;
}
/* Social icon row */
.footer-social {
  display: grid;
  grid-template-columns: repeat(4, var(--tap));   /* 7 icons -> 2 rows (4+3) */
  justify-content: center;   /* centred on mobile; left on desktop */
  gap: .25rem;
  list-style: none;
  margin: var(--sp-1) 0 0;
  padding: var(--sp-2) 0 0;
  border-top: 1px solid rgba(255,255,255,.1);
}
@media (min-width: 900px) { .footer-social { justify-content: flex-start; } }
.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--tap);               /* 44px tap target */
  height: var(--tap);
  color: var(--ink-on-dark-2);
  border-radius: var(--radius-sm);
}
.footer-social a:hover { color: #fff; background: rgba(255,255,255,.08); text-decoration: none; }
.footer-social svg { width: 1.25rem; height: 1.25rem; }

.site-footer a {
  color: var(--ink-on-dark-2);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-out);
}
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer h4 {
  color: #fff;
  font-size: .8125rem;
  margin: 0 0 var(--sp-2);
  letter-spacing: .1em;
  text-transform: uppercase;
  font-family: var(--font-body);
  font-weight: 700;
}
.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
  line-height: 1.5;
}
.site-footer ul a {
  display: block;
  font-size: .8125rem;
  padding-block: 0;
}
@media (max-width: 600px) {
  .site-footer ul { line-height: 1.3; }
  .site-footer ul a { padding-block: .15rem; } /* compact rows, still tappable (~24px) */
}
/* Link columns: 2-up on mobile (compact), 4-up on desktop */
.footer-grid {
  display: grid;
  gap: var(--sp-3) var(--sp-4);
  grid-template-columns: 1fr 1fr;
  padding-block: var(--sp-4);
}
/* Mobile: two independent column-stacks (left = Buildings + Upgrades, right =
   Guides + Company) so a short column flows straight into the next without
   leaving a row-aligned gap. Desktop: wrappers dissolve back into a 4-col row. */
.footer-col { display: flex; flex-direction: column; gap: var(--sp-4); }
@media (min-width: 768px) {
  .footer-grid { grid-template-columns: repeat(4, 1fr); }
  .footer-col { display: contents; }
}

/* Bottom strip: centred on mobile; © + pipe + legal on one line at ≥768px */
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.12);
  padding-top: var(--sp-3);
  font-size: var(--fs-xs);
  text-align: center;
}
.footer-bottom p { max-width: none; } /* override global p { max-width: 68ch } */
.footer-bottom__strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  row-gap: .25rem;
}
.footer-bottom__cr { margin: 0; }
.footer-bottom__legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}
.footer-bottom__legal a { color: var(--ink-on-dark-2); white-space: nowrap; }
/* Pipe separator before every legal link — the first one sits between © and Terms */
.footer-bottom__legal a::before {
  content: "|";
  margin: 0 var(--sp-2);
  color: rgba(255,255,255,.3);
}

/* ---- Scroll reveal ----
   Only hide when JS is present (html.js, set synchronously in header.php).
   Without JS the reveal never fires, so content must default to visible. */
.js .reveal {
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity  var(--dur-base) var(--ease-out),
    transform var(--dur-base) var(--ease-out);
}
.reveal.is-visible { opacity: 1; transform: none; }
