:root {
  --bg: #d783a4;
  --bg-deep: #873f5c;
  --ink: #fff8fa;
  --muted: rgba(255, 248, 250, 0.72);
  --shadow: rgba(52, 13, 28, 0.46);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
}

body {
  min-height: 100vh;
  overflow: hidden;
  color: var(--ink);
  background: var(--bg-deep);
  font-family: Avenir Next, Montserrat, Trebuchet MS, sans-serif;
}

body[data-flavor="vanilla"] {
  --bg: #d8c2a4;
  --bg-deep: #9d7f55;
  --ink: #fffaf0;
  --muted: rgba(255, 250, 240, 0.76);
  --shadow: rgba(72, 48, 17, 0.36);
}

body[data-flavor="chocolate"] {
  --bg: #8a4d2f;
  --bg-deep: #411606;
  --ink: #fff6ec;
  --muted: rgba(255, 246, 236, 0.74);
  --shadow: rgba(24, 8, 2, 0.48);
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

.stage {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto;
  width: 100%;
  min-height: 100vh;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(20px, 3vw, 44px);
}

.stage::before,
.stage::after {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  content: "";
}

.stage::before {
  background:
    linear-gradient(90deg, rgba(26, 7, 13, 0.46), transparent 30%, transparent 66%, rgba(26, 7, 13, 0.42)),
    linear-gradient(0deg, rgba(18, 6, 9, 0.36), transparent 36%);
}

.stage::after {
  background: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.022) 0 1px, transparent 1px 4px);
  mix-blend-mode: soft-light;
}

.ambient {
  display: none;
}

.nav,
.controls,
.hero {
  position: relative;
  z-index: 3;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand,
.nav-links,
.socials,
.flavor-switcher {
  display: flex;
  align-items: center;
}

.brand {
  gap: 12px;
  font-weight: 800;
}

.brand-mark {
  width: 34px;
  aspect-ratio: 1;
  border: 2px solid currentColor;
  transform: rotate(45deg);
  box-shadow: inset 0 0 0 7px rgba(255, 255, 255, 0.12);
}

.nav-links {
  gap: clamp(18px, 3vw, 42px);
  font-size: 16px;
  font-weight: 800;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 34vw) minmax(0, 1fr);
  align-items: center;
  min-height: 0;
}

.product-frame {
  position: fixed;
  inset: 0;
  z-index: 0;
  margin: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 46%, rgba(255, 255, 255, 0.16), transparent 42%),
    linear-gradient(135deg, var(--bg), var(--bg-deep));
}

.media-shell {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}

.product-image,
.product-video {
  grid-area: 1 / 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: opacity 420ms ease, transform 720ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.product-video {
  opacity: 0;
}

.media-shell.has-video .product-video {
  opacity: 1;
}

.media-shell.has-video .product-image {
  opacity: 0;
}

.product-frame.is-swapping .product-image,
.product-frame.is-swapping .product-video {
  opacity: 0;
  transform: scale(1.035);
}

.copy {
  position: relative;
  z-index: 4;
}

.copy-left {
  grid-column: 1;
  align-self: center;
  padding-left: clamp(10px, 4.5vw, 82px);
}

.copy-right {
  grid-column: 3;
  align-self: center;
  justify-self: end;
  max-width: 560px;
  padding-right: clamp(10px, 4vw, 68px);
  text-align: right;
}

.eyebrow,
.description {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.eyebrow {
  margin-bottom: 18px;
}

h1,
h2 {
  margin: 0;
  color: var(--ink);
  font-family: Georgia, Times New Roman, serif;
  font-size: clamp(50px, 6.35vw, 116px);
  font-weight: 700;
  line-height: 0.76;
  letter-spacing: 0;
  text-shadow: 0 26px 64px var(--shadow);
}

h2 {
  font-size: clamp(50px, 6.35vw, 116px);
}

.display-word {
  display: block;
}

.display-word-accent {
  margin: 0;
  font: inherit;
  transform: none;
}

.display-word-final {
  margin-top: 0.03em;
  font-style: italic;
}

.description {
  max-width: 360px;
  margin: 26px 0 0 auto;
  font-size: 12px;
  line-height: 1.6;
  text-transform: none;
  letter-spacing: 0.04em;
}

.controls {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  gap: 24px;
  padding-bottom: 2px;
}

.socials {
  gap: 18px;
  font-size: 13px;
  font-weight: 900;
}

.socials a,
.telegram-cta {
  text-shadow: 0 12px 30px var(--shadow);
}

.socials a {
  position: relative;
}

.socials a::after {
  position: absolute;
  left: 0;
  bottom: -7px;
  width: 0;
  height: 1px;
  content: "";
  background: currentColor;
  transition: width 220ms ease;
}

.socials a:hover::after {
  width: 100%;
}

.telegram-cta {
  justify-self: center;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: var(--ink);
  text-align: center;
  font-weight: 900;
}

.telegram-copy {
  display: grid;
  gap: 3px;
  min-width: 132px;
  font-size: 13px;
  line-height: 1.1;
  letter-spacing: 0.02em;
}

.telegram-copy strong {
  font-size: 18px;
}

.telegram-icon {
  display: grid;
  width: 48px;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 18px 34px var(--shadow);
  backdrop-filter: blur(18px);
  transition: transform 220ms ease, background 220ms ease, border-color 220ms ease;
}

.telegram-icon svg {
  width: 23px;
  fill: currentColor;
  transform: translateX(-1px);
}

.telegram-cta:hover .telegram-icon {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px) scale(1.08);
}

.flavor-switcher {
  justify-self: end;
  align-items: center;
  gap: 0;
  padding-right: 2px;
}

.flavor {
  position: relative;
  display: grid;
  width: 48px;
  aspect-ratio: 1;
  min-height: 0;
  margin-left: -10px;
  padding: 0;
  place-items: center;
  color: var(--ink);
  border: 1px solid rgba(255, 255, 255, 0);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 14px 28px var(--shadow);
  cursor: pointer;
  overflow: hidden;
  transition: border-color 220ms ease, transform 220ms ease, z-index 220ms ease;
}

.flavor:first-child {
  margin-left: 0;
}

.flavor:hover {
  z-index: 5;
  border-color: #fff;
  transform: scale(1.13);
}

.flavor.is-active {
  z-index: 4;
  border-color: #fff;
}

.flavor-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1.65);
}

@media (max-width: 900px) {
  body {
    overflow: hidden;
  }

  .stage {
    min-height: 100svh;
    padding: 18px;
  }

  .nav-links {
    display: none;
  }

  .hero {
    grid-template-columns: 1fr;
    align-content: center;
    gap: 18px;
    text-align: center;
  }

  .copy-left,
  .copy-right {
    grid-column: 1;
    justify-self: center;
    padding: 0;
    text-align: center;
  }

  .copy-left {
    align-self: end;
  }

  .copy-right {
    align-self: start;
  }

  h1,
  h2 {
    font-size: clamp(43px, 13.8vw, 72px);
  }

  .description {
    display: none;
  }

  .controls {
    grid-template-columns: 1fr auto;
    align-items: end;
  }

  .socials {
    display: none;
  }

  .telegram-cta {
    justify-self: start;
  }

  .flavor-switcher {
    justify-self: end;
  }

  .flavor {
    width: 44px;
    margin-left: -12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
