/* ==========================================================================
   OPAL — Custom Nail Studio
   Ported from the Claude Design source OPAL.dc.html.

   Two knobs were props in the design document and are custom properties here:
     --accent   brand accent (design options: #A8BBD6 #7E96BC #485671 #C9B79A)
     --pin      scroll distance the pinned hero spends on each of its 3 screens
   ========================================================================== */

:root {
  --ink: #05080F;
  --ink-scrim: #04070D;
  --accent: #A8BBD6;
  --accent-mid: #7E96BC;
  --accent-deep: #485671;
  --serif: 'Bodoni Moda', 'Times New Roman', serif;
  --sans: 'Space Grotesk', 'Helvetica Neue', Helvetica, sans-serif;
  --gutter: max(24px, 4vw);
  --pin: 150vh;
  --ease-out: cubic-bezier(0.16, 0.84, 0.24, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  background: var(--ink);
}

body {
  margin: 0;
  background: var(--ink);
  color: #FFFFFF;
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-wrap: pretty;
  /* html keeps overflow:visible, so this propagates to the viewport and leaves
     position:sticky on the hero stage intact. */
  overflow-x: hidden;
}

a { color: #FFFFFF; text-decoration: none; }
::selection { background: var(--accent); color: var(--ink); }

.accent { color: var(--accent); }

/* --------------------------------------------------------------------------
   Keyframes
   -------------------------------------------------------------------------- */

@keyframes opalSheen {
  0%        { background-position: 210% 0; }
  60%, 100% { background-position: -110% 0; }
}

@keyframes opalDriftA {
  0%, 100% { transform: translate3d(-4%, 2%, 0) scale(1); }
  50%      { transform: translate3d(9%, -7%, 0) scale(1.18); }
}

@keyframes opalDriftB {
  0%, 100% { transform: translate3d(6%, -3%, 0) scale(1.12); }
  50%      { transform: translate3d(-7%, 6%, 0) scale(0.92); }
}

@keyframes opalBolt {
  0%, 86%, 100% { opacity: 0; }
  87%           { opacity: 0.95; }
  88.5%         { opacity: 0.1; }
  90%           { opacity: 0.7; }
  93%           { opacity: 0; }
}

/* --------------------------------------------------------------------------
   Film grain / scanlines
   -------------------------------------------------------------------------- */

.scanlines {
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  opacity: 0.28;
  background: repeating-linear-gradient(0deg,
    rgba(255, 255, 255, 0.022) 0px,
    rgba(255, 255, 255, 0.022) 1px,
    rgba(0, 0, 0, 0) 1px,
    rgba(0, 0, 0, 0) 3px);
}

/* --------------------------------------------------------------------------
   Nav — hidden until the first screen has been scrolled past
   -------------------------------------------------------------------------- */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 70;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  padding: 22px var(--gutter);
  background: linear-gradient(180deg, rgba(5, 8, 15, 0.72) 0%, rgba(5, 8, 15, 0) 100%);
  opacity: 0;
  transform: translateY(-101%);
  pointer-events: none;
  /* visibility keeps the offscreen links out of the tab order */
  visibility: hidden;
  transition:
    transform 620ms var(--ease-out),
    opacity 420ms linear,
    visibility 0s linear 620ms;
}

.nav.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  visibility: visible;
  transition:
    transform 620ms var(--ease-out),
    opacity 420ms linear,
    visibility 0s;
}

.nav__brand {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0.42em;
  padding-left: 0.42em;
}

.nav__brand,
.nav__brand:hover { color: #FFFFFF; }

.nav__links {
  display: flex;
  align-items: center;
  gap: 40px;
}

.nav__link {
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.62);
  transition: color 400ms linear;
}

.nav__link.is-active { color: var(--accent); }

.nav__cta {
  display: flex;
  justify-content: flex-end;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding: 20px 38px;
  background-image: linear-gradient(100deg,
    #FFFFFF 0%, #FFFFFF 26%, #FFFFFF 44%,
    #D8E2EF 56%,
    #FFFFFF 74%, #FFFFFF 100%);
  background-size: 280% 100%;
  background-position: 100% 0;
  transition: background-position 900ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.btn,
.btn:hover { color: var(--ink); }

.btn:hover { background-position: 0% 0; }

.btn--sm { padding: 14px 26px; font-size: 11px; }
.btn--wide { padding: 20px 40px; }

.btn--ghost {
  font-weight: 400;
  padding: 19px 34px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  background-image: none;
  transition: border-color 400ms, background-color 400ms;
}

.btn--ghost,
.btn--ghost:hover { color: #FFFFFF; }

.btn--ghost:hover {
  border-color: #FFFFFF;
  background-color: rgba(255, 255, 255, 0.08);
}

.actions {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}

.actions--tight { gap: 16px; }

/* --------------------------------------------------------------------------
   Type
   -------------------------------------------------------------------------- */

.eyebrow {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0 0 26px;
  font-size: 10px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
}

.eyebrow__rule {
  display: block;
  flex: none;
  width: 56px;
  height: 1px;
  background: currentColor;
}

.lede {
  margin: 0 0 0.14em;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(20px, 2.3vw, 38px);
  line-height: 1.15;
  color: rgba(255, 255, 255, 0.9);
}

.display {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(58px, 14.6vw, 290px);
  line-height: 0.82;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: #FFFFFF;
}

.display--hero {
  font-size: clamp(52px, 12.2vw, 236px);
  margin-bottom: 5vh;
}

/* --------------------------------------------------------------------------
   Hero — one continuous take, three captions crossfading over it
   -------------------------------------------------------------------------- */

.flow {
  position: relative;
  height: calc(100vh + 3 * var(--pin));
}

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

.flow__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 42%;
  background: var(--ink);
  transform: scale(1.02);
  filter: contrast(1.06) saturate(1.05);
}

.flow__vignette,
.flow__scrim {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.flow__vignette {
  background: radial-gradient(120% 90% at 50% 30%,
    rgba(5, 8, 15, 0) 0%,
    rgba(5, 8, 15, 0.34) 62%,
    rgba(5, 8, 15, 0.78) 100%);
}

.flow__scrim {
  background: linear-gradient(0deg,
    rgba(4, 7, 13, 0.94) 0%,
    rgba(4, 7, 13, 0.82) 26%,
    rgba(4, 7, 13, 0.34) 56%,
    rgba(4, 7, 13, 0) 78%);
}

.stage-meta {
  position: absolute;
  top: 26px;
  z-index: 4;
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  line-height: 1.9;
}

.stage-meta--tl {
  left: var(--gutter);
  color: rgba(255, 255, 255, 0.72);
}

.stage-meta--tr {
  right: var(--gutter);
  text-align: right;
}

.stage-counter {
  position: absolute;
  right: var(--gutter);
  bottom: 26px;
  z-index: 4;
  font-family: var(--serif);
  font-size: 12px;
  letter-spacing: 0.34em;
  color: rgba(255, 255, 255, 0.6);
}

.seq {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 132px var(--gutter) 7vh;
}

/* Screens two and three start hidden and are faded in by the scroll loop.
   The stacked-hero block below reverses this with the same selector, so the
   two rules can never lose a specificity race to each other. */
.seq[data-seq="1"],
.seq[data-seq="2"] {
  opacity: 0;
  pointer-events: none;
}

.seq__wrap { width: 100%; }
.seq__wrap[data-align="right"] { text-align: right; }

/* --------------------------------------------------------------------------
   Studio
   -------------------------------------------------------------------------- */

.rest {
  position: relative;
  z-index: 2;
  background: linear-gradient(180deg,
    #08101D 0%, #111E33 16%, #0B1322 58%, #070B14 82%, var(--ink) 100%);
}

.studio {
  position: relative;
  overflow: hidden;
  padding: 14vh var(--gutter) 0;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.studio__head {
  position: relative;
  isolation: isolate;
  max-width: 1600px;
}

.studio__head .eyebrow { margin-bottom: 5vh; }

.studio__blob {
  position: absolute;
  z-index: -1;
  pointer-events: none;
  border-radius: 50%;
}

.studio__blob--a {
  top: -30vh;
  left: -10vw;
  width: 54vw;
  height: 54vw;
  max-height: 820px;
  filter: blur(90px);
  opacity: 0.55;
  background: radial-gradient(circle at 50% 50%,
    color-mix(in srgb, var(--accent) 55%, transparent) 0%,
    color-mix(in srgb, var(--accent-deep) 30%, transparent) 46%,
    rgba(5, 8, 15, 0) 72%);
  animation: opalDriftA 17s ease-in-out infinite;
}

.studio__blob--b {
  top: 2vh;
  right: -8vw;
  width: 42vw;
  height: 42vw;
  max-height: 660px;
  filter: blur(100px);
  opacity: 0.45;
  background: radial-gradient(circle at 50% 50%,
    color-mix(in srgb, var(--accent-mid) 52%, transparent) 0%,
    rgba(17, 30, 51, 0.3) 50%,
    rgba(5, 8, 15, 0) 74%);
  animation: opalDriftB 23s ease-in-out infinite;
}

.studio__bolt {
  position: absolute;
  z-index: -1;
  pointer-events: none;
  opacity: 0;
}

.studio__bolt--a {
  top: -34vh;
  left: 34%;
  width: 2px;
  height: 96vh;
  transform: rotate(10deg);
  filter: blur(1.6px);
  background: linear-gradient(180deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.95) 20%,
    color-mix(in srgb, var(--accent) 70%, transparent) 56%,
    rgba(255, 255, 255, 0) 100%);
  animation: opalBolt 9s linear infinite;
}

.studio__bolt--b {
  top: -34vh;
  right: 22%;
  width: 1px;
  height: 74vh;
  transform: rotate(-7deg);
  filter: blur(1.4px);
  background: linear-gradient(180deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.8) 30%,
    color-mix(in srgb, var(--accent) 55%, transparent) 64%,
    rgba(255, 255, 255, 0) 100%);
  animation: opalBolt 9s linear 3.4s infinite;
}

.studio__title {
  margin: 0 0 6vh;
  font-family: var(--serif);
  font-weight: 200;
  font-size: clamp(56px, 12.2vw, 244px);
  line-height: 0.97;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  text-align: right;
  color: #FFFFFF;
  background-image: linear-gradient(100deg,
    #FFFFFF 0%, #FFFFFF 36%, #FFFFFF 45%,
    var(--accent) 51%,
    #FFFFFF 57%, #FFFFFF 66%, #FFFFFF 100%);
  background-size: 260% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: opalSheen 7.5s cubic-bezier(0.45, 0, 0.2, 1) infinite;
}

.studio__grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 6vw;
  align-items: start;
  padding-bottom: 14vh;
}

.studio__copy {
  margin: 0 0 6vh;
  max-width: 38ch;
  font-size: clamp(16px, 1.3vw, 23px);
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.72);
}

.facts {
  display: grid;
  gap: 4vh;
  margin: 0;
}

.fact {
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  padding-top: 20px;
}

.fact__label {
  margin-bottom: 14px;
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
}

.fact__value {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(22px, 2.5vw, 44px);
  line-height: 1.12;
  color: #FFFFFF;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.footer {
  position: relative;
  overflow: hidden;
  padding: 10vh var(--gutter) 4vh;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.footer__wordmark {
  margin: 0 0 4vh;
  font-family: var(--serif);
  font-weight: 100;
  font-size: 22.4vw;
  line-height: 0.76;
  letter-spacing: -0.01em;
  white-space: nowrap;
  text-shadow: 0 0 120px color-mix(in srgb, var(--accent) 45%, transparent);
}

.footer__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  flex-wrap: wrap;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  padding-top: 28px;
}

.footer__social {
  display: flex;
  align-items: center;
  gap: 32px;
}

.footer__link {
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.66);
  transition: color 300ms linear;
}

.footer__link:hover { color: #FFFFFF; }

.footer__meta {
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.42);
}

/* --------------------------------------------------------------------------
   Reveals

   The hidden state is applied by JS and only to blocks still below the fold,
   so a dead script leaves the copy visible rather than blank.
   -------------------------------------------------------------------------- */

.reveal.is-hidden {
  opacity: 0;
  transform: translate3d(0, 42px, 0);
}

.reveal.is-hidden.is-revealed {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  transition:
    opacity 900ms var(--ease-out),
    transform 1100ms var(--ease-out);
}

/* --------------------------------------------------------------------------
   Stacked hero

   Narrow viewports and reduced-motion both drop the pin: the three screens
   become three stacked blocks over a single held frame.
   -------------------------------------------------------------------------- */

@media (max-width: 860px), (prefers-reduced-motion: reduce) {
  .flow { height: auto; }

  .flow__stage {
    position: relative;
    height: auto;
    padding-top: 12vh;
  }

  .seq {
    position: relative;
    inset: auto;
    padding: 0 max(24px, 6vw) 10vh;
  }

  /* Mirrors the hidden rule above — same selector, so it always wins here. */
  .seq[data-seq="1"],
  .seq[data-seq="2"] {
    opacity: 1;
    pointer-events: auto;
  }

  .seq__wrap[data-align="right"] { text-align: left; }

  .flow__scrim {
    background: linear-gradient(0deg,
      rgba(4, 7, 13, 0.94) 0%,
      rgba(4, 7, 13, 0.86) 60%,
      rgba(4, 7, 13, 0.7) 100%);
  }
}

@media (max-width: 860px) {
  .studio__grid { grid-template-columns: 1fr; }
  .footer__wordmark { font-size: 26vw; }
}

@media (prefers-reduced-motion: reduce) {
  .studio__title {
    animation: none;
    background-image: none;
    -webkit-text-fill-color: #FFFFFF;
  }

  .studio__blob,
  .studio__bolt { animation: none; }

  .nav,
  .nav.is-visible,
  .btn,
  .btn--ghost,
  .nav__link,
  .footer__link,
  .reveal.is-hidden.is-revealed { transition: none; }
}
