/* Interactive additions. Loaded from styles.css so one request stays enough.
   Appended rules only. Existing image treatments are unchanged. */

@media (prefers-reduced-motion: no-preference) {
  html.js .reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.6s ease, transform 0.6s ease;
    transition-delay: var(--reveal-delay, 0ms);
  }
  html.js .reveal.in,
  html.js .reveal.is-visible {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

.lead { color: var(--muted); margin-bottom: 1rem; }

.ic {
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 12px;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.ic:hover,
.ic:focus-within { border-color: var(--gold); background: var(--p-card); }

.bento-cell,
.who-card,
.story-slot,
.variety-item,
.flow-item {
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.bento-cell:hover,
.who-card:hover,
.story-slot:hover,
.flow-item:hover {
  border-color: var(--gold);
  box-shadow: 0 8px 24px rgba(17, 17, 17, 0.06);
}

/* Service-area chips */
.valley-map {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 1fr;
  gap: 16px;
  margin-top: 18px;
}
.valley-group {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  padding: 14px;
}
.valley-group h3 { font-size: 15px; margin-bottom: 10px; }
.valley-group ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.valley-map a {
  display: inline-block;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--p-card);
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
  padding: 8px 14px;
}
.valley-map a:hover,
.valley-map a:focus-visible {
  border-color: var(--gold);
  background: var(--p-gold-soft);
}
.valley-map a[aria-current="page"] {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--text);
}
.valley-map .chip {
  display: inline-block;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--p-card);
  color: var(--muted);
  font-weight: 700;
  font-size: 15px;
  padding: 8px 14px;
}

.footer-areas {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin: 0 0 14px;
}
.footer-areas a {
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
}
.footer-areas a:hover,
.footer-areas a:focus-visible { text-decoration: underline; }
.footer-areas a[aria-current="page"] { font-weight: 700; }
.footer-areas .chip {
  color: var(--muted);
  font-size: 14px;
}

/* How it works */
.flow {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 8px;
}
.flow-item {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--p-card);
  padding: 16px;
}
.flow-num {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--text);
  font-weight: 700;
  margin-bottom: 10px;
}
.flow-item h3 { font-size: 1.05rem; margin-bottom: 0.35rem; }
.flow-item p { color: var(--muted); font-size: 15px; }
@media (min-width: 800px) {
  .flow-item:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 33px;
    right: -16px;
    width: 16px;
    height: 2px;
    background: var(--gold);
  }
}
@media (prefers-reduced-motion: no-preference) {
  html.js .flow-item.in .flow-num,
  html.js .flow-item.is-visible .flow-num {
    animation: flow-pop 0.45s ease;
  }
}
@keyframes flow-pop {
  from { transform: scale(0.7); }
  to { transform: none; }
}

/* Day and evening compare */
.compare-frame {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
  max-width: 860px;
}
.compare-frame img {
  width: 100%;
  height: 420px;
  object-fit: cover;
  object-position: center;
}
.compare.is-ready .compare-frame {
  max-width: none;
  aspect-ratio: 2 / 1;
}
.compare.is-ready .compare-frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
}
.compare-label {
  position: absolute;
  top: 12px;
  z-index: 2;
  background: var(--p-card);
  color: var(--text);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 13px;
  font-weight: 700;
  pointer-events: none;
}
.compare-label-day { left: 12px; }
.compare-label-evening { right: 12px; }
.compare.is-ready input[type="range"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
  z-index: 3;
  touch-action: pan-y;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
}
/* A 1px thumb makes the native value at a pointer match interact.js,
   which maps the pointer across the full photo width. */
.compare.is-ready input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 1px;
  height: 1px;
}
.compare.is-ready input[type="range"]::-moz-range-thumb {
  width: 1px;
  height: 1px;
  border: 0;
}
.compare:not(.is-ready) input[type="range"],
.compare:not(.is-ready) .compare-handle,
.compare:not(.is-ready) .compare-label { display: none; }
.compare-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--p-card);
  z-index: 2;
  pointer-events: none;
  transform: translateX(-1px);
}
.compare-handle::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  background: var(--p-card);
  transform: translate(-50%, -50%);
}
.compare-frame:focus-within {
  outline: 2px solid var(--gold);
  outline-offset: -3px;
}
.compare-note { color: var(--muted); margin-top: 10px; font-size: 15px; }

/* Tabs */
.switcher { margin-top: 8px; }
.switch-list { display: flex; gap: 8px; }
.switch-tab {
  background: var(--p-card);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 8px 8px 0 0;
  padding: 10px 18px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.switch-tab:hover,
.switch-tab:focus-visible { border-color: var(--gold); }
.switch-tab[aria-selected="true"] {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--text);
}
.switch-panel {
  border: 1px solid var(--line);
  border-radius: 0 12px 12px 12px;
  padding: 18px 18px 8px;
  background: var(--p-card);
}
.switch-panel ul { list-style: none; margin: 0; }
.switch-panel li {
  position: relative;
  padding: 0 0 0.85rem 1rem;
  color: var(--muted);
}
.switch-panel li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 8px;
  height: 2px;
  background: var(--gold);
}
.switcher:not(.is-ready) .switch-list { display: none; }
.switcher:not(.is-ready) .switch-panel { border-radius: 12px; margin-bottom: 12px; }
.switcher.is-ready .switch-panel[hidden] { display: none; }

/* Gallery */
.carousel-viewport { position: relative; }
.carousel-track {
  position: relative;
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding-bottom: 8px;
}
@media (prefers-reduced-motion: reduce) {
  .carousel-track { scroll-behavior: auto; }
}
.carousel-slide {
  flex: 0 0 78%;
  scroll-snap-align: start;
}
.shot {
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface);
  cursor: zoom-in;
  color: inherit;
  font: inherit;
  text-align: left;
  text-decoration: none;
}
.shot img {
  width: 100%;
  height: 280px;
  object-fit: cover;
}
.shot-label {
  display: block;
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 700;
}
.shot:hover,
.shot:focus-visible { border-color: var(--gold); }
.carousel-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}
.carousel-prev,
.carousel-next {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  background: var(--p-card);
  color: var(--text);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}
.carousel-prev:hover,
.carousel-next:hover { background: var(--p-gold-soft); }
.carousel-status { margin: 0; color: var(--muted); font-size: 15px; }

/* Lightbox */
.lightbox[hidden] { display: none; }
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(17, 17, 17, 0.92);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 56px 16px 16px;
}
.lightbox figure { margin: 0; }
.lightbox img {
  max-height: 78vh;
  max-width: 100%;
  width: auto;
  height: auto;
  margin: 0 auto;
  object-fit: contain;
}
.lightbox figcaption {
  color: #fff;
  text-align: center;
  margin-top: 8px;
  font-size: 14px;
}
.lightbox button {
  background: var(--p-card);
  color: var(--text);
  border: 2px solid var(--gold);
  border-radius: 8px;
  padding: 10px 12px;
  font-weight: 700;
  font-family: Arial, Helvetica, sans-serif;
  cursor: pointer;
}
.lightbox-close {
  position: absolute;
  top: 12px;
  right: 12px;
}
body.lightbox-open { overflow: hidden; }

/* Quiz */
.quiz {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px;
  background: var(--p-card);
  max-width: 720px;
}
.quiz-q { font-weight: 700; margin-bottom: 12px; }
.quiz-q:focus { outline: none; }
.quiz-choices { display: flex; flex-wrap: wrap; gap: 8px; }
.quiz-choices button,
.quiz-back,
.quiz-restart {
  background: var(--p-card);
  color: var(--text);
  border: 2px solid var(--line);
  border-radius: 8px;
  padding: 10px 14px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.quiz-choices button:hover,
.quiz-choices button:focus-visible,
.quiz-back:hover,
.quiz-restart:hover {
  border-color: var(--gold);
  background: var(--p-gold-soft);
}
.quiz-step[hidden],
.quiz-result[hidden] { display: none; }
.quiz-result h3 { margin-bottom: 0.5rem; }
.quiz-result-text { color: var(--muted); margin-bottom: 1rem; }
.quiz-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 14px;
}
.quiz-progress { color: var(--muted); font-size: 14px; margin: 12px 0 0; }

/* Floating text link, mobile only */
.text-us { display: none; }
@media (max-width: 767px) {
  .text-us {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    right: 12px;
    bottom: 104px;
    z-index: 61;
    background: var(--p-card);
    color: var(--text);
    border: 2px solid var(--gold);
    border-radius: 999px;
    padding: 10px 16px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 4px 16px rgba(17, 17, 17, 0.12);
  }
  .text-us:hover,
  .text-us:focus-visible { background: var(--p-gold-soft); }
  body.menu-open .text-us,
  body.lightbox-open .text-us { display: none; }
}

@media (max-width: 800px) {
  .valley-map,
  .flow { grid-template-columns: 1fr 1fr; }
  .flow-item:not(:last-child)::after { display: none; }
  .compare-frame img { height: 240px; }
  .compare.is-ready .compare-frame { aspect-ratio: 4 / 3; }
  .carousel-slide { flex-basis: 86%; }
  .shot img { height: 210px; }
  .lightbox {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: minmax(0, 1fr) auto;
    align-items: center;
  }
  .lightbox figure { grid-column: 1 / -1; grid-row: 1; }
  .lightbox-prev { grid-column: 1; grid-row: 2; }
  .lightbox-next { grid-column: 2; grid-row: 2; }
  .lightbox img { max-height: 70vh; }
}

@media (max-width: 560px) {
  .valley-map,
  .flow { grid-template-columns: 1fr; }
  .switch-tab { flex: 1; }
}
