/* ==========================================================================
   Premium page versions — service-detail-v2.html, work-v2.html
   Builds on pages.css (zoom, faq-wrap, big-marquee, hscroll, meta…)
   ========================================================================== */


/* ==========================================================================
   SERVICE DETAIL v2
   ========================================================================== */

/* --- Hero: giant title + tall image with scroll-rotating badge ---------- */

.sx-hero { padding: clamp(120px, 17vh, 190px) var(--pad-x) clamp(48px, 6vw, 96px); }
.sx-hero__top { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.sx-hero__index { font-family: var(--f-mono); font-size: 12px; letter-spacing: .14em; color: var(--c-muted); }
.sx-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr);
  gap: clamp(32px, 5vw, 96px);
  align-items: end;
  margin-top: clamp(32px, 5vw, 72px);
}
.sx-hero__title {
  font-weight: 500;
  font-size: clamp(64px, min(12vw, 20vh), 220px);
  line-height: .9;
  letter-spacing: -.065em;
}
.sx-hero__copy .page-hero__lead { margin-top: clamp(28px, 3vw, 44px); }
.sx-hero__copy .cta-row { margin-top: 32px; gap: 12px; }

.sx-hero__media { position: relative; }
.sx-hero__img {
  aspect-ratio: .78;
  border-radius: 999px 999px 26px 26px;
  transform: scale(calc(.94 + var(--t) * .06));
  opacity: var(--t);
}
.sx-badge {
  position: absolute;
  left: -64px;
  bottom: 48px;
  width: 150px;
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--c-bg);
}
.sx-badge svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(calc(var(--p) * 360deg));
}
.sx-badge text { font-family: var(--f-mono); font-size: 13px; letter-spacing: .28em; fill: var(--c-ink); }
.sx-badge__core {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--c-orange);
  color: #fff;
  font-size: 20px;
}

/* --- Sticky chapter navigation ------------------------------------------ */

.chapters {
  position: sticky;
  top: 86px;
  z-index: 40;
  padding: 12px var(--pad-x);
  background: rgba(246, 246, 245, .94);
  border-bottom: 1px solid var(--c-line);
}
.chapters__inner { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.chapters__inner::-webkit-scrollbar { display: none; }
.chapters__link {
  flex: none;
  padding: 9px 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  color: var(--c-muted);
  transition: background .6s var(--ease-premium), color .6s;
}
.chapters__link:hover { color: var(--c-ink); }
.chapters__link.is-active { background: var(--c-ink); color: #fff; }

[id^="sx-"] { scroll-margin-top: 150px; }

/* --- Statement with inline images --------------------------------------- */

.sx-statement { padding: clamp(80px, 11vw, 180px) var(--pad-x) clamp(60px, 8vw, 120px); }
.sx-statement__text {
  max-width: 1320px;
  font-weight: 500;
  font-size: clamp(34px, 4.6vw, 84px);
  line-height: 1.08;
  letter-spacing: -.05em;
}
.inline-img {
  display: inline-block;
  width: calc(var(--t) * 1.9em);
  height: .8em;
  margin: 0 .08em;
  vertical-align: -.04em;
  border-radius: 999px;
  transition: none;
}

.sx-signs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
  gap: 16px;
  margin-top: clamp(48px, 6vw, 96px);
}
.sx-sign {
  --r-dist: 40px;
  display: flex;
  flex-direction: column;
  gap: 40px;
  padding: 24px;
  border-radius: var(--radius-md);
  border: 1px solid var(--c-line);
  transition: background .8s var(--ease-premium), border-color .8s;
}
.sx-sign:hover { background: #fff; border-color: #fff; }
.sx-sign__check {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--c-ink);
  color: #fff;
  font-size: 14px;
}
.sx-sign p { font-size: 17px; line-height: 1.4; letter-spacing: -.02em; }

/* --- Deliverables: list scrolls, image stage stays pinned ---------------- */

.sx-deliver__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 110px);
  align-items: start;
}
.sx-d {
  min-height: 46vh;
  padding: 32px 0;
  border-top: 1px solid var(--c-line);
  display: flex;
  flex-direction: column;
  justify-content: center;
  opacity: .32;
  transition: opacity .8s var(--ease-premium);
}
.sx-d.is-active { opacity: 1; }
.sx-d__num { font-family: var(--f-mono); font-size: 12px; letter-spacing: .14em; color: var(--c-muted); }
.sx-d h3 { margin-top: 14px; font-size: clamp(30px, 3.2vw, 52px); font-weight: 500; line-height: 1; letter-spacing: -.05em; }
.sx-d p { margin-top: 16px; max-width: 460px; font-size: 16px; line-height: 1.6; color: var(--c-body); }
.sx-d .svc-row__tags { margin-top: 20px; }

.sx-deliver__stage {
  position: sticky;
  top: 22vh;
  height: 62vh;
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.sx-deliver__img {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.08);
  transition: opacity .8s var(--ease-premium), transform 1.4s var(--ease-premium);
}
.sx-deliver__img.is-active { opacity: 1; transform: scale(1); }
.sx-deliver__count {
  position: absolute;
  left: 20px;
  bottom: 20px;
  z-index: 2;
  padding: 8px 14px;
  border-radius: 999px;
  background: #fff;
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: .1em;
}

/* --- Process timeline: line fills as you scroll ------------------------- */

.sx-timeline { position: relative; max-width: 1100px; margin: 0 auto; }
.sx-timeline__line {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1.5px;
  background: var(--c-line);
  transform: translateX(-50%);
}
.sx-timeline__line span {
  position: absolute;
  inset: 0;
  background: var(--c-orange);
  transform-origin: 50% 0;
  transform: scaleY(clamp(0, calc(var(--p) * 1.5 - .25), 1));
}
.sx-step {
  position: relative;
  width: 50%;
  padding: 0 clamp(32px, 5vw, 80px) clamp(56px, 7vw, 110px) 0;
  text-align: right;
}
.sx-step:nth-child(odd) { margin-left: 50%; padding: 0 0 clamp(56px, 7vw, 110px) clamp(32px, 5vw, 80px); text-align: left; }
.sx-step::before {
  content: "";
  position: absolute;
  top: 6px;
  right: -8px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--c-bg);
  box-shadow: inset 0 0 0 1.5px var(--c-ink);
}
.sx-step:nth-child(odd)::before { right: auto; left: -8px; }
.sx-step__week { font-family: var(--f-mono); font-size: 12px; letter-spacing: .14em; color: var(--c-orange); }
.sx-step h3 { margin-top: 12px; font-size: clamp(28px, 2.8vw, 44px); font-weight: 500; letter-spacing: -.045em; }
.sx-step p { margin-top: 12px; font-size: 16px; line-height: 1.6; color: var(--c-body); }
.sx-step ul { display: flex; flex-wrap: wrap; gap: 6px; margin: 18px 0 0; padding: 0; list-style: none; }
.sx-step:not(:nth-child(odd)) ul { justify-content: flex-end; }

/* --- Packages: cards stack on top of each other while scrolling --------- */

.sx-stack { display: flex; flex-direction: column; gap: 28px; }
.sx-pack {
  position: sticky;
  top: calc(170px + var(--i) * 26px);
  min-height: min(64vh, 620px);
  padding: clamp(28px, 4vw, 64px);
  border-radius: var(--radius-lg);
  background: #fff;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 80px);
  box-shadow: 0 -20px 60px rgba(0, 0, 0, .05);
}
.sx-pack--dark { background: var(--c-ink); color: #fff; }
.sx-pack--accent { background: var(--c-orange); color: #fff; }
.sx-pack__side { display: flex; flex-direction: column; justify-content: space-between; gap: 32px; }
.sx-pack__tag { font-family: var(--f-mono); font-size: 12px; letter-spacing: .14em; opacity: .7; }
.sx-pack h3 { margin-top: 18px; font-size: clamp(40px, 5vw, 88px); font-weight: 500; line-height: .95; letter-spacing: -.055em; }
.sx-pack__desc { margin-top: 18px; max-width: 420px; font-size: 16px; line-height: 1.6; opacity: .8; }
.sx-pack__time { font-size: 15px; font-weight: 500; }
.sx-pack__time span { display: block; font-family: var(--f-mono); font-size: 11px; letter-spacing: .14em; font-weight: 400; opacity: .6; margin-bottom: 6px; }
.sx-pack ul { margin: 0; padding: 0; list-style: none; align-self: center; }
.sx-pack li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid rgba(128, 128, 128, .22);
  font-size: clamp(16px, 1.3vw, 19px);
}
.sx-pack li::before { content: "✓"; flex: none; width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: currentColor; font-size: 12px; }
.sx-pack li::before { color: inherit; }
.sx-pack li { --tick: var(--c-ink); }
.sx-pack li::before { background: var(--c-orange); color: #fff; }
.sx-pack--accent li::before { background: #fff; color: var(--c-orange); }
.sx-pack--dark .btn--dark { background: #fff; color: var(--c-ink); --fill: var(--c-orange); --fill-ink: #fff; }
.sx-pack--accent .btn--dark { --fill: #fff; --fill-ink: var(--c-ink); }

/* --- Featured work ------------------------------------------------------- */

.sx-work { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.sx-work .zoom:first-child { grid-column: 1 / -1; }
.sx-work .zoom:first-child .zoom__media { aspect-ratio: 16 / 8; }
.sx-work .zoom__media { aspect-ratio: 4 / 3; }

/* --- Closing CTA with round button -------------------------------------- */

.sx-cta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 40px;
  flex-wrap: wrap;
  padding: clamp(80px, 10vw, 160px) var(--pad-x);
  border-top: 1px solid var(--c-line);
}
.sx-cta h2 { font-size: clamp(48px, 7vw, 132px); font-weight: 500; line-height: .95; letter-spacing: -.06em; }
.sx-cta__circle {
  position: relative;
  flex: none;
  width: clamp(150px, 14vw, 210px);
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border-radius: 50%;
  background: var(--c-orange);
  color: #fff;
  font-size: 17px;
  font-weight: 500;
  overflow: hidden;
  isolation: isolate;
}
.sx-cta__circle::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: 50%;
  background: var(--c-ink);
  transform: scale(0);
  transition: transform .9s var(--ease-premium);
}
.sx-cta__circle:hover { color: #fff; }
.sx-cta__circle:hover::before { transform: scale(1); }


/* ==========================================================================
   OUR WORK v2
   ========================================================================== */

.wx-hero { padding: clamp(120px, 17vh, 190px) var(--pad-x) clamp(40px, 5vw, 80px); }
.wx-title {
  margin-top: 24px;
  font-weight: 500;
  font-size: clamp(72px, min(15vw, 24vh), 280px);
  line-height: .86;
  letter-spacing: -.07em;
}
.wx-count {
  display: inline-block;
  margin-left: .1em;
  font-size: .18em;
  letter-spacing: 0;
  vertical-align: top;
  font-family: var(--f-mono);
  font-weight: 400;
  color: var(--c-muted);
}
.wx-hero__row { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px 48px; flex-wrap: wrap; margin-top: clamp(28px, 4vw, 56px); }

/* Featured: pinned horizontal showcase (uses .hscroll from pages.css) */
.wx-featured { height: 360vh; }
.wx-feature {
  position: relative;
  flex: none;
  width: clamp(300px, 62vw, 1000px);
  height: clamp(320px, 62vh, 640px);
  border-radius: var(--radius-lg);
  overflow: hidden;
  color: #fff;
}
.wx-feature:hover { color: #fff; }
.wx-feature__img { position: absolute; inset: 0; transition: transform 1.4s var(--ease-premium); }
.wx-feature:hover .wx-feature__img { transform: scale(1.05); }
.wx-feature__meta {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  padding: clamp(20px, 3vw, 40px);
  background: linear-gradient(transparent, rgba(0, 0, 0, .35));
}
.wx-feature__meta h3 { font-size: clamp(32px, 4vw, 72px); font-weight: 500; line-height: .95; letter-spacing: -.05em; }
.wx-feature__meta span { font-size: 14px; }
.wx-feature__num { position: absolute; left: clamp(20px, 3vw, 40px); top: clamp(20px, 3vw, 36px); font-family: var(--f-mono); font-size: 12px; letter-spacing: .14em; }

/* Index toolbar */
.wx-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px 32px;
  flex-wrap: wrap;
  padding-bottom: 24px;
  margin-bottom: clamp(32px, 4vw, 56px);
  border-bottom: 1px solid var(--c-line);
}
.wx-toggle { display: flex; gap: 4px; padding: 4px; border-radius: 999px; background: #fff; }
.wx-toggle button {
  appearance: none;
  border: 0;
  padding: 9px 18px;
  border-radius: 999px;
  background: transparent;
  color: var(--c-muted);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background .6s var(--ease-premium), color .6s;
}
.wx-toggle button.is-active { background: var(--c-ink); color: #fff; }

.wx-index[data-view="grid"] .wx-list,
.wx-index[data-view="list"] .wx-grid { display: none; }

/* Editorial grid: sizes assigned in order by js/pages-v2.js (wx-s1…wx-s4) */
.wx-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(48px, 6vw, 96px) clamp(16px, 2vw, 32px);
  align-items: start;
}
.wx-item { display: block; color: var(--c-ink); grid-column: span 6; }
.wx-item:hover { color: var(--c-ink); }
.wx-item[hidden], .wx-row[hidden] { display: none; }
.wx-item.wx-s1 { grid-column: 1 / span 7; }
.wx-item.wx-s2 { grid-column: 9 / span 4; margin-top: clamp(80px, 14vw, 240px); }
.wx-item.wx-s3 { grid-column: 2 / span 5; }
.wx-item.wx-s4 { grid-column: 7 / span 6; margin-top: clamp(40px, 8vw, 140px); }
.wx-item.is-in, .wx-row.is-in { animation: rise-in .9s var(--ease-premium); }

.wx-item__media { position: relative; overflow: hidden; border-radius: var(--radius-lg); aspect-ratio: 4 / 3; }
.wx-item.wx-s2 .wx-item__media,
.wx-item.wx-s3 .wx-item__media { aspect-ratio: 4 / 5; }
.wx-item__img {
  position: absolute;
  inset: -10% 0;
  transform: translate3d(0, calc((var(--p) - .5) * -14%), 0) scale(1);
  transition: scale 1.4s var(--ease-premium);
  will-change: transform;
}
.wx-item:hover .wx-item__img { scale: 1.05; }
.wx-item__meta {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 16px;
  align-items: baseline;
  margin-top: 18px;
}
.wx-item__num { font-family: var(--f-mono); font-size: 12px; color: var(--c-muted); }
.wx-item__meta h3 { font-size: clamp(20px, 1.8vw, 28px); font-weight: 500; letter-spacing: -.04em; }
.wx-item__meta span:last-child { font-size: 14px; color: var(--c-muted); }

/* List view */
.wx-list { border-top: 1px solid var(--c-line); }
.wx-row {
  display: grid;
  grid-template-columns: 70px minmax(0, 1.4fr) minmax(0, 1fr) 90px 48px;
  gap: 24px;
  align-items: center;
  padding: 26px 0;
  border-bottom: 1px solid var(--c-line);
  color: var(--c-ink);
}
.wx-row:hover { color: var(--c-ink); }
.wx-row__num, .wx-row__year { font-family: var(--f-mono); font-size: 13px; color: var(--c-muted); }
.wx-row__name {
  font-size: clamp(26px, 3vw, 48px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -.05em;
  transition: transform .9s var(--ease-premium), color .6s;
}
.wx-row:hover .wx-row__name { transform: translateX(12px); }
.wx-list:hover .wx-row:not(:hover) .wx-row__name { color: #BDBDBB; }
.wx-row__cat { font-size: 15px; color: var(--c-body); }
.wx-row__arrow {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--c-line);
  transition: background .6s var(--ease-premium), color .6s, border-color .6s, transform .9s var(--ease-premium);
}
.wx-row:hover .wx-row__arrow { background: var(--c-ink); border-color: var(--c-ink); color: #fff; transform: rotate(-45deg); }

/* Cursor label that follows the mouse over project images */
.cursor-view {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 60;
  pointer-events: none;
}
.cursor-view span {
  width: 96px;
  height: 96px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--c-ink);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  transform: translate(-50%, -50%) scale(0);
  transition: transform .6s var(--ease-premium);
}
.cursor-view.is-visible span { transform: translate(-50%, -50%) scale(1); }
@media (hover: none) { .cursor-view { display: none; } }


/* ==========================================================================
   Mobile
   ========================================================================== */

@media (max-width: 759px) {
  .sx-hero__grid { grid-template-columns: minmax(0, 1fr); }
  .sx-hero__title { font-size: clamp(56px, 17vw, 96px); }
  .sx-badge { left: auto; right: 12px; bottom: 12px; width: 120px; height: 120px; }
  .chapters { top: 76px; }
  .sx-deliver__grid { grid-template-columns: minmax(0, 1fr); }
  .sx-deliver__stage { display: none; }
  .sx-d { min-height: 0; opacity: 1; }
  .sx-timeline__line { left: 8px; }
  .sx-step,
  .sx-step:nth-child(odd) { width: auto; margin-left: 0; padding: 0 0 56px 40px; text-align: left; }
  .sx-step::before,
  .sx-step:nth-child(odd)::before { left: 0; right: auto; }
  .sx-step:not(:nth-child(odd)) ul { justify-content: flex-start; }
  .sx-pack { grid-template-columns: minmax(0, 1fr); top: calc(140px + var(--i) * 16px); }
  .sx-work { grid-template-columns: minmax(0, 1fr); }
  .sx-work .zoom:first-child .zoom__media { aspect-ratio: 4 / 3; }

  .wx-title { font-size: clamp(64px, 20vw, 110px); }
  .wx-feature { width: 82vw; height: 56vh; }
  .wx-item,
  .wx-item.wx-s1, .wx-item.wx-s2, .wx-item.wx-s3, .wx-item.wx-s4 { grid-column: 1 / -1; margin-top: 0; }
  .wx-row { grid-template-columns: 40px minmax(0, 1fr) 40px; gap: 12px; }
  .wx-row__cat, .wx-row__year { display: none; }
  .wx-row__arrow { width: 40px; height: 40px; }
}
