@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@400;500;600&display=swap");

:root {
  --background: 0 0% 6%;
  --foreground: 0 0% 90%;
  --card: 0 0% 15%;
  --muted: 0 0% 55%;
  --border: 0 0% 22%;
  --primary: 0 0% 75%;
  --primary-fg: 0 0% 6%;
  --glow: 38 70% 50%;
  --radius: 0.25rem;
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: Inter, system-ui, sans-serif;
  --header-h: 4rem;
  --noise: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.015'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

html.light {
  --background: 0 0% 98%;
  --foreground: 0 0% 12%;
  --card: 0 0% 94%;
  --muted: 0 0% 45%;
  --border: 0 0% 88%;
  --primary: 0 0% 12%;
  --primary-fg: 0 0% 98%;
  --glow: 38 75% 48%;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: hsl(var(--foreground));
  background-color: hsl(var(--background));
  background-image:
    radial-gradient(ellipse 80% 50% at 50% 0%, hsl(var(--glow) / 0.06) 0%, transparent 60%),
    radial-gradient(circle at 20% 80%, hsl(var(--glow) / 0.03) 0%, transparent 40%),
    radial-gradient(circle at 80% 60%, hsl(var(--glow) / 0.03) 0%, transparent 40%),
    var(--noise);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

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

a:hover {
  opacity: 0.85;
}

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

.container {
  width: 100%;
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}

@media (min-width: 768px) {
  .container {
    padding: 0 2rem;
  }
}

/* —— Header —— */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  border-bottom: 1px solid hsl(var(--border) / 0.5);
  background: hsl(var(--background) / 0.9);
  backdrop-filter: blur(10px);
}

.site-header__inner {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

@media (min-width: 1024px) {
  .site-header__inner {
    padding: 0 2rem;
  }
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.brand img {
  width: 2rem;
  height: 2rem;
  object-fit: contain;
}

.brand span {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
}

.ca-bar {
  display: none;
  align-items: center;
  gap: 0.35rem;
  max-width: min(420px, 36vw);
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius);
  border: 1px solid hsl(var(--border));
  background: hsl(var(--card));
  font-family: ui-monospace, monospace;
  font-size: 0.7rem;
}

@media (min-width: 900px) {
  .ca-bar {
    display: flex;
  }
}

.ca-bar__label {
  color: hsl(var(--muted));
  flex-shrink: 0;
}

.ca-bar__value {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: none;
  border-radius: var(--radius);
  background: transparent;
  color: hsl(var(--foreground));
  cursor: pointer;
}

.icon-btn:hover {
  background: hsl(var(--card));
}

.icon-btn svg {
  width: 1.125rem;
  height: 1.125rem;
}

.theme-toggle__moon {
  display: none;
}

html.light .theme-toggle__sun {
  display: none;
}

html.light .theme-toggle__moon {
  display: block;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-shrink: 0;
}

@media (min-width: 640px) {
  .header-actions {
    gap: 0.5rem;
  }
}

.nav-link {
  padding: 0.35rem 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

@media (min-width: 640px) {
  .nav-link {
    padding: 0.35rem 0.65rem;
    font-size: 0.85rem;
  }
}

.btn-buy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: hsl(var(--primary));
  color: hsl(var(--primary-fg));
  border: 1px solid transparent;
  cursor: pointer;
}

@media (min-width: 640px) {
  .btn-buy {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
  }
}

.btn-buy:hover {
  opacity: 0.92;
}

/* —— Main —— */
main {
  padding-top: var(--header-h);
}

/* —— Hero —— */
.hero {
  padding: 3rem 0 2rem;
  text-align: center;
}

@media (min-width: 768px) {
  .hero {
    padding: 4rem 0 3rem;
  }
}

.hero h1 {
  font-size: clamp(2.75rem, 8vw, 5.5rem);
  text-transform: uppercase;
  margin: 0 0 0.75rem;
  filter: drop-shadow(0 0 40px hsl(var(--glow) / 0.35));
}

.hero__tagline {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: hsl(var(--muted));
  max-width: 28rem;
  margin: 0 auto 1.5rem;
}

.hero__ca-mobile {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  border: 1px solid hsl(var(--border));
  background: hsl(var(--card));
  font-family: ui-monospace, monospace;
  font-size: 0.65rem;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 900px) {
  .hero__ca-mobile {
    display: none;
  }
}

.hero__ca-mobile .ca-truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.hero__cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem 1rem;
  margin-bottom: 2.5rem;
}

.hero__cta-row .nav-link {
  padding: 0.5rem 0.75rem;
}

.hero__visual {
  max-width: 56rem;
  margin: 0 auto;
  border-radius: 0.5rem;
  overflow: hidden;
  border: 1px solid hsl(var(--border) / 0.6);
  box-shadow: 0 24px 80px hsl(0 0% 0% / 0.45);
}

.hero__visual img {
  width: 100%;
}

/* —— Sections —— */
.section {
  padding: 4rem 0;
}

.section__title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0 0 1.5rem;
  text-align: center;
}

.section__body {
  max-width: 42rem;
  margin: 0 auto;
}

.section__body p {
  margin: 0 0 1.25rem;
  color: hsl(var(--foreground) / 0.92);
  line-height: 1.7;
}

.section__body p:last-child {
  margin-bottom: 0;
}

.section__body .lead {
  font-size: 1.05rem;
  color: hsl(var(--foreground));
}

.history-badge {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: hsl(var(--glow));
  margin-bottom: 0.75rem;
}

.history-link {
  display: inline-flex;
  margin-top: 1rem;
  font-weight: 500;
  color: hsl(var(--glow));
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* —— Meme grid —— */
.meme-grid {
  column-count: 2;
  column-gap: 0.75rem;
  max-width: 1200px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .meme-grid {
    column-count: 3;
    column-gap: 1rem;
  }
}

@media (min-width: 1024px) {
  .meme-grid {
    column-count: 4;
    column-gap: 1rem;
  }
}

.meme-grid figure {
  margin: 0 0 0.75rem;
  break-inside: avoid;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid hsl(var(--border) / 0.5);
  background: hsl(var(--card));
}

@media (min-width: 768px) {
  .meme-grid figure {
    margin-bottom: 1rem;
  }
}

.meme-grid img {
  width: 100%;
  vertical-align: middle;
}

/* —— How to buy —— */
.steps {
  display: grid;
  gap: 1.25rem;
  max-width: 56rem;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }
}

.step-card {
  padding: 1.5rem;
  border-radius: var(--radius);
  border: 1px solid hsl(var(--border));
  background: hsl(var(--card));
}

.step-card__num {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  color: hsl(var(--muted));
  letter-spacing: 0.08em;
  margin-bottom: 0.75rem;
}

.step-card h3 {
  font-size: 1.125rem;
  margin: 0 0 0.5rem;
}

.step-card p {
  margin: 0;
  font-size: 0.95rem;
  color: hsl(var(--muted));
  line-height: 1.6;
}

.section-cta {
  text-align: center;
  margin-top: 2.5rem;
}

/* —— Footer —— */
.site-footer {
  padding: 3rem 0 2rem;
  border-top: 1px solid hsl(var(--border) / 0.5);
  text-align: center;
}

.site-footer p {
  margin: 0 0 0.75rem;
  font-size: 0.875rem;
  color: hsl(var(--muted));
}

.site-footer .disclaimer {
  max-width: 36rem;
  margin: 1rem auto 0;
  font-size: 0.75rem;
  line-height: 1.55;
  opacity: 0.9;
}

/* —— Toast —— */
.toast {
  position: fixed;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  z-index: 200;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius);
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  font-size: 0.875rem;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.toast.is-visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}
