/* RZR Construction — "level line" design system.
   Display: Oswald (OFL, self-hosted variable woff2) — condensed display caps.
   Body: Barlow (OFL, self-hosted 400/500/700) — workhorse grotesk.
   Ground: warm bone paper, near-black ink for display type, white cards.
   Brand red #D0303A appears ONLY as the level-line motif (3px rule + 9px
   square end-cap, always dead level) and the tap-to-call conversion path.
   No CDN anything. One 720px breakpoint + a 980px grid step. */

/* ── Fonts (self-hosted, OFL) ─────────────────── */
@font-face {
  font-family: "Oswald";
  src: url("/assets/fonts/oswald-var.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Barlow";
  src: url("/assets/fonts/barlow-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Barlow";
  src: url("/assets/fonts/barlow-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Barlow";
  src: url("/assets/fonts/barlow-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ── Tokens ───────────────────────────────────── */
:root {
  --ink: #1b1c1e;         /* near-black: display type, closing band, footer */
  --ink-2: #242629;       /* raised panel on ink */
  --ink-line: #35383c;    /* hairline on ink */
  --paper: #f7f5f0;       /* warm bone: page ground */
  --card: #ffffff;        /* card surface */
  --body-c: #3d3f42;      /* body text on paper */
  --mut: #6b6d70;         /* muted text on paper */
  --mut-dark: #a9acb0;    /* muted text on ink */
  --line: #e5e1d7;        /* hairline on paper */
  --red: #d0303a;         /* brand red — level line + call CTAs only */
  --red-deep: #a8242d;    /* hover / pressed */
  --display: "Oswald", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --font: "Barlow", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font: 400 17px/1.7 var(--font);
  background: var(--paper);
  color: var(--body-c);
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--red); color: #fff; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }
.on-ink :focus-visible { outline-color: #fff; }

img { max-width: 100%; }
a { touch-action: manipulation; }

.container { max-width: 1140px; margin: 0 auto; padding-inline: clamp(1.25rem, 5vw, 3rem); }
section { padding-block: clamp(4rem, 9vw, 7.5rem); }

.skip { position: absolute; left: -200vw; top: 0; background: var(--ink); color: #fff; padding: .6rem 1rem; z-index: 200; }
.skip:focus { left: 0; }

/* ── The level line (signature motif) ──────────
   One weight everywhere: 3px red rule, 9px square end-cap sitting proud of
   the line like a spirit-level bubble. Always perfectly level. */
.hero-rule {
  position: relative; width: 96px; height: 3px; background: var(--red);
  margin-top: clamp(1.6rem, 3vw, 2.4rem);
  transform-origin: left;
  transition: transform .36s ease-out .15s;
}
.hero-rule::after {
  content: ""; position: absolute; right: 0; bottom: 0;
  width: 9px; height: 9px; background: var(--red);
}

/* ── Header / nav (light, level line on the site's top edge) ─────── */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: var(--card);
  border-top: 3px solid var(--red);
  border-bottom: 1px solid var(--line);
}
.nav[data-scrolled] { box-shadow: 0 10px 34px rgba(27, 28, 30, .09); }
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem 1.25rem; flex-wrap: wrap; padding-block: .85rem;
}
.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand img { height: 46px; width: auto; display: block; }
.nav nav { display: flex; align-items: center; flex-wrap: wrap; gap: .35rem clamp(.9rem, 2.5vw, 1.75rem); }
.nav nav a {
  font-family: var(--display); font-weight: 500; font-size: .85rem;
  letter-spacing: .11em; text-transform: uppercase;
  color: var(--mut); text-decoration: none; padding-block: .35rem;
}
.nav nav a[aria-current="page"] { color: var(--ink); }
.nav-call {
  background: var(--red); color: #fff !important;
  padding: .55rem 1.05rem !important; letter-spacing: .08em;
}
.nav-call:hover, .nav-call:focus-visible { background: var(--red-deep); background-size: 0 !important; }

/* Animated underline — level and red */
.nav nav a:not(.nav-call), .link, footer nav a {
  background-image: linear-gradient(var(--red), var(--red));
  background-size: 0% 2px;
  background-repeat: no-repeat;
  background-position: left 100%;
  transition: background-size .18s ease-out;
}
.nav nav a:hover, .nav nav a:focus-visible,
.link:hover, .link:focus-visible,
footer nav a:hover, footer nav a:focus-visible { background-size: 100% 2px; }
.nav nav a[aria-current="page"]:not(.nav-call) { background-size: 100% 2px; color: var(--ink); }

/* ── Type ─────────────────────────────────────── */
h1, h2, .wordmark {
  font-family: var(--display); text-transform: uppercase;
  font-weight: 600; color: var(--ink); letter-spacing: .01em;
}
h1 { font-size: clamp(2.7rem, 7vw, 5rem); line-height: .98; max-width: 20ch; }
h2 { font-size: clamp(1.9rem, 4.2vw, 2.9rem); line-height: 1.05; max-width: 26ch; }
h3 { font-family: var(--display); font-weight: 500; text-transform: uppercase; letter-spacing: .03em; font-size: 1.25rem; color: var(--ink); }
.lede { font-size: clamp(1.05rem, 1.7vw, 1.2rem); max-width: 60ch; margin-top: 1.5rem; }

/* Kicker: 9px level-square + industrial caps */
.kicker {
  display: flex; align-items: center; gap: .7rem;
  font-family: var(--display); font-weight: 600; font-size: .84rem;
  letter-spacing: .24em; text-transform: uppercase; color: var(--ink);
  margin-bottom: 1.2rem;
}
.kicker::before { content: ""; width: 9px; height: 9px; background: var(--red); flex: none; }
.on-ink .kicker { color: #fff; }

/* ── Hero (light, statement type) ─────────────── */
.hero {
  background: var(--paper);
  padding-block: clamp(4.5rem, 11vw, 9rem) clamp(3.5rem, 8vw, 6.5rem);
}
.hero.sub { padding-block: clamp(3.5rem, 7vw, 5.5rem) clamp(2.75rem, 5vw, 4rem); }
.hero-title { font-size: clamp(3.1rem, 11vw, 7.4rem); font-weight: 700; line-height: .95; max-width: none; }
.hero-title .rzr { color: var(--red); }

.phone-label {
  font-family: var(--display); font-weight: 600; font-size: .95rem;
  letter-spacing: .24em; text-transform: uppercase; color: var(--red);
  margin-top: 2.6rem;
}
.phone-hero {
  display: inline-block; font-family: var(--display); font-weight: 600;
  font-size: clamp(2.5rem, 8vw, 4.6rem); line-height: 1.1;
  color: var(--ink); text-decoration: none; font-variant-numeric: tabular-nums;
  border-bottom: 3px solid var(--red); padding-bottom: .05em; margin-top: .2rem;
}
.phone-hero:hover, .phone-hero:focus-visible { color: var(--red); }

.cta-row { display: flex; align-items: center; gap: 1.6rem; margin-top: 2.2rem; flex-wrap: wrap; }

.btn {
  display: inline-block; background: var(--ink); color: #fff;
  font-family: var(--display); font-weight: 600; font-size: 1rem;
  letter-spacing: .08em; text-transform: uppercase; text-decoration: none;
  padding: .95rem 1.9rem; border: none;
  transition: background-color .18s ease-out, transform .18s ease-out;
}
.btn:hover, .btn:focus-visible { background: var(--red-deep); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-red { background: var(--red); }
.btn-red:hover, .btn-red:focus-visible { background: var(--red-deep); }
.btn-invert { background: #fff; color: var(--ink); }
.btn-invert:hover, .btn-invert:focus-visible { background: var(--red); color: #fff; }

.link {
  font-weight: 700; font-size: .95rem; color: var(--ink);
  text-decoration: none; padding-bottom: .2rem;
}
.on-ink .link { color: #fff; background-image: linear-gradient(#fff, #fff); }

/* ── Facts bar (true things only, under the hero) ── */
.facts { background: var(--card); border-block: 1px solid var(--line); padding-block: 0; }
.facts-inner { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 2.5rem; }
.facts-inner p {
  display: flex; align-items: center; gap: .75rem;
  font-family: var(--display); font-weight: 500; font-size: .88rem;
  letter-spacing: .12em; text-transform: uppercase; color: var(--ink);
  padding-block: 1.4rem;
}
.facts-inner p::before { content: ""; width: 9px; height: 9px; background: var(--red); flex: none; }

/* ── How it works (numbered steps, level markers) ── */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2.25rem; margin-top: 2.8rem; }
.step { position: relative; border-top: 1px solid var(--line); padding-top: 1.4rem; }
.step::before { content: ""; position: absolute; top: -1px; left: 0; width: 44px; height: 3px; background: var(--red); }
.step-num {
  font-family: var(--display); font-weight: 700; font-size: 2.9rem;
  line-height: 1; color: var(--ink); display: block;
}
.step h3 { font-size: 1.12rem; margin-top: .65rem; }
.step p { font-size: .95rem; margin-top: .55rem; }

/* ── Service tiles (index overview) ──────────── */
.svc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-top: 2.8rem; }
.svc {
  background: var(--card); border: 1px solid var(--line);
  padding: 1.7rem 1.5rem 1.8rem;
  transition: border-color .18s ease-out, box-shadow .18s ease-out;
}
.svc:hover { border-color: var(--ink); box-shadow: 0 12px 30px rgba(27, 28, 30, .07); }
.svc h3 { font-size: 1.18rem; }
.svc p { font-size: .95rem; margin-top: .6rem; }
.svc .link { display: inline-block; margin-top: 1rem; font-size: .85rem; }

/* ── Service sections (services.html) ────────── */
.svc-row {
  display: grid; grid-template-columns: 110px 1fr; gap: 1.5rem 2.5rem;
  border-top: 1px solid var(--line); padding-block: 2.8rem;
}
.svc-row:last-of-type { border-bottom: 1px solid var(--line); }
.svc-row-num {
  font-family: var(--display); font-weight: 700; font-size: clamp(2.4rem, 5vw, 3.4rem);
  line-height: 1; color: var(--red);
}
.svc-row h3 { font-size: 1.5rem; }
.svc-row p { max-width: 62ch; margin-top: .8rem; }
.svc-row .tags { margin-top: 1rem; }
.tags {
  font-size: .78rem; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--mut);
}

/* ── Promise band (dark, planks with level tops) ── */
.promise { background: var(--ink); color: #cfd2d6; }
.promise-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.25rem; margin-top: 2.6rem; }
.plank { border-top: 3px solid var(--red); padding-top: 1.2rem; }
.plank h3 { color: #fff; font-size: 1.12rem; }
.plank p { font-size: .95rem; margin-top: .55rem; }
.promise h2 { color: #fff; }
.promise .lede { color: var(--mut-dark); }

/* ── Gallery (work.html; markup generator-owned — restyle only) ── */
.gallery { display: grid; gap: clamp(2rem, 5vw, 3rem); margin-top: 2.8rem; }
.gallery-2 { grid-template-columns: 1fr 1fr; }
.proj {
  background: var(--card); border: 1px solid var(--line);
  padding: 1rem 1rem 1.5rem;
}
.ba { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.ba-pane { position: relative; margin: 0; cursor: zoom-in; }
.ba-pane img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; display: block; background: var(--line); }
.ba-cap {
  position: absolute; top: 0; left: 0; background: var(--ink); color: #fff;
  font-family: var(--display); font-weight: 600; font-size: .78rem;
  letter-spacing: .2em; padding: .4rem .7rem;
}
.ba-cap-after { background: var(--red); }
.ba-pane.expanded { grid-column: 1 / -1; cursor: zoom-out; }
.proj-title {
  font-family: var(--display); font-weight: 500; text-transform: uppercase;
  letter-spacing: .03em; font-size: 1.28rem; color: var(--ink); margin-top: 1.1rem;
}
.proj-blurb { font-size: .95rem; margin-top: .45rem; max-width: 62ch; }
.proj-meta {
  font-size: .75rem; font-weight: 700; letter-spacing: .16em;
  text-transform: uppercase; color: var(--mut); margin-top: .6rem;
}
.gallery-note { font-size: .85rem; color: var(--mut); margin-top: 1.5rem; max-width: 62ch; }
.gallery-note .link { font-size: inherit; }

/* ── Service area ────────────────────────────── */
.area-list { list-style: none; display: flex; flex-wrap: wrap; gap: .6rem .5rem; margin-top: 1.8rem; padding: 0; }
.area-list li {
  font-family: var(--display); font-weight: 500; font-size: .9rem;
  letter-spacing: .08em; text-transform: uppercase; color: var(--ink);
  border: 1px solid var(--line); background: var(--card); padding: .5rem .9rem;
}
.area-list li.area-home { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ── Closing CTA band (ink, level-lined phone) ── */
.cta-band { background: var(--ink); color: var(--mut-dark); }
.cta-band h2 { color: #fff; }
.cta-band .lede { color: var(--mut-dark); }
.phone-band {
  display: inline-block; font-family: var(--display); font-weight: 600;
  font-size: clamp(2.2rem, 6vw, 3.6rem); color: #fff; text-decoration: none;
  font-variant-numeric: tabular-nums; border-bottom: 3px solid var(--red); margin-top: 1.2rem;
}
.phone-band:hover, .phone-band:focus-visible { color: var(--red); }

/* ── Contact page ────────────────────────────── */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-top: 2.8rem; }
.contact-tile { background: var(--card); border: 1px solid var(--line); padding: 1.7rem 1.6rem 1.9rem; }
.contact-tile h3 { font-size: 1.18rem; }
.contact-tile p { font-size: .95rem; margin-top: .6rem; }
.phone-big {
  display: inline-block; font-family: var(--display); font-weight: 600;
  font-size: clamp(1.9rem, 4.5vw, 2.6rem); color: var(--ink); text-decoration: none;
  font-variant-numeric: tabular-nums; border-bottom: 3px solid var(--red); margin-top: .6rem;
}
.phone-big:hover, .phone-big:focus-visible { color: var(--red); }

/* ── Footer (ink, level line on top) ─────────── */
footer { background: var(--ink); color: var(--mut-dark); border-top: 3px solid var(--red); padding-block: 2.4rem 2.6rem; }
.foot-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.wordmark { font-size: 1.05rem; letter-spacing: .14em; color: #fff; }
.wordmark .wm-accent { color: var(--red); }
.wordmark.small { font-size: .9rem; }
footer nav { display: flex; gap: 1.4rem; flex-wrap: wrap; }
footer nav a {
  font-family: var(--display); font-weight: 500; font-size: .8rem;
  letter-spacing: .1em; text-transform: uppercase; color: #cfd2d6; text-decoration: none;
}
.foot-tag { margin-top: 1.3rem; font-family: var(--display); font-weight: 500; font-size: .9rem; letter-spacing: .12em; text-transform: uppercase; color: var(--mut-dark); }
.foot-legal { margin-top: .5rem; }
.foot-legal p { font-size: .8rem; color: var(--mut-dark); line-height: 1.7; }
.foot-legal a { color: #cfd2d6; }

/* ── Mobile call bar (tap-to-call is THE conversion) ── */
.call-bar { display: none; }

/* ── 404 ─────────────────────────────────────── */
.nf { min-height: 55vh; display: flex; align-items: center; }
.nf-num {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(6rem, 18vw, 11rem); line-height: 1; color: var(--red); opacity: .13;
}
.nf h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin-top: -1.2rem; }

/* ── Reveal motion (JS-gated: the inline head script stamps html.js; with
      JS disabled nothing is ever hidden — full no-JS baseline) ─────────── */
html.js [data-reveal] { opacity: 0; transform: translateY(12px); transition: opacity .25s ease-out, transform .25s ease-out; transition-delay: var(--d, 0ms); }
html.js [data-reveal].in { opacity: 1; transform: none; }
html.js .hero-rule { transform: scaleX(0); }
html.js .hero-rule.go { transform: scaleX(1); }

/* Failsafe: the inline head script stamps html.js, then site.js must load to
   reveal content. If site.js dies (bad deploy, blocked request) nothing may
   stay hidden — after 2s everything animates to visible. site.js stamps
   .js-ready as its first act, which cancels the failsafe so the normal
   IntersectionObserver reveal keeps working below the fold. */
@keyframes reveal-failsafe { to { opacity: 1; transform: none; } }
html.js:not(.js-ready) [data-reveal] { animation: reveal-failsafe .25s ease-out 2s forwards; }
html.js:not(.js-ready) .hero-rule { animation: reveal-failsafe .36s ease-out 2s forwards; }

/* ── Responsive ──────────────────────────────── */
@media (max-width: 980px) {
  .steps { grid-template-columns: repeat(2, 1fr); }
  .svc-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-2 { grid-template-columns: 1fr; }
  .facts-inner { grid-template-columns: 1fr; }
  .facts-inner p { padding-block: .9rem; }
  .facts-inner p + p { border-top: 1px solid var(--line); }
}

@media (max-width: 720px) {
  .brand img { height: 40px; }
  .nav-inner { padding-block: .7rem; }
  .nav nav { width: 100%; justify-content: flex-start; gap: .3rem .9rem; }
  .nav nav a { font-size: .76rem; letter-spacing: .07em; }
  .nav-call { display: none; }        /* the fixed call bar takes over */

  .steps { grid-template-columns: 1fr; gap: 1.6rem; }
  .svc-grid { grid-template-columns: 1fr; }
  .svc-row { grid-template-columns: 1fr; gap: .8rem; padding-block: 2rem; }
  .promise-grid { grid-template-columns: 1fr; gap: 1.6rem; }
  .contact-grid { grid-template-columns: 1fr; }
  .ba { grid-template-columns: 1fr 1fr; gap: 3px; }  /* keep before/after side by side */

  .foot-inner { flex-direction: column; align-items: flex-start; }

  .call-bar {
    display: flex; align-items: center; justify-content: center; gap: .5rem;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 100;
    background: var(--red); color: #fff; text-decoration: none;
    font-family: var(--display); font-weight: 600; font-size: 1.15rem;
    letter-spacing: .08em; text-transform: uppercase;
    padding: .9rem 1rem calc(.9rem + env(safe-area-inset-bottom));
    box-shadow: 0 -4px 18px rgba(0, 0, 0, .25);
  }
  body { padding-bottom: 3.6rem; }
}

/* ── Reduced motion (selectors carry the html.js gate so they outweigh the
      JS-gated hidden states above) ──────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
  html.js [data-reveal] { opacity: 1; transform: none; }
  html.js .hero-rule { transform: scaleX(1); }
}
