/* Services page. Layout and states only — all content comes from services-data.js. */

.services-page {
  --header-h: 65px;          /* replaced at runtime with the measured header height */
  /* White-to-gold palette: change these to retint the whole page. */
  --bg-top: #fffdf9;                      /* near-white */
  --bg-mid: #fbf5ea;                      /* warm ivory */
  --bg-bottom: #f2e4c8;                   /* soft champagne gold */
  --accent: #a8763e;                      /* bronze: active bar + tag outlines */
  --ink: #1d1a16;                         /* warm near-black text */
  --muted: rgba(29, 26, 22, 0.4);
  --soft: rgba(29, 26, 22, 0.68);
  --line: rgba(168, 118, 62, 0.28);       /* bronze-tinted dividers */
  --radius: 18px;            /* site radius (buttons, portfolio cards) */
  --indent: 22px;            /* list text inset, leaves room for the active bar */
  /* Near-white behind the header strip, champagne below the section. */
  background: linear-gradient(var(--bg-top) 0 var(--header-h), var(--bg-bottom) var(--header-h));
  color: var(--ink);
  overflow-x: clip;
}

/* Header reads dark-on-light. */
.services-page #site-header {
  background: rgba(255, 253, 249, 0.6);
  border-bottom-color: var(--line);
}
.services-page .navbar { max-width: 1280px; }
.services-page nav.links a { color: var(--soft); }
.services-page nav.links a:hover { color: var(--ink); }

/* ---------- Section ---------- */

.svc {
  /* White at the top, warming to a hint of gold toward the bottom. */
  background: linear-gradient(to bottom, var(--bg-top) 0%, var(--bg-mid) 55%, var(--bg-bottom) 100%);
  padding: clamp(48px, 7vw, 110px) 0 clamp(72px, 9vw, 140px);
}

.svc-inner {
  width: min(1320px, calc(100% - 56px));
  margin: 0 auto;
}

.svc-heading {
  margin: 0;
  font: 700 clamp(3rem, 8vw, 7.5rem)/0.92 'Space Grotesk', sans-serif;
  letter-spacing: -0.055em;
}

/* Inline superscript: stays attached to the heading's last word when it wraps. */
.svc-heading-end { white-space: nowrap; }

.svc-label {
  display: inline-block;
  vertical-align: top;
  margin: 0.55em 0 0 0.45em;
  white-space: nowrap;
  font: 500 clamp(11px, 1vw, 14px)/1 'Space Grotesk', sans-serif;
  letter-spacing: 0.04em;
  color: var(--soft);
}

.svc-intro {
  margin: clamp(14px, 1.6vw, 22px) 0 0;
  font: 400 clamp(1rem, 1.3vw, 1.25rem)/1.5 'Space Grotesk', sans-serif;
  color: var(--soft);
}

/* 1024px and up: intro on the right, its last line sitting on the heading's baseline. */
@media (min-width: 1024px) {
  .svc-head {
    display: flex;
    justify-content: space-between;
    align-items: last baseline;
    gap: clamp(32px, 5vw, 88px);
  }
  .svc-intro {
    flex: 0 1 320px;
    max-width: 320px;
    margin: 0;
    text-align: right;
  }
}

.svc-body {
  display: grid;
  grid-template-columns: 4fr 6fr;
  gap: clamp(32px, 5vw, 88px);
  align-items: start;
  margin-top: clamp(40px, 5.5vw, 80px);
}

/* ---------- List ---------- */

.svc-list-wrap { position: relative; }

/* Accessibility-only owner of the tabs (aria-owns); takes no space. */
.svc-tablist {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

.svc-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.svc-item { border-bottom: 1px solid var(--line); }

.svc-tab {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  width: 100%;
  margin: 0;
  padding: clamp(16px, 1.7vw, 24px) 0 clamp(16px, 1.7vw, 24px) var(--indent);
  border: 0;
  background: none;
  color: var(--muted);
  text-align: left;
  cursor: pointer;
  transition: color 0.3s ease;
}

.svc-num {
  flex: 0 0 auto;
  padding-top: 0.35em;
  font: 500 12px/1 'Space Grotesk', sans-serif;
  letter-spacing: 0.06em;
}

.svc-name {
  font: 400 clamp(1.6rem, 2.6vw, 2.6rem)/1.08 'Space Grotesk', sans-serif;
  letter-spacing: -0.03em;
}

.svc-item.is-active .svc-tab { color: var(--ink); }
.svc-item.is-active .svc-name { font-weight: 700; }

.svc-tab:focus { outline: none; }
.svc-tab:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: -2px;
  border-radius: 8px;
}

/* One shared bar; services.js moves it with transforms (y + scaleY of a 100px base). */
.svc-bar {
  position: absolute;
  z-index: 1;
  left: 0;
  top: 0;
  width: 2px;
  height: 100px;
  background: var(--accent);
  transform-origin: 0 0;
  pointer-events: none;
}

/* Detail block: collapsed unless active (height animated by GSAP). */
.svc-detail {
  height: 0;
  overflow: hidden;
}

.svc-item.is-active .svc-detail { height: auto; }

.svc-detail-inner {
  padding: 0 0 clamp(20px, 2vw, 28px) var(--indent);
}

.svc-desc {
  margin: 0 0 14px;
  color: var(--soft);
  font-size: 1.05rem;
  line-height: 1.5;
}

.svc-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.svc-tag {
  padding: 6px 12px;
  border: 1px solid rgba(168, 118, 62, 0.45);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.6);
  font: 500 12px/1.2 'Space Grotesk', sans-serif;
  white-space: nowrap;
}

.svc-price {
  margin: 16px 0 6px;
  font: 600 1rem/1.3 'Space Grotesk', sans-serif;
}

.svc-cta {
  display: inline-flex;
  gap: 0.4em;
  font: 600 0.95rem/1.3 'Space Grotesk', sans-serif;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.svc-cta:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Image panel ---------- */

.svc-panel-col {
  position: sticky;
  top: calc(var(--header-h) + 24px);
}

.svc-panel {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  background: #2b2b30;
}

.svc-slot {
  position: absolute;
  inset: 0;
  opacity: 0;
}

.svc-slot.is-active { opacity: 1; }

.svc-slot img,
.svc-slot picture {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.svc-slot video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.svc-media-label {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 1;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(23, 24, 29, 0.72);
  color: #fff;
  font: 600 11px/1 'Space Grotesk', sans-serif;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.svc-placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  background: #2b2b30;
  color: rgba(255, 255, 255, 0.55);
  font: 500 13px/1.3 'Space Grotesk', sans-serif;
  letter-spacing: 0.04em;
}

/* ---------- Mobile / tablet (below 1024px) ---------- */

@media (max-width: 1023px) {
  .svc-inner { width: calc(100% - 32px); }

  .svc-body {
    grid-template-columns: 1fr;
    gap: 16px;
    margin-top: 28px;
  }

  /* Image panel first, capped in height so panel + list fit one screen while pinned. */
  .svc-panel-col {
    order: -1;
    position: static;
  }

  .svc-panel {
    width: min(100%, calc(34svh * 16 / 9));
    margin: 0 auto;
  }

  .svc-tab { padding: 12px 0 12px var(--indent); }
  .svc-name { font-size: clamp(1.2rem, 4.6vw, 1.7rem); }
  .svc-desc { font-size: 0.95rem; margin-bottom: 10px; }
  .svc-tag { padding: 5px 10px; font-size: 11px; }
  .svc-price { margin-top: 10px; }
  .svc-detail-inner { padding-bottom: 14px; }
}

/* Short screens: smaller panel so the pinned panel + list still fit one screen. */
@media (max-width: 1023px) and (max-height: 700px) {
  .svc-panel { width: min(100%, calc(27svh * 16 / 9)); }
}

/* Lenis */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
