/* ==========================================================================
   ORGANIC ACADEMY — Design System
   Tokens, tipografía, componentes y movimiento.
   Tema claro por defecto; los bloques oscuros usan .invert.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. FUENTES
   Todas alojadas en local: cero peticiones a terceros, funciona sin conexión
   y no filtra la IP del visitante a Google.

   BE BOLD y Halimun son de pago y todavía no están. Sus @font-face ya están
   declarados: al dejar los archivos en assets/fonts/ con esos nombres exactos
   entran solos y desplazan a Anton / Great Vibes, sin tocar una línea de CSS.
   Hasta entonces el navegador falla esa petición (la cachea) y usa el respaldo.

   Respaldos — Anton, Great Vibes y Montserrat — bajo SIL Open Font License,
   que sí permite uso comercial y alojamiento propio.
   -------------------------------------------------------------------------- */

/* --- Titulares --- */
@font-face {
  font-family: 'BE BOLD';
  src: url('../fonts/bebold.woff2') format('woff2'),
       url('../fonts/bebold.otf') format('opentype');
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Anton';
  src: url('../fonts/anton-latin.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* --- Firma / acentos --- */
@font-face {
  font-family: 'Halimun';
  src: url('../fonts/halimun.woff2') format('woff2'),
       url('../fonts/halimun.otf') format('opentype');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Great Vibes';
  src: url('../fonts/greatvibes-latin.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* --- Texto --- */
@font-face {
  font-family: 'Montserrat';
  src: url('../fonts/montserrat-latin.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* --------------------------------------------------------------------------
   2. TOKENS
   -------------------------------------------------------------------------- */

:root {
  /* Marca — primarios */
  --c-pink:        #FF0055;
  --c-pink-light:  #FF2E7A;

  /* Marca — secundario */
  --c-gold:        #D4AF37;

  /* Marca — neutros */
  --c-black:       #0D0D0D;
  --c-white:       #FFFFFF;

  /* Semánticos (tema oscuro cinematográfico).
     Las superficies no son gris neutro: llevan una pizca de magenta para que
     el rosa de marca no se vea como un parche pegado encima. */
  --c-bg:          var(--c-black);
  --c-surface:     #141216;
  --c-surface-2:   #1A171C;
  --c-fg:          var(--c-white);
  --c-fg-muted:    rgba(255, 255, 255, 0.64);
  --c-fg-faint:    rgba(255, 255, 255, 0.52);  /* 5.4:1 sobre el fondo — cumple AA */
  --c-line:        rgba(255, 255, 255, 0.09);
  --c-line-strong: rgba(255, 255, 255, 0.18);

  /* Degradados */
  --g-pink:     linear-gradient(135deg, var(--c-pink) 0%, var(--c-pink-light) 100%);
  --g-gold:     linear-gradient(135deg, #B8952B 0%, var(--c-gold) 50%, #F0D77A 100%);
  --g-hairline: linear-gradient(90deg, transparent, var(--c-pink), var(--c-gold), transparent);

  /* Tipografía */
  --f-display: 'BE BOLD', 'Anton', 'Archivo Black', Impact, sans-serif;
  --f-script:  'Halimun', 'Great Vibes', 'Sacramento', cursive;
  --f-body:    'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Escala tipográfica — desktop first, fluida hacia móvil */
  --t-display: clamp(2.5rem, 5.4vw, 5.25rem);
  --t-h1:      clamp(1.625rem, 3.4vw, 3.125rem);
  --t-h2:      clamp(1.625rem, 2.8vw, 2.625rem);
  --t-h3:      clamp(1.125rem, 1.6vw, 1.5rem);
  --t-lead:    clamp(1rem, 1.15vw, 1.1875rem);
  --t-body:    1rem;
  --t-small:   0.875rem;
  --t-micro:   0.75rem;

  --lh-tight: 1.06;
  --lh-snug:  1.28;
  --lh-body:  1.7;

  --ls-display: -0.02em;
  --ls-eyebrow:  0.18em;

  /* Espaciado — base 8pt */
  --s-1: 0.5rem;
  --s-2: 1rem;
  --s-3: 1.5rem;
  --s-4: 2rem;
  --s-5: 3rem;
  --s-6: 4rem;
  --s-7: 6rem;

  /* Ritmo vertical — UNA sola escala para todos los huecos entre bloques.
     Cualquier margen o padding vertical de la landing sale de aquí: así el
     espaciado es uniforme y se recalibra la página entera tocando estos
     cinco valores. Valores en escritorio (1280px) / móvil (375px):
     8/6 · 11/8 · 15/12 · 20/16 · 26/20 px. */
  --stack-1: clamp(0.375rem, 0.6vw, 0.5rem);
  --stack-2: clamp(0.5rem,   0.9vw, 0.75rem);
  --stack-3: clamp(0.75rem,  1.2vw, 1rem);
  --stack-4: clamp(1rem,     1.6vw, 1.25rem);
  --stack-5: clamp(1.25rem,  2vw,   1.5rem);

  /* Ritmo de sección. Se suma arriba y abajo entre secciones contiguas, así
     que el hueco real entre bloques es el doble: ~32px en móvil y ~41px en
     escritorio. Compacto a propósito: cada sección debe engancharse con la
     siguiente sin bandas negras muertas de por medio. */
  --section-y:        var(--stack-4);
  --container:        1120px;
  --container-narrow: 760px;
  --gutter:           clamp(1.25rem, 4vw, 2.5rem);

  /* Radios */
  --r-sm:   10px;
  --r-md:   16px;
  --r-lg:   24px;
  --r-xl:   32px;
  --r-full: 999px;

  /* Sombras — sobre negro una sombra sola no se ve, así que cada una combina
     profundidad (negro) con un halo de luz de marca. */
  --sh-sm:   0 2px 10px rgba(0, 0, 0, 0.45);
  --sh-md:   0 16px 40px -14px rgba(0, 0, 0, 0.75);
  --sh-lg:   0 48px 96px -36px rgba(0, 0, 0, 0.9);
  --sh-pink: 0 20px 52px -16px rgba(255, 0, 85, 0.5);
  --sh-glow: 0 0 0 1px rgba(255, 255, 255, 0.05),
             0 40px 90px -40px rgba(255, 0, 85, 0.4),
             0 20px 60px -30px rgba(0, 0, 0, 0.9);

  /* Movimiento */
  --e-out:   cubic-bezier(0.22, 1, 0.36, 1);
  --d-fast:  0.18s;
  --d-base:  0.32s;
  --d-slow:  0.6s;
}

/* Panel elevado. Sobre un fondo ya negro no se puede "oscurecer" un bloque
   para destacarlo, así que se separa subiendo un punto la superficie y
   marcando el borde superior con una línea de luz. */
.panel {
  --c-surface:   #1A171C;
  --c-surface-2: #221E24;
  position: relative;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(255, 0, 85, 0.09), transparent 62%),
    linear-gradient(180deg, #17141A 0%, #100E12 100%);
  border: 1px solid var(--c-line);
  box-shadow: var(--sh-lg);
}

/* top:0 y no -1px porque .community recorta con overflow:hidden */
.panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 12%;
  right: 12%;
  height: 1px;
  background: var(--g-hairline);
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   3. RESET
   -------------------------------------------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  background: var(--c-bg);
  color: var(--c-fg);
  font-family: var(--f-body);
  font-size: var(--t-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Iluminación ambiental. Va en una capa fija propia y no en background-attachment
   del body, que en móvil obliga a repintar en cada scroll. Al ser position:fixed
   con z-index negativo no ocupa espacio ni desplaza absolutamente nada. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    /* foco rosa superior — el que baña el hero */
    radial-gradient(ellipse 90% 55% at 50% -8%,  rgba(255, 0, 85, 0.16), transparent 62%),
    /* contraluz dorado a la derecha */
    radial-gradient(ellipse 55% 45% at 92% 12%,  rgba(212, 175, 55, 0.09), transparent 60%),
    /* rebote frío a media página, para que el negro no se aplane */
    radial-gradient(ellipse 70% 45% at 5% 52%,   rgba(255, 46, 122, 0.06), transparent 65%),
    radial-gradient(ellipse 65% 40% at 95% 88%,  rgba(212, 175, 55, 0.05), transparent 62%),
    /* base: gris carbón arriba cayendo a negro profundo */
    linear-gradient(180deg, #141116 0%, #0D0D0D 38%, #0A090C 100%);
}

/* Viñeta: oscurece las esquinas y empuja la mirada al centro. Es lo que da
   el aire cinematográfico sin añadir un solo elemento visible. */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(ellipse 75% 65% at 50% 45%,
              transparent 55%, rgba(0, 0, 0, 0.55) 100%);
}

img, svg, video, canvas { display: block; max-width: 100%; }
img { height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; padding: 0; }

:focus-visible {
  outline: 2px solid var(--c-pink);
  outline-offset: 3px;
  border-radius: 4px;
}

.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;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: var(--s-2);
  z-index: 999;
  background: var(--c-pink);
  color: var(--c-white);
  padding: var(--s-1) var(--s-2);
  border-radius: var(--r-sm);
  font-weight: 700;
}
.skip-link:focus { top: var(--s-2); }

/* --------------------------------------------------------------------------
   4. LAYOUT
   -------------------------------------------------------------------------- */

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container--narrow { max-width: var(--container-narrow); }

.section { padding-block: var(--section-y); position: relative; }

/* --------------------------------------------------------------------------
   5. TIPOGRAFÍA
   -------------------------------------------------------------------------- */

.display, .h2, .h3 {
  font-family: var(--f-display);
  font-weight: 400;              /* BE BOLD ya es pesada de diseño */
  letter-spacing: var(--ls-display);
  line-height: var(--lh-tight);
  text-transform: uppercase;
  text-wrap: balance;
}

.display { font-size: var(--t-display); }
.h2      { font-size: var(--t-h2); }
.h3      { font-size: var(--t-h3); line-height: var(--lh-snug); }

/* Titular hero: Montserrat 800 en caja normal, tal como marca el wireframe.
   Una condensada display haría ilegible una frase de esta longitud. */
.headline {
  font-family: var(--f-body);
  font-weight: 800;
  font-size: var(--t-h1);
  line-height: 1.28;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

/* Acento Halimun — el contrapeso emocional a BE BOLD */
.script {
  font-family: var(--f-script);
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.15;
  text-transform: none;
  color: var(--c-gold);
}

.eyebrow {
  font-family: var(--f-body);
  font-size: var(--t-micro);
  font-weight: 700;
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  color: var(--c-fg-muted);
}

.lead {
  font-size: var(--t-lead);
  line-height: var(--lh-body);
  color: var(--c-fg-muted);
  text-wrap: pretty;
}

.muted { color: var(--c-fg-muted); }
.text-pink { color: var(--c-pink); }
.text-gold { color: var(--c-gold); }

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

/* --------------------------------------------------------------------------
   6. BOTONES
   -------------------------------------------------------------------------- */

.btn {
  --btn-y: 1.1875rem;
  --btn-x: 2.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6875rem;
  padding: var(--btn-y) var(--btn-x);
  border: 1px solid transparent;
  border-radius: var(--r-full);
  font-family: var(--f-body);
  font-size: 0.9375rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  line-height: 1;
  cursor: pointer;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  transition: transform var(--d-fast) var(--e-out),
              box-shadow var(--d-base) var(--e-out),
              border-color var(--d-base) var(--e-out),
              background var(--d-base) var(--e-out);
}

.btn:active { transform: translateY(1px) scale(0.995); }

/* Barrido de brillo al pasar el cursor */
.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(110deg, transparent 32%, rgba(255,255,255,0.26) 50%, transparent 68%);
  transform: translateX(-120%);
  transition: transform var(--d-slow) var(--e-out);
}
.btn:hover::after { transform: translateX(120%); }

.btn--primary {
  background: var(--g-pink);
  color: var(--c-white);
  box-shadow: var(--sh-pink);
}
.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 26px 60px -20px rgba(255, 0, 85, 0.62);
}

.btn--ghost {
  background: transparent;
  color: var(--c-fg);
  border-color: var(--c-line-strong);
}
.btn--ghost:hover {
  border-color: var(--c-pink);
  color: var(--c-pink);
  transform: translateY(-2px);
}

.btn--block { display: flex; width: 100%; }
.btn--lg    { --btn-y: 1.375rem; --btn-x: 3rem; font-size: 1.0625rem; }

.btn__icon { flex-shrink: 0; }

/* --------------------------------------------------------------------------
   7. TARJETAS Y SUPERFICIES
   -------------------------------------------------------------------------- */

.card {
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--r-lg);
  padding: var(--s-4);
  transition: transform var(--d-base) var(--e-out),
              border-color var(--d-base) var(--e-out),
              box-shadow var(--d-base) var(--e-out);
}

.card--hover:hover {
  transform: translateY(-4px);
  border-color: var(--c-line-strong);
  box-shadow: var(--sh-lg);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border: 1px solid var(--c-line-strong);
  border-radius: var(--r-full);
  font-size: var(--t-micro);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.rule {
  border: 0;
  height: 1px;
  background: var(--c-line);
}

/* --------------------------------------------------------------------------
   8. PLACEHOLDERS DE IMAGEN
   Huecos etiquetados que declaran su propio propósito. Para sustituirlos:
   cambiar el <div class="ph"> por un <img> con el mismo aspect-ratio.
   -------------------------------------------------------------------------- */

.ph {
  position: relative;
  display: grid;
  place-content: center;
  align-content: center;
  gap: 0.375rem;
  padding: var(--s-2);
  text-align: center;
  aspect-ratio: var(--ph-ratio, 4 / 3);
  border: 1px dashed var(--c-line-strong);
  border-radius: var(--r-md);
  background:
    linear-gradient(135deg, rgba(255, 0, 85, 0.05), rgba(212, 175, 55, 0.05)),
    var(--c-surface-2);
  overflow: hidden;
}

.ph__label {
  font-size: var(--t-micro);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-fg-muted);
}

.ph__hint {
  font-size: var(--t-micro);
  line-height: 1.45;
  color: var(--c-fg-faint);
}

.ph--portrait { --ph-ratio: 4 / 5; }
.ph--story    { --ph-ratio: 9 / 16; }
.ph--wide     { --ph-ratio: 16 / 9; }
.ph--square   { --ph-ratio: 1 / 1; }

/* --------------------------------------------------------------------------
   9. FORMULARIOS
   -------------------------------------------------------------------------- */

.field { display: grid; gap: 0.375rem; }

.field__label {
  font-size: var(--t-small);
  font-weight: 600;
  color: var(--c-fg-muted);
}

.field__input {
  width: 100%;
  padding: 1rem 1.125rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--c-line-strong);
  border-radius: var(--r-sm);
  color: var(--c-fg);
  transition: border-color var(--d-fast) var(--e-out),
              box-shadow var(--d-fast) var(--e-out);
}

.field__input::placeholder { color: var(--c-fg-faint); }

.field__input:focus {
  outline: none;
  border-color: var(--c-pink);
  box-shadow: 0 0 0 4px rgba(255, 0, 85, 0.12);
}

.field__input[aria-invalid='true'] { border-color: var(--c-pink); }
.field__error { font-size: var(--t-small); color: var(--c-pink); }

/* --------------------------------------------------------------------------
   10. MOVIMIENTO
   Los elementos arrancan ocultos y motion.js les añade .is-visible.
   Solo se animan opacity y transform (compuestas por GPU, sin reflow).
   -------------------------------------------------------------------------- */

[data-reveal] {
  opacity: 0;
  transition: opacity 0.7s var(--e-out), transform 0.7s var(--e-out);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}

[data-reveal='fade']  { transform: none; }
[data-reveal='up']    { transform: translateY(28px); }
[data-reveal='left']  { transform: translateX(-28px); }
[data-reveal='right'] { transform: translateX(28px); }
[data-reveal='scale'] { transform: scale(0.965); }

[data-reveal].is-visible {
  opacity: 1;
  transform: none;
  will-change: auto;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-10px); }
}

@keyframes pulse-ring {
  0%   { box-shadow: 0 0 0 0 rgba(255, 0, 85, 0.40); }
  70%  { box-shadow: 0 0 0 18px rgba(255, 0, 85, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 0, 85, 0); }
}

@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.is-floating { animation: float 6s ease-in-out infinite; }
.is-pulsing  { animation: pulse-ring 2.4s var(--e-out) infinite; }

/* Carril marquee — se pausa al pasar el cursor para poder mirarlo */
.marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}
.marquee__track {
  display: flex;
  gap: var(--s-2);
  width: max-content;
  animation: marquee var(--marquee-duration, 44s) linear infinite;
}
.marquee:hover .marquee__track,
.marquee:focus-within .marquee__track { animation-play-state: paused; }

/* Preferencia de movimiento reducido — innegociable */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  [data-reveal] { opacity: 1; transform: none; }
}

/* --------------------------------------------------------------------------
   11. RESPONSIVE
   Desktop first: la base es la composición de escritorio, esto reduce.
   -------------------------------------------------------------------------- */

/* Sin ajuste de --section-y para tablet: la escala --stack-* ya es fluida y
   baja sola de 20px a 16px entre 1280 y 375. */

@media (max-width: 768px) {
  .card { padding: var(--s-3); }
  .btn  { --btn-y: 1.0625rem; --btn-x: 1.75rem; }
}

@media (max-width: 480px) {
  :root { --gutter: 1.25rem; }
  .btn--lg { --btn-x: 1.5rem; font-size: 0.9375rem; }
}

/* --------------------------------------------------------------------------
   12. IMPRESIÓN
   -------------------------------------------------------------------------- */

@media print {
  body { background: #fff; color: #000; }
  .marquee, .btn::after, .site-header { display: none; }
}
