:root {
  color-scheme: dark;
  --black: #040302;
  --paper: #f7eddd;
  --vsl-thumb: image-set(
    url("./assets/vsl-thumbnail.avif") type("image/avif"),
    url("./assets/vsl-thumbnail.webp") type("image/webp"),
    url("./assets/vsl-thumbnail.jpg") type("image/jpeg")
  );
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--black);
}

body {
  margin: 0;
  min-height: 100svh;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 239, 196, 0.028), transparent 30%),
    radial-gradient(ellipse 90% 42% at 50% -8%, rgba(215, 179, 111, 0.16), rgba(91, 58, 24, 0.05) 43%, transparent 73%),
    radial-gradient(ellipse 86% 42% at 50% 104%, rgba(133, 86, 35, 0.11), transparent 68%),
    linear-gradient(180deg, #050403 0%, #080503 46%, #020201 100%);
  color: var(--paper);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.is-unlocked {
  overflow-y: auto;
}

body::before {
  position: fixed;
  inset: 0;
  pointer-events: none;
  content: "";
  opacity: 0.2;
  background:
    linear-gradient(180deg, rgba(255, 248, 235, 0.024), transparent 22%, rgba(0, 0, 0, 0.28)),
    repeating-linear-gradient(96deg, rgba(255, 255, 255, 0.014) 0 1px, transparent 1px 11px),
    radial-gradient(ellipse 74% 68% at 50% 40%, transparent 0%, rgba(0, 0, 0, 0.58) 82%);
}

a,
button {
  -webkit-tap-highlight-color: transparent;
}

.watch-page {
  position: relative;
  z-index: 1;
  width: min(390px, 100%);
  height: 100svh;
  margin: 0 auto;
  padding: clamp(17px, 2.3svh, 22px) 22px clamp(14px, 2svh, 18px);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

body.is-unlocked .watch-page {
  min-height: 100svh;
  height: auto;
  padding-bottom: 28px;
}

.brand {
  margin: 0 0 14px;
  color: rgba(215, 179, 111, 0.9);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.64rem;
  letter-spacing: 0.44em;
  line-height: 1;
}

.copy {
  width: 100%;
  margin: 0 0 4px;
}

h1 {
  max-width: 312px;
  margin: 0 auto;
  color: #fff7e9;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 9.7vw, 2.7rem);
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.05;
  text-wrap: balance;
}

.loop {
  max-width: 310px;
  margin: 0 auto 28px;
  color: #c29b57;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(0.86rem, 3.45vw, 0.98rem);
  font-weight: 400;
  line-height: 1.28;
  opacity: 0.92;
  text-align: center;
  text-shadow: 0 0 12px rgba(194,155,87,.08);
  text-wrap: balance;
}

.vsl-frame {
  position: relative;
  align-self: center;
  width: min(70vw, 284px);
  max-width: 100%;
  overflow: hidden;
  aspect-ratio: 9 / 16;
  border-radius: 19px;
  transform: translateY(-6px);
  background:
    radial-gradient(ellipse at 50% 12%, rgba(215, 179, 111, 0.12), transparent 42%),
    linear-gradient(180deg, rgba(20, 13, 7, 0.46), rgba(5, 3, 2, 0.92)),
    #050302;
  isolation: isolate;
  contain: paint;
  box-shadow:
    0 24px 68px rgba(0, 0, 0, 0.64),
    0 10px 22px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(247, 237, 221, 0.042),
    0 0 32px rgba(215, 179, 111, 0.035);
}

.vsl-frame::before,
.vsl-frame::after {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
}

.vsl-frame::before {
  z-index: 2;
  border-radius: inherit;
  background:
    linear-gradient(145deg, rgba(255, 248, 235, 0.12), transparent 24%, transparent 74%, rgba(215, 179, 111, 0.08)),
    linear-gradient(180deg, rgba(255, 248, 235, 0.035), transparent 18%, rgba(0, 0, 0, 0.2));
  opacity: 0.56;
}

.vsl-frame::after {
  z-index: 3;
  border-radius: inherit;
  box-shadow:
    0 0 52px rgba(0, 0, 0, 0.34) inset,
    0 0 1px rgba(255, 248, 235, 0.08) inset;
  opacity: 0.92;
}

.vsl-poster,
.vsl-frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.vsl-frame iframe {
  position: absolute;
  inset: 0;
  z-index: 1;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  filter: saturate(0.92) brightness(0.9) contrast(1.02);
  transition:
    opacity 420ms ease,
    visibility 420ms ease,
    filter 420ms ease;
}

.vsl-frame.is-playing iframe {
  visibility: visible;
  opacity: 1;
  filter: none;
}

.vsl-poster {
  position: absolute;
  inset: 0;
  z-index: 4;
  padding: 0;
  border: 0;
  cursor: pointer;
  background:
    linear-gradient(180deg, rgba(255, 248, 235, 0.035), transparent 28%, rgba(3, 2, 1, 0.5) 100%),
    var(--vsl-thumb) center / cover no-repeat,
    #050302;
  filter: brightness(1.04);
  transition:
    opacity 460ms ease,
    visibility 460ms ease;
  will-change: opacity;
}

.vsl-poster::before {
  position: absolute;
  inset: 0;
  z-index: 0;
  content: "";
  background:
    radial-gradient(ellipse 66% 36% at 50% 18%, rgba(255, 248, 235, 0.06), transparent 68%),
    radial-gradient(ellipse 80% 36% at 50% 86%, rgba(0, 0, 0, 0.58), transparent 72%),
    linear-gradient(180deg, rgba(255, 248, 235, 0.018), transparent 36%, rgba(0, 0, 0, 0.12));
}

.vsl-frame.is-playing .vsl-poster {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.play {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 1;
  width: 56px;
  height: 56px;
  border: 1px solid rgba(247, 237, 221, 0.22);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 32%, rgba(255, 248, 235, 0.065), transparent 48%),
    rgba(12, 9, 6, 0.24);
  box-shadow:
    0 12px 30px rgba(0, 0, 0, 0.44),
    0 0 18px rgba(215, 179, 111, 0.052),
    0 1px 0 rgba(255, 248, 235, 0.08) inset;
  transform: translate(-50%, -50%);
  -webkit-backdrop-filter: blur(12px) saturate(1.05);
  backdrop-filter: blur(12px) saturate(1.05);
}

.play::before {
  position: absolute;
  top: 50%;
  left: 53.5%;
  width: 0;
  height: 0;
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
  border-left: 14px solid rgba(236, 226, 207, 0.62);
  content: "";
  transform: translate(-38%, -50%);
}

.reflection {
  margin: 22px 0 0;
  color: rgba(255, 248, 235, 0.86);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.08rem, 4.5vw, 1.28rem);
  letter-spacing: 0;
  line-height: 1.18;
  text-align: center;
}

.reflection span {
  color: rgba(247, 237, 221, 0.58);
}

.cta {
  display: none;
  width: 100%;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  margin-top: auto;
  border: 1px solid rgba(215, 179, 111, 0.34);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 248, 235, 0.035), transparent 100%),
    rgba(215, 179, 111, 0.055);
  color: rgba(255, 248, 235, 0.9);
  font-size: 0.9rem;
  font-weight: 560;
  letter-spacing: 0;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition:
    opacity 620ms cubic-bezier(0.19, 1, 0.22, 1),
    visibility 180ms ease,
    background 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 620ms cubic-bezier(0.19, 1, 0.22, 1),
    filter 620ms cubic-bezier(0.19, 1, 0.22, 1);
  opacity: 0;
  filter: blur(4px);
  transform: translateY(8px);
  will-change: opacity, transform, filter;
}

.cta.is-visible {
  display: inline-flex;
  opacity: 1;
  box-shadow:
    0 0 25px rgba(215, 179, 111, 0.052),
    0 1px 0 rgba(255, 248, 235, 0.045) inset;
  filter: blur(0);
  transform: translateY(0);
  animation: ctaReveal 620ms cubic-bezier(0.19, 1, 0.22, 1) both;
}

body.is-unlocked .cta.is-visible {
  margin-top: 42px;
}

.cta.is-visible:hover {
  border-color: rgba(215, 179, 111, 0.5);
  background:
    linear-gradient(180deg, rgba(255, 248, 235, 0.045), transparent 100%),
    rgba(215, 179, 111, 0.085);
  transform: translateY(-1px);
}

.access-panel {
  position: relative;
  display: none;
  width: 100%;
  max-width: 318px;
  margin: 14px auto 0;
  padding: 11px 4px 10px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 248, 235, 0.008), transparent 36%),
    radial-gradient(ellipse 58% 34% at 50% 0%, rgba(215, 179, 111, 0.026), transparent 80%);
  box-shadow: 0 -10px 28px rgba(215, 179, 111, 0.012);
  opacity: 0;
  transform: translateY(8px);
  will-change: opacity, transform;
}

.access-panel.is-visible {
  display: block;
  animation: panelReveal 780ms cubic-bezier(0.19, 1, 0.22, 1) 140ms both;
}

.access-panel::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  opacity: 0.06;
  background:
    repeating-linear-gradient(104deg, rgba(255, 248, 235, 0.024) 0 1px, transparent 1px 15px),
    linear-gradient(90deg, transparent, rgba(255, 248, 235, 0.012), transparent);
}

.access-label {
  position: relative;
  margin: 0 0 5px;
  color: rgba(215, 179, 111, 0.5);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.28em;
  line-height: 1;
}

.access-panel h2 {
  position: relative;
  max-width: 226px;
  margin: 0 auto;
  color: rgba(255, 248, 235, 0.79);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.01rem, 4.32vw, 1.14rem);
  font-weight: 400;
  line-height: 1.2;
  text-wrap: balance;
}

.access-copy {
  position: relative;
  max-width: 262px;
  margin: 9px auto 0;
  color: rgba(247, 237, 221, 0.52);
  font-size: 0;
  line-height: 1.32;
}

.access-meta {
  display: block;
  margin: 0 auto;
  color: rgba(215, 179, 111, 0.54);
  font-size: 0.7rem;
  font-weight: 430;
  letter-spacing: 0.035em;
  line-height: 1.2;
  white-space: nowrap;
}

.access-continuation {
  display: block;
  max-width: 252px;
  margin: 9px auto 0;
  color: rgba(247, 237, 221, 0.72);
  font-size: 0.86rem;
  font-weight: 390;
  line-height: 1.5;
}

.access-price {
  position: relative;
  margin: 8px 0 0;
  color: rgba(255, 247, 233, 0.52);
  font-size: clamp(0.92rem, 4vw, 1.04rem);
  font-weight: 430;
  letter-spacing: 0.02em;
  line-height: 1;
}

.access-security {
  position: relative;
  margin: 2px 0 0;
  color: rgba(247, 237, 221, 0.32);
  font-size: 0.64rem;
  font-weight: 380;
  line-height: 1.28;
}

.cta:focus-visible,
.vsl-poster:focus-visible {
  outline: 2px solid rgba(255, 248, 235, 0.72);
  outline-offset: 4px;
}

@media (max-height: 760px) {
  .watch-page {
    padding-top: 14px;
    padding-bottom: 14px;
  }

  .brand {
    margin-bottom: 9px;
  }

  .copy {
    margin-bottom: 2px;
  }

  h1 {
    font-size: clamp(1.82rem, 8.8vw, 2.45rem);
  }

  .loop {
    margin-bottom: 22px;
    font-size: 0.83rem;
  }

  .vsl-frame {
    width: min(61vw, 236px);
    border-radius: 14px;
    transform: translateY(-6px);
  }

  .reflection {
    margin: 15px 0 0;
    font-size: 1rem;
  }

  .cta {
    min-height: 42px;
    font-size: 0.84rem;
  }

  body.is-unlocked .cta.is-visible {
    margin-top: 34px;
  }

  .access-panel {
    margin-top: 12px;
    padding-top: 10px;
    padding-bottom: 9px;
  }

  .access-panel h2 {
    font-size: 0.96rem;
  }

  .access-copy {
    margin-top: 8px;
    line-height: 1.3;
  }

  .access-meta {
    font-size: 0.62rem;
    letter-spacing: 0.025em;
  }

  .access-continuation {
    margin-top: 7px;
    font-size: 0.8rem;
    line-height: 1.46;
  }

  .access-price {
    margin-top: 7px;
    font-size: 0.9rem;
  }
}

@keyframes ctaReveal {
  from {
    opacity: 0;
    filter: blur(4px);
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
  }
}

@keyframes panelReveal {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (min-width: 720px) {
  .watch-page {
    padding-top: 24px;
    padding-bottom: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 1ms !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
  }
}
