/* =========================================================
   Inner pages layer — knowledge-city.html, pavers.html, gallery.html
   Loads after styles.css / motion.css / theme.css and overrides them where needed.
   Pairs with js/pages-next.js. Without JS everything is static and readable.
   ========================================================= */

:root { --pnx-ease: cubic-bezier(.16, 1, .3, 1); }

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

/* generic reveal (only applied by JS once IntersectionObserver is confirmed) */
.pnx-rv { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--pnx-ease) var(--pd, 0ms), transform 1s var(--pnx-ease) var(--pd, 0ms); }
.pnx-rv.pnx-in { opacity: 1; transform: none; }

/* =========================================================
   KNOWLEDGE CITY
   ========================================================= */

/* ---------- Hero ---------- */
.kcx-hero {
  --kcx-overlap: 64px;
  position: relative; isolation: isolate; z-index: 2;
  min-height: clamp(520px, calc(100svh - var(--pnx-hdr, 80px) - var(--kcx-overlap) - 28px), 940px);
  display: flex; flex-direction: column; justify-content: flex-end; align-items: stretch;
  overflow: visible; padding-top: 96px; background: var(--navy);
}
.kcx-hero-clip { position: absolute; inset: 0; overflow: hidden; z-index: -1; background: var(--navy); }
.kcx-hero-media { position: absolute; inset: -2px 0 0; transform-origin: 50% 35%; will-change: transform; }
.kcx-hero .kc-hero-shade {
  background:
    linear-gradient(to top, rgba(8,14,23,.94) 0%, rgba(8,14,23,.62) 34%, rgba(8,14,23,.12) 66%, rgba(8,14,23,.38) 100%),
    radial-gradient(ellipse 70% 60% at 15% 85%, rgba(8,14,23,.55), transparent 70%);
}
.kcx-hero .kc-hero-text { padding-bottom: clamp(28px, 4.5vw, 56px); will-change: transform, opacity; }
.kcx-hero .kc-status { margin-bottom: 18px; }
.kcx-hero h1 {
  font-size: clamp(3.3rem, 10.4vw, 9.4rem); line-height: .9; letter-spacing: -.035em;
  text-shadow: 0 10px 40px rgba(0,0,0,.35);
}
.kcx-gold { font-style: italic; color: var(--gold); letter-spacing: -.02em; }
.kcx-hero-btns { margin-top: 24px; }
.kcx-hero-btns .btn { min-height: 54px; padding: 0 30px; }
.kcx-hero .kc-hero-lead { margin-top: 18px; max-width: 32rem; font-size: clamp(1.02rem, 1.5vw, 1.25rem); color: rgba(255,255,255,.86); }

/* key facts: glass panel overlapping the hero edge */
.kcx-facts-wrap { position: relative; z-index: 3; margin-bottom: calc(var(--kcx-overlap) * -1); }
.kcx-hero .kcx-facts {
  grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0;
  background: linear-gradient(135deg, rgba(20,36,58,.86), rgba(10,18,29,.84));
  -webkit-backdrop-filter: blur(18px) saturate(1.35); backdrop-filter: blur(18px) saturate(1.35);
  border: 1px solid rgba(255,255,255,.16); border-radius: 22px; overflow: hidden;
  box-shadow: 0 40px 80px -30px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.12);
}
.kcx-hero .kcx-facts > div {
  position: relative; padding: clamp(18px, 2.4vw, 28px) clamp(18px, 2.4vw, 30px);
  background: transparent; border: 0; border-radius: 0; box-shadow: none;
  border-left: 1px solid rgba(255,255,255,.12);
}
.kcx-hero .kcx-facts > div:first-child { border-left: 0; }
.kcx-hero .kcx-facts > div.tilt { transform: none !important; }   /* panel, not cards */
.kcx-hero .kcx-facts dt { color: var(--gold); font-size: .74rem; letter-spacing: .14em; }
.kcx-hero .kcx-facts dd { margin-top: 8px; color: #fff; font-size: clamp(1.7rem, 2.8vw, 2.5rem); line-height: 1.05; font-variant-numeric: tabular-nums; }
.kcx-hero .kcx-facts dd.kc-fact-text { font-size: clamp(1rem, 1.35vw, 1.2rem); line-height: 1.3; }
.js-motion .kcx-facts { opacity: 0; transform: translateY(34px); }
.js-motion.page-ready .kcx-facts { opacity: 1; transform: none; transition: opacity 1s .45s, transform 1.2s var(--pnx-ease) .45s; }
@media (max-width: 760px) {
  .kcx-hero { --kcx-overlap: 48px; padding-top: 72px; }
  .kcx-hero .kcx-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); border-radius: 18px; }
  .kcx-hero .kcx-facts > div:nth-child(3) { border-left: 0; }
  .kcx-hero .kcx-facts > div:nth-child(n+3) { border-top: 1px solid rgba(255,255,255,.12); }
}

/* ---------- Overview ---------- */
.kcx-intro-sec { padding-top: calc(var(--section-y) + 64px); }
.kcx-intro { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 6vw, 96px); align-items: start; }
.kcx-intro-head h2 { margin-top: 12px; font-size: clamp(2rem, 3.8vw, 3.1rem); line-height: 1.08; letter-spacing: -.015em; }
.kcx-intro-head h2::after { content: ""; display: block; width: 64px; height: 3px; margin-top: 22px; border-radius: 2px; background: var(--gold); }
.kcx-intro-body p { color: var(--muted); font-size: 1.05rem; line-height: 1.75; }
.kcx-intro-body .kcx-lede { color: var(--ink); font-family: var(--font-head); font-weight: 600; font-size: clamp(1.25rem, 2.1vw, 1.7rem); line-height: 1.42; letter-spacing: -.005em; }
.kcx-intro-body p + p { margin-top: 20px; }
@media (max-width: 820px) { .kcx-intro { grid-template-columns: 1fr; } }

/* ---------- Masterplan stepper ---------- */
.kcx-plan-sec {
  background: var(--navy); color: #fff; padding-bottom: clamp(56px, 8vw, 96px);
  background-image:
    linear-gradient(rgba(201,162,39,.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(201,162,39,.055) 1px, transparent 1px);
  background-size: 72px 72px;
}
.kcx-plan-sec .section-head h2 { color: #fff; }
.kcx-plan-sec .section-head .eyebrow { color: var(--gold); }
.kcx-plan-sec .gallery-lead { color: rgba(255,255,255,.78); }
.kcx-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 28px 20px; }
.kcx-step { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.kcx-steps .kcx-step-media {
  position: relative; display: block; aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden; background: #fff;
  box-shadow: 0 20px 50px -24px rgba(0,0,0,.7), 0 0 0 1px rgba(255,255,255,.08);
}
.kcx-steps .kcx-step-media img { width: 100%; height: 100%; object-fit: contain; }
.kcx-step-kicker { display: flex; align-items: center; gap: 10px; font-size: .74rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); }
.kcx-step-kicker span { display: inline-grid; place-items: center; min-width: 30px; height: 24px; padding: 0 6px; border-radius: 6px; border: 1px solid rgba(201,162,39,.55); font-variant-numeric: tabular-nums; letter-spacing: .04em; }
.kcx-step-title { margin-top: 6px; font-size: 1.06rem; line-height: 1.35; color: #fff; }
.kcx-plan-ui, .kcx-dots { display: none; }

/* phones / tablets: horizontal scroll-snap carousel + dots */
@media (max-width: 959px) and (prefers-reduced-motion: no-preference) {
  .kcx-steps {
    display: flex; gap: 14px; overflow-x: auto; overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory; scrollbar-width: none;
    margin-inline: calc(var(--gutter) * -1); padding: 6px var(--gutter) 10px; scroll-padding-inline: var(--gutter);
  }
  .kcx-steps::-webkit-scrollbar { display: none; }
  .kcx-step { flex: 0 0 min(82%, 520px); scroll-snap-align: center; }
  .kcx-dots { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin-top: 18px; padding: 0 var(--gutter); }
  .kcx-dots span { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.28); transition: background-color .3s, width .3s var(--pnx-ease); }
  .kcx-dots span.is-on { width: 22px; border-radius: 4px; background: var(--gold); }
}

/* desktop: pinned stage that steps through the drawings as you scroll */
.kcx-plan.is-pinned { position: relative; height: calc(var(--n, 16) * 34vh + 100vh - var(--pnx-hdr, 80px)); }
.kcx-plan.is-pinned .kcx-plan-sticky { position: sticky; top: var(--pnx-hdr, 80px); height: calc(100vh - var(--pnx-hdr, 80px)); overflow: hidden; }
.kcx-plan.is-pinned .kcx-plan-inner {
  --cols: minmax(280px, .78fr) minmax(0, 1.65fr);
  position: relative; height: 100%; display: grid; grid-template-columns: var(--cols); gap: clamp(32px, 4vw, 72px);
  padding-block: clamp(20px, 4.5vh, 44px);
}
.kcx-plan.is-pinned .kcx-steps { grid-column: 1 / -1; grid-row: 1; position: relative; display: block; height: 100%; }
.kcx-plan.is-pinned .kcx-step {
  position: absolute; inset: 0; display: grid; grid-template-columns: var(--cols); gap: clamp(32px, 4vw, 72px);
  align-items: center; pointer-events: none;
}
.kcx-plan.is-pinned .kcx-step.is-active { pointer-events: auto; }
.kcx-plan.is-pinned .kcx-step-text { grid-column: 1; grid-row: 1; align-self: start; padding-top: clamp(8px, 6vh, 64px); }
.kcx-plan.is-pinned .kcx-step-media {
  grid-column: 2; grid-row: 1; justify-self: center; width: 100%;
  max-width: calc((100vh - var(--pnx-hdr, 80px) - 96px) * 4 / 3);
  border-radius: 16px; box-shadow: 0 50px 100px -40px rgba(0,0,0,.85), 0 0 0 1px rgba(201,162,39,.25);
  opacity: 0; transform: translateY(26px) scale(.965);
  transition: opacity .7s var(--pnx-ease), transform .9s var(--pnx-ease), box-shadow .3s;
}
.kcx-plan.is-pinned .kcx-step.is-past .kcx-step-media { transform: translateY(-18px) scale(1.015); }
.kcx-plan.is-pinned .kcx-step.is-active .kcx-step-media { opacity: 1; transform: none; }
.kcx-plan.is-pinned .kcx-step-media::after {
  content: "View full size"; position: absolute; top: 14px; right: 14px; padding: 7px 12px; border-radius: 999px;
  background: rgba(14,27,43,.82); color: #fff; font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  opacity: 0; transform: translateY(-4px); transition: opacity .3s, transform .3s var(--pnx-ease);
}
.kcx-plan.is-pinned .kcx-step-media:hover::after, .kcx-plan.is-pinned .kcx-step-media:focus-visible::after { opacity: 1; transform: none; }
.kcx-plan.is-pinned .kcx-step.is-active .kcx-step-media:hover { box-shadow: 0 50px 100px -40px rgba(0,0,0,.85), 0 0 0 2px var(--gold); }
.kcx-plan.is-pinned .kcx-step-text > * { opacity: 0; transform: translateY(22px); transition: opacity .5s, transform .7s var(--pnx-ease); }
.kcx-plan.is-pinned .kcx-step.is-past .kcx-step-text > * { transform: translateY(-16px); }
.kcx-plan.is-pinned .kcx-step.is-active .kcx-step-text > * { opacity: 1; transform: none; transition-delay: .12s; }
.kcx-plan.is-pinned .kcx-step.is-active .kcx-step-text > :nth-child(2) { transition-delay: .2s; }
.kcx-plan.is-pinned .kcx-step-title { margin-top: 16px; font-size: clamp(1.6rem, 2.5vw, 2.35rem); line-height: 1.15; letter-spacing: -.01em; }
.kcx-plan.is-pinned .kcx-step-kicker { font-size: .8rem; }

.kcx-plan.is-pinned .kcx-plan-ui { display: block; grid-column: 1; grid-row: 1; align-self: end; position: relative; z-index: 2; padding-bottom: clamp(4px, 2vh, 20px); }
.kcx-count { display: flex; align-items: baseline; gap: 10px; margin: 0 0 18px; font-variant-numeric: tabular-nums; }
.kcx-count b { font-family: var(--font-head); font-weight: 600; font-size: clamp(3.6rem, 6.4vw, 6rem); line-height: .85; color: var(--gold); letter-spacing: -.03em; }
.kcx-count span { font-size: 1rem; font-weight: 600; color: rgba(255,255,255,.62); }
.kcx-rail { position: relative; }
.kcx-rail-fill { position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--gold); transform: scaleX(0); transform-origin: left; }
.kcx-rail::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: rgba(255,255,255,.16); z-index: -1; }
.kcx-ticks { display: flex; gap: 4px; margin: 0; padding: 0; list-style: none; }
.kcx-ticks li { flex: 1; }
.kcx-tick { display: block; width: 100%; height: 30px; padding: 0; border: 0; background: none; cursor: pointer; position: relative; border-radius: 3px; }
.kcx-tick::before { content: ""; position: absolute; left: 0; right: 0; bottom: 8px; height: 3px; border-radius: 2px; background: rgba(255,255,255,.22); transition: background-color .35s, height .35s var(--pnx-ease); }
.kcx-tick:hover::before { background: rgba(255,255,255,.5); height: 6px; }
.kcx-tick.is-on::before { background: var(--gold); }
.kcx-tick[aria-current="step"]::before { height: 8px; }
.kcx-tick:focus-visible { outline-offset: 2px; }
.kcx-hint { display: flex; align-items: center; gap: 12px; margin: 14px 0 0; font-size: .7rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: rgba(255,255,255,.6); }
.kcx-hint-line { position: relative; width: 36px; height: 1px; background: rgba(255,255,255,.25); overflow: hidden; }
.kcx-hint-line::after { content: ""; position: absolute; inset: 0; background: var(--gold); animation: kcxHint 2.2s var(--pnx-ease) infinite; }
@keyframes kcxHint { from { transform: translateX(-100%); } to { transform: translateX(100%); } }

/* ---------- 3D views: coverflow reels ---------- */
.kcx-views { background: var(--surface-2); overflow: hidden; }
.kcx-group { --card: min(760px, 68vw); }
.kcx-group + .kcx-group { margin-top: clamp(40px, 6vw, 88px); }
.kcx-group-head { display: flex; align-items: flex-end; gap: clamp(14px, 2.4vw, 28px); }
.kcx-group-no {
  flex: none; font-family: var(--font-head); font-weight: 600; font-size: clamp(3.4rem, 7vw, 6.2rem); line-height: .78;
  color: transparent; -webkit-text-stroke: 1.2px var(--gold); letter-spacing: -.04em;
}
.kcx-group-title { min-width: 0; }
.kcx-group-title h3 { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; font-size: clamp(1.35rem, 2.5vw, 2rem); line-height: 1.15; }
.kcx-group-count { margin-top: 6px; color: var(--muted); font-size: .92rem; }
.kcx-reel-nav { margin-left: auto; display: flex; align-items: center; gap: 10px; flex: none; }
.kcx-group--alt .kcx-group-head { flex-direction: row-reverse; text-align: right; }
.kcx-group--alt .kcx-group-title h3 { justify-content: flex-end; }
.kcx-group--alt .kcx-reel-nav { margin-left: 0; margin-right: auto; }
.kcx-reel-pos { margin-right: 4px; font-size: .88rem; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.kcx-reel-pos b { color: var(--ink); }
.kcx-reel-btn {
  width: 48px; height: 48px; display: grid; place-items: center; padding: 0; cursor: pointer;
  border-radius: 50%; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink);
  box-shadow: 0 6px 16px -8px rgba(14,27,43,.35); transition: background-color .25s, color .25s, border-color .25s, transform .25s, opacity .25s;
}
.kcx-reel-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.kcx-reel-btn:hover:not(:disabled) { background: var(--gold); border-color: var(--gold); color: var(--navy); transform: translateY(-2px); }
.kcx-reel-btn:disabled { opacity: .35; cursor: default; box-shadow: none; }
.kcx-reel {
  list-style: none; margin: 0; display: flex; gap: clamp(14px, 2vw, 30px);
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none;
  padding: 26px calc(50% - var(--card) / 2) 64px;
  margin-bottom: -24px;
}
.kcx-reel::-webkit-scrollbar { display: none; }
.kcx-card {
  flex: 0 0 var(--card); scroll-snap-align: center; min-width: 0;
  transform: perspective(1500px) rotateY(calc(var(--cf, 0) * -24deg)) scale(calc(1 - var(--cfa, 0) * .12));
  opacity: calc(1 - var(--cfa, 0) * .4);
  transform-origin: 50% 50%; will-change: transform;
}
.kcx-card .g-link {
  aspect-ratio: 16 / 9; border-radius: 18px; background: var(--navy);
  box-shadow: 0 22px 40px -24px rgba(14,27,43,.5);
}
.kcx-card.is-center .g-link { box-shadow: 0 26px 44px -22px rgba(14,27,43,.6); }
.kcx-card .g-link:hover { transform: none; }
.kcx-card .g-link:hover img { transform: scale(1.035); filter: none; }
.kcx-card .g-link img { transition: transform .9s var(--pnx-ease); }
@media (max-width: 720px) {
  .kcx-group { --card: 84vw; }
  .kcx-group-head, .kcx-group--alt .kcx-group-head { flex-wrap: wrap; flex-direction: row; text-align: left; }
  .kcx-group--alt .kcx-group-title h3 { justify-content: flex-start; }
  .kcx-group-title { flex: 1 1 0; }
  .kcx-reel-nav, .kcx-group--alt .kcx-reel-nav { margin: 4px 0 0 auto; }
  .kcx-reel-btn { width: 44px; height: 44px; }
  .kcx-reel { padding-top: 18px; padding-bottom: 56px; }
}
@media (max-width: 420px) { .kcx-reel-pos { display: none; } }

/* ---------- Closing CTA ---------- */
.kcx-cta { position: relative; isolation: isolate; overflow: hidden; background: var(--navy); color: #fff; text-align: center; padding: clamp(96px, 14vw, 190px) 0; }
.kcx-cta-media { position: absolute; inset: 0; z-index: -1; }
.kcx-cta-media img { width: 100%; height: 100%; object-fit: cover; opacity: .5; transform: scale(1.04); }
.kcx-cta-media::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse 70% 80% at 50% 50%, rgba(10,18,29,.55), rgba(10,18,29,.92)); }
.kcx-cta .eyebrow { color: var(--gold); }
.kcx-cta h2 { margin: 14px auto 0; max-width: 16ch; color: #fff; font-size: clamp(2.3rem, 6vw, 4.8rem); line-height: 1.02; letter-spacing: -.025em; text-wrap: balance; }
.kcx-cta-lead { margin: 20px auto 0; max-width: 34rem; color: rgba(255,255,255,.82); font-size: clamp(1rem, 1.5vw, 1.15rem); }
.kcx-cta-btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 34px; }
.kcx-cta-btns .btn-gold { min-height: 56px; padding: 0 34px; font-size: 1rem; }
.kcx-cta-btns .btn-outline-light { min-height: 56px; }
[data-theme="dark"] .kcx-cta { border-top: 1px solid rgba(201,162,39,.16); }

/* =========================================================
   PAVERS
   ========================================================= */

/* ---------- Hero ornament: CSS 3D paver block ---------- */
.pvx-hero-visual { position: relative; }
.pvx-block {
  --w: 150px; --d: 96px; --h: 48px;
  position: absolute; left: -84px; bottom: -64px; z-index: 3; width: 210px; height: 190px;
  perspective: 900px; pointer-events: none;
}
.pvx-block-tilt {
  position: absolute; left: 50%; top: 46%; width: 0; height: 0; transform-style: preserve-3d;
  transform: translateY(var(--blift, 0px)) rotateX(calc(-34deg + var(--by, 0deg))) rotateY(calc(var(--bx, 0deg) + var(--bs, 0deg)));
  transition: transform .8s var(--pnx-ease);
}
.pvx-block-spin { position: absolute; transform-style: preserve-3d; animation: pvxSpin 18s linear infinite; }
@keyframes pvxSpin { from { transform: rotateY(-30deg); } to { transform: rotateY(330deg); } }
.pvx-face {
  position: absolute; left: 0; top: 0; backface-visibility: hidden;
  background:
    radial-gradient(rgba(14,27,43,.13) .7px, transparent 1.2px) 0 0 / 5px 7px,
    radial-gradient(rgba(255,255,255,.16) .7px, transparent 1.2px) 2px 3px / 11px 9px,
    radial-gradient(rgba(14,27,43,.1) 1.1px, transparent 1.7px) 5px 1px / 13px 17px,
    var(--face);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.12);
}
.pvx-top, .pvx-bottom { width: var(--w); height: var(--d); margin: calc(var(--d) / -2) 0 0 calc(var(--w) / -2); }
.pvx-front, .pvx-back { width: var(--w); height: var(--h); margin: calc(var(--h) / -2) 0 0 calc(var(--w) / -2); }
.pvx-left, .pvx-right { width: var(--d); height: var(--h); margin: calc(var(--h) / -2) 0 0 calc(var(--d) / -2); }
.pvx-top {
  --face: linear-gradient(135deg, #F0D26A 0%, #D7B03A 40%, #B8921C 100%);
  transform: rotateX(90deg) translateZ(calc(var(--h) / 2));
  box-shadow: inset 0 0 0 5px rgba(255,236,170,.35), inset 0 0 0 6px rgba(110,84,10,.35), inset 0 0 26px rgba(110,84,10,.25);
}
.pvx-top::after {
  content: ""; position: absolute; inset: 22%;
  background: url("../assets/img/logo-navy.png") center / contain no-repeat; opacity: .32;
}
.pvx-bottom { --face: #4D3C09; transform: rotateX(-90deg) translateZ(calc(var(--h) / 2)); }
.pvx-front { --face: linear-gradient(180deg, #B8921C, #8A6C10); transform: translateZ(calc(var(--d) / 2)); }
.pvx-back { --face: linear-gradient(180deg, #A9861A, #7B600E); transform: rotateY(180deg) translateZ(calc(var(--d) / 2)); }
.pvx-right { --face: linear-gradient(180deg, #9C7B16, #6F560C); transform: rotateY(90deg) translateZ(calc(var(--w) / 2)); }
.pvx-left { --face: linear-gradient(180deg, #C29B22, #8F7012); transform: rotateY(-90deg) translateZ(calc(var(--w) / 2)); }
.pvx-block-shadow {
  position: absolute; left: 50%; bottom: 6px; width: 150px; height: 26px; margin-left: -75px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(0,0,0,.55), transparent); filter: blur(4px);
}
@media (max-width: 860px) {
  .pvx-block { left: auto; right: -14px; bottom: auto; top: -116px; transform: scale(.62); transform-origin: 100% 0; }
}
@media (max-width: 380px) { .pvx-block { display: none; } }
@media (min-width: 1100px) { .pv-subnav a { padding: 7px 12px; font-size: .85rem; } }
#installation { overflow-x: clip; }
@media (prefers-reduced-motion: reduce) {
  .pvx-block-spin { animation: none; transform: rotateY(-34deg); }
  .pvx-block-tilt { transition: none; }
}
.pv-hero { position: relative; }
.pv-hero .pv-hero-inner { position: relative; }

/* ---------- Sub-nav ---------- */
.pv-subnav { box-shadow: 0 10px 24px -20px rgba(14,27,43,.5); }
.pv-subnav a { transition: background-color .25s, color .25s, border-color .25s; }
.pv-subnav a[aria-current="true"] { background: var(--navy); color: #fff; border-color: var(--navy); }
[data-theme="dark"] .pv-subnav a[aria-current="true"] { background: var(--gold); color: var(--navy); border-color: var(--gold); }

/* ---------- Section numerals ---------- */
main:has(.pv-section) { counter-reset: pvx; }
.pv-section { counter-increment: pvx; }
.pv-section .section-head::before,
.pv-section .pv-install > div:first-child::before {
  content: counter(pvx, decimal-leading-zero);
  display: block; margin-bottom: 4px;
  font-family: var(--font-head); font-weight: 600; font-size: clamp(3.4rem, 7vw, 5.6rem); line-height: .9; letter-spacing: -.04em;
  color: transparent; -webkit-text-stroke: 1.2px var(--gold);
}
.pv-section .section-head h2 { text-wrap: balance; }

/* ---------- Product cards ---------- */
.pv-list { gap: clamp(18px, 2.4vw, 28px); }
.pv-item, .pv-item:last-child { padding-bottom: 0; border-bottom: 0; display: block; }
.pvx-card {
  position: relative; isolation: isolate; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr); gap: 22px clamp(24px, 4vw, 56px); align-items: start;
  padding: clamp(20px, 3vw, 38px); border-radius: 22px;
  background: var(--surface); border: 1px solid var(--line);
  box-shadow: 0 1px 2px rgba(14,27,43,.05), 0 24px 48px -32px rgba(14,27,43,.35);
  transform: perspective(1800px) rotateX(var(--ty, 0deg)) rotateY(var(--tx, 0deg));
  transition: transform .7s var(--pnx-ease), box-shadow .4s, border-color .4s;
}
.section-alt .pvx-card { background: var(--bg); }
.pvx-card.is-hover { box-shadow: 0 2px 4px rgba(14,27,43,.06), 0 40px 70px -36px rgba(14,27,43,.5); border-color: rgba(201,162,39,.45); }
.pvx-card::before {   /* light sweep */
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: linear-gradient(105deg, transparent 38%, rgba(255,255,255,.42) 50%, transparent 62%);
  transform: translateX(-110%); transition: transform 1.2s var(--pnx-ease);
}
.pvx-card.is-hover::before { transform: translateX(110%); }
.pvx-card::after {    /* pointer spotlight */
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: 0; transition: opacity .4s;
  background: radial-gradient(520px circle at var(--mx, 50%) var(--my, 50%), rgba(201,162,39,.13), transparent 45%);
}
.pvx-card.is-hover::after { opacity: 1; }
.pvx-info { display: grid; gap: 12px; align-content: start; }
.pvx-info h3 { font-size: clamp(1.45rem, 2.4vw, 1.95rem); letter-spacing: -.01em; }
.pvx-info h3::after { content: ""; display: block; width: 36px; height: 3px; margin-top: 12px; border-radius: 2px; background: var(--gold); transition: width .5s var(--pnx-ease); }
.pvx-card.is-hover .pvx-info h3::after { width: 72px; }
.pvx-info > p { margin: 0; color: var(--muted); line-height: 1.68; }
.pvx-info .pv-best { padding: 10px 14px; border-radius: 10px; background: var(--surface-2); border-left: 3px solid var(--gold); font-size: .94rem; }
.section-alt .pvx-info .pv-best { background: var(--surface); }
.pvx-media { display: grid; gap: 12px; align-content: start; }
.pvx-media .pv-photos { max-width: none; margin: 0; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 12px; }   /* tiles stay <= ~190px wide: never larger than before */
.pvx-media .pv-photos li { box-shadow: 0 10px 22px -16px rgba(14,27,43,.5); }
.pvx-media .pv-photos li:hover { transform: translateY(-4px); box-shadow: 0 18px 30px -16px rgba(14,27,43,.55); }
.pvx-card .pv-ktables { grid-column: 1 / -1; margin-top: 4px; }
.pv-sizes span { border-radius: 999px; padding: 5px 12px; letter-spacing: .01em; }
@media (max-width: 860px) {
  .pvx-card { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .pv-colours { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .pv-colours li { padding: 6px 6px 10px; font-size: .84rem; }
  .pvx-card { border-radius: 18px; padding: 18px 16px 20px; }
  .pvx-media .pv-photos { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
}
[data-theme="dark"] .pvx-card { box-shadow: 0 1px 0 rgba(255,255,255,.03) inset, 0 24px 48px -28px rgba(0,0,0,.7); }
[data-theme="dark"] .section-alt .pvx-card { background: var(--surface); }
[data-theme="dark"] .section-alt .pvx-info .pv-best { background: var(--surface-2); }
[data-theme="dark"] .pvx-card::before { background: linear-gradient(105deg, transparent 38%, rgba(255,255,255,.07) 50%, transparent 62%); }
[data-theme="dark"] .pvx-card.is-hover { box-shadow: 0 40px 70px -30px rgba(0,0,0,.8); }

/* ---------- Finishes ---------- */
.pv-finish { overflow: hidden; border-radius: 18px; transition: transform .5s var(--pnx-ease), box-shadow .35s, border-color .35s; }
.pv-finish:hover { border-color: rgba(201,162,39,.45); box-shadow: 0 30px 50px -30px rgba(14,27,43,.45); }
.pv-finish > div { border-radius: 12px; background: var(--img-bg); }
.pv-finish h3 { display: flex; align-items: center; gap: 10px; }
.pv-finish h3::before { content: ""; width: 10px; height: 10px; border-radius: 2px; background: var(--gold); transform: rotate(45deg); }

/* ---------- Colour swatches: tactile ---------- */
.pv-colours { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 14px; max-width: 1000px; }
.pv-colours li {
  flex-direction: column; align-items: stretch; gap: 10px; padding: 8px 8px 12px; border-radius: 16px; text-align: center;
  box-shadow: 0 10px 20px -18px rgba(14,27,43,.5); cursor: default;
}
.pnx .pv-colours > li {
  transition: opacity .9s var(--pnx-ease), transform 1s var(--pnx-ease), translate .4s var(--pnx-ease), box-shadow .4s, border-color .4s;
  transition-delay: calc(var(--d, 0) * 1ms), calc(var(--d, 0) * 1ms), 0s, 0s, 0s;
}
.pv-colours li:hover { translate: 0 -5px; border-color: rgba(201,162,39,.5); box-shadow: 0 22px 34px -20px rgba(14,27,43,.55); }
.pv-colours .sw {
  position: relative; width: 100%; height: auto; aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden;
  border: 0;
  box-shadow: inset 0 2px 0 rgba(255,255,255,.4), inset 0 -4px 0 rgba(0,0,0,.2), inset 0 0 0 1px rgba(0,0,0,.1), 0 8px 14px -8px rgba(0,0,0,.45);
  transition: transform .4s var(--pnx-ease);
}
.pv-colours .sw::before {   /* concrete grain */
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(rgba(0,0,0,.16) .8px, transparent 1.3px) 0 0 / 6px 6px,
    radial-gradient(rgba(255,255,255,.2) .8px, transparent 1.3px) 3px 2px / 8px 8px,
    radial-gradient(rgba(0,0,0,.1) 1.2px, transparent 1.8px) 1px 4px / 11px 11px;
}
.pv-colours .sw::after {    /* chamfer + sheen */
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: linear-gradient(135deg, rgba(255,255,255,.38), rgba(255,255,255,0) 42%, rgba(0,0,0,0) 70%, rgba(0,0,0,.16));
  box-shadow: inset 0 0 0 4px rgba(255,255,255,.12);
  transition: opacity .4s;
}
.pv-colours li:hover .sw { transform: scale(1.04); }
[data-theme="dark"] .pv-colours li:hover { box-shadow: 0 22px 34px -18px rgba(0,0,0,.8); }

/* ---------- Tables: sticky headers, tidy on phones ---------- */
@media (min-width: 721px) {
  .pv-section .table-wrap { overflow: visible; }
  .pv-section .area-table thead th,
  .pv-ktable thead th { position: sticky; top: var(--pnx-stick, 150px); z-index: 2; }
  .pv-section .area-table thead th:first-child { border-top-left-radius: calc(var(--radius-lg) - 1px); }
  .pv-section .area-table thead th:last-child { border-top-right-radius: calc(var(--radius-lg) - 1px); }
  .pv-ktable { overflow: visible; border-collapse: separate; border-spacing: 0; }
  .pv-ktable thead th:first-child { border-top-left-radius: 9px; }
  .pv-ktable thead th:last-child { border-top-right-radius: 9px; }
}
.pv-section .area-table tbody tr:not(.phase-row) { transition: background-color .2s; }
.pv-section .area-table tbody tr:not(.phase-row):hover,
.pv-ktable tbody tr:hover { background: rgba(201,162,39,.08); }
.pv-section .table-wrap { box-shadow: 0 24px 48px -36px rgba(14,27,43,.4); }
@media (max-width: 720px) {
  .pv-section .table-wrap {
    overflow: auto; max-height: min(74vh, 640px); overscroll-behavior: contain;
    background:
      linear-gradient(90deg, var(--surface) 30%, transparent) left center / 40px 100% no-repeat local,
      linear-gradient(270deg, var(--surface) 30%, transparent) right center / 40px 100% no-repeat local,
      radial-gradient(farthest-side at 0 50%, rgba(14,27,43,.18), transparent) left center / 14px 100% no-repeat scroll,
      radial-gradient(farthest-side at 100% 50%, rgba(14,27,43,.18), transparent) right center / 14px 100% no-repeat scroll,
      var(--surface);
  }
  .pv-section .area-table thead th { position: sticky; top: 0; z-index: 2; }
  .pv-ktable { font-size: .88rem; }
}

/* ---------- Installation ---------- */
.pv-steps li { transition: border-color .3s, box-shadow .3s; }
.pv-steps li:hover { border-color: rgba(201,162,39,.5); box-shadow: 0 16px 30px -22px rgba(14,27,43,.45); }

/* ---------- Enquiry band ---------- */
.pvx-quote-sec { padding: clamp(56px, 8vw, 104px) 0; }
.pvx-quote {
  position: relative; isolation: isolate; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 28px clamp(28px, 5vw, 64px); align-items: center;
  padding: clamp(28px, 5vw, 60px); border-radius: 26px;
  background: linear-gradient(120deg, #FBF4DD 0%, #F5E6B4 55%, #EFD889 100%);
  color: #0E1B2B; border: 1px solid rgba(201,162,39,.55);
  box-shadow: 0 40px 80px -46px rgba(14,27,43,.55);
}
.pvx-quote::after {   /* faint herringbone paving in the corner */
  content: ""; position: absolute; right: -6%; top: -30%; width: 55%; height: 160%; z-index: -1; opacity: .5;
  background:
    repeating-linear-gradient(45deg, rgba(14,27,43,.07) 0 2px, transparent 2px 26px),
    repeating-linear-gradient(-45deg, rgba(14,27,43,.07) 0 2px, transparent 2px 26px);
  -webkit-mask-image: radial-gradient(closest-side, #000 30%, transparent); mask-image: radial-gradient(closest-side, #000 30%, transparent);
  transform: rotate(8deg);
}
.pvx-quote .eyebrow { color: #6B520A; }
.pvx-quote h2 { margin-top: 10px; color: #0E1B2B; font-size: clamp(2rem, 4.4vw, 3.4rem); line-height: 1.02; letter-spacing: -.02em; }
.pvx-quote-text p:last-child { margin-top: 14px; max-width: 30rem; color: #34404F; font-size: 1.05rem; }
.pvx-quote-actions { display: grid; gap: 12px; }
.pvx-quote .btn-gold { min-height: 56px; background: #0E1B2B; border-color: #0E1B2B; color: #fff; box-shadow: 0 16px 30px -16px rgba(14,27,43,.7); }
.pvx-quote .btn-gold:hover { background: #1B2D45; border-color: #1B2D45; }
.pvx-qlink {
  display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-radius: 14px; text-decoration: none;
  color: #0E1B2B; background: rgba(255,255,255,.6); border: 1px solid rgba(14,27,43,.14);
  transition: background-color .25s, transform .25s var(--pnx-ease), box-shadow .25s;
}
.pvx-qlink:hover { background: #fff; transform: translateY(-2px); box-shadow: 0 14px 24px -16px rgba(14,27,43,.5); }
.pvx-qlink > span:last-child { display: grid; font-weight: 700; font-size: 1.05rem; letter-spacing: .01em; line-height: 1.25; }
.pvx-qlink small { font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #5A4507; }
.pvx-qicon { flex: none; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: #0E1B2B; color: var(--gold); }
.pvx-qicon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pvx-quote :focus-visible { outline-color: #0E1B2B; }
@media (max-width: 760px) { .pvx-quote { grid-template-columns: 1fr; } }
[data-theme="dark"] .pvx-quote { background: linear-gradient(120deg, #17263A 0%, #121D2B 60%, #1A2433 100%); color: var(--ink); border-color: rgba(201,162,39,.4); box-shadow: 0 40px 80px -40px rgba(0,0,0,.8); }
[data-theme="dark"] .pvx-quote::after { background: repeating-linear-gradient(45deg, rgba(201,162,39,.08) 0 2px, transparent 2px 26px), repeating-linear-gradient(-45deg, rgba(201,162,39,.08) 0 2px, transparent 2px 26px); }
[data-theme="dark"] .pvx-quote .eyebrow { color: var(--gold-text); }
[data-theme="dark"] .pvx-quote h2 { color: #fff; }
[data-theme="dark"] .pvx-quote-text p:last-child { color: var(--muted); }
[data-theme="dark"] .pvx-quote .btn-gold { background: var(--gold); border-color: var(--gold); color: var(--navy); }
[data-theme="dark"] .pvx-qlink { color: var(--ink); background: rgba(255,255,255,.04); border-color: rgba(232,237,244,.14); }
[data-theme="dark"] .pvx-qlink:hover { background: rgba(255,255,255,.08); }
[data-theme="dark"] .pvx-qlink small { color: var(--gold-text); }
[data-theme="dark"] .pvx-qicon { background: var(--gold); color: var(--navy); }
[data-theme="dark"] .pvx-quote :focus-visible { outline-color: var(--gold); }

/* =========================================================
   GALLERY
   ========================================================= */
.gx-section .gallery-title { font-size: clamp(2.6rem, 7vw, 5.2rem); letter-spacing: -.03em; line-height: 1; }
.gx-bar {
  position: sticky; top: var(--pnx-hdr, 80px); z-index: 15;
  margin: 0 calc(var(--gutter) * -1) 18px; padding: 12px var(--gutter) 0;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(1.3); backdrop-filter: blur(14px) saturate(1.3);
}
.gx-bar .g-count { margin: 10px 0 0; padding-bottom: 10px; }
.gx-bar .g-filters { gap: 6px; }
.gx-bar .g-filter { padding: 0 10px 0 16px; font-size: .88rem; }
.gx-section .gallery-lead { text-wrap: balance; }
.g-filter { display: inline-flex; align-items: center; gap: 8px; transition: background-color .25s, border-color .25s, color .25s, transform .25s var(--pnx-ease), box-shadow .25s; }
.g-filter:active { transform: scale(.96); }
.g-filter[aria-pressed="true"] { box-shadow: 0 10px 22px -12px rgba(14,27,43,.6); }
.gx-n {
  display: inline-grid; place-items: center; min-width: 24px; height: 22px; padding: 0 7px; border-radius: 999px;
  background: var(--surface-2); color: var(--muted); font-size: .74rem; font-weight: 700; font-variant-numeric: tabular-nums;
  transition: background-color .25s, color .25s;
}
.g-filter[aria-pressed="true"] .gx-n { background: rgba(255,255,255,.16); color: inherit; }
[data-theme="dark"] .g-filter[aria-pressed="true"] .gx-n { background: rgba(14,27,43,.16); }
@media (max-width: 720px) {
  .gx-bar .g-filters {
    flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; scrollbar-width: none;
    margin-inline: calc(var(--gutter) * -1); padding: 2px var(--gutter) 4px;
  }
  .gx-bar .g-filters::-webkit-scrollbar { display: none; }
  .gx-bar .g-filter { flex: none; }
  .gx-bar .g-filters {
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent);
    mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent);
  }
}

/* varied rhythm (spans assigned by JS from the visible order) */
.gx-on #g-grid {
  --cols: 4; --gap: 14px;
  grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: var(--gap); grid-auto-flow: dense;
  grid-auto-rows: calc((min(100vw, var(--container)) - 2 * var(--gutter) - (var(--cols) - 1) * var(--gap)) / var(--cols) * .75);
}
@media (max-width: 1099px) { .gx-on #g-grid { --cols: 3; } }
@media (max-width: 720px)  { .gx-on #g-grid { --cols: 2; --gap: 8px; } }
.gx-on #g-grid .g-link { aspect-ratio: auto; height: 100%; position: relative; border-radius: 14px; }
.gx-on #g-grid .gx-big { grid-column: span 2; grid-row: span 2; }
.gx-on #g-grid .gx-wide { grid-column: span 2; }
.gx-on #g-grid .gx-tall { grid-row: span 2; }
.gx-on #g-grid .g-link {
  transform: perspective(900px) rotateX(var(--gy, 0deg)) rotateY(var(--gx, 0deg));
  transition: transform .5s var(--pnx-ease), box-shadow .4s, clip-path 1.1s var(--ease-in-out, ease);
}
.gx-on #g-grid .g-link:hover { transform: perspective(900px) rotateX(var(--gy, 0deg)) rotateY(var(--gx, 0deg)) translateY(-5px); box-shadow: 0 28px 44px -24px rgba(14,27,43,.6); }
.gx-on #g-grid .g-link:hover img { transform: scale(1.06); filter: brightness(1.04); }
.gx-cap {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; padding: 34px 14px 12px; pointer-events: none;
  background: linear-gradient(to top, rgba(8,14,23,.88), rgba(8,14,23,0));
  color: #fff; font-size: .84rem; font-weight: 600; line-height: 1.35; text-align: left;
  opacity: 0; transform: translateY(12px); transition: opacity .35s, transform .45s var(--pnx-ease);
}
.g-link:hover .gx-cap, .g-link:focus-visible .gx-cap { opacity: 1; transform: none; }
@media (hover: none) { .gx-cap { display: none; } }
[data-theme="dark"] .gx-on #g-grid .g-link:hover { box-shadow: 0 28px 44px -20px rgba(0,0,0,.85); }

/* =========================================================
   Reduced motion: static everything
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  .kcx-hero-media, .kcx-hero .kc-hero-text { transform: none !important; opacity: 1 !important; }
  .kcx-card { transform: none !important; opacity: 1 !important; }
  .pvx-card, .pvx-card::before { transition: none; transform: none !important; }
  .gx-on #g-grid .g-link, .gx-on #g-grid .g-link:hover { transform: none; }
  .kcx-hint-line::after { animation: none; }
  .pnx-rv { opacity: 1; transform: none; }
}
