/* Fancee Stone Protection */

@property --iris {
  syntax: "<length>";
  inherits: true;
  initial-value: 0px;
}

:root {
  --navy: #17243a;
  --ink: #0c1524;
  --gold: #cf9a37;
  --gold-hi: #e7c078;
  --stone: #f4f1ec;
  --mute: rgba(244, 241, 236, .64);
  --line: rgba(207, 154, 55, .28);
  --font: "arboria", "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
  --pad: clamp(20px, 4.4vw, 64px);
  --ease: cubic-bezier(.2, .7, .1, 1);
}

/* declared on the clipped elements themselves so var(--iris) resolves per element */
.frame, .shot {
  /* regular octagon, vertex up, radius var(--iris) around the box centre */
  --octagon: polygon(
    50% calc(50% - var(--iris)),
    calc(50% + var(--iris) * .7071) calc(50% - var(--iris) * .7071),
    calc(50% + var(--iris)) 50%,
    calc(50% + var(--iris) * .7071) calc(50% + var(--iris) * .7071),
    50% calc(50% + var(--iris)),
    calc(50% - var(--iris) * .7071) calc(50% + var(--iris) * .7071),
    calc(50% - var(--iris)) 50%,
    calc(50% - var(--iris) * .7071) calc(50% - var(--iris) * .7071));
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--stone);
  font-family: var(--font);
  font-weight: 300;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a { color: inherit; }
em { font-style: normal; color: var(--gold); }
h1, h2, p, ul, ol, figure, fieldset { margin: 0; padding: 0; }
ul, ol { list-style: none; }
fieldset { border: 0; min-width: 0; }

.wrap { width: min(1320px, 100%); margin-inline: auto; padding-inline: var(--pad); }

.eyebrow {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--gold);
}

.display {
  font-size: clamp(38px, 6.4vw, 104px);
  font-weight: 200;
  line-height: .98;
  letter-spacing: -.025em;
  margin-top: .5em;
}
.display--sm { font-size: clamp(34px, 4.6vw, 72px); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 30px;
  border: 1px solid var(--gold);
  border-radius: 999px;
  background: var(--gold);
  color: var(--ink);
  font: 500 13px/1 var(--font);
  letter-spacing: .2em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background .3s, color .3s, transform .3s var(--ease);
}
.btn:hover { background: var(--gold-hi); transform: translateY(-2px); }
.btn--ghost { background: rgba(12, 21, 36, .35); color: var(--stone); min-height: 44px; padding: 0 22px; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.btn--ghost:hover { background: var(--gold); color: var(--ink); }
.btn--block { width: 100%; }
:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 3px; }

/* ---------- nav ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 0 var(--pad);
  pointer-events: none;
  opacity: 0;
  transform: translateY(-16px);
  transition: opacity .9s .9s, transform .9s .9s var(--ease);
}
.is-ready .nav { opacity: 1; transform: none; }
.nav > * { pointer-events: auto; }
/* past the film the nav sits on a solid bar so it never fights the content under it */
.nav::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 72px;
  background: rgba(12, 21, 36, .86);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  opacity: 0;
  transition: opacity .4s;
  z-index: -1;
}
.nav.is-solid::before { opacity: 1; }
.nav.is-solid .nav__logo { background: none; box-shadow: none; }
.nav.is-solid .nav__links { padding-top: 14px; }

/* the logo hangs from the top edge on a navy plaque, so it always sits on a brand colour */
.nav__logo {
  display: block;
  background: var(--navy);
  transition: padding .4s var(--ease), background .4s, box-shadow .4s;
  padding: 18px 22px 16px;
  border-radius: 0 0 6px 6px;
  box-shadow: 0 12px 40px rgba(12, 21, 36, .35);
}
.nav__logo img { width: clamp(88px, 8.6vw, 128px); height: auto; transition: width .4s var(--ease); }
.nav.is-compact .nav__logo { padding: 10px 16px; }
.nav.is-compact .nav__logo img { width: 78px; }

.nav__links { display: flex; align-items: center; gap: clamp(16px, 2.4vw, 36px); padding-top: 22px; transition: padding .4s var(--ease); }
.nav__links a:not(.btn) {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .24em;
  text-transform: uppercase;
  text-decoration: none;
  text-shadow: 0 1px 14px rgba(12, 21, 36, .6);
  padding: 14px 0;
}
.nav__links a:not(.btn):hover { color: var(--gold-hi); }

/* ---------- scroll film ---------- */
.film { position: relative; height: 1040vh; background: var(--ink); }

.stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100lvh;
  overflow: hidden;
  background: var(--ink);
}

.stage__mark {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 96px;
  height: 96px;
  margin: -48px 0 0 -48px;
  animation: breathe 1.8s ease-in-out infinite;
}
.is-ready .stage__mark { animation: none; opacity: 0; transition: opacity .6s; }
@keyframes breathe { 50% { opacity: .35; transform: scale(.94); } }

.frame {
  position: absolute;
  inset: 0;
  overflow: hidden;
  transform: scale(var(--fs, 1));
  border-radius: var(--fr, 0px);
  clip-path: var(--octagon);
  transition: --iris 1.9s cubic-bezier(.76, 0, .18, 1);
  will-change: transform;
}
.is-ready .frame { --iris: 110vmax; }
.is-open .frame { clip-path: none; }

.frame .poster, .frame canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(12, 21, 36, .6) 0%, rgba(12, 21, 36, 0) 24%),
    linear-gradient(0deg, rgba(12, 21, 36, .5) 0%, rgba(12, 21, 36, 0) 16%);
}
/* heavier corner shading only while the hero headline is on screen */
.scrim::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: var(--hero, 1);
  background:
    radial-gradient(120% 90% at 0% 100%, rgba(12, 21, 36, .82) 0%, rgba(12, 21, 36, .46) 38%, rgba(12, 21, 36, 0) 70%),
    linear-gradient(0deg, rgba(12, 21, 36, .7) 0%, rgba(12, 21, 36, .16) 30%, rgba(12, 21, 36, 0) 52%);
}
.veil { position: absolute; inset: 0; background: var(--ink); opacity: var(--veil, 0); }

/* captions: position/opacity are driven from JS via --o and --y */
.cap {
  position: absolute;
  z-index: 2;
  opacity: var(--o, 0);
  transform: translate3d(0, var(--y, 0px), 0);
  visibility: hidden;
  will-change: opacity, transform;
}
.cap.is-live { visibility: visible; }

.cap--hero {
  left: var(--pad);
  right: var(--pad);
  bottom: calc(100lvh - 100svh + clamp(128px, 16vh, 172px));
}
.cap--hero .eyebrow { color: var(--gold-hi); text-shadow: 0 1px 16px rgba(12, 21, 36, .9); }
.cap--hero h1 {
  margin-top: .3em;
  font-size: clamp(46px, 9vw, 148px);
  font-weight: 200;
  line-height: .93;
  letter-spacing: -.03em;
}
/* hero lines rise once on load */
.is-loading .cap--hero .eyebrow, .is-loading .cap--hero h1 { opacity: 0; transform: translateY(40px); }
.cap--hero .eyebrow, .cap--hero h1 { transition: opacity 1.1s 1s, transform 1.3s 1s var(--ease); }
.cap--hero h1 { transition-delay: 1.15s; }

.cap--center, .cap--top {
  left: var(--pad);
  right: var(--pad);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(18px, 2.6vh, 32px);
}
.cap--center { top: 50%; translate: 0 -50%; }
/* soft navy pool behind mid-film lines so they hold on bright stone without dimming the whole picture */
.cap--center::before, .cap--top::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -70% -10%;
  background: radial-gradient(closest-side, rgba(12, 21, 36, .62) 0%, rgba(12, 21, 36, .34) 45%, rgba(12, 21, 36, 0) 100%);
  pointer-events: none;
}
.cap--center em, .cap--top em { color: var(--gold-hi); }
.cap--top { top: clamp(120px, 19vh, 220px); }

.big {
  font-size: clamp(40px, 7.6vw, 128px);
  font-weight: 200;
  line-height: .96;
  letter-spacing: -.03em;
  text-shadow: 0 2px 50px rgba(12, 21, 36, .55), 0 1px 3px rgba(12, 21, 36, .35);
}
.sub {
  font-size: clamp(13px, 1.25vw, 17px);
  font-weight: 400;
  letter-spacing: .3em;
  text-transform: uppercase;
  text-shadow: 0 1px 18px rgba(12, 21, 36, .8);
}
.cap--end .btn { pointer-events: auto; }
.cap:not(.is-live) .btn { pointer-events: none; }

.cue {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: calc(100lvh - 100svh + 18px);
  translate: -50% 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 11px;
  padding: 6px 14px;
  background: none;
  border: 0;
  color: var(--stone);
  font: 500 12px/1 var(--font);
  letter-spacing: .3em;
  text-transform: uppercase;
  text-shadow: 0 1px 14px rgba(12, 21, 36, .95), 0 0 2px rgba(12, 21, 36, .6);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: opacity .35s, visibility 0s .35s;
}
.cue.is-on { opacity: 1; visibility: visible; transition: opacity .7s; }
.cue > span:first-child { padding-left: .3em; }   /* balance the trailing letter-space */
.cue__arrow {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(12, 21, 36, .6);
  border: 1px solid rgba(207, 154, 55, .75);
  color: var(--gold-hi);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background .3s, color .3s;
}
.cue:hover .cue__arrow { background: var(--gold); color: var(--ink); }
.cue__arrow svg { animation: nudge 1.6s ease-in-out infinite; }
@keyframes nudge { 0%, 100% { transform: translateY(-3px); } 50% { transform: translateY(3px); } }

.rail {
  position: absolute;
  right: var(--pad);
  bottom: calc(100lvh - 100svh + 30px);
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--mute);
  opacity: 0;
  transition: opacity .9s 1.4s;
}
.is-ready .rail { opacity: 1; }
.rail__bar { width: clamp(70px, 10vw, 160px); height: 1px; background: rgba(244, 241, 236, .25); }
.rail__bar i { display: block; height: 100%; background: var(--gold); transform-origin: left; transform: scaleX(var(--p, 0)); }

/* ---------- facts ---------- */
.facts {
  position: relative;
  padding: clamp(96px, 16vh, 200px) 0 clamp(80px, 12vh, 160px);
  background: var(--navy);
  isolation: isolate;
}
.facts::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: url(../assets/img/icon-gold.svg) 0 0 / 132px 132px;
  opacity: .045;
  mask-image: linear-gradient(120deg, transparent 20%, #000 100%);
  -webkit-mask-image: linear-gradient(120deg, transparent 20%, #000 100%);
}

.facts__list { margin-top: clamp(56px, 9vh, 120px); border-top: 1px solid var(--line); }
.facts__list li {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  align-items: baseline;
  gap: 8px 40px;
  padding: clamp(22px, 3.4vh, 40px) 0;
  border-bottom: 1px solid var(--line);
}
.facts__word {
  font-size: clamp(40px, 7.4vw, 118px);
  font-weight: 200;
  line-height: 1;
  letter-spacing: -.03em;
  color: var(--gold);
}
.facts__line { font-size: clamp(16px, 1.5vw, 21px); color: var(--mute); max-width: 30ch; }

/* ---------- install steps ---------- */
.steps { position: relative; height: 430vh; background: var(--ink); }
.steps__stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100lvh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(24px, 5vw, 96px);
  padding: clamp(96px, 12vh, 140px) var(--pad) clamp(32px, 6vh, 72px);
  overflow: hidden;
}
.steps__list { margin-top: clamp(28px, 5vh, 64px); }
.steps__list li {
  display: grid;
  grid-template-columns: 44px auto 1fr;
  align-items: baseline;
  gap: 0 18px;
  padding: clamp(12px, 1.9vh, 20px) 0;
  border-top: 1px solid rgba(244, 241, 236, .12);
  color: rgba(244, 241, 236, .34);
  transition: color .5s;
}
.steps__list b { font-size: 12px; font-weight: 500; letter-spacing: .2em; }
.steps__list span { font-size: clamp(26px, 3vw, 46px); font-weight: 200; letter-spacing: -.02em; line-height: 1.1; }
.steps__list small { font-size: 15px; justify-self: end; text-align: right; opacity: 0; transform: translateX(-12px); transition: opacity .5s, transform .5s var(--ease); }
.steps__list li.is-on { color: var(--stone); }
.steps__list li.is-on b { color: var(--gold); }
.steps__list li.is-on small { opacity: .7; transform: none; }

.steps__media {
  position: relative;
  height: 100%;
  max-height: 78vh;
  aspect-ratio: 4 / 5;
  justify-self: center;
  border-radius: 4px;
  overflow: hidden;
  background: var(--navy);
}
.shot { position: absolute; inset: 0; overflow: hidden; clip-path: var(--octagon); }
.shot:first-child { clip-path: none; }
.shot img { width: 100%; height: 100%; object-fit: cover; transform: scale(var(--z, 1.2)); will-change: transform; }

/* ---------- surfaces marquee ---------- */
.surfaces { padding: clamp(70px, 12vh, 150px) 0; background: var(--navy); overflow: hidden; }
.marquee {
  display: flex;
  align-items: center;
  gap: clamp(22px, 3vw, 48px);
  width: max-content;
  white-space: nowrap;
  font-size: clamp(48px, 9.6vw, 156px);
  font-weight: 200;
  line-height: 1.08;
  letter-spacing: -.03em;
  transform: translate3d(var(--x, 0px), 0, 0);
  will-change: transform;
}
.marquee i { width: .16em; height: .16em; background: var(--gold); rotate: 45deg; flex: none; }
.marquee--line { color: transparent; -webkit-text-stroke: 1px var(--gold); margin-left: -30vw; }

/* ---------- quote ---------- */
.quote { position: relative; padding: clamp(110px, 18vh, 220px) 0 clamp(90px, 14vh, 180px); overflow: hidden; isolation: isolate; }
.quote__bg { position: absolute; inset: 0; z-index: -1; }
.quote__bg img { width: 100%; height: 100%; object-fit: cover; transform: scale(var(--z, 1.3)); will-change: transform; }
.quote__bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(12, 21, 36, .93) 0%, rgba(12, 21, 36, .78) 55%, rgba(12, 21, 36, .6) 100%); }
.quote__grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(40px, 7vw, 120px); align-items: end; }

.form { display: grid; gap: 22px; padding: clamp(24px, 3vw, 44px); background: rgba(23, 36, 58, .82); border: 1px solid var(--line); border-radius: 6px; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.form label > span, .form legend { display: block; font-size: 11px; font-weight: 500; letter-spacing: .26em; text-transform: uppercase; color: var(--mute); }
.form input[type="text"], .form input[type="tel"] {
  width: 100%;
  margin-top: 6px;
  padding: 10px 0 12px;
  background: none;
  border: 0;
  border-bottom: 1px solid rgba(244, 241, 236, .3);
  border-radius: 0;
  color: var(--stone);
  font: 300 20px/1.3 var(--font);
  transition: border-color .3s;
}
.form input:focus { outline: 0; border-color: var(--gold); }
.form input.is-bad { border-color: #e2725b; }
.form fieldset { display: flex; flex-wrap: wrap; gap: 10px; }
.form legend { margin-bottom: 12px; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; inset: 0; }
.chip span { display: block; padding: 11px 18px; border: 1px solid rgba(244, 241, 236, .3); border-radius: 999px; font-size: 14px; letter-spacing: .04em; text-transform: none; color: var(--stone); transition: background .25s, border-color .25s, color .25s; }
.chip input:checked + span { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.chip input:focus-visible + span { outline: 2px solid var(--gold-hi); outline-offset: 3px; }
.form__note { min-height: 1.4em; font-size: 14px; color: var(--gold-hi); }

/* ---------- footer ---------- */
.foot { display: flex; flex-direction: column; align-items: center; gap: 28px; padding: clamp(64px, 10vh, 120px) var(--pad) 40px; background: var(--navy); text-align: center; }
.foot img { width: 170px; height: auto; }
.foot p { font-size: 11px; letter-spacing: .26em; text-transform: uppercase; color: var(--mute); }

/* ---------- reveal ---------- */
[data-reveal] { opacity: 0; transform: translateY(36px); transition: opacity 1s var(--ease), transform 1.2s var(--ease); }
[data-reveal].in { opacity: 1; transform: none; }
.facts__list li:nth-child(2) { transition-delay: .06s; }
.facts__list li:nth-child(3) { transition-delay: .12s; }
.facts__list li:nth-child(4) { transition-delay: .18s; }

/* ---------- small screens ---------- */
@media (max-width: 820px) {
  .nav__links a:not(.btn) { display: none; }
  .nav__links { padding-top: 16px; }
  .nav__logo { padding: 14px 16px 12px; }
  .cap--hero { bottom: calc(100lvh - 100svh + 134px); }
  .cap--top { top: clamp(128px, 20vh, 190px); }
  .sub { font-size: 11px; letter-spacing: .2em; white-space: nowrap; }
  .rail__chapter { display: none; }

  .facts__list li { grid-template-columns: 1fr; }

  .steps { height: 400vh; }
  .steps__stage { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); align-items: start; gap: 18px; padding-top: 104px; padding-bottom: calc(100lvh - 100svh + 20px); }
  .steps__text .display { display: none; }
  .steps__list { margin-top: 14px; }
  .steps__list li { padding: 8px 0; grid-template-columns: 34px auto 1fr; }
  .steps__list span { font-size: 24px; }
  .steps__list small { font-size: 13px; }
  .steps__media { width: 100%; height: 100%; max-height: none; aspect-ratio: auto; }

  .quote__grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .frame { transition: none; }
  .stage__mark, .cue__arrow svg { animation: none; }
  [data-reveal] { transition: none; opacity: 1; transform: none; }
  .cap--hero .eyebrow, .cap--hero h1, .nav, .rail { transition: none; }
}
