:root {
  --bg: #000;
  --ink: #fff;
  --mute: #9c9c9c;
  --neon: #39ff14;
  --sans: "Inter Tight", "Segoe UI", system-ui, sans-serif;
  --gutter: clamp(16px, 3.4vw, 48px);
  --ease: cubic-bezier(.65, 0, .2, 1);
  --head: clamp(120px, 25vh, 250px);

  --w: min(46vw, calc((100vh - var(--head) - 100px - 104px) * 1.7778));
  --h: calc(var(--w) * .5625);
  --r: calc(var(--w) * .86);
}

@supports (height: 100svh) {
  :root { --w: min(46vw, calc((100svh - var(--head) - 100px - 104px) * 1.7778)); }
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 15px/1.45 var(--sans); -webkit-font-smoothing: antialiased; overflow: hidden; }
h1, p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--neon); outline-offset: 3px; }

.page { position: relative; height: 100vh; height: 100svh; display: flex; flex-direction: column; }

/* Title */
.head { flex: none; height: var(--head); padding: 0 var(--gutter); display: flex; flex-direction: column; align-items: flex-end; justify-content: center; text-align: right; }
.for { font-size: 13px; color: var(--mute); }
.for b { font-weight: 500; color: var(--neon); }
h1 {
  font: 700 clamp(72px, 18.5vh, 200px)/.98 var(--sans);
  letter-spacing: -.01em;
  white-space: nowrap;
  color: var(--neon);
  text-shadow: 0 0 34px rgba(57, 255, 20, .38);
  animation: rise 1.1s cubic-bezier(.16, 1, .3, 1) both;
}
@keyframes rise {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: none; }
}

/* The three commercials on one axis */
.stage { position: relative; flex: 1; min-height: 0; overflow: hidden; perspective: calc(var(--w) * 2.6); }
.ring { position: absolute; inset: 0; transform-style: preserve-3d; }
@keyframes enter { from { opacity: 0; } to { opacity: 1; } }

.card {
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--w);
  height: var(--h);
  margin: calc(var(--h) / -2) 0 0 calc(var(--w) / -2);
  cursor: pointer;
  transform: translateZ(calc(var(--r) * -1)) rotateY(var(--a)) translateZ(var(--r)) rotateY(calc(var(--a) * -1)) rotateY(var(--tilt));
  transition: transform 1.15s var(--ease);
  will-change: transform;
  animation: enter 1.4s ease .3s both;
}
.card.no-anim { transition: none; }

.frame {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 8px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 0 0 2px var(--neon), 0 0 16px rgba(57, 255, 20, .8), 0 0 54px rgba(57, 255, 20, .42);
  transition: box-shadow 1.15s var(--ease);
}
.card:not(.is-center) .frame { box-shadow: 0 0 0 2px rgba(57, 255, 20, .62), 0 0 18px rgba(57, 255, 20, .32); }
.frame video { display: block; width: 100%; height: 100%; object-fit: cover; }
.shade { position: absolute; inset: 0; background: #000; opacity: .5; transition: opacity 1.15s var(--ease); pointer-events: none; }
.card.is-center .shade { opacity: 0; }

/* The benefit above each commercial */
.pro {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 100%;
  margin-bottom: 14px;
  font-size: clamp(20px, 1.9vw, 30px);
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -.01em;
  text-align: right;
}
.card.is-center .pro { text-align: center; }
.card.is-left .pro { text-align: left; right: 52%; }
.card.is-right .pro { left: 52%; }

.arrow {
  position: absolute;
  z-index: 5;
  top: 50%;
  width: 54px;
  height: 54px;
  margin-top: -27px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #000;
  color: var(--neon);
  border: 1.5px solid var(--neon);
  transition: background .25s, color .25s, transform .25s;
}
.arrow svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.arrow--prev { left: calc(50% - var(--w) / 2 - 27px); }
.arrow--next { right: calc(50% - var(--w) / 2 - 27px); }
.arrow:hover { background: var(--neon); color: #000; transform: scale(1.08); }
.arrow:active { transform: scale(.95); }

.sound {
  position: absolute;
  z-index: 5;
  left: 50%;
  top: calc(50% + var(--h) / 2 - 54px);
  transform: translateX(-50%);
  height: 42px;
  padding: 0 16px 0 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  border-radius: 999px;
  background: rgba(0, 0, 0, .82);
  color: var(--neon);
  font-size: 14px;
  font-weight: 500;
  transition: background .25s, color .25s;
}
.sound svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sound .sp { fill: currentColor; stroke: none; }
.sound .on { display: none; }
.sound[aria-pressed="true"] .on { display: inline; }
.sound[aria-pressed="true"] .off { display: none; }
.sound:hover { background: var(--neon); color: #000; }

/* Bottom, on the right */
.foot { flex: none; height: 100px; padding: 0 var(--gutter); display: flex; justify-content: flex-end; align-items: center; gap: clamp(20px, 3vw, 44px); text-align: right; }
.note { font-size: 13px; color: var(--mute); }
.caption { font-size: clamp(20px, 2vw, 26px); font-weight: 700; letter-spacing: -.01em; transition: opacity .35s; }
.caption b { font-weight: 700; }
.caption span { margin-left: 6px; font-size: 14px; font-weight: 400; letter-spacing: 0; color: var(--mute); }
.caption.is-swap { opacity: 0; }
.cta { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.mail { display: inline-flex; align-items: center; min-height: 46px; padding: 0 26px; border-radius: 999px; background: var(--neon); color: #000; font-weight: 700; box-shadow: 0 0 22px rgba(57, 255, 20, .5); transition: box-shadow .25s, transform .25s; }
.mail:hover { box-shadow: 0 0 36px rgba(57, 255, 20, .85); transform: translateY(-1px); }
.copy { font-size: 13px; color: var(--mute); }
.copy:hover { color: var(--neon); }

.toast { position: fixed; z-index: 60; left: 50%; bottom: 24px; transform: translateX(-50%); padding: 12px 20px; border-radius: 999px; background: var(--neon); color: #000; font-size: 14px; font-weight: 500; white-space: nowrap; }

/* Phones and portrait screens */
@media (max-width: 820px), (orientation: portrait) {
  :root { --w: 72vw; }
  @supports (height: 100svh) { :root { --w: 72vw; } }
  .head { flex: 1 1 26%; height: auto; justify-content: flex-end; padding-bottom: 6px; }
  h1 { font-size: clamp(64px, 18.5vw, 130px); }
  .stage { flex: 0 0 calc(var(--h) + 158px); }
  .ring { top: -32px; bottom: 32px; }
  .pro { font-size: 18px; }
  .card:not(.is-center) .pro { opacity: 0; }
  .arrow { width: 50px; height: 50px; top: auto; bottom: 0; margin: 0; }
  .arrow--prev { left: calc(50% - 118px); }
  .arrow--next { right: calc(50% - 118px); }
  .sound { top: auto; bottom: 0; width: 50px; height: 50px; padding: 0; justify-content: center; border: 1.5px solid var(--neon); }
  .sound span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .foot { flex: 1 1 30%; height: auto; padding-top: 14px; padding-bottom: max(16px, env(safe-area-inset-bottom)); flex-direction: column; align-items: flex-end; justify-content: flex-start; gap: 8px; }
  .caption { order: 1; }
  .cta { order: 2; align-items: flex-end; margin-top: 4px; }
  .note { order: 3; font-size: 12px; }
}
