/* =========================================================
   Common Enemies — Landing
   Electronic Metal / Hip-Hop
   ========================================================= */

@font-face {
  font-family: "CommonEnemiesX";
  src: url("../assets/fonts/CommonEnemiesX.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #0a0a0a;
  --bg-elevated: #121212;
  --surface: #1a1a1a;
  --surface-hover: #222;
  --red: #ff0000;
  --red-dim: #cc0000;
  --red-glow: rgba(255, 0, 0, 0.35);
  --text: #f5f5f5;
  --muted: #9a9a9a;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 0, 0, 0.45);
  --font-body: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "CommonEnemiesX", "Space Grotesk", sans-serif;
  --max: 1120px;
  --header-h: 4rem;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::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.5;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

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

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Atmosphere ---------- */

.noise {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 50;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px;
  mix-blend-mode: overlay;
}

.grid-bg {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(rgba(255, 0, 0, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 0, 0, 0.03) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 20%, black 20%, transparent 75%);
}

/* ---------- Header ---------- */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.25rem;
  background: linear-gradient(to bottom, rgba(10, 10, 10, 0.92), rgba(10, 10, 10, 0.6) 70%, transparent);
  backdrop-filter: blur(8px);
}

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

.brand-mark {
  width: 28px;
  height: auto;
  filter: drop-shadow(0 0 8px var(--red-glow));
}

.brand-text {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text);
}

.nav {
  display: flex;
  gap: 1.5rem;
}

.nav a {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.2s var(--ease);
}

.nav a:hover,
.nav a:focus-visible {
  color: var(--red);
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: calc(var(--header-h) + 2rem) 1.25rem 4rem;
  text-align: center;
}

.hero-glow {
  position: absolute;
  top: 35%;
  left: 50%;
  width: min(70vw, 520px);
  height: min(70vw, 520px);
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(255, 0, 0, 0.18) 0%, transparent 65%);
  pointer-events: none;
  animation: pulse-glow 5s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% { opacity: 0.7; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(1.08); }
}

.hero-inner {
  position: relative;
  width: 100%;
  max-width: var(--max);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.hero-logo-wrap {
  position: relative;
}

.hero-logo {
  width: clamp(120px, 22vw, 200px);
  height: auto;
  filter: drop-shadow(0 0 24px var(--red-glow));
  animation: logo-in 1s var(--ease) both;
}

@keyframes logo-in {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(12px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.hero-wordmark {
  width: min(92vw, 780px);
  height: auto;
  margin-top: 0.25rem;
  filter: drop-shadow(0 0 18px rgba(255, 0, 0, 0.35));
  animation: fade-up 0.9s var(--ease) 0.15s both;
}

.hero-tagline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.65rem 0.85rem;
  margin: 0.25rem 0 0;
  font-size: clamp(0.7rem, 1.6vw, 0.85rem);
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
  animation: fade-up 0.9s var(--ease) 0.28s both;
}

.hero-tagline .dot {
  width: 5px;
  height: 5px;
  background: var(--red);
  box-shadow: 0 0 8px var(--red);
  transform: rotate(45deg);
  flex-shrink: 0;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  justify-content: center;
  margin-top: 1rem;
  animation: fade-up 0.9s var(--ease) 0.4s both;
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.scroll-hint {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0.45;
}

.scroll-hint span {
  display: block;
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--red), transparent);
  animation: scroll-line 2s ease-in-out infinite;
}

@keyframes scroll-line {
  0% { opacity: 0; transform: scaleY(0.4); transform-origin: top; }
  40% { opacity: 1; }
  100% { opacity: 0; transform: scaleY(1); transform-origin: top; }
}

/* ---------- Buttons ---------- */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border: 1px solid transparent;
  clip-path: polygon(
    0 0,
    calc(100% - 12px) 0,
    100% 12px,
    100% 100%,
    12px 100%,
    0 calc(100% - 12px)
  );
  transition: background 0.25s var(--ease), border-color 0.25s var(--ease), transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.btn-primary {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
  box-shadow: 0 0 0 0 transparent;
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--red-dim);
  box-shadow: 0 0 24px var(--red-glow);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  border-color: var(--red);
  color: #fff;
  box-shadow: 0 0 20px rgba(255, 0, 0, 0.15);
  transform: translateY(-2px);
}

.btn-badge {
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  padding: 0.2rem 0.45rem;
  border: 1px solid rgba(255, 255, 255, 0.35);
  opacity: 0.85;
}

.btn-primary .btn-badge {
  border-color: rgba(255, 255, 255, 0.45);
}

.btn-ghost .btn-badge {
  border-color: rgba(255, 0, 0, 0.5);
  color: var(--red);
}

/* ---------- Sections ---------- */

.section {
  position: relative;
  z-index: 1;
  padding: 5rem 1.25rem;
}

.section-inner {
  max-width: var(--max);
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 2.75rem;
}

.section-eyebrow {
  margin: 0 0 0.5rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--red);
}

.section-title {
  margin: 0 0 0.75rem;
  font-family: var(--font-display), var(--font-body);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: normal;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
  text-shadow: 0 0 40px rgba(255, 0, 0, 0.25);
}

.section-sub {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* ---------- Platforms ---------- */

.platforms {
  background: linear-gradient(to bottom, transparent, var(--bg-elevated) 20%, var(--bg-elevated) 80%, transparent);
}

.platform-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 520px) {
  .platform-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .platform-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.15rem;
  }
}

.platform-card {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  padding: 1.75rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  text-align: center;
  clip-path: polygon(
    0 0,
    calc(100% - 16px) 0,
    100% 16px,
    100% 100%,
    16px 100%,
    0 calc(100% - 16px)
  );
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease), transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.platform-card:hover,
.platform-card:focus-visible {
  border-color: var(--border-strong);
  background: var(--surface-hover);
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 0, 0, 0.12);
}

.platform-card:hover .platform-icon,
.platform-card:focus-visible .platform-icon {
  color: var(--red);
  filter: drop-shadow(0 0 8px var(--red-glow));
}

.platform-icon {
  color: var(--text);
  transition: color 0.25s var(--ease), filter 0.25s var(--ease);
}

.platform-name {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.platform-badge {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--red);
  border: 1px solid rgba(255, 0, 0, 0.4);
  padding: 0.3rem 0.55rem;
}

/* ---------- Merch ---------- */

.merch {
  min-height: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6rem 1.25rem;
  overflow: hidden;
}

.merch-bg {
  position: absolute;
  inset: 0;
  background:
    center / cover no-repeat url("../assets/images/merch.jpg");
  filter: grayscale(0.3) contrast(1.1) brightness(0.45);
  transform: scale(1.05);
}

.merch-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, rgba(10, 10, 10, 0.88) 0%, rgba(10, 10, 10, 0.55) 50%, rgba(80, 0, 0, 0.5) 100%),
    linear-gradient(to top, var(--bg) 0%, transparent 30%);
}

.merch-content {
  position: relative;
  z-index: 1;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.merch-copy {
  margin: 0 0 1rem;
  color: var(--muted);
  max-width: 28ch;
}

/* ---------- Footer ---------- */

.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  padding: 2rem 1.25rem;
  background: #050505;
}

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
}

@media (min-width: 700px) {
  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.footer-brand img {
  width: 22px;
  height: auto;
  opacity: 0.85;
}

.footer-copy {
  margin: 0;
  font-size: 0.75rem;
  color: var(--muted);
}

.footer-links {
  display: flex;
  gap: 0.5rem;
}

.footer-link {
  min-width: 2.5rem;
  min-height: 2.5rem;
  padding: 0.4rem 0.55rem;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--muted);
  border: 1px solid var(--border);
  transition: color 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.footer-link:hover,
.footer-link:focus-visible {
  color: var(--red);
  border-color: var(--border-strong);
  box-shadow: 0 0 12px rgba(255, 0, 0, 0.2);
}

/* ---------- Toast ---------- */

.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  z-index: 100;
  padding: 0.85rem 1.35rem;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 20px rgba(255, 0, 0, 0.15);
  clip-path: polygon(
    0 0,
    calc(100% - 10px) 0,
    100% 10px,
    100% 100%,
    10px 100%,
    0 calc(100% - 10px)
  );
  transition: transform 0.35s var(--ease), opacity 0.35s var(--ease);
  opacity: 0;
  pointer-events: none;
}

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

.toast[hidden] {
  display: block;
}

/* ---------- Focus ---------- */

:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
}

/* ---------- Reduced motion ---------- */

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

  .hero-logo,
  .hero-wordmark,
  .hero-tagline,
  .hero-ctas,
  .hero-glow,
  .scroll-hint span {
    animation: none !important;
  }

  .platform-card,
  .btn {
    transition: none;
  }
}

/* ---------- Small screens ---------- */

@media (max-width: 480px) {
  .brand-text {
    display: none;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }

  .hero-ctas {
    width: 100%;
    max-width: 280px;
    flex-direction: column;
  }
}
