/* ==========================================================================
   /360-service/ — part 1 "property film" + part 2 "360 Service Orbit" story.
   Positions and timings are driven by modules/property-film.js (video time) and
   modules/orbit/story.js through CSS custom properties.
   ========================================================================== */

.film, .story { letter-spacing: normal; font-family: var(--font); }

/* ---------- Part 1: film ---------- */
.film { position: relative; height: 100vh; background: #060606; color: #eae6de; overflow: clip; }
.film__sticky { position: sticky; top: 0; height: 100vh; overflow: hidden; }
.film__screen { position: absolute; inset: 0; }
.film__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #060606; opacity: 0; pointer-events: none; }
.film__intro {
  position: absolute; inset: 0; pointer-events: none;
  background: url("/assets/img/film-intro.webp") center / cover no-repeat;
}
.film__cloud { position: absolute; max-width: none; pointer-events: none; }
.film__cloud--tl { width: 980px; top: -6%; left: -26%; }
.film__cloud--tr { width: 1040px; top: 2%; right: -28%; }
.film__cloud--bl { width: 1180px; top: 52%; left: -30%; }
.film__cloud--br { width: 1120px; top: 54%; right: -30%; }
.film__shade {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,.14) 0%, rgba(0,0,0,.06) 28%, rgba(0,0,0,.1) 68%, rgba(0,0,0,.42) 100%);
}
.film__chapters { position: absolute; inset: 0; pointer-events: none; }
.film__chapter {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 0 6vw;
  opacity: var(--o, 0);
  transform: translateY(var(--y, 0px)) scale(var(--s, 1));
  filter: blur(var(--blur, 0px));
}
.film__chapter:first-child { --o: 1; }
.film__chapter.is-active, .film__chapter--cards { pointer-events: auto; }
.film__chapter--cards { display: block; padding: 0; transform: scale(var(--s, 1)); }
.film__heading {
  max-width: 980px; padding: 0 24px; text-align: center; color: #fff;
  font-size: 78px; line-height: 0.95; letter-spacing: -0.045em; font-weight: 500; text-wrap: balance;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.45), 0 0 2px rgba(0, 0, 0, 0.25);
}
.film__chapter:last-child .film__heading { font-size: 72px; }

/* The six "issues" of a purchase: quiet glass cards with a fine sand rule and a numeral,
   set straight, so they read as considered advice rather than warnings. */
.issue {
  --hover: 0px;
  position: absolute; top: var(--top); left: var(--left);
  width: 300px; padding: 22px 24px 24px;
  border-radius: 14px; color: #f4efe7;
  border: 1px solid rgba(234, 222, 204, 0.2);
  background: linear-gradient(160deg, rgba(36, 28, 21, 0.62), rgba(20, 16, 12, 0.5));
  -webkit-backdrop-filter: blur(16px) saturate(1.1); backdrop-filter: blur(16px) saturate(1.1);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  opacity: var(--enter, 0);
  transform: translateY(calc((1 - var(--enter, 0)) * 28px + var(--hover)));
  transition: transform 300ms var(--ease-out), border-color 300ms ease, background-color 300ms ease;
}
.issue:hover { --hover: -4px; border-color: rgba(200, 169, 126, 0.55); }
.issue__num {
  display: flex; align-items: center; gap: 10px; margin-bottom: 16px;
  font-size: 11px; font-weight: 500; letter-spacing: 0.24em; color: #c8a97e; font-variant-numeric: tabular-nums;
}
.issue__num::before { content: ""; width: 22px; height: 1px; background: currentColor; opacity: 0.8; }
.issue__title { font-size: 24px; line-height: 1.08; letter-spacing: -0.03em; font-weight: 400; text-wrap: balance; }
.issue__detail { margin-top: 10px; font-size: 13.5px; line-height: 1.45; letter-spacing: -0.005em; color: rgba(234, 226, 214, 0.72); text-wrap: pretty; }

.film__hint { position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 8; pointer-events: none; }
.film__hint span {
  display: inline-flex; justify-content: center; min-width: 144px; padding: 12px 18px; border-radius: 999px; white-space: nowrap;
  background: #fff; color: #060606; font-size: 12px; font-weight: 600; line-height: 1; letter-spacing: 0.08em; text-transform: uppercase;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.16);
  animation: film-blink 1.5s ease-in-out infinite;
}
@keyframes film-blink { 0%, 100% { opacity: .48; transform: translateY(0); } 50% { opacity: 1; transform: translateY(2px); } }
.film__black { position: absolute; inset: 0; background: #000; opacity: 0; z-index: 6; pointer-events: none; }
.film__loading {
  position: absolute; inset: 0; z-index: 9; display: flex; align-items: center; justify-content: center; pointer-events: none;
  background: linear-gradient(to bottom, rgba(0,0,0,.32), rgba(0,0,0,.48));
}
.film__loading > span {
  padding: 10px 14px; border-radius: 999px; border: 1px solid rgba(234, 230, 222, 0.35); background: rgba(0,0,0,.3);
  font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase;
}
.film__loading[hidden] { display: none; }

@media (max-width: 809px) {
  .film__video { object-fit: contain; }
  .film__cloud--tl { width: 520px; top: -2%; left: -38%; }
  .film__cloud--tr { width: 540px; top: 4%; right: -42%; }
  .film__cloud--bl { width: 640px; top: 56%; left: -44%; }
  .film__cloud--br { width: 620px; top: 58%; right: -44%; }
  .film__chapter { padding: 0 20px; }
  .film__heading, .film__chapter:last-child .film__heading { font-size: 40px; line-height: 0.99; padding: 0 8px; }
  .issue { top: var(--top-m); left: var(--left-m); width: 44vw; max-width: 230px; padding: 16px 16px 18px; border-radius: 12px; }
  .issue__num { margin-bottom: 10px; font-size: 10px; gap: 8px; }
  .issue__num::before { width: 14px; }
  .issue__title { font-size: 18px; line-height: 1.1; }
  .issue__detail { margin-top: 6px; font-size: 12px; line-height: 1.35; }
  .film__hint { bottom: 18px; }
  .film__hint span { min-width: 132px; padding: 10px 16px; }
}


/* ---------- Part 2: story ---------- */
/* The film part plays in one screen; ~3 more screens of scroll carry the closing
   (modules/orbit/story.js sets the exact height). */
.story { position: relative; height: 400vh; background: var(--c-paper); }
.story__sticky {
  position: sticky; top: 0; height: 100vh; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background: var(--c-paper); user-select: none; -webkit-user-select: none; touch-action: pan-y;
}
.story__veil { position: absolute; inset: 0; z-index: 0; background: #000; pointer-events: none; }
.story__hveil {
  position: absolute; left: 50%; top: 50%; z-index: 1; width: 1180px; height: 620px; opacity: 0; pointer-events: none;
  transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(0,0,0,.62), rgba(0,0,0,0));
}
.story__rings { position: absolute; left: 50%; top: 50%; z-index: 2; overflow: visible; pointer-events: none; transform: translate(-50%, -50%); }

.story__frame { position: relative; z-index: 3; flex-shrink: 0; width: 100%; height: var(--frame-h, 560px); overflow: hidden; }
.story__stage { position: absolute; inset: 0; perspective: 1400px; transform-style: preserve-3d; }
.story__card { opacity: 0; }
.story:not(.is-live) .story__card, .story:not(.is-live) .story__card * { pointer-events: none; }
.story__house {
  position: absolute; left: 50%; bottom: calc(var(--house-h, 400px) * -0.1); z-index: 20;
  width: var(--house-w, 540px); height: var(--house-h, 400px);
  transform-origin: 50% 100%; opacity: 0; pointer-events: none;
}
.story__house img { width: 100%; height: 100%; object-fit: contain; object-position: center bottom; }

.story__final { position: absolute; inset: 0; z-index: 72; opacity: 0; visibility: hidden; pointer-events: none; }
.story__final-title {
  position: absolute; top: var(--final-title-top); left: 50%; width: min(920px, calc(100% - 32px));
  transform: translate(-50%, -100%); text-align: center; color: #7a6249;
  font-size: clamp(24px, 4.2vw, 52px); line-height: 1.03; letter-spacing: -0.04em; font-weight: 500; text-wrap: balance;
}
.story__final-cta {
  position: absolute; left: 50%; top: var(--final-cta-top); width: min(680px, calc(100% - 32px));
  transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center;
}
.story__final-sub { color: #7a6249; font-size: clamp(15px, 1.7vw, 22px); line-height: 1.2; letter-spacing: 0.055em; font-weight: 500; }
.story__final .pill-btn { pointer-events: auto; min-height: 46px; font-size: 14px; }

.story__texts { position: absolute; inset: 0; z-index: 60; pointer-events: none; }
.story__lockup { position: absolute; left: 50%; top: 50%; width: var(--lk-w, 200px); opacity: 0; transform: translate(-50%, -50%) scale(.94); }
.story__lockup .lockup__name { font-size: var(--lk-name, 46px); }
.story__lockup .lockup__tag { margin-top: var(--lk-gap, 14px); font-size: var(--lk-tag, 11px); color: inherit; opacity: 0.6; }
.story__line {
  position: absolute; top: 50%; left: 0; width: 100%; display: flex; justify-content: center;
  transform: translateY(calc(-50% + var(--ty, 120px))) scale(var(--hs, 0.97));
}
.story__line-inner { width: 100%; max-width: 980px; padding: 0 24px; text-align: center; opacity: var(--ho, 0); filter: blur(var(--hb, 0px)); }
.story__label { margin-bottom: 18px; font-size: 13px; line-height: 1; letter-spacing: 0.18em; font-weight: 600; text-transform: uppercase; }
.story__heading { color: #fff; font-size: 78px; line-height: 0.95; letter-spacing: -0.045em; font-weight: 500; text-wrap: balance; }
.story__accent { color: #a78b6b; }

.story__cursor { position: absolute; left: 0; top: 0; z-index: 90; width: 460px; height: 200px; display: grid; opacity: 0; pointer-events: none; perspective: 1100px; }
.story__face { grid-area: 1 / 1; opacity: 0; transform-style: preserve-3d; }
.story__dot {
  position: absolute; left: 0; top: 0; z-index: 91; width: 10px; height: 10px; border-radius: 50%; opacity: 0; pointer-events: none;
  background: rgba(255, 255, 255, 0.92); box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.14);
}
.story__ringhint {
  position: absolute; left: 50%; bottom: calc(max(22px, env(safe-area-inset-bottom)) + 84px); z-index: 60; transform: translateX(-50%);
  display: flex; align-items: center; gap: 10px; white-space: nowrap; opacity: 0; pointer-events: none;
  color: #7a6249; font-size: 12px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase;
}
.story__ringhint::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 4px rgb(122 98 73 / 0.16); animation: ringhint-pulse 1.8s ease-in-out infinite; }
.story__ringhint-touch { display: none; }
@media (hover: none), (max-width: 809px) {
  .story__ringhint { font-size: 10.5px; letter-spacing: 0.14em; }
  .story__ringhint-fine { display: none; }
  .story__ringhint-touch { display: inline; }
}
@keyframes ringhint-pulse { 50% { box-shadow: 0 0 0 8px rgb(122 98 73 / 0); } }
.story__ringpick {
  position: absolute; left: 50%; bottom: calc(max(22px, env(safe-area-inset-bottom)) + 76px); z-index: 61;
  display: inline-flex; align-items: center; gap: 10px; height: 46px; padding: 0 20px 0 16px; white-space: nowrap;
  border-radius: 999px; color: #fff; background: rgb(var(--rgb, 122 98 73)); box-shadow: 0 14px 34px rgb(var(--rgb, 122 98 73) / 0.35);
  font-size: 14px; font-weight: 500; opacity: 0; pointer-events: none;
  transform: translate(-50%, 14px) scale(0.96); transition: transform .5s cubic-bezier(0.22, 1, 0.36, 1), background-color .4s, box-shadow .4s;
}
.story__ringpick.is-picked { pointer-events: auto; transform: translate(-50%, 0) scale(1); }
.story__ringpick-open { padding-right: 10px; border-right: 1px solid rgba(255, 255, 255, 0.35); font-size: 10.5px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; opacity: 0.8; }
.story__ringcard { position: absolute; left: 0; top: 0; z-index: 85; width: 460px; height: 200px; opacity: 0; pointer-events: none; }

.story.is-compact .story__cursor, .story.is-compact .story__dot, .story.is-compact .story__ringcard { display: none; }
.story.is-compact .story__hveil { width: 620px; height: 420px; }
.story.is-compact .story__line-inner { max-width: 700px; padding: 0 22px; }
.story.is-compact .story__label { margin-bottom: 12px; font-size: 11px; }
.story.is-compact .story__heading { font-size: 40px; line-height: 0.99; }
.story.is-compact .story__final-cta { gap: 10px; }
.story.is-compact .story__final .pill-btn { min-height: 42px; padding: 0 19px; font-size: 13px; }
/* Reduce motion: the issue cards fade in where they rest instead of rising. */
@media (prefers-reduced-motion: reduce) {
  .issue { transform: none; }
}

/* ---------- Story player: play / pause, progress by service, skip ---------- */
.story__player {
  --ink: 200 169 126;
  position: absolute; left: 50%; bottom: max(22px, env(safe-area-inset-bottom)); z-index: 90;
  transform: translateX(-50%); width: min(600px, calc(100% - 32px));
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 16px;
  padding: 8px 18px 8px 8px; border-radius: 999px;
  color: #f1ebe2; background: rgba(20, 16, 12, 0.38); border: 1px solid rgba(241, 235, 226, 0.14);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  transition: color .6s ease, background-color .6s ease, border-color .6s ease;
}
.story__player.is-light { color: #392615; background: rgba(255, 255, 255, 0.6); border-color: rgba(57, 38, 21, 0.12); }
.story__play {
  width: 40px; height: 40px; display: grid; place-items: center; padding: 0; border-radius: 50%; cursor: pointer;
  color: inherit; background: none; border: 1px solid currentColor; border-color: color-mix(in srgb, currentColor 35%, transparent);
  transition: border-color .2s;
}
.story__play:hover { border-color: currentColor; }
.story__play svg { width: 14px; height: 14px; fill: currentColor; }
.story__icon-pause, .story__icon-replay,
.story__player.is-playing .story__icon-play,
.story__player.is-ended .story__icon-play, .story__player.is-ended .story__icon-pause { display: none; }
.story__player.is-playing .story__icon-pause, .story__player.is-ended .story__icon-replay { display: inline; }
.story__progress { display: grid; gap: 6px; min-width: 0; }
.story__now {
  min-height: 1.3em; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
  font-size: 10px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; opacity: 0.8;
}
.story__track { position: relative; height: 16px; cursor: pointer; }
.story__track::before { content: ""; position: absolute; inset: 50% 0 auto; height: 1px; background: currentColor; opacity: 0.22; }
.story__fill { position: absolute; inset: 50% 0 auto; height: 1px; background: rgb(var(--ink)); transform: scaleX(0); transform-origin: left; transition: background-color .6s; }
.story__mark {
  position: absolute; top: 50%; left: calc(var(--at, 0) * 100%); width: 18px; height: 18px; margin: -9px 0 0 -9px;
  display: grid; place-items: center; padding: 0; border: 0; background: none; cursor: pointer;
}
.story__mark::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--c); transition: transform .3s var(--ease-out), box-shadow .3s; }
.story__mark:hover::before, .story__mark[aria-current]::before { transform: scale(1.7); box-shadow: 0 0 0 3px rgb(var(--ink) / 0.22); }
.story__skip {
  padding: 8px 2px; border: 0; background: none; color: inherit; cursor: pointer; white-space: nowrap;
  font-size: 11px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; opacity: 0.78; transition: opacity .2s;
}
.story__skip:hover { opacity: 1; }
.story__skip[hidden] { display: none; }
/* Once the film part is over: "Watch again" on the left, a cue to scroll on to the right.
   The bar fades away as the visitor scrolls into the rest of the story. */
.story__again, .story__next { display: none; }
.story__player.is-ended .story__progress, .story__player.is-ended .story__skip { display: none; }
.story__player.is-ended { grid-template-columns: auto 1fr; padding-right: 22px; }
.story__player.is-ended .story__play { width: auto; height: 40px; grid-auto-flow: column; gap: 8px; padding: 0 16px 0 14px; border-radius: 999px; }
.story__player.is-ended .story__again { display: inline; font-size: 11px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; }
.story__player.is-ended .story__next {
  display: block; justify-self: end; white-space: nowrap;
  font-size: 11px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase;
}
.story__player.is-ended .story__next span { display: inline-block; margin-left: 4px; animation: story-next 1.6s ease-in-out infinite; }
@keyframes story-next { 50% { transform: translateY(3px); } }
.story__player { transition: opacity .4s ease, color .6s ease, background-color .6s ease, border-color .6s ease; }
.story__player.is-away { opacity: 0; pointer-events: none; }
.story__player.is-ended .story__again { white-space: nowrap; }
@media (max-width: 699px) {
  .story__player.is-ended { padding-right: 18px; }
  .story__player.is-ended .story__play { width: 36px; height: 36px; padding: 0; }
  .story__player.is-ended .story__again { display: none; }
  .story__player.is-ended .story__next { font-size: 10px; letter-spacing: 0.14em; }
}
@media (max-width: 699px) {
  .story__player { width: calc(100% - 24px); gap: 12px; padding: 6px 14px 6px 6px; bottom: max(14px, env(safe-area-inset-bottom)); }
  .story__play { width: 36px; height: 36px; }
  .story__skip { font-size: 10px; letter-spacing: 0.14em; }
}
