/* ==========================================================================
   KOVAIBUILD — Interior Work page
   --------------------------------------------------------------------------
   Loads after css/style.css and css/service-page.css. Everything the page
   shares with the other service pages lives in service-page.css; this file
   holds only what is specific to Interior Work:

     S1  Tokens
     S2  Full-width service card (the seventh, umbrella card)
     S3  Video figures  (.ssc-interior-video)
     S4  Transformation split
     S5  Design-to-finished comparison slider  (.ssc-interior-compare)
     S5b Process — video left, steps stacked down the right
     S6  Hover-swap gallery tiles
     S7  Responsive
     S8  Reduced motion
   ========================================================================== */

/* ==========================================================================
   S1. TOKENS
   ========================================================================== */
:root {
  /* >> CHANGE THIS PAGE'S BACKGROUND IMAGES HERE */
  --ssc-svc-img-why: url("../assets/interior/interior-06-stair-garden.webp");
  --ssc-svc-img-cta: url("../assets/interior/interior-02-living-finished.webp");

  --ssc-svc-intro-cols: 46fr 54fr;
  --ssc-svc-intro-ratio: 3 / 4;
}


/* ==========================================================================
   S2. FULL-WIDTH SERVICE CARD
   --------------------------------------------------------------------------
   There are seven services, which leaves a hole in a three-column grid. The
   seventh — "Complete Interior Solutions" — is the umbrella of the other six,
   so it runs the full width and reads as a summary rather than a leftover.
   ========================================================================== */
.ssc-svc-card--full {
  grid-column: 1 / -1;
  flex-direction: row;
  align-items: center;
  gap: 26px;
  padding: 30px 34px;
}
.ssc-svc-card--full .ssc-svc-card__icon { margin: 0; flex: none; }
.ssc-svc-card--full .ssc-svc-card__body { min-width: 0; }
.ssc-svc-card--full .ssc-svc-card__title { margin: 0 0 6px; }
.ssc-svc-card--full .ssc-svc-card__text { margin: 0; max-width: 68ch; }
.ssc-svc-card--full .ssc-svc-card__arrow {
  align-self: center;
  margin-left: auto;
  flex: none;
}
/* the oversized ghost number would sit on top of the arrow in a row layout */
.ssc-svc-card--full .ssc-svc-card__num { top: 50%; right: 96px; transform: translateY(-50%); }


/* ==========================================================================
   S3. VIDEO FIGURES
   --------------------------------------------------------------------------
   Both clips are portrait and modest in resolution, so they are given a frame
   that matches their own aspect ratio and never blown up past their native
   width — a stretched video looks far worse than a small sharp one.
   ========================================================================== */
.ssc-interior-video {
  position: relative;
  margin: 0;
  border-radius: var(--ssc-radius-lg, 22px);
  overflow: hidden;
  background: linear-gradient(150deg, #2c2e35, #14151a);
  box-shadow: var(--ssc-shadow-lg, 0 28px 70px rgba(17,17,20,.16));
}
.ssc-interior-video video {
  display: block;
  width: 100%;
  height: auto;
  background: #14151a;
}
/* transformation clip — native 696 x 1248 */
.ssc-interior-video--tall { max-width: 420px; margin-inline: auto; aspect-ratio: 696 / 1248; }
/* design clip — native 464 x 832, deliberately kept small so it stays sharp */
.ssc-interior-video--small { max-width: 320px; aspect-ratio: 464 / 832; }
.ssc-interior-video--tall video,
.ssc-interior-video--small video { height: 100%; object-fit: cover; }

.ssc-interior-video__caption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 34px 18px 14px;
  font-size: 11px; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  color: #fff;
  background: linear-gradient(to top, rgba(10,10,12,.78), transparent);
  pointer-events: none;
}


/* ==========================================================================
   S4. TRANSFORMATION SPLIT
   ========================================================================== */
.ssc-interior-transform {
  padding-block: var(--ssc-section-y, 96px);
  background: var(--ssc-paper, #f7f7f5);
}
.ssc-interior-transform__grid {
  display: grid;
  grid-template-columns: 40fr 60fr;
  gap: clamp(34px, 5vw, 72px);
  align-items: center;
}
.ssc-interior-transform__content { min-width: 0; }
.ssc-interior-transform__text {
  max-width: 54ch;
  margin: 0 0 30px;
  font-size: clamp(15px, 1.4vw, 17px);
  line-height: 1.75;
  color: var(--ssc-text-muted, #5c6168);
}

/* the five stages, as a numbered rail */
.ssc-interior-stages { margin: 0; padding: 0; list-style: none; counter-reset: stage; }
.ssc-interior-stages li {
  position: relative;
  counter-increment: stage;
  padding: 0 0 22px 46px;
  border-left: 1px solid var(--ssc-border, #e3e3df);
  margin-left: 13px;
}
.ssc-interior-stages li:last-child { padding-bottom: 0; border-left-color: transparent; }
.ssc-interior-stages li::before {
  content: counter(stage, decimal-leading-zero);
  position: absolute; left: -13px; top: -2px;
  display: grid; place-items: center;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--ssc-ink, #111114);
  color: var(--ssc-gold-light, #20bec9);
  font-size: 10px; font-weight: 700; letter-spacing: .04em;
}
.ssc-interior-stages strong {
  display: block;
  margin: 0 0 3px;
  font-size: 15.5px;
  color: var(--ssc-ink, #111114);
}
.ssc-interior-stages span {
  display: block;
  font-size: 14.5px; line-height: 1.65;
  color: var(--ssc-text-muted, #5c6168);
}


/* ==========================================================================
   S5. DESIGN-TO-FINISHED COMPARISON SLIDER
   --------------------------------------------------------------------------
   Driven by js/interior.js, which writes --ssc-compare-pos (a percentage).
   Both images are the same 2:3 box and the same viewpoint, so the two states
   line up exactly as the divider moves across them.
   ========================================================================== */
.ssc-interior-compare-section {
  padding-block: var(--ssc-section-y, 96px);
  background: #fff;
}

.ssc-interior-compare {
  --ssc-compare-pos: 50%;
  position: relative;
  width: 100%;
  max-width: 780px;
  margin-inline: auto;
  aspect-ratio: 2 / 3;
  border-radius: var(--ssc-radius-lg, 22px);
  overflow: hidden;
  background: #14151a;
  box-shadow: var(--ssc-shadow-lg, 0 28px 70px rgba(17,17,20,.16));
  touch-action: pan-y;          /* let the page scroll vertically over it */
  user-select: none;
  cursor: ew-resize;
}
.ssc-interior-compare img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  pointer-events: none;
  -webkit-user-drag: none;
}
/* the finished state sits on top and is revealed from the left */
.ssc-interior-compare__after {
  clip-path: inset(0 0 0 var(--ssc-compare-pos));
}

.ssc-interior-compare__label {
  position: absolute; top: 16px;
  padding: 7px 13px;
  font-size: 10.5px; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  color: #fff;
  background: rgba(15,15,18,.62);
  backdrop-filter: blur(8px);
  border-radius: 999px;
  pointer-events: none;
}
.ssc-interior-compare__label--before { left: 16px; }
.ssc-interior-compare__label--after  { right: 16px; }

/* the divider + handle */
.ssc-interior-compare__divider {
  position: absolute; top: 0; bottom: 0;
  left: var(--ssc-compare-pos);
  width: 2px;
  margin-left: -1px;
  background: rgba(255,255,255,.9);
  box-shadow: 0 0 0 1px rgba(17,17,20,.18);
  pointer-events: none;
}
.ssc-interior-compare__handle {
  position: absolute;
  top: 50%; left: var(--ssc-compare-pos);
  width: 52px; height: 52px;
  margin: -26px 0 0 -26px;
  display: grid; place-items: center;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: var(--ssc-ink, #111114);
  box-shadow: 0 6px 20px rgba(17,17,20,.28);
  cursor: ew-resize;
  touch-action: none;           /* the handle itself owns the drag */
}
.ssc-interior-compare__handle:focus-visible {
  outline: 3px solid var(--ssc-gold, #007f88);
  outline-offset: 3px;
}
.ssc-interior-compare__handle svg {
  width: 24px; height: 24px;
  fill: none; stroke: currentColor;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}

.ssc-interior-compare__hint {
  margin: 18px 0 0;
  text-align: center;
  font-size: 13.5px;
  color: var(--ssc-text-muted, #5c6168);
}

/* Without JavaScript the slider would be a dead image, so it falls back to the
   two states side by side. */
.no-js .ssc-interior-compare { aspect-ratio: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
.no-js .ssc-interior-compare img { position: static; aspect-ratio: 2 / 3; }
.no-js .ssc-interior-compare__after { clip-path: none; }
.no-js .ssc-interior-compare__divider,
.no-js .ssc-interior-compare__handle { display: none; }


/* ==========================================================================
   S5b. PROCESS — VIDEO LEFT, STEPS STACKED DOWN THE RIGHT
   --------------------------------------------------------------------------
   The shared layout runs the four steps across as a horizontal timeline. Here
   the clip sits alongside them, so the steps are stacked into a vertical rail
   beside it instead — the same treatment service-page.css already uses on
   narrow screens, just applied at every width on this page.
   ========================================================================== */
.ssc-interior-process__grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(30px, 4.5vw, 64px);
  align-items: start;
}

.ssc-svc-process__list--stacked {
  grid-template-columns: 1fr;
  row-gap: 0;
  padding-top: 4px;
}
.ssc-svc-process__list--stacked .ssc-svc-step {
  padding: 0 0 34px 34px;
}
/* the connector becomes the vertical rail linking one step to the next */
.ssc-svc-process__list--stacked .ssc-svc-step::before {
  top: 6px; bottom: 0; left: 6px;
  right: auto;
  width: 1px; height: auto;
}
.ssc-svc-process__list--stacked .ssc-svc-step:last-child {
  padding-bottom: 0;
}
.ssc-svc-process__list--stacked .ssc-svc-step:last-child::before {
  display: none;
}
.ssc-svc-process__list--stacked .ssc-svc-step::after {
  top: 4px; left: 0;
}
.ssc-svc-process__list--stacked .ssc-svc-step p {
  max-width: 52ch;
}


/* ==========================================================================
   S6. HOVER-SWAP GALLERY TILES
   --------------------------------------------------------------------------
   A tile marked --swap holds two images: the second fades in on hover, on
   focus, and on tap. Both are the same box, so nothing shifts.
   ========================================================================== */
.ssc-svc-gallery-item--swap { position: relative; }
.ssc-svc-gallery-item--swap .ssc-svc-gallery-item__swap {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity .45s var(--ssc-ease, cubic-bezier(.22,.61,.36,1));
}
.ssc-svc-gallery-item--swap:hover .ssc-svc-gallery-item__swap,
.ssc-svc-gallery-item--swap:focus-visible .ssc-svc-gallery-item__swap,
.ssc-svc-gallery-item--swap.is-swapped .ssc-svc-gallery-item__swap { opacity: 1; }

/* a small cue so it is discoverable rather than a hidden easter egg */
.ssc-svc-gallery-item__swap-cue {
  position: absolute; top: 12px; right: 12px;
  z-index: 2;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 11px;
  font-size: 10px; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  color: #fff;
  background: rgba(15,15,18,.58);
  backdrop-filter: blur(8px);
  border-radius: 999px;
  pointer-events: none;
}
.ssc-svc-gallery-item__swap-cue svg {
  width: 12px; height: 12px;
  fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}


/* ==========================================================================
   S7. RESPONSIVE
   ========================================================================== */
@media (max-width: 1100px) {
  .ssc-svc-card--full { flex-direction: column; align-items: flex-start; gap: 18px; }
  .ssc-svc-card--full .ssc-svc-card__arrow { margin-left: 0; }
}
@media (max-width: 900px) {
  .ssc-interior-transform__grid { grid-template-columns: 1fr; }
  .ssc-interior-process__grid { grid-template-columns: 1fr; }
  .ssc-interior-process__grid .ssc-interior-video--small { margin-inline: auto; }
  .ssc-interior-video--tall { max-width: 340px; }
  .ssc-interior-compare { max-width: 520px; }
}
@media (max-width: 767px) {
  .ssc-interior-video--tall  { max-width: 280px; }
  .ssc-interior-video--small { max-width: 100%; }
  .ssc-interior-compare__handle { width: 44px; height: 44px; margin: -22px 0 0 -22px; }
  .ssc-interior-compare__label { top: 10px; font-size: 9.5px; padding: 6px 10px; }
  .ssc-interior-compare__label--before { left: 10px; }
  .ssc-interior-compare__label--after  { right: 10px; }
}
@media (max-width: 400px) {
  .ssc-svc-gallery-item__swap-cue { font-size: 9px; padding: 5px 8px; }
}


/* ==========================================================================
   S8. REDUCED MOTION
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  .ssc-svc-gallery-item--swap .ssc-svc-gallery-item__swap { transition: none; }
  .ssc-interior-video video { animation: none; }
}
