/* ============================================================
   JLP SOURCE — design system
   Palette: white dominant · ink cobalt #1A3354 · mid-blue #2E6DA4
            stone #F6F2EC. No gradients. No dark mode.
   Type: Inter Tight (display) / Inter (text).
   ============================================================ */

:root {
  --ink: #1A3354;
  --blue: #2E6DA4;
  --stone: #F6F2EC;
  --paper: #FFFFFF;
  --text: #37465E;
  --muted: #6B7890;
  --line: #E4E4E0;
  --line-stone: #E2DCD1;

  --font-display: "Inter Tight", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-text: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --wrap: 1360px;
  --gutter: clamp(20px, 5vw, 72px);
  --header-h: 64px;
  --subnav-h: 49px;
}

/* ---- reset ---- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-text);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
  font-weight: 560;
}
h1 { font-size: clamp(2.5rem, 6.4vw, 5.25rem); font-weight: 600; }
h2 { font-size: clamp(1.9rem, 3.8vw, 3.1rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); letter-spacing: -0.01em; }
h4 { font-size: 1.02rem; letter-spacing: 0; }
p { margin: 0 0 1em; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
ul[role="list"] { list-style: none; margin: 0; padding: 0; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 2px; }

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

.kicker {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--blue);
  margin: 0 0 1.1em;
}
.lede { font-size: clamp(1.05rem, 1.6vw, 1.3rem); line-height: 1.55; max-width: 36em; }

/* ---- skip link ---- */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--ink); color: #fff; padding: 10px 18px; font-weight: 600;
}
.skip-link:focus { left: 12px; top: 12px; }

/* ---- header ---- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; height: var(--header-h);
}
.wordmark { display: inline-flex; align-items: center; }
.wordmark img { height: 18px; width: auto; display: block; }
.site-nav ul { display: flex; gap: clamp(16px, 2.4vw, 34px); list-style: none; margin: 0; padding: 0; }
.site-nav a {
  font-size: 0.9rem; font-weight: 500; color: var(--ink);
  padding: 6px 2px;
}
.site-nav a:hover { color: var(--blue); text-decoration: none; }
.site-nav a[aria-current="page"] { color: var(--blue); box-shadow: inset 0 -2px 0 var(--blue); }
.nav-cta {
  border: 1.5px solid var(--ink); border-radius: 2px;
  padding: 8px 16px !important; color: var(--ink);
}
.nav-cta:hover { background: var(--ink); color: #fff !important; }

.nav-toggle {
  display: none;
  background: none; border: 1px solid var(--line); border-radius: 2px;
  font: inherit; font-size: 0.85rem; font-weight: 600; color: var(--ink);
  padding: 8px 14px; cursor: pointer;
}

/* ---- buttons ---- */
.btn {
  display: inline-block;
  background: var(--ink); color: #fff;
  font-family: var(--font-text); font-size: 0.92rem; font-weight: 600;
  padding: 14px 28px; border: 1.5px solid var(--ink); border-radius: 2px;
  cursor: pointer; transition: background 160ms ease, color 160ms ease;
}
.btn:hover { background: var(--blue); border-color: var(--blue); color: #fff; text-decoration: none; }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); border-color: var(--ink); }
.quote-link {
  display: inline-block;
  font-weight: 600; font-size: 0.92rem; color: var(--ink);
  border-bottom: 1.5px solid var(--blue); padding-bottom: 2px;
}
.quote-link:hover { color: var(--blue); text-decoration: none; }

/* ---- hero: scroll scrub ----
   A 320vh section with a sticky 100vh stage. js/hero.js maps scroll progress
   to plate crossfades, the copy beat and the progress rule. With reduced
   motion, a low powered device, or no JS, html carries .static-hero and the
   section collapses to a static full bleed hero showing the final plate. */
.hero-scrub { position: relative; height: 320vh; }
.hero-stage {
  position: sticky; top: 0; height: 100vh;
  overflow: hidden; background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.hero-plate {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  opacity: 0;
}
.hero-stage.scrubbing .hero-plate { will-change: opacity, transform; }
.btn-magnet { transition: transform 240ms cubic-bezier(0.2, 0.6, 0.3, 1); }
.hero-plate[data-plate="0"] { opacity: 1; }
.hero-light {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(560px circle at var(--mx, 50%) var(--my, 40%), rgba(46, 109, 164, 0.1), transparent 62%);
  opacity: 0; transition: opacity 400ms ease;
}
.hero-stage:hover .hero-light { opacity: 1; }
.hero-overlay {
  position: absolute; inset: 0;
  display: grid; align-content: center;
  padding-inline: var(--gutter);
  opacity: 0; transform: translateY(16px);
  pointer-events: none;
  /* legibility scrim, rides the copy beat since it sits on the overlay */
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.82) 0%, rgba(255, 255, 255, 0.5) 40%, rgba(255, 255, 255, 0) 70%);
}
@media (max-width: 768px) {
  .hero-overlay {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.85) 0%, rgba(255, 255, 255, 0.55) 55%, rgba(255, 255, 255, 0.1) 100%);
  }
}
.hero-overlay.on { pointer-events: auto; }
.hero-overlay h1 { max-width: 10.5em; }
.hero-overlay .lede { margin-top: 1.4em; max-width: 30em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 2.2em; }
.hero-progress {
  position: absolute; top: 50%; right: clamp(16px, 3vw, 40px);
  height: 128px; width: 2px;
  transform: translateY(-50%);
  background: var(--line);
}
.hero-progress i {
  display: block; width: 100%; height: 100%;
  background: var(--ink);
  transform: scaleY(0); transform-origin: top;
}
/* static fallback */
html.static-hero .hero-scrub { height: auto; }
html.static-hero .hero-stage { position: relative; height: min(88vh, 760px); }
html.static-hero .hero-plate { opacity: 0 !important; }
html.static-hero .hero-plate:last-of-type { opacity: 1 !important; }
html.static-hero .hero-overlay { opacity: 1 !important; transform: none !important; pointer-events: auto; }
html.static-hero .hero-progress, html.static-hero .hero-light { display: none; }
html:not(.js) .hero-scrub { height: auto; }
html:not(.js) .hero-stage { position: relative; height: min(88vh, 760px); }
html:not(.js) .hero-plate:last-of-type { opacity: 1; }
html:not(.js) .hero-overlay { opacity: 1; transform: none; pointer-events: auto; }
html:not(.js) .hero-progress { display: none; }

/* ---- stats / facts strip ---- */
.facts {
  background-color: var(--stone);
  background-image: linear-gradient(rgba(246, 242, 236, 0.92), rgba(246, 242, 236, 0.92)), url("../assets/img/tex-plaster-1600.jpg");
  background-size: cover;
  border-bottom: 1px solid var(--line-stone);
}
.facts-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: clamp(18px, 3vw, 48px); padding-block: clamp(30px, 4vw, 52px);
}
.fact .fact-n {
  font-family: var(--font-display); font-weight: 600; color: var(--ink);
  font-size: clamp(1.5rem, 2.6vw, 2.2rem); letter-spacing: -0.02em;
}
.fact .fact-l { font-size: 0.85rem; color: var(--muted); margin-top: 2px; }

/* ---- generic section ---- */
.section { padding-block: clamp(56px, 8vw, 120px); }
.section--stone { background: var(--stone); }
.section-head { max-width: 46em; margin-bottom: clamp(32px, 4.5vw, 64px); }

/* split rows — asymmetric editorial layout */
.split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(28px, 6vw, 96px);
  align-items: center;
}
.split--flip { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); }
.split figure { margin: 0; }
.split img { width: 100%; object-fit: cover; }

/* ---- featured category index (home) ---- */
.cat-index { border-top: 1px solid var(--line); }
.cat-index-row {
  display: grid;
  grid-template-columns: 70px minmax(0, 4fr) minmax(0, 6fr) auto;
  gap: clamp(16px, 3vw, 48px);
  align-items: center;
  padding-block: clamp(20px, 2.6vw, 34px);
  border-bottom: 1px solid var(--line);
  color: inherit;
}
.cat-index-row:hover { text-decoration: none; background: var(--stone); }
.cat-index-row:hover .ci-title { color: var(--blue); }
.ci-num {
  font-family: var(--font-display); font-size: 0.85rem; font-weight: 560;
  color: var(--muted); letter-spacing: 0.06em;
}
.ci-title {
  font-family: var(--font-display); font-weight: 560;
  font-size: clamp(1.15rem, 2vw, 1.55rem); letter-spacing: -0.015em;
  color: var(--ink); transition: color 140ms ease;
}
.ci-desc { font-size: 0.92rem; color: var(--muted); margin: 0; max-width: 42em; }
.ci-arrow { color: var(--ink); font-size: 1.2rem; }

/* ---- sub-scroll navigation ---- */
.subnav {
  position: sticky; top: var(--header-h); z-index: 90;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.subnav-inner { display: flex; align-items: center; gap: 18px; }
.subnav-label {
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--muted);
  padding-right: 18px; border-right: 1px solid var(--line);
  white-space: nowrap;
}
.subnav ul {
  position: relative;
  display: flex; gap: 4px; list-style: none; margin: 0; padding: 0;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.subnav ul::-webkit-scrollbar { display: none; }
.subnav-link {
  display: inline-block; position: relative;
  font-size: 0.86rem; font-weight: 500; color: var(--muted);
  padding: 14px 10px; white-space: nowrap;
  transition: color 160ms ease;
}
.subnav-link:hover { color: var(--ink); text-decoration: none; }
.subnav-link[aria-current="true"] { color: var(--ink); font-weight: 600; }
/* single indicator element, moved between chips rather than snapped */
.subnav-indicator {
  position: absolute; bottom: 0; left: 0;
  height: 2px; width: 0; background: var(--ink);
  transition: left 300ms cubic-bezier(0.4, 0, 0.2, 1), width 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---- category sections ---- */
.cat {
  display: grid;
  grid-template-columns: clamp(48px, 5vw, 88px) minmax(0, 1fr);
  border-bottom: 1px solid var(--line);
  scroll-margin-top: calc(var(--header-h) + var(--subnav-h) + 8px);
}
.cat--stone { background: var(--stone); }
.cat--stone .product-row { border-color: var(--line-stone); }
.cat-side { position: relative; border-right: 1px solid var(--line); }
.cat--stone .cat-side { border-color: var(--line-stone); }
.cat-side span {
  position: sticky;
  top: calc(var(--header-h) + var(--subnav-h) + 24px);
  display: inline-block;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--muted);
  padding: 18px 0;
  margin-left: calc(50% - 0.5em);
}
.cat-body { padding: clamp(48px, 6vw, 96px) var(--gutter) clamp(56px, 7vw, 104px); max-width: calc(var(--wrap) - 88px); }

.cat-head {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  gap: clamp(28px, 5vw, 88px);
  align-items: start;
  margin-bottom: clamp(36px, 5vw, 64px);
}
.cat-intro { max-width: 38em; font-size: 1.02rem; }
.cat-head .quote-link { margin-top: 0.6em; }
.cat-head-media { margin: 0; }
.cat-head-media img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }

.cat-sub { margin-top: clamp(32px, 4vw, 56px); }
.cat-sub-title {
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--blue);
  margin-bottom: 0.4em;
}

/* product rows — horizontal spec rows, not cards */
.product-row {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 4fr) minmax(0, 3fr) auto;
  gap: clamp(14px, 2.4vw, 40px);
  align-items: baseline;
  padding-block: 16px;
  border-top: 1px solid var(--line);
}
.product-rows li:last-child { border-bottom: 1px solid var(--line); }
.cat--stone .product-rows li:last-child { border-color: var(--line-stone); }
.pr-name { margin: 0; font-weight: 560; }
.pr-desc { margin: 0; font-size: 0.9rem; color: var(--muted); }
.pr-spec { margin: 0; font-size: 0.82rem; color: var(--text); font-variant-numeric: tabular-nums; }
.pr-quote { font-size: 0.85rem; font-weight: 600; color: var(--blue); white-space: nowrap; }

/* ---- services (trade services page + home strip) ---- */
.service-rows { border-top: 1px solid var(--line); }
.service-row {
  display: grid;
  grid-template-columns: 70px minmax(0, 4fr) minmax(0, 7fr);
  gap: clamp(16px, 3vw, 56px);
  padding-block: clamp(26px, 3.6vw, 44px);
  border-bottom: 1px solid var(--line);
  align-items: start;
}
.section--stone .service-rows, .section--stone .service-row { border-color: var(--line-stone); }
.service-row h3 { margin-bottom: 0.3em; }
.service-row p { margin: 0; max-width: 44em; }

/* ---- CTA band ---- */
.cta-band { background: var(--ink); }
.cta-band .wrap {
  display: grid; grid-template-columns: minmax(0, 7fr) auto;
  gap: clamp(24px, 4vw, 64px); align-items: center;
  padding-block: clamp(48px, 6vw, 84px);
}
.cta-band h2 { color: #fff; margin-bottom: 0.3em; }
.cta-band p { color: #BBC9DC; margin: 0; max-width: 38em; }
.cta-band .btn { background: #fff; color: var(--ink); border-color: #fff; }
.cta-band .btn:hover { background: var(--stone); border-color: var(--stone); }

/* ---- forms ---- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 24px; }
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field--full { grid-column: 1 / -1; }
.form-field label { font-size: 0.85rem; font-weight: 600; color: var(--ink); }
.form-field .hint { font-size: 0.78rem; color: var(--muted); }
.form-field input, .form-field select, .form-field textarea {
  font: inherit; font-size: 0.95rem; color: var(--text);
  background: #fff; border: 1px solid #C9CDD6; border-radius: 2px;
  padding: 12px 14px;
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
  outline: 2px solid var(--blue); outline-offset: 0; border-color: var(--blue);
}
.form-field input[type="file"] { padding: 10px; background: var(--stone); border-style: dashed; }
fieldset { border: 0; margin: 0 0 10px; padding: 0; }
legend {
  font-family: var(--font-display); font-weight: 560; color: var(--ink);
  font-size: 1.05rem; padding: 0; margin-bottom: 14px;
}
.form-note { font-size: 0.85rem; color: var(--muted); }
.form-status { font-weight: 600; color: var(--ink); }
.form-confirm {
  display: none;
  border: 1px solid var(--line-stone); background: var(--stone);
  padding: clamp(24px, 4vw, 40px);
}
.form-confirm.show { display: block; }
.form-confirm h3 { margin-bottom: 0.4em; }
.form-confirm p { max-width: 44em; }
.form-confirm p:last-child { margin-bottom: 0; }
#quote-form.sent { display: none; }

/* ---- 404 and legal ---- */
.err-code {
  font-family: var(--font-display); font-weight: 600; color: var(--ink);
  font-size: clamp(5rem, 16vw, 11rem); line-height: 0.95; letter-spacing: -0.04em;
  margin: 0 0 0.15em;
}
.prose { max-width: 66ch; }
.prose h2 { font-size: 1.3rem; margin-top: 2.2em; }
.prose h2:first-child { margin-top: 0; }
.prose ul { padding-left: 1.2em; margin: 0 0 1em; }
.prose li { margin-bottom: 0.4em; }

/* ---- footer ---- */
.site-footer {
  background-color: var(--ink);
  background-image: linear-gradient(rgba(26, 51, 84, 0.96), rgba(26, 51, 84, 0.96)), url("../assets/img/tex-concrete-1600.jpg");
  background-size: cover;
  color: #BBC9DC;
}
.site-footer a { color: #E8EEF5; }
.site-footer a:hover { color: #fff; }
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 4fr) repeat(3, minmax(0, 2.5fr));
  gap: clamp(28px, 4vw, 64px);
  padding-block: clamp(48px, 6vw, 88px) clamp(32px, 4vw, 56px);
}
.footer-grid h4 {
  color: #fff; font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase;
  margin-bottom: 1.2em;
}
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.footer-grid li { font-size: 0.9rem; }
.footer-wordmark { margin: 0 0 1.2em; }
.footer-wordmark img { height: 72px; width: auto; display: block; }
.footer-coverage { margin-top: 1.1em; font-size: 0.92rem; max-width: 26em; }
.footer-legal {
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  padding-block: 22px 30px;
  display: flex; flex-wrap: wrap; gap: 8px 28px;
  font-size: 0.78rem; color: #8FA3BC;
}
.footer-legal p { margin: 0; }

/* ---- scroll reveals (JS adds .in; non-JS users see content immediately) ---- */
html.js .reveal { opacity: 0; transform: translateY(14px); }
html.js .reveal.in {
  opacity: 1; transform: none;
  transition: opacity 560ms ease, transform 560ms ease;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html.js .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .ci-title, .subnav-link, .subnav-indicator { transition: none; }
}

/* ---- page intro (interior pages) ---- */
.page-intro { padding-block: clamp(52px, 8vw, 110px) clamp(40px, 6vw, 80px); border-bottom: 1px solid var(--line); }
.page-intro .lede { margin-top: 1.3em; }
.page-intro--stone { background: var(--stone); border-color: var(--line-stone); }

/* definition rows (coverage page) */
.def-rows { border-top: 1px solid var(--line); margin-top: 8px; }
.def-row {
  display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 8fr);
  gap: clamp(14px, 3vw, 48px);
  padding-block: 18px; border-bottom: 1px solid var(--line);
}
.def-row dt { font-weight: 600; color: var(--ink); }
.def-row dd { margin: 0; }

/* ---- responsive (breakpoints: 480, 768, 1024, 1440) ---- */
@media (min-width: 1440px) {
  html { font-size: 17px; }
}

@media (max-width: 1024px) {
  .subnav ul {
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 20px, #000 calc(100% - 20px), transparent 100%);
    mask-image: linear-gradient(to right, transparent 0, #000 20px, #000 calc(100% - 20px), transparent 100%);
  }
}

@media (max-width: 1024px) {
  .split, .split--flip { grid-template-columns: 1fr; }
  .facts-grid { grid-template-columns: repeat(2, 1fr); }
  .cat { grid-template-columns: 1fr; }
  .cat-side { display: none; }
  .cat-head { grid-template-columns: 1fr; }
  .cat-head-media { order: -1; max-width: 420px; }
  .cat-head-media img { aspect-ratio: 16 / 10; }
  .cat-body { padding-inline: var(--gutter); }
  .cat-index-row { grid-template-columns: 48px 1fr auto; }
  .ci-desc { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .cta-band .wrap { grid-template-columns: 1fr; }
  .service-row { grid-template-columns: 48px 1fr; }
  .service-row p { grid-column: 2; }
}

@media (max-width: 768px) {
  .site-nav {
    position: absolute; top: var(--header-h); left: 0; right: 0;
    background: var(--paper); border-bottom: 1px solid var(--line);
    display: none; padding: 10px var(--gutter) 20px;
  }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; gap: 4px; }
  .site-nav a { display: block; padding: 11px 2px; font-size: 1rem; }
  .nav-cta { text-align: center; margin-top: 8px; }
  .nav-toggle { display: inline-block; }
  .form-grid { grid-template-columns: 1fr; }
  .product-row { grid-template-columns: 1fr; gap: 3px; padding-block: 14px; }
  .pr-quote { margin-top: 4px; }
  .def-row { grid-template-columns: 1fr; gap: 2px; }
  .subnav-label { display: none; }
  .facts-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-scrub { height: 220vh; }
}

@media (max-width: 480px) {
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { text-align: center; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-wordmark img { height: 56px; }
}
