/* Alchemy website. Black, big type, real screenshots; red only on buttons. */

:root {
  --accent: #ec4856;
  --bg: #000;
  --text: #f5f5f7;
  --text-2: #a1a1a6;
  --text-3: #6e6e73;
  --line: rgba(255, 255, 255, 0.1);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --max: 1180px;
}

* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 70px;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.55 'Inter', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img {
  display: block;
  max-width: 100%;
  height: auto;
}
a {
  color: inherit;
  text-decoration: none;
}
h1,
h2,
h3 {
  margin: 0;
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.04;
}

/* ---- buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  transition:
    transform 0.3s var(--ease),
    filter 0.3s;
}
.btn:hover {
  filter: brightness(1.1);
  transform: scale(1.03);
}
.btn-small {
  height: 34px;
  padding: 0 16px;
  font-size: 14px;
}
.btn-big {
  height: 52px;
  padding: 0 28px;
  font-size: 17px;
}

/* ---- header ---- */
.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 32px;
  height: 56px;
  padding: 0 max(20px, calc((100vw - var(--max)) / 2));
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(20px) saturate(1.6);
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.01em;
}
.nav-links {
  display: flex;
  gap: 28px;
  margin-left: auto;
  font-size: 14px;
  color: var(--text-2);
}
.nav-links a:hover {
  color: var(--text);
}

/* ---- hero ---- */
.hero {
  min-height: 92vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 120px 20px 40px;
  text-align: center;
}
.hero-logo {
  width: 96px;
  height: 96px;
  margin-bottom: 34px;
}
.hero h1 {
  font-size: clamp(54px, 10vw, 128px);
}
.hero-sub {
  max-width: 560px;
  margin: 26px 0 0;
  font-size: clamp(19px, 2vw, 23px);
  color: var(--text-2);
}
.hero-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-top: 40px;
}
.version {
  font-size: 14px;
  color: var(--text-3);
}

/* The opening: each part fades up in turn, like titles. */
.intro {
  opacity: 0;
  transform: translateY(26px);
  filter: blur(8px);
  animation: intro 1.4s var(--ease) forwards;
}
.hero-logo.intro {
  animation-delay: 0.1s;
}
.hero h1.intro {
  animation-delay: 0.35s;
}
.hero-sub.intro {
  animation-delay: 0.6s;
}
.hero-actions.intro {
  animation-delay: 0.8s;
}
@keyframes intro {
  to {
    opacity: 1;
    transform: none;
    filter: none;
  }
}

/* The browser rises and grows to full size as you scroll (script sets --p from 0 to 1). */
.stage {
  height: 170vh;
}
.stage-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.stage-shot {
  --p: 0;
  margin: 0;
  width: min(1400px, 94vw);
  transform: perspective(1800px) rotateX(calc((1 - var(--p)) * 22deg)) scale(calc(0.72 + var(--p) * 0.28));
  opacity: calc(0.35 + var(--p) * 0.65);
  will-change: transform;
}
.stage-shot img {
  border-radius: 14px;
  box-shadow: 0 50px 140px rgba(0, 0, 0, 0.9);
  outline: 1px solid rgba(255, 255, 255, 0.08);
}

/* ---- feature sections ---- */
.feature {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  padding: 120px 0 40px;
}
.statement {
  max-width: 900px;
  margin: 0 auto 70px;
  text-align: center;
}
.kicker {
  margin: 0 0 16px;
  font-size: 17px;
  font-weight: 600;
  color: var(--accent);
}
.statement h2 {
  font-size: clamp(42px, 6.4vw, 88px);
}
.dim {
  color: var(--text-3);
}
.statement-sub {
  max-width: 640px;
  margin: 26px auto 0;
  font-size: 20px;
  color: var(--text-2);
}

/* Video: the floating player slides out of the page as you scroll (script sets --p). */
.popout-scene {
  --p: 0;
  position: relative;
  margin: 0 auto;
  max-width: 1080px;
}
.scene-base {
  border-radius: 14px;
  outline: 1px solid rgba(255, 255, 255, 0.08);
  filter: brightness(calc(1 - var(--p) * 0.45));
}
.scene-float {
  position: absolute;
  right: -3%;
  bottom: -8%;
  width: 46%;
  border-radius: 12px;
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.85);
  outline: 1px solid rgba(255, 255, 255, 0.15);
  opacity: var(--p);
  transform: translate(calc((1 - var(--p)) * -30%), calc((1 - var(--p)) * -40%)) scale(calc(0.6 + var(--p) * 0.4));
}
.trio {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
  max-width: 1000px;
  margin: 140px auto 0;
}
.trio h3 {
  font-size: 22px;
  letter-spacing: -0.02em;
}
.trio p {
  margin: 10px 0 0;
  color: var(--text-2);
}

/* Ad blocking: a counted-up number beside the shield panel. */
.split {
  display: grid;
  grid-template-columns: 4fr 7fr;
  align-items: center;
  gap: 64px;
}
.count-number {
  display: block;
  font-size: clamp(110px, 14vw, 190px);
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 0.9;
  font-variant-numeric: tabular-nums;
}
.count p {
  margin: 18px 0 0;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.count p.small {
  font-size: 17px;
  font-weight: 400;
  color: var(--text-2);
}
.shot,
.wide-shot {
  margin: 0;
}
.shot img,
.wide-shot img {
  border-radius: 14px;
  outline: 1px solid rgba(255, 255, 255, 0.08);
}
.wide-shot {
  --p: 1;
  max-width: 1180px;
  margin: 0 auto;
  transform: scale(calc(0.9 + var(--p) * 0.1));
}

/* ---- everything else ---- */
.more {
  width: min(980px, calc(100% - 40px));
  margin: 0 auto;
  padding: 160px 0 40px;
}
.more h2 {
  font-size: clamp(40px, 5.6vw, 72px);
  margin-bottom: 48px;
}
.more-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 56px;
}
.more-list li {
  padding: 22px 0;
  border-top: 1px solid var(--line);
}
.more-list b {
  display: block;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.more-list span {
  display: block;
  margin-top: 4px;
  color: var(--text-2);
  font-size: 16px;
}

/* ---- final ---- */
.final {
  padding: 200px 20px 160px;
  text-align: center;
}
.final-logo {
  width: 120px;
  height: 120px;
  margin: 0 auto 36px;
}
.final h2 {
  font-size: clamp(48px, 7vw, 96px);
  margin-bottom: 40px;
}
.final-note {
  margin: 16px 0 0;
  font-size: 14px;
  color: var(--text-3);
}

/* ---- footer: credits, and the open-source line tucked at the very bottom ---- */
.footer {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 70px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--text-2);
}
.footer p {
  margin: 0;
}
.footer b {
  color: var(--text);
  font-weight: 600;
}
.footer a:hover {
  text-decoration: underline;
}
.legal {
  margin-top: 10px !important;
  font-size: 12px;
  color: var(--text-3);
}

/* ---- music button ---- */
.sound {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 60;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(20, 20, 22, 0.75);
  backdrop-filter: blur(16px);
  color: var(--text-2);
  cursor: pointer;
  transition:
    color 0.2s,
    transform 0.3s var(--ease);
}
.sound:hover {
  color: var(--text);
  transform: scale(1.06);
}
.sound svg {
  grid-area: 1 / 1;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.sound .icon-on,
.sound .bars {
  display: none;
}
.sound[aria-pressed='true'] .icon-off {
  display: none;
}
.sound[aria-pressed='true'] .bars {
  grid-area: 1 / 1;
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 16px;
}
.bars i {
  width: 3px;
  height: 100%;
  border-radius: 2px;
  background: var(--text);
  animation: bar 0.9s ease-in-out infinite alternate;
}
.bars i:nth-child(2) {
  animation-delay: -0.3s;
}
.bars i:nth-child(3) {
  animation-delay: -0.6s;
}
@keyframes bar {
  from {
    transform: scaleY(0.25);
  }
  to {
    transform: scaleY(1);
  }
}
.bars i {
  transform-origin: bottom;
}

/* ---- scroll reveal ---- */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition:
    opacity 1.2s var(--ease),
    transform 1.2s var(--ease);
}
.reveal.in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
  .intro,
  .reveal {
    opacity: 1;
    transform: none;
    filter: none;
  }
  .stage-shot,
  .popout-scene,
  .wide-shot {
    --p: 1 !important;
  }
}

/* ---- smaller screens ---- */
@media (max-width: 900px) {
  .split {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .trio {
    grid-template-columns: 1fr;
    gap: 32px;
    margin-top: 100px;
  }
}
@media (max-width: 700px) {
  .nav-links {
    display: none;
  }
  .nav .btn {
    margin-left: auto;
  }
  .stage {
    height: 120vh;
  }
  .more-list {
    grid-template-columns: 1fr;
  }
  .feature {
    padding-top: 90px;
  }
  .statement {
    margin-bottom: 44px;
  }
  .scene-float {
    right: -2%;
    width: 56%;
  }
}
