:root {
  color-scheme: dark;
  --frame-pad: clamp(18px, 4.8vw, 28px);
  --footer-h: 56px;
  --bg: #040e1a;
  --bg-gradient: linear-gradient(180deg, rgba(4, 14, 26, 1) 0%, rgba(7, 28, 77, 1) 52%, rgba(4, 14, 26, 1) 100%);
  --accent: #d9f453;
  --accent-soft: rgba(217, 244, 83, 0.28);
  --accent-cool: rgba(53, 216, 255, 0.22);
  --text: rgba(255, 255, 255, 0.92);
  --muted: rgba(255, 255, 255, 0.68);
  --panel: rgba(7, 28, 77, 0.35);
  --border: rgba(255, 255, 255, 0.14);
  --shadow: 0 40px 90px rgba(4, 14, 26, 0.72);
  --radius-xl: 26px;
  --radius-lg: 18px;

  --font-base: "Avenir Next Rounded", "Avenir Next", "Avenir", "Futura", "Trebuchet MS", sans-serif;
  --font-display: "LuckiestGuy-Regular", var(--font-base);
}

@font-face {
  font-family: "LuckiestGuy-Regular";
  src: url("./LuckiestGuy-Regular.ttf") format("truetype");
  font-display: swap;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  color: var(--text);
  font-family: var(--font-base);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(900px 520px at 18% -12%, var(--accent-soft), transparent 62%),
    radial-gradient(860px 520px at 90% 8%, var(--accent-cool), transparent 66%),
    radial-gradient(760px 420px at 50% 120%, rgba(78, 211, 122, 0.12), transparent 60%),
    var(--bg-gradient);
  overflow: hidden;
  position: relative;
}

body::before,
body::after {
  content: "";
  position: fixed;
  pointer-events: none;
  z-index: 0;
  filter: blur(6px);
  opacity: 0.8;
}

body::before {
  width: 320px;
  height: 320px;
  top: -120px;
  left: -80px;
  background: radial-gradient(circle at 30% 30%, rgba(217, 244, 83, 0.55), transparent 60%);
}

body::after {
  width: 380px;
  height: 380px;
  bottom: -160px;
  right: -120px;
  background: radial-gradient(circle at 30% 30%, rgba(53, 216, 255, 0.38), transparent 62%);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

.stage {
  position: relative;
  width: 100%;
  height: 100svh;
  display: grid;
  place-items: center;
  padding: clamp(14px, 3vw, 28px);
  isolation: isolate;
  z-index: 1;
}

.frame {
  position: relative;
  aspect-ratio: 9 / 16;
  height: min(94svh, calc(92vw * 16 / 9));
  width: min(92vw, calc(94svh * 9 / 16));
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  background: var(--panel);
  backdrop-filter: blur(18px);
}

.frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(255, 255, 255, 0.12), transparent 56%),
    radial-gradient(140% 90% at 50% 120%, rgba(217, 244, 83, 0.10), transparent 62%);
  opacity: 0.55;
  pointer-events: none;
}

.frame-inner {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.frame-scroll {
  flex: 1;
  overflow: auto;
  padding: var(--frame-pad);
  padding-bottom: calc(var(--frame-pad) + var(--footer-h));
  min-height: 0;
}

.frame-scroll::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.home {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.brand img {
  width: min(200px, 70%);
  height: auto;
  border-radius: 0;
}

.hero-title {
  margin: 16px 0 0;
  font-family: var(--font-display);
  font-size: clamp(28px, 4.4vw, 44px);
  letter-spacing: -0.03em;
  line-height: 1.08;
  text-shadow: 0 14px 34px rgba(0, 0, 0, 0.48);
}

.hero-sub {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: clamp(14px, 2.2vw, 17px);
  line-height: 1.6;
  text-shadow: 0 10px 24px rgba(0, 0, 0, 0.34);
  max-width: 46ch;
}

.store-row {
  margin-top: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.store-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  overflow: hidden;
  transform: translateZ(0);
}

.store-badge img {
  height: 44px;
  width: auto;
  display: block;
  filter: drop-shadow(0 18px 34px rgba(0, 0, 0, 0.46));
}

.store-badge:focus-visible {
  outline: 2px solid rgba(217, 244, 83, 0.56);
  outline-offset: 2px;
}

.doc {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-top: 6px;
  gap: 10px;
}

.sheet {
  margin: 10px auto 0;
  width: min(560px, 100%);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: rgba(4, 14, 26, 0.55);
  padding: 18px;
  text-align: left;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.48);
}

.sheet h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: -0.02em;
}

.sheet-meta {
  margin: 8px 0 12px;
  color: var(--muted);
  font-size: 13px;
}

.sheet h2 {
  margin: 16px 0 8px;
  font-size: 14px;
  letter-spacing: -0.01em;
  color: var(--text);
}

.sheet p {
  margin: 0 0 10px;
  color: rgba(255, 255, 255, 0.84);
}

.sheet ul {
  margin: 0 0 10px;
  padding-left: 18px;
  color: rgba(255, 255, 255, 0.84);
}

.sheet li {
  margin: 6px 0;
}

.sheet a {
  text-decoration: underline;
  text-underline-offset: 2px;
  color: rgba(217, 244, 83, 0.92);
}

.footer-bar {
  flex-shrink: 0;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 12px 16px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(180deg, rgba(4, 14, 26, 0.52), rgba(4, 14, 26, 0.86));
  text-align: center;
  color: rgba(255, 255, 255, 0.62);
  font-size: 12px;
}

.footer-links {
  display: inline-flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-links a {
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
}

.footer-links a:hover {
  color: var(--text);
  border-color: rgba(217, 244, 83, 0.50);
}

.reveal {
  animation: rise 600ms ease both;
  animation-delay: var(--delay, 0ms);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    animation: none;
  }
}

@media (max-width: 600px) {
  .stage {
    padding: 0;
  }

  .frame {
    width: 100%;
    height: 100svh;
    border-radius: 0;
    border: none;
    box-shadow: none;
  }

  .frame-scroll {
    padding: 18px 16px;
    padding-bottom: calc(18px + var(--footer-h));
  }
}
