/* =============================================================
   BLUESTONE — HOME PAGE (css/home.css)
   Responsive Replacement v2 — effects preserved
   -------------------------------------------------------------
   Goals:
   • Keep ALL visuals/animations exactly as you built them.
   • Remove layout brittleness ⇒ fluid, “water-like” at any width.
   • Eliminate overflow + class collisions (scoped .process .progress).
   • Use clamp(), svh/dvh, safe gutters, and consistent tokens.
   ============================================================= */

/* -------------------------------------------------------------
   THEME TOKENS (consolidated, last-wins preserved)
   ------------------------------------------------------------- */
:root {
  /* Base palette */
  --bg: #0b0f19;
  /* page background */
  --panel: #0b0f15;
  /* dark panels */
  --surface: #10141c;
  /* elevated surfaces */
  --card: #111a2a;
  /* cards */
  --line: rgba(255, 255, 255, .12);
  --text: #e8eef6;
  /* primary text */
  --muted: #a7b0bf;
  /* secondary text */
  --brand: #77e2b3;
  /* teal/blue brand (last defined in your chunks) */
  --brand-2: #7ab7ff;
  /* secondary brand blue */
  --accent: #ffd36e;
  /* amber accent */
  --ok: #22c55e;
  /* success */
  --red: #ef4444;
  /* alert */

  /* Layout + effects */
  --radius: 22px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --gutter: clamp(16px, 3vw, 36px);
  --maxw: 1200px;

  /* Hero background image */
  --hero-bg-image: url('../img/bss_bg.png');
  --hero-mobile-bg-image: url('../img/bss_bg_mobile.png');
  --bgfx-parallax: -0.80;
  /* negative = faster up than scroll */
  --bgfx-sat: 1.25;
  /* color richness */
  --bgfx-cursor-range: 10%;
  /* ±10% range */

  /* Services pile */
  --featureH: 420px;
  --pileW: 160px;
  --pileOverlap: .64;

  /* Misc */
  --labelGutter: 56px;
  /* tweak 48–72px if needed */
  --base-font: 16px;

  /* Image zoom behaviour */
  --imgZoomRest: 1.06;
  /* default slightly zoomed in */
  --imgZoomHover: 1.00;
  /* on hover zooms out to true size */
  --imgZoomSpeed: .35s;

  /* Lightbox */
  --lb-bg: rgba(10, 12, 18, .86);

  --svc-gap-m: 16px;
}


/* Small device tuning for services card stage */
@media (max-width: 880px) {
  :root {
    --featureH: 300px;
    --pileW: 180px;
  }
}

@media (max-width: 600px) {
  :root {
    --featureH: 260px;
    --pileW: 160px;
  }
}

/* -------------------------------------------------------------
   PAGE AMBIENCE (applies when body has .home)
   ------------------------------------------------------------- */
.home {
  background:
    radial-gradient(1200px 600px at 70% -10%, color-mix(in oklab, var(--brand) 18%, transparent), transparent 60%),
    radial-gradient(1000px 500px at -10% 10%, color-mix(in oklab, var(--accent) 14%, transparent), transparent 55%),
    var(--bg);
  color: var(--text);
  overflow-x: clip;
  /* avoid stray full-bleed tracks causing scroll */
}

/* -------------------------------------------------------------
   BASE + CONTAINERS
   ------------------------------------------------------------- */
* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font: 16px/1.5 system-ui, -apple-system, Segoe UI, Roboto, Inter, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
}

.container {
  width: min(var(--maxw), calc(100% - 2rem));
  margin-inline: auto;
}

.section {
  padding: clamp(2.2rem, 6vw, 4.8rem) 0;
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  margin: 0 0 .5rem;
  line-height: 1.1;
}

.section-lead {
  color: var(--muted);
  margin: 0 0 1rem;
}

.lead {
  opacity: .75;
}

.center {
  margin-inline: auto;
}

.hidden {
  display: none !important;
}

/* Buttons */
.btn {
  display: inline-block;
  font-weight: 800;
  border-radius: 999px;
  padding: .7rem 1.05rem;
  text-decoration: none;
}

.btn-primary {
  color: #06121f;
  background: linear-gradient(135deg, var(--brand-2), var(--brand));
  box-shadow: var(--shadow);
}

.btn-ghost {
  color: var(--text);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .02);
}

/* -------------------------------------------------------------
   PROGRESS BAR + COMET (top of page)
   ------------------------------------------------------------- */
.progress {
  position: fixed;
  left: 0;
  top: 0;
  height: 3px;
  width: 0%;
  z-index: 2000;
  background: linear-gradient(90deg, var(--brand-2), var(--brand));
  box-shadow: 0 0 12px color-mix(in oklab, var(--brand-2) 70%, transparent);
  --prog-x: 0%;
}

.progress::after {
  content: "";
  position: absolute;
  top: -3px;
  left: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle at 30% 30%, #fff, rgba(255, 255, 255, .35) 60%, transparent 70%);
  box-shadow: 0 0 10px rgba(255, 255, 255, .35), 0 0 24px color-mix(in oklab, var(--brand-2) 55%, transparent);
  transform: translateX(var(--prog-x));
  transition: transform .15s ease-out;
}

/* -------------------------------------------------------------
   HERO — CINEMATIC SKYFIELD
   ------------------------------------------------------------- */
.hero.skyfield {
  position: relative;
  inline-size: 100%;
  min-height: 100svh;
  height: 100svh;
  overflow: clip;
  display: block;
}

@supports (height: 100dvh) {
  .hero.skyfield {
    min-height: 100dvh;
    height: 100dvh;
  }
}

/* Full-bleed media */
.hero.skyfield .hero-media {
  position: absolute;
  inset: 0;
  background-image: var(--hero-bg-image);
  background-size: cover;
  background-position: 50% 50%;
  background-repeat: no-repeat;
  will-change: transform;
  transform-origin: 60% 40%;
  animation: kb-pan 16s ease-in-out infinite alternate;
}

@media (max-width: 900px) {


  .hero.skyfield .hero-media {
    /* keep cover so it still fills */
    background-size: cover;
    background-position: 50% 45%;
    background-image: var(--hero-mobile-bg-image);

    /* lighter motion + less zoom than desktop */
    transform-origin: 50% 45%;
    animation: kb-pan-mobile 18s ease-in-out infinite alternate;
    /* overrides kb-pan */
  }

  /* Mobile keyframes: remove heavy scale-in, tiny drift only */
  @keyframes kb-pan-mobile {
    0% {
      transform: translate3d(0, 0, 0) scale(1.00);
    }

    50% {
      transform: translate3d(0, -1.5%, 0) scale(1.1);
    }

    100% {
      transform: translate3d(0, -3%, 0) scale(1.00);
    }
  }
}

/* Subtle vignette */
.hero.skyfield::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background:
    radial-gradient(1200px 600px at 80% -10%, color-mix(in oklab, var(--brand) 10%, transparent), transparent 65%),
    radial-gradient(1000px 500px at 5% 10%, color-mix(in oklab, var(--accent) 8%, transparent), transparent 60%),
    linear-gradient(180deg, rgba(0, 0, 0, .22), rgba(0, 0, 0, .10) 28%, rgba(0, 0, 0, 0) 55%),
    linear-gradient(0deg, rgba(0, 0, 0, .14), rgba(0, 0, 0, 0) 40%);
}

/* Clouds */
.hero.skyfield .clouds {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  transition: transform .6s cubic-bezier(.2, .8, .2, 1);
}

.hero.skyfield .cloud {
  position: absolute;
  width: clamp(360px, 42vw, 820px);
  height: auto;
  opacity: .96;
  filter: drop-shadow(0 18px 28px rgba(0, 0, 0, .28));
  will-change: transform, opacity;
}

#cloud1 {
  top: 50%;
  left: -16%;
  transform: scale(.9);
  opacity: .68;
  z-index: 1;
}

#cloud2 {
  top: 40%;
  left: -5%;
  transform: scale(1);
  opacity: .58;
  z-index: 2;
}

#cloud3 {
  top: 40%;
  right: 30%;
  transform: scale(1);
  opacity: .72;
  z-index: 1;
}

#cloud9 {
  top: 50%;
  right: 39%;
  transform: scale(1.2);
  opacity: .62;
  z-index: 1;
}

#cloud4 {
  top: 55%;
  right: 10%;
  transform: scale(1.25);
  opacity: .88;
  z-index: 2;
}

#cloud5 {
  bottom: -30%;
  left: 80%;
  transform: scale(1.48);
  opacity: .86;
  z-index: 4;
}

#cloud6 {
  bottom: 6%;
  right: 8%;
  transform: scale(.60);
  opacity: .66;
  z-index: 4;
}

#cloud7 {
  top: -30%;
  left: 76%;
  transform: scale(1.06);
  opacity: .92;
  z-index: 3;
}

#cloud10 {
  bottom: 30%;
  left: -35%;
  transform: scale(1);
  opacity: .66;
  z-index: 4;
}

@media (max-width:900px) {
  #cloud1 {
    top: 3%;
    left: -16%;
    transform: scale(.9);
    opacity: .68;
    z-index: 1;
  }

  #cloud2 {
    top: 20%;
    left: 43%;
    transform: scale(1);
    opacity: .56;
    z-index: 2;
  }

  #cloud3 {
    top: 70%;
    right: 20%;
    transform: scale(1.60);
    opacity: .72;
    z-index: 1;
  }

  #cloud9 {
    top: 50%;
    right: 50%;
    transform: scale(1.50);
    opacity: .62;
    z-index: 1;
  }

  #cloud4 {
    top: 55%;
    right: 10%;
    transform: scale(1.25);
    opacity: .88;
    z-index: 2;
  }

  #cloud5 {
    bottom: -30%;
    left: 90%;
    transform: scale(1.88);
    opacity: .86;
    z-index: 4;
  }

  #cloud6 {
    bottom: 6%;
    right: 8%;
    transform: scale(.60);
    opacity: .66;
    z-index: 4;
  }

  #cloud7 {
    top: -30%;
    left: 76%;
    transform: scale(1.06);
    opacity: .92;
    z-index: 3;
  }

  #cloud10 {
    bottom: 30%;
    left: -35%;
    transform: scale(1);
    opacity: .66;
    z-index: 4;
  }
}


/* Lift clouds as you scroll */
body.scrolled .hero.skyfield .clouds {
  transform: translateY(-18px);
}

/* Fog bank (two layers) */
.hero.skyfield .hero-fog {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

.hero.skyfield .hero-fog::before,
.hero.skyfield .hero-fog::after {
  content: "";
  position: absolute;
  left: -20%;
  right: -20%;
  height: 44%;
  bottom: -8%;
  filter: blur(30px) saturate(1.05);
  opacity: .45;
  background: radial-gradient(120% 120% at 50% 70%, color-mix(in oklab, var(--brand) 14%, rgba(255, 255, 255, .92)) 0%, rgba(255, 255, 255, .55) 40%, rgba(255, 255, 255, 0) 70%);
  animation: fog-drift-1 18s linear infinite alternate;
}

.hero.skyfield .hero-fog::after {
  bottom: -12%;
  height: 50%;
  opacity: .38;
  filter: blur(32px) saturate(1.05);
  background: radial-gradient(120% 120% at 55% 65%, color-mix(in oklab, var(--accent) 10%, rgba(255, 255, 255, .9)) 0%, rgba(255, 255, 255, .50) 38%, rgba(255, 255, 255, 0) 70%);
  animation: fog-drift-2 62s linear infinite alternate;
}

/* Blend to next section */
.hero.skyfield::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 16vh;
  z-index: 4;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(11, 15, 25, 0) 0%, color-mix(in oklab, var(--bg) 60%, transparent) 55%, var(--bg) 100%);
}

/* Sun-glint sweep (JS toggles .run) */
.hero.skyfield .hero-glint {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  mix-blend-mode: screen;
}

.hero.skyfield .hero-glint::before {
  content: "";
  position: absolute;
  top: -20%;
  bottom: -20%;
  left: -30%;
  width: 28%;
  transform: translateX(-60%) rotate(12deg);
  filter: blur(14px);
  background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, .18) 46%, rgba(255, 255, 255, 0) 100%);
}

.hero.skyfield .hero-glint.run::before {
  animation: glint-sweep 1500ms cubic-bezier(.2, .8, .2, 1) 1 both;
}

/* Scroll cue */
.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  z-index: 5;
  background: rgba(255, 255, 255, .06);
  border: 1px solid #2a3b60;
  color: #fff;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .25);
  transition: transform .25s ease, opacity .25s ease, background-color .25s ease;
}

.scroll-cue:hover {
  background: rgba(255, 255, 255, .1);
  transform: translateX(-50%) translateY(-1px);
}

.scroll-cue .chev {
  display: block;
  font-size: 18px;
  line-height: 1;
  animation: cue-bounce 2.4s ease-in-out infinite;
}

body.scrolled .scroll-cue {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(6px);
}

/* Keyframes */
@keyframes kb-pan {
  from {
    transform: scale(1) translate3d(0, 0, 0);
  }

  to {
    transform: scale(1.06) translate3d(1.2%, -1.2%, 0);
  }
}

@keyframes glint-sweep {
  0% {
    transform: translateX(-60%) rotate(12deg);
    opacity: 0.0;
  }

  10% {
    opacity: .6;
  }

  60% {
    opacity: .35;
  }

  100% {
    transform: translateX(220%) rotate(12deg);
    opacity: 0;
  }
}

@keyframes cue-bounce {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(3px);
  }
}

@keyframes fog-drift-1 {
  from {
    transform: translateX(-6%);
  }

  to {
    transform: translateX(6%);
  }
}

@keyframes fog-drift-2 {
  from {
    transform: translateX(5%);
  }

  to {
    transform: translateX(-5%);
  }
}

/* Reduced motion & pause hooks */
@media (prefers-reduced-motion: reduce) {
  .hero.skyfield .hero-media {
    animation: none;
  }

  .hero.skyfield .hero-glint::before {
    animation: none !important;
  }

  .hero.skyfield .hero-fog::before,
  .hero.skyfield .hero-fog::after {
    animation: none !important;
  }

  .scroll-cue .chev {
    animation: none;
  }
}

.hero.skyfield.paused .hero-media {
  animation-play-state: paused;
}

.hero.skyfield.paused .hero-glint::before,
.hero.skyfield.paused .hero-fog::before,
.hero.skyfield.paused .hero-fog::after {
  animation-play-state: paused;
}

/* -------------------------------------------------------------
   NUMBERS — Tilt Card + Metrics Grid
   ------------------------------------------------------------- */
.metrics .paracard {
  perspective: 1200px;
  margin-top: .6rem;
}

.metrics .pcard {
  position: relative;
  border-radius: 22px;
  border: 1px solid var(--line);
  overflow: hidden;
  background: radial-gradient(1200px 500px at -10% -20%, color-mix(in oklab, var(--brand) 22%, transparent), transparent 60%),
    radial-gradient(1000px 400px at 110% 0%, color-mix(in oklab, var(--accent) 18%, transparent), transparent 55%),
    linear-gradient(180deg, rgba(255, 255, 255, .02), rgba(255, 255, 255, .01));
  box-shadow: var(--shadow);
  transform-style: preserve-3d;
}

.metrics .layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.metrics .glow {
  background: radial-gradient(400px 220px at 20% 30%, color-mix(in oklab, var(--brand) 32%, transparent), transparent 60%), radial-gradient(360px 200px at 80% 70%, color-mix(in oklab, var(--accent) 28%, transparent), transparent 60%);
  mix-blend-mode: screen;
  filter: blur(.5px);
  transform: translateZ(40px);
}

.metrics .mesh {
  background-image: linear-gradient(transparent 0 95%, rgba(255, 255, 255, .06) 95% 100%), linear-gradient(90deg, transparent 0 95%, rgba(255, 255, 255, .06) 95% 100%);
  background-size: 28px 28px;
  opacity: .6;
  transform: translateZ(20px) rotateZ(.0001deg);
}

.metrics .shine {
  background: radial-gradient(1000px 500px at -10% -30%, rgba(255, 255, 255, .15), transparent 60%);
  mix-blend-mode: overlay;
  transform: translateZ(60px);
}

.metrics .metrics-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  padding: clamp(1rem, 3.4vw, 2rem);
}

.metric {
  background: rgba(255, 255, 255, .02);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: clamp(.8rem, 2.8vw, 1.1rem);
  box-shadow: var(--shadow);
}

.metric .value {
  font-weight: 900;
  font-size: clamp(1.8rem, 5vw, 3.2rem);
  letter-spacing: .4px;
}

.metric .label {
  color: var(--muted);
  margin-top: .25rem;
}

@media (max-width:980px) {
  .metrics .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width:560px) {
  .metrics .metrics-grid {
    grid-template-columns: 1fr;
  }
}

/* -------------------------------------------------------------
   OUR PROCESS — Horizontal (desktop) → Vertical (mobile)
   ------------------------------------------------------------- */
section.process {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(1200px 600px at 10% -10%, #1b2230 0%, transparent 60%),
    radial-gradient(1000px 500px at 110% 120%, #121a26 10%, transparent 60%),
    linear-gradient(180deg, #0b1017 0%, #0d1118 100%);
  border-radius: var(--radius);
  margin: 0 var(--gutter);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .45), inset 0 0 0 1px rgba(255, 255, 255, .04);
}

.process .pin-wrap {
  height: 100vh;
  position: relative;
}

.process .bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.process .bg::before {
  content: "";
  position: absolute;
  inset: -20% -10% -10% -20%;
  background-image:
    linear-gradient(transparent 31px, rgba(122, 183, 255, .07) 32px),
    linear-gradient(90deg, transparent 31px, rgba(122, 183, 255, .07) 32px);
  background-size: 32px 32px;
  transform: translate3d(0, 0, 0);
}

.float {
  position: absolute;
  width: clamp(80px, 12vw, 160px);
  aspect-ratio: 1.2;
  opacity: .12;
  border-radius: 12px;
  background: conic-gradient(from 180deg at 50% 50%, var(--brand) 0 25%, var(--brand-2) 25% 50%, var(--accent) 50% 75%, #fff 75% 100%);
  filter: blur(1px) saturate(.8);
  mix-blend-mode: screen;
}

.float.f1 {
  top: 16%;
  left: 6%;
}

.float.f2 {
  top: 58%;
  left: 82%;
}

.float.f3 {
  top: 76%;
  left: 28%;
  width: clamp(60px, 10vw, 120px);
}

.process .head {
  position: relative;
  z-index: 2;
  padding: calc(var(--gutter)*1.2) var(--gutter) 0;
  max-width: var(--maxw);
  margin: 0 auto;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: .8rem;
  color: var(--brand-2);
  opacity: .9;
}

.process h2 {
  font-size: clamp(28px, 4.8vw, 56px);
  font-weight: 800;
  line-height: 1.06;
}

.sub {
  color: var(--muted);
  max-width: 60ch;
}

/* Progress rail (scoped to process to avoid collision with top .progress) */
.process .progress {
  position: absolute;
  left: var(--gutter);
  top: 116px;
  bottom: var(--gutter);
  width: 4px;
  background: linear-gradient(180deg, rgba(122, 183, 255, .15), rgba(119, 226, 179, .15));
  border-radius: 2px;
  overflow: hidden;
}

.process .progress .bar {
  position: absolute;
  left: 0;
  top: 0;
  bottom: auto;
  width: 100%;
  height: 0%;
  background: linear-gradient(180deg, var(--brand-2), var(--brand));
  box-shadow: 0 0 12px rgba(122, 183, 255, .55);
}

.track-wrap {
  position: relative;
  overflow: hidden;
  z-index: 2;
}

.track {
  display: flex;
  gap: clamp(16px, 3vw, 28px);
  padding: var(--gutter);
  will-change: transform;
}

.process-card {
  position: relative;
  flex: 0 0 min(72vw, 560px);
  background: linear-gradient(180deg, rgba(255, 255, 255, .03), rgba(255, 255, 255, .01));
  border: 1px solid rgba(255, 255, 255, .06);
  border-radius: var(--radius);
  padding: clamp(18px, 2.2vw, 28px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, .35), inset 0 0 0 1px rgba(255, 255, 255, .02);
  transform-style: preserve-3d;
  transform: perspective(1200px) rotateX(var(--rx, 0)) rotateY(var(--ry, 0));
  transition: box-shadow .3s ease;
}

.process-card:hover {
  box-shadow: 0 35px 70px rgba(0, 0, 0, .45), inset 0 0 0 1px rgba(255, 255, 255, .03);
}

.step-index {
  position: absolute;
  right: 16px;
  top: 10px;
  font-weight: 700;
  color: var(--muted);
  opacity: .6;
}

.ghost-num {
  position: absolute;
  inset: auto -6px -18px auto;
  font-weight: 900;
  font-size: clamp(56px, 13vw, 160px);
  line-height: .8;
  color: transparent;
  -webkit-text-stroke: 1px rgba(122, 183, 255, .25);
  opacity: .25;
  pointer-events: none;
}

.process-card h3 {
  font-size: clamp(20px, 2.2vw, 28px);
  font-weight: 800;
  margin-bottom: .5rem;
}

.process-card p {
  color: var(--muted);
  margin: 0 0 10px;
}

.bullets {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.bullets li {
  list-style: none;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  color: #dbe6f7;
}

.bullets li::before {
  content: "";
  width: 10px;
  height: 10px;
  margin-top: 7px;
  border-radius: 99px;
  background: radial-gradient(circle at 30% 30%, var(--accent), var(--brand));
  box-shadow: 0 0 10px rgba(255, 211, 110, .6);
}

.dots {
  display: flex;
  gap: 10px;
  justify-content: center;
  align-items: center;
  padding: 8px 0 22px;
}

.dots .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .15);
  transform: scale(.9);
  transition: transform .25s ease, background .25s ease, box-shadow .25s ease;
}

.dots .dot.active {
  background: linear-gradient(180deg, var(--brand-2), var(--brand));
  transform: scale(1.2);
  box-shadow: 0 0 10px rgba(122, 183, 255, .6);
}

@media (max-width:900px) {
  .process .progress {
    display: none;
    height: 800px;
  }

  .process .pin-wrap {
    height: auto;
  }

  /* lets the section grow naturally on mobile */


  .track {
    display: grid;
    grid-template-columns: 1fr;
  }

  .process-card {
    flex-basis: auto;
  }
}

@media (prefers-reduced-motion: reduce) {

  .process-card,
  .float,
  .process .bg::before {
    transition: none !important;
    animation: none !important;
  }
}

/* ============================================================
   SERVICES — Hover-Accordion (scoped to #services)
   Same design; tighter spacing; responsive
   ============================================================ */

/* 0) If the section above has big bottom margins, this tiny
      negative clamp safely closes any leftover seam */
section#services.services.section{
  padding-top: 0 !important;
  margin-top: clamp(-24px, -2vh, 0);
}

/* Container: no top padding so the title sits right under the section edge */
#services .services-wrap,
#services .services-wrap.container{
  padding-top: 0 !important;
}

/* ---- TITLE BLOCK (kept as-is, just tight margins) ---- */
#services .svc-header{
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  margin-top: 0 !important;
  margin-bottom: clamp(6px, 1.2vh, 14px) !important; /* tight gap under title */
}

#services .svc-heroTitle{
  margin: 0;
  text-align: center;
  text-transform: uppercase;
  line-height: .9;
  letter-spacing: .01em;
  font-size: clamp(42px, 11vw, 180px);
  text-wrap: balance;
  max-width: 92vw;
  filter: drop-shadow(0 6px 22px rgba(0,0,0,.35));
}

/* Split host + initial char state (scroll will animate these) */
#services .svc-heroTitle > span{ display:inline-block; white-space:nowrap; }
#services .svc-heroTitle .char{
  display:inline-block;
  opacity:0;
  transform: translateY(0.65em);
  will-change: transform, opacity;
}

@media (prefers-reduced-motion: reduce){
  #services .svc-heroTitle .char{ opacity:1 !important; transform:none !important; }
}

/* ---- BODY wrappers: remove any top spacing that pushes the rail down ---- */
#services .svc-body{ margin-top: 0 !important; padding-top: 0 !important; }
#services .svc-accordion{ margin-top: 0 !important; padding-top: 0 !important; }

/* ---- RAIL (main gap fix = smaller top padding; rest unchanged) ---- */
#services .fx-rail{
  box-sizing:border-box;
  width:100%;
  display:flex;
  justify-content:center;
  gap:16px;
  height:clamp(510px, 78vh, 710px);
  /* was: 16vh 4vh 3vh 4vh — keep right/bottom/left, shrink TOP */
  padding: clamp(6px, 1.2vh, 14px) 4vh 3vh 4vh;
  overflow-x:hidden;
}

/* ---- CARDS (unchanged design) ---- */
#services .fx-card{
  flex:0 0 180px;
  border-radius:8px;
  position:relative;
  overflow:hidden;
  border:0;
  cursor:pointer;
  transition:.5s ease-in-out;
  box-shadow:1px 5px 15px #1e0e3e;
  background-position:50% 50%;
  background-size:cover;
  background-color:#0c0c23;
}
#services .fx-card:focus-visible{ outline:2px solid #8ea5b7; outline-offset:2px; }

#services .fx-card .content{
  font-size:1.5rem;
  inset: 0;
  position:absolute;
  color:#fff;
  display:flex; flex-direction:column; align-items:center;
  justify-content:flex-end;
  height:100%;
  padding:15px;
  background:linear-gradient(0deg, rgba(2,2,46,.6755) 0%, rgba(255,255,255,0) 100%);
  opacity:0; transform:translateY(100%); visibility:hidden;
  transition:opacity .5s ease-in-out, transform .5s .2s;
}
#services .fx-card .content span{
  display:block; margin-top:5px; font-size:1.2rem; color:#fff; opacity:.9;
}

#services .fx-card:is(:hover, :focus-visible){
  flex:0 0 360px;
  box-shadow:1px 3px 15px #7645d8;
  transform:translateY(-5px);
}
#services .fx-card:is(:hover, :focus-visible) .content{
  opacity:1; transform:translateY(0); visibility:visible;
}

/* ---- Mobile: horizontal swipe + snap; captions visible ---- */
/* ---------- Mobile carousel (phones only ≤900px) ---------- */
/* ---------- Mobile carousel (phones only ≤900px) ---------- */
@media (max-width: 900px){
  /* Rail: horizontal carousel with centered snap */
  #services .fx-rail{
    /* Carousel knobs */
    --cardCollapsed: 74vw;                 /* width of non-active cards */
    --cardExpanded: 86vw;                  /* width of active (center) card */
    --gap: 14px;
    --sidePad: calc((100vw - var(--cardExpanded)) / 2);

    height: clamp(360px, 70vh, 560px);

    /* Make it a real horizontal scroller */
    overflow-x: auto !important;
    overflow-y: hidden;
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: var(--gap);

    /* Touch behaviour */
    touch-action: pan-x;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;

    /* Snap + center the active card (first/last included) */
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--sidePad);
    padding: 1.25rem var(--sidePad) 1.5rem var(--sidePad);
  }

  /* Cards: same design, sized for carousel */
  #services .fx-card{
    flex: 0 0 var(--cardCollapsed);
    height: clamp(300px, 86vh, 500px);
    scroll-snap-align: center;
    transform: none !important; /* keep flat on mobile */
    transition: flex-basis .28s ease, box-shadow .28s ease, opacity .28s ease;
    box-shadow: 1px 5px 15px #1e0e3e; /* base glow same as desktop */
    pointer-events: auto;
  }

  /* MOBILE CAPTIONS: hidden by default, like desktop initial state */
  #services .fx-card .content{
    opacity: 0;
    transform: translateY(100%);
    visibility: hidden;
  }

  /* Centered (active) card widens + shows caption with fade-up */
  #services .fx-card.is-active{
    flex-basis: var(--cardExpanded);
    box-shadow: 1px 3px 18px #7645d8; /* hover-like glow */
  }
  #services .fx-card.is-active .content{
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
  }

  /* Non-active cards a touch softer (optional) */
  #services .fx-card:not(.is-active){
    opacity: .98;
  }
}







/* -------------------------------------------------------------
   PROJECTS — Grid + IRIS Lightbox
   ------------------------------------------------------------- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}

@media (max-width:980px) {
  .projects-grid {
    grid-template-columns: 1fr;
  }
}

.project {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--card);
  box-shadow: var(--shadow);
  cursor: pointer;
}

.project img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  display: block;
  transition: transform .5s ease;
  filter: saturate(1.02) contrast(1.02);
}

.project:hover img {
  transform: scale(1.06);
}

.tag {
  position: absolute;
  left: 10px;
  top: 10px;
  background: rgba(11, 15, 25, .75);
  border: 1px solid var(--line);
  padding: .25rem .55rem;
  border-radius: 10px;
  font-size: .85rem;
  color: var(--text);
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .86);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 3000;
  opacity: 0;
}

.lightbox.open {
  display: flex;
}

.lightbox-content {
  position: relative;
  width: min(92vw, 1100px);
  max-height: 86vh;
  clip-path: circle(0% at var(--cx, 50%) var(--cy, 50%));
  transition: clip-path .6s cubic-bezier(.2, .8, .2, 1), opacity .3s ease;
  opacity: 0;
}

.lightbox.open .lightbox-content {
  clip-path: circle(150% at var(--cx, 50%) var(--cy, 50%));
  opacity: 1;
}

.lightbox img {
  width: 100%;
  max-height: 86vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, .6);
}

.lightbox .close,
.lightbox .prev,
.lightbox .next {
  position: absolute;
  top: 10px;
  background: rgba(11, 15, 25, .75);
  border: 1px solid #2a3b60;
  color: #fff;
  padding: .45rem .6rem;
  border-radius: 10px;
  cursor: pointer;
}

.lightbox .close {
  right: 10px;
}

.lightbox .prev {
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox .next {
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
}

/* -------------------------------------------------------------
   CONTACT / CTA — Centered block + beveled pill
   ------------------------------------------------------------- */
#contact.section {
  min-height: 10vh;
  display: grid;
  place-items: center;
  padding: 1rem 3rem 6rem;
}

#contact .contact-center {
  display: grid;
  gap: 1rem;
  text-align: center;
}

.btn-cta {
  --top: hsl(200 90% 62%);
  --bot: hsl(200 90% 45%);
  --shadow: rgba(14, 165, 233, .45);
  border: 0;
  border-radius: 9999px;
  padding: .9rem 1.6rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(180deg, var(--top), var(--bot));
  box-shadow: 0 10px 18px var(--shadow), inset 0 1px 0 rgba(255, 255, 255, .65), inset 0 -2px 0 rgba(0, 0, 0, .2);
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
  text-decoration: none;
}

.btn-cta:hover {
  filter: brightness(1.03);
  box-shadow: 0 14px 26px var(--shadow), inset 0 1px 0 rgba(255, 255, 255, .72), inset 0 -2.5px 0 rgba(0, 0, 0, .24);
  text-decoration: none;
}

.btn-cta:active {
  transform: translateY(1px);
  box-shadow: 0 6px 10px var(--shadow), inset 0 -1px 0 rgba(255, 255, 255, .45), inset 0 2px 0 rgba(0, 0, 0, .22);
  text-decoration: none;
}

.btn-cta:focus {
  outline: 3px solid color-mix(in oklab, var(--top) 35%, white);
  outline-offset: 3px;
  text-decoration: none;
}

/* -------------------------------------------------------------
   TESTIMONIALS — Pausable marquee
   ------------------------------------------------------------- */
.testimonials .track {
  display: flex;
  gap: 1rem;
  overflow: hidden;
  mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.marquee {
  animation: marquee 32s linear infinite;
}

.testimonials .track:hover .marquee {
  animation-play-state: paused;
}

@keyframes marquee {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

.t-card {
  flex: 0 0 360px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .02), rgba(255, 255, 255, .005));
  box-shadow: var(--shadow);
  padding: 1rem;
}

.stars {
  color: #fbbf24;
}

/* -------------------------------------------------------------
   FAQS
   ------------------------------------------------------------- */
.faqs details {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, .02);
  padding: .8rem 1rem;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .25);
}

.faqs details+details {
  margin-top: .8rem;
}

.faqs summary {
  cursor: pointer;
  font-weight: 800;
}

/* -------------------------------------------------------------
   INTRO (after hero) — two-column + SVG Plan→House
   ------------------------------------------------------------- */
section.intro {
  position: relative;
  margin: 0 var(--gutter);
  border-radius: var(--radius);
  background:
    radial-gradient(1200px 600px at 8% -10%, #1b2230 0%, transparent 60%),
    radial-gradient(1000px 500px at 110% 120%, #121a26 10%, transparent 60%),
    linear-gradient(180deg, #0b1017 0%, #0d1118 100%);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .45), inset 0 0 0 1px rgba(255, 255, 255, .04);
  overflow: clip;
}

.intro .wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-bottom: var(--gutter);
}

.intro .head {
  padding: calc(var(--gutter)*1.2) var(--gutter) 0;
}

.intro h2 {
  font-size: clamp(28px, 4.6vw, 52px);
  line-height: 1.06;
  font-weight: 800;
  margin: 6px 0 8px;
}

.intro .sub {
  color: var(--muted);
  max-width: 70ch;
}

.intro .ctas {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.intro .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 12px;
  font-weight: 800;
  border: 1px solid rgba(255, 255, 255, .08);
  text-decoration: none;
}

.intro .btn.primary {
  background: linear-gradient(180deg, var(--brand-2), var(--brand));
  color: #06121f;
}

.intro .btn.ghost {
  background: rgba(255, 255, 255, .03);
  color: #e7f0ff;
}

.intro-grid {
  display: grid;
  gap: clamp(16px, 3vw, 28px);
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  padding-right: var(--gutter);
}

.plan2home .plan .wall-outer {
  stroke: #7ab7ff;
  stroke-opacity: .95;
  stroke-width: 3;
}

.plan2home .plan .wall-inner {
  stroke: #7ab7ff;
  stroke-opacity: .9;
  stroke-width: 2;
}

.plan2home .plan .door-arc {
  stroke: #7ab7ff;
  stroke-opacity: .9;
  stroke-width: 2;
}

.plan2home .plan .door-jamb {
  stroke: #7ab7ff;
  stroke-opacity: .8;
  stroke-width: 2;
}

.plan2home .plan .window {
  stroke: #7ab7ff;
  stroke-opacity: .85;
  stroke-width: 3;
}

.plan2home .plan .stairs {
  stroke: #7ab7ff;
  stroke-opacity: .8;
  stroke-width: 2;
}

.plan2home .plan .dim {
  stroke: #7ab7ff;
  stroke-opacity: .4;
  stroke-width: 1.5;
  stroke-dasharray: 4 6;
}

.plan2home .house .body,
.plan2home .house .roof,
.plan2home .house .chim {
  filter: drop-shadow(0 10px 26px rgba(122, 183, 255, .28));
}

.plan2home .house .shadow {
  filter: blur(2px);
}

.plan2home .stage {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 20px 50px rgba(0, 0, 0, .35));
}

@media (max-width:900px) {
  .intro-grid {
    grid-template-columns: 1fr;
    padding-right: 0;
  }

  .plan2home {
    margin: 0 var(--gutter);
  }
}

/* -------------------------------------------------------------
   ACCREDITATIONS — Full‑bleed belt
   ------------------------------------------------------------- */
#accreditations .logo-track {
  position: relative;
  overflow: hidden;
  width: 100vw;
  margin-inline: calc(50% - 50vw);
  -webkit-mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent);
}

#accreditations .logo-belt {
  --speed: 32s;
  --gap: clamp(2rem, 6vw, 8rem);
  display: flex;
  gap: var(--gap);
  will-change: transform;
  animation: accredit-marquee var(--speed) linear infinite;
}

#accreditations .logo-set {
  position: static !important;
  display: inline-flex;
  align-items: center;
  gap: var(--gap);
  flex: 0 0 auto;
}

#accreditations .logo-set img {
  display: block;
  margin: 30px;
  flex: 0 0 auto;
  height: clamp(79px, 19vw, 150px);
  width: auto;
  filter: grayscale(100%);
  opacity: .9;
  transition: transform .2s ease, filter .2s ease, opacity .2s ease;
}

#accreditations .logo-set img:hover {
  filter: none;
  opacity: 1;
  transform: scale(1.05);
}

#accreditations .logo-track:hover .logo-belt {
  animation-play-state: paused;
}

@keyframes accredit-marquee {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

@media (prefers-reduced-motion: reduce) {
  #accreditations .logo-belt {
    animation: none;
  }
}

/* -------------------------------------------------------------
   BGFX — Reverse parallax + cursor-reactive blobs
   ------------------------------------------------------------- */
#bgfx {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity .3s ease;
  mix-blend-mode: screen;
  background:
    radial-gradient(40vw 40vw at calc(var(--mx, .5)*100%) calc(var(--my, .5)*100% + var(--bgfx-y, 0px)), rgba(91, 169, 255, .18) 0%, rgba(91, 169, 255, 0) 60%),
    radial-gradient(32vw 32vw at calc((1 - var(--mx, .5))*100%) calc((1 - var(--my, .5))*100% + var(--bgfx-y, 0px)), rgba(255, 120, 200, .14) 0%, rgba(255, 120, 200, 0) 62%);
}

body.bgfx-on #bgfx {
  opacity: 1;
}

/* -------------------------------------------------------------
   TYPO TIDY + HEADINGS (minor)
   ------------------------------------------------------------- */
h2,
h3 {
  margin: 0 0 12px;
}

/* -------------------------------------------------------------
   END
   ------------------------------------------------------------- */