@font-face {
  font-family: "MusashiBrush";
  src: url("fonts/MusashiBrush.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --cream: #f7f5f0;
  --tan: #ede6da;
  --red: #e63946;
  --gold: #d4af37;
  --gold-bright: #f0d36a;
  --gold-dim: #6b5b2e;
  --gold-deep: #4a3e1e;
  --ink: #1c1c1c;
  --night: #100f12;
  --surface: #1a191e;
  --surface-alt: #161519;
  --track: #1f1e23;
  --hairline: #2a2a30;
  --text: #f5f1e8;
  --text-muted: #c9c9ce;
  --text-secondary: #8a8a8f;
  --radius: 1.25rem;
  --font-display: "Bebas Neue", system-ui, sans-serif;
  --font-brand: "MusashiBrush", "Hiragino Mincho ProN", serif;
  --font-sans: "DM Sans", ui-sans-serif, system-ui, sans-serif;
  --gradient-gold: linear-gradient(
    135deg,
    #f3dc86 0%,
    #d4af37 48%,
    #b8891f 100%
  );
  --gradient-bg: var(--night);
  --night-top-lighting: radial-gradient(
    ellipse 120% 580px at 50% -8%,
    rgb(255 138 147 / 0.4) 0%,
    rgb(230 57 70 / 0.2) 33%,
    rgb(122 21 34 / 0.1) 66%,
    transparent 100%
  );
  --shadow-3d-icon:
    0 1px 0 rgb(255 255 255 / 0.2) inset, 0 -2px 8px rgb(0 0 0 / 0.4) inset,
    0 30px 60px -20px rgb(0 0 0 / 0.7), 0 18px 40px -10px rgb(212 175 55 / 0.35);
  --max: 72rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  min-height: 100%;
  overflow-x: hidden;
  background-color: var(--night);
  background-image: var(--night-top-lighting);
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

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

.font-display {
  font-family: var(--font-display);
  letter-spacing: 0.04em;
}

.font-brand {
  font-family: var(--font-brand);
}

.wrap {
  width: min(var(--max), calc(100% - 2.5rem));
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.5rem;
  gap: 0.75rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand img {
  width: 40px;
  height: 40px;
  border-radius: 26%;
  box-shadow: 0 8px 18px rgb(0 0 0 / 0.4);
}

.brand span {
  font-family: var(--font-display);
  font-size: 1.25rem;
  letter-spacing: 0.08em;
}

.store-badge {
  display: inline-flex;
  flex-shrink: 0;
  transition: transform 0.15s ease;
}

.store-badge:hover {
  transform: scale(1.05);
}

.store-badge:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
}

.store-badge img {
  height: 40px;
  width: 135px;
  max-width: none;
}

.hero {
  display: grid;
  align-items: center;
  gap: 3rem;
  padding-top: 3rem;
}

.hero-copy {
  order: 2;
}

.hero h1 {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  font-family: var(--font-brand);
  font-size: clamp(2.75rem, 10vw, 7.25rem);
  line-height: 0.8;
  font-weight: 400;
  overflow: visible;
  padding: 0.08em 0.06em 0.1em 0.08em;
  margin: 0;
  text-align: left;
}

.hero-title-desktop,
.hero-title-mobile {
  display: flex;
  flex-direction: column;
  align-items: inherit;
}

.hero-title-mobile {
  display: none;
}

.hero h1 .text-3d-gold {
  display: block;
  overflow: visible;
  padding-left: 0.04em;
}

.hero p {
  margin-top: 1.5rem;
  max-width: 28rem;
  font-size: 1.125rem;
  color: var(--text-muted);
}

.hero-copy .store-badge {
  margin-top: 2rem;
}

.hero-art {
  order: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  justify-self: center;
  position: relative;
  width: min(20rem, 70vw);
}

.hero-glow {
  position: absolute;
  inset: 8%;
  z-index: -1;
  border-radius: 28%;
  background: radial-gradient(
    circle,
    rgb(212 175 55 / 0.45) 0%,
    transparent 70%
  );
  filter: blur(42px);
  transform: scale(1.12);
}

.icon-3d {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  border-radius: 28%;
  box-shadow: var(--shadow-3d-icon);
  transition: transform 0.5s ease;
}

.icon-3d:hover {
  transform: scale(1.02);
}

.text-3d-gold {
  background: var(--gradient-gold);
  color: transparent;
  text-shadow: 0 1px rgb(184 137 31 / 0.35);
  filter: drop-shadow(0 8px 16px rgb(212 175 55 / 0.32));
  -webkit-background-clip: text;
  background-clip: text;
}

.features {
  display: grid;
  gap: 2rem;
  margin-top: 4.5rem;
}

.card-stack {
  position: relative;
}

.card-stack-base {
  position: absolute;
  z-index: 0;
  inset: 10px 0 -10px;
  border-radius: var(--radius);
  background: #0a090c;
  box-shadow: 0 6px 12px rgb(0 0 0 / 0.5);
}

.card-face {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid rgb(255 255 255 / 0.08);
}

.feature-visual {
  height: 13.5rem;
  background: #121014;
  border-bottom: 1px solid rgb(255 255 255 / 0.06);
  overflow: hidden;
}

.feature-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
}

.feature-art-count {
  object-position: 48% 38%;
}

.feature-art-streak {
  object-position: 50% 46%;
}

.feature-art-arena {
  object-position: 42% 48%;
}

.card-copy {
  padding: 1.5rem;
}

.card-copy h3 {
  font-family: var(--font-display);
  font-size: 1.65rem;
  letter-spacing: 0.06em;
}

.card-copy p {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.cta {
  margin-top: 6rem;
  margin-bottom: 5rem;
  text-align: center;
}

.cta h2 {
  font-family: var(--font-brand);
  font-size: clamp(3.2rem, 8vw, 5.25rem);
  font-weight: 400;
  line-height: 1.12;
  overflow: visible;
}

.cta p {
  margin: 0.25rem auto 0;
  max-width: 26rem;
  color: var(--text-secondary);
}

.cta .store-badge {
  margin-top: 2rem;
}

.legal {
  width: min(44rem, calc(100% - 1.75rem));
  margin: 3rem auto 0;
  padding-bottom: 4rem;
}

.legal h1 {
  font-family: var(--font-brand);
  font-size: clamp(2.4rem, 6vw, 3.4rem);
  font-weight: 400;
}

.legal .meta {
  margin-top: 0.75rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.legal h2 {
  margin-top: 2.25rem;
  font-size: 1.15rem;
}

.legal h3 {
  margin-top: 1.35rem;
  font-size: 1rem;
}

.legal p,
.legal li {
  margin-top: 0.75rem;
  color: var(--text-muted);
}

.legal ul {
  padding-left: 1.2rem;
}

.legal a {
  color: var(--gold);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.support-grid {
  display: grid;
  gap: 1rem;
  margin-top: 2rem;
}

.support-card {
  padding: 1.25rem 1.35rem;
  border-radius: 1rem;
  background: var(--surface);
  border: 1px solid rgb(255 255 255 / 0.08);
}

.support-card h2 {
  font-family: var(--font-display);
  letter-spacing: 0.06em;
  font-size: 1.35rem;
  margin-top: 0;
}

@media (max-width: 767px) {
  .home .site-header {
    display: none;
  }

  .hero {
    padding-top: 2.25rem;
  }

  .hero h1 {
    align-items: center;
    text-align: center;
    font-size: clamp(2.1rem, 11vw, 3.6rem);
  }

  .hero-title-desktop {
    display: none;
  }

  .hero-title-mobile {
    display: flex;
    align-items: center;
  }

  .hero p {
    margin-inline: auto;
    text-align: center;
  }

  .hero-copy .store-badge {
    display: flex;
    justify-content: center;
    width: 100%;
  }
}

@media (max-width: 520px) {
  .wrap {
    width: min(var(--max), calc(100% - 1.75rem));
  }

  .site-header .store-badge {
    display: none;
  }

  .brand span {
    font-size: 1.05rem;
  }

  .feature-visual {
    height: 12.5rem;
  }
}

@media (min-width: 640px) {
  .features {
    grid-template-columns: repeat(3, 1fr);
  }

  .support-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 768px) {
  .hero {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    padding-top: 5rem;
  }

  .hero-copy {
    order: 1;
  }

  .hero-art {
    order: 2;
    width: min(22rem, 100%);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .icon-3d,
  .store-badge {
    transition: none;
  }
}
