/* =============================================
   WANTED MUSIC - Global Styles
   wanted-music.com
   ============================================= */

:root {
  /* === COULEURS === */
  --color-bg: #040404;
  --color-surface: #0b090a;
  --color-surface-2: #120c0d;
  --color-surface-3: #1b1113;
  --color-surface-card: rgba(18, 12, 13, 0.8);
  --color-primary: #ff1f32;
  --color-primary-dark: #b80f20;
  --color-primary-glow: rgba(255, 31, 50, 0.45);
  --color-secondary: #ff6e7a;
  --color-secondary-glow: rgba(255, 110, 122, 0.3);
  --color-gold: #d9b16f;
  --color-gold-glow: rgba(217, 177, 111, 0.28);
  --color-success: #22c55e;
  --color-error: #ef4444;
  --color-warning: #f97316;
  --color-text: #f8f4f5;
  --color-text-muted: #c3b7ba;
  --color-text-faint: #75686d;
  --color-text-inverse: #070404;
  --color-border: rgba(255, 31, 50, 0.24);
  --color-border-hover: rgba(255, 31, 50, 0.52);
  --color-glass: rgba(255, 255, 255, 0.04);

  /* === TYPOGRAPHIE === */
  --font-display: "Orbitron", "Exo 2", sans-serif;
  --font-body: "Inter", "DM Sans", sans-serif;
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.2rem + 2.5vw, 3.5rem);
  --text-hero: clamp(3rem, 0.5rem + 7vw, 8rem);

  /* === ESPACEMENT === */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* === RADIUS === */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  --radius-full: 9999px;

  /* === TRANSITIONS === */
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --t-fast: 150ms var(--ease-expo);
  --t-med: 350ms var(--ease-expo);
  --t-slow: 600ms var(--ease-expo);

  /* === SHADOWS === */
  --shadow-sm: 0 0 15px rgba(255, 31, 50, 0.14);
  --shadow-md: 0 0 35px rgba(255, 31, 50, 0.26), 0 4px 20px rgba(0, 0, 0, 0.65);
  --shadow-lg: 0 0 70px rgba(255, 31, 50, 0.35), 0 10px 48px rgba(0, 0, 0, 0.85);
  --shadow-cyan: 0 0 35px rgba(255, 110, 122, 0.28);
  --shadow-gold: 0 0 35px rgba(217, 177, 111, 0.24);
  --shadow-inset: inset 0 1px 0 rgba(255, 255, 255, 0.05);

  /* === GRADIENTS === */
  --gradient-hero: linear-gradient(130deg, #ff2639 0%, #a80f1d 50%, #54090f 100%);
  --gradient-brand: linear-gradient(90deg, #ff3042, #b80f20);
  --gradient-card: linear-gradient(150deg, rgba(255, 31, 50, 0.1) 0%, rgba(255, 255, 255, 0.02) 100%);
  --gradient-glow: radial-gradient(ellipse 80% 50% at 50% 0%, rgba(255, 31, 50, 0.26) 0%, transparent 100%);

  /* === LAYOUT === */
  --container-xs: 480px;
  --container-sm: 640px;
  --container-md: 960px;
  --container-lg: 1200px;
  --container-xl: 1440px;
  --container-full: 100%;
  --header-height: 72px;
  --spot-x: 50%;
  --spot-y: 28%;

  /* === ANIMATIONS === */
  --anim-grain: grain 0.4s steps(3) infinite;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.55;
  color: var(--color-text);
  position: relative;
  background:
    radial-gradient(circle at 16% -4%, rgba(255, 31, 50, 0.22) 0, transparent 38%),
    radial-gradient(circle at 92% 0%, rgba(255, 110, 122, 0.12) 0, transparent 30%),
    radial-gradient(circle at 50% 120%, rgba(255, 31, 50, 0.12) 0, transparent 45%),
    var(--color-bg);
  overflow-x: hidden;
}

body:not([data-page="login"]):not([data-page="checkout"]) {
  background:
    linear-gradient(125deg, rgba(4, 4, 4, 0.76) 0%, rgba(4, 4, 4, 0.86) 58%, rgba(4, 4, 4, 0.9) 100%),
    radial-gradient(circle at 16% -4%, rgba(255, 31, 50, 0.22) 0, transparent 38%),
    radial-gradient(circle at 92% 0%, rgba(255, 110, 122, 0.12) 0, transparent 30%),
    radial-gradient(circle at 50% 120%, rgba(255, 31, 50, 0.12) 0, transparent 45%),
    var(--color-bg);
}

main {
  position: relative;
  z-index: 2;
}

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

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

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  line-height: 1.1;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  letter-spacing: 0.02em;
}

p {
  margin: 0;
  color: var(--color-text-muted);
}

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

input,
textarea,
select {
  min-height: 44px;
}

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

.container {
  width: min(100% - 2rem, var(--container-lg));
  margin-inline: auto;
}

.section {
  position: relative;
  padding: var(--space-20) 0;
}

main > .section + .section::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  width: min(92vw, 1180px);
  height: 1px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent 0%, rgba(255, 43, 66, 0.54) 22%, rgba(255, 198, 208, 0.42) 50%, rgba(255, 43, 66, 0.54) 78%, transparent 100%);
  pointer-events: none;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-6);
  margin-bottom: var(--space-8);
}

.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
  background: rgba(255, 31, 50, 0.14);
  color: #ffd0d5;
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.section-title {
  margin-top: 0.8rem;
  font-size: var(--text-2xl);
  color: var(--color-text);
}

.section-text {
  margin-top: 1rem;
  max-width: 70ch;
}

.skip-link {
  position: absolute;
  left: var(--space-4);
  top: -200px;
  z-index: 10000;
  padding: 0.7rem 1rem;
  border-radius: var(--radius-md);
  background: var(--color-primary);
  color: var(--color-text-inverse);
  font-weight: 700;
}

.skip-link:focus-visible {
  top: var(--space-4);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.glass {
  backdrop-filter: blur(20px) saturate(160%);
  background: rgba(20, 12, 13, 0.68);
  border: 1px solid rgba(255, 31, 50, 0.2);
  box-shadow: var(--shadow-inset);
}

.text-gradient {
  background: var(--gradient-brand);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.page-hero {
  padding: calc(var(--header-height) + var(--space-16)) 0 var(--space-12);
  min-height: 40vh;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at var(--spot-x, 14%) var(--spot-y, 0%), rgba(255, 31, 50, 0.3), transparent 46%),
    radial-gradient(circle at 88% 10%, rgba(255, 110, 122, 0.13), transparent 34%);
  z-index: 1;
  pointer-events: none;
  animation: pageAmbientShift 18s ease-in-out infinite alternate;
}

.page-hero .page-three-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0.88;
  filter: saturate(1.12) contrast(1.04);
  pointer-events: none;
}

.page-hero .container {
  position: relative;
  z-index: 2;
}

.page-title {
  font-size: clamp(2.2rem, 1.2rem + 4vw, 5rem);
  text-wrap: balance;
}

.page-subtitle {
  margin-top: 1rem;
  max-width: 60ch;
}

.grid {
  display: grid;
  gap: var(--space-6);
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stack {
  display: grid;
  gap: var(--space-4);
}

.flow > * + * {
  margin-top: var(--space-4);
}

.muted {
  color: var(--color-text-muted);
}

.faint {
  color: var(--color-text-faint);
}

.sr-announcer {
  position: fixed;
  left: 0;
  bottom: 0;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

@media (max-width: 1023px) {
  :root {
    --header-height: 64px;
  }

  .section {
    padding: var(--space-16) 0;
  }

  .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  :root {
    --header-height: 60px;
  }

  .container {
    width: min(100% - 1.1rem, var(--container-lg));
  }

  .section-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: minmax(0, 1fr);
  }

  .page-hero {
    padding-bottom: var(--space-8);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
