/* ============================================================
   MEDIA.LEAD — Base Styles
   Reset + Typography + Grid + Textures
   ============================================================ */

/* ── Reset ──────────────────────────────────────────────────── */

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

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  font-size: var(--type-body-size);
  line-height: var(--type-body-lh);
  font-weight: 400;
  color: var(--text-secondary);
  background: var(--bg-primary);
  overflow-x: hidden;
  cursor: none;
}

@media (hover: none) {
  body { cursor: auto; }
}

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

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

@media (hover: none) {
  button { cursor: pointer; }
}

img, svg {
  display: block;
  max-width: 100%;
}

ul, ol {
  list-style: none;
}

input, textarea, select {
  font-family: var(--font-body);
  font-size: inherit;
  color: inherit;
  background: none;
  border: none;
  outline: none;
}

::selection {
  background: rgba(125, 114, 254, 0.3);
  color: #fff;
}

/* ── Typography Classes ─────────────────────────────────────── */

.type-display {
  font-family: var(--font-display);
  font-size: var(--type-display-size);
  line-height: var(--type-display-lh);
  font-weight: var(--type-display-weight);
  letter-spacing: var(--type-display-tracking);
  text-transform: uppercase;
  color: var(--text-primary);
}

.type-h1,
h1 {
  font-family: var(--font-display);
  font-size: var(--type-h1-size);
  line-height: var(--type-h1-lh);
  font-weight: var(--type-h1-weight);
  letter-spacing: var(--type-h1-tracking);
  text-transform: uppercase;
  color: var(--text-primary);
}

.type-h2,
h2 {
  font-family: var(--font-display);
  font-size: var(--type-h2-size);
  line-height: var(--type-h2-lh);
  font-weight: var(--type-h2-weight);
  letter-spacing: var(--type-h2-tracking);
  text-transform: uppercase;
  color: var(--text-primary);
}

.type-h3,
h3 {
  font-family: var(--font-display);
  font-size: var(--type-h3-size);
  line-height: var(--type-h3-lh);
  font-weight: var(--type-h3-weight);
  text-transform: uppercase;
  color: var(--text-primary);
}

.type-label {
  font-family: var(--font-display);
  font-size: var(--type-label-size);
  line-height: var(--type-label-lh);
  font-weight: var(--type-label-weight);
  letter-spacing: var(--type-label-tracking);
  text-transform: uppercase;
}

.type-label-sm {
  font-family: var(--font-display);
  font-size: var(--type-label-sm-size);
  line-height: var(--type-label-sm-lh);
  font-weight: var(--type-label-sm-weight);
  letter-spacing: var(--type-label-sm-tracking);
  text-transform: uppercase;
}

.type-body-lg {
  font-family: var(--font-body);
  font-size: var(--type-body-lg-size);
  line-height: var(--type-body-lg-lh);
  font-weight: 400;
}

.type-body {
  font-family: var(--font-body);
  font-size: var(--type-body-size);
  line-height: var(--type-body-lh);
  font-weight: 400;
}

.type-body-sm {
  font-family: var(--font-body);
  font-size: var(--type-body-sm-size);
  line-height: var(--type-body-sm-lh);
  font-weight: 400;
}

.type-caption {
  font-family: var(--font-body);
  font-size: var(--type-caption-size);
  line-height: var(--type-caption-lh);
  font-weight: 400;
}

.type-micro {
  font-family: var(--font-body);
  font-size: var(--type-micro-size);
  line-height: var(--type-micro-lh);
  font-weight: 400;
  letter-spacing: var(--type-micro-tracking);
}

/* ── Gradient Text ──────────────────────────────────────────── */

.gradient-text {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Container ──────────────────────────────────────────────── */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
}

/* ── Grid ───────────────────────────────────────────────────── */

.grid {
  display: grid;
  grid-template-columns: repeat(var(--grid-columns), 1fr);
  gap: var(--grid-gap);
}

.col-span-12 { grid-column: span 12; }
.col-span-8 { grid-column: span 8; }
.col-span-6 { grid-column: span 6; }
.col-span-4 { grid-column: span 4; }
.col-span-3 { grid-column: span 3; }

.col-start-2 { grid-column-start: 2; }
.col-start-3 { grid-column-start: 3; }
.col-start-4 { grid-column-start: 4; }

@media (max-width: 1023px) {
  .col-span-4 { grid-column: span 6; }
  .col-span-3 { grid-column: span 6; }
}

@media (max-width: 767px) {
  .col-span-6,
  .col-span-4,
  .col-span-3 { grid-column: span 12; }
  .col-start-2,
  .col-start-3,
  .col-start-4 { grid-column-start: 1; }
}

/* ── Sections ───────────────────────────────────────────────── */

.section {
  position: relative;
  padding-top: var(--section-padding);
  padding-bottom: var(--section-padding);
  overflow: hidden;
}

.section--primary { background: var(--bg-primary); }
.section--secondary { background: var(--bg-secondary); }
.section--base { background: var(--bg-base); }

/* ── Section Glow (gradient flow between blocks) ──────────── */

.section-glow {
  position: relative;
  height: 0;
  overflow: visible;
  pointer-events: none;
  z-index: 1;
}

.section-glow__blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  will-change: transform;
}

.section-glow__blob--red {
  width: 600px;
  height: 400px;
  top: -200px;
  right: 5%;
  background: radial-gradient(ellipse, rgba(255, 58, 58, 0.06) 0%, transparent 70%);
  animation: glow-drift-1 18s ease-in-out infinite alternate;
}

.section-glow__blob--purple {
  width: 500px;
  height: 350px;
  top: -175px;
  left: 10%;
  background: radial-gradient(ellipse, rgba(125, 114, 254, 0.05) 0%, transparent 70%);
  animation: glow-drift-2 22s ease-in-out infinite alternate;
}

@keyframes glow-drift-1 {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-30px, 15px) scale(1.08); }
  100% { transform: translate(20px, -10px) scale(0.95); }
}

@keyframes glow-drift-2 {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(25px, -20px) scale(1.1); }
  100% { transform: translate(-15px, 10px) scale(0.96); }
}

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

@media (max-width: 767px) {
  .section-glow__blob--red { width: 300px; height: 200px; }
  .section-glow__blob--purple { width: 250px; height: 175px; }
}

/* ── Section Header ─────────────────────────────────────────── */

.section-header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto var(--space-6);
}

.section-header h2 {
  margin-bottom: var(--space-2);
}

.section-header p {
  color: var(--text-secondary);
  max-width: 640px;
  margin: 0 auto;
}

/* ── Background Textures ────────────────────────────────────── */

/* Gradient Mesh (ambient glow) */
.bg-mesh {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.bg-mesh::before {
  content: "";
  position: absolute;
  top: -20%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(255,58,58,0.06) 0%, transparent 70%);
  filter: blur(80px);
}

.bg-mesh::after {
  content: "";
  position: absolute;
  bottom: -15%;
  left: -5%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(125,114,254,0.04) 0%, transparent 70%);
  filter: blur(80px);
}

/* Grid Pattern */
.bg-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.018) 1px, transparent 1px);
  background-size: 64px 64px;
}

/* Noise Grain — applied globally */
.bg-noise::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9990;
  pointer-events: none;
  mix-blend-mode: overlay;
  opacity: 0.03;
  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)' opacity='1'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

/* ── Max Width Utility ──────────────────────────────────────── */

.max-w-text { max-width: 680px; }
.max-w-narrow { max-width: 560px; }
.mx-auto { margin-left: auto; margin-right: auto; }
.text-center { text-align: center; }

/* ── Reduced Motion ─────────────────────────────────────────── */

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

