/* ═══════════════════════════════════════════════════════════════════════════
   iBeroFit — página provisional
   Tokens y lenguaje visual heredados de la línea de diseño de A.RO Health:
   base oscura cálida, coral de marca y tipografía display serif.
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  color-scheme: dark;

  --bg: #101110;
  --bg-deep: #0a0b0a;
  --surface: rgba(31, 30, 28, 0.58);
  --border: rgba(243, 241, 234, 0.09);
  --border-strong: rgba(243, 241, 234, 0.16);

  --text: #f3f1ea;
  --text-muted: #a9a69b;
  --text-subtle: #7b7970;

  --brand: #e07a56;
  --brand-text: #e89272;
  --accent: #6bbc90;
  --brand-soft: rgba(224, 122, 86, 0.14);
  --accent-soft: rgba(107, 188, 144, 0.12);

  --font-display: 'Iowan Old Style', 'Palatino Linotype', Palatino, 'Book Antiqua', Georgia, serif;
  --font-ui: -apple-system, BlinkMacSystemFont, 'Segoe UI', Inter, Roboto, 'Helvetica Neue', Arial, sans-serif;

  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-6: 24px;
  --s-8: 32px;
  --s-12: 48px;

  --r-lg: 16px;
  --r-xl: 24px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-lg: 0 6px 12px rgba(0, 0, 0, 0.45), 0 24px 64px rgba(0, 0, 0, 0.55);
}

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

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

body {
  margin: 0;
  min-height: 100svh;
  display: flex;
  background: radial-gradient(140% 120% at 50% 0%, #171816 0%, var(--bg) 45%, var(--bg-deep) 100%);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: rgba(224, 122, 86, 0.32);
  color: var(--text);
}

/* ── Fondo ─────────────────────────────────────────────────────────────────── */

.aurora {
  position: fixed;
  inset: -20%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(760px 460px at 18% 12%, var(--brand-soft), transparent 62%),
    radial-gradient(680px 420px at 84% 22%, var(--accent-soft), transparent 64%),
    radial-gradient(900px 520px at 50% 110%, rgba(133, 159, 224, 0.1), transparent 60%);
  filter: blur(6px);
  animation: drift 26s var(--ease-out) infinite alternate;
}

.grid-veil {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.5;
  background-image:
    linear-gradient(rgba(243, 241, 234, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(243, 241, 234, 0.035) 1px, transparent 1px);
  background-size: 68px 68px;
  mask-image: radial-gradient(circle at 50% 45%, #000 0%, transparent 72%);
  -webkit-mask-image: radial-gradient(circle at 50% 45%, #000 0%, transparent 72%);
}

@keyframes drift {
  from {
    transform: translate3d(-2%, -1%, 0) scale(1);
  }
  to {
    transform: translate3d(2%, 2%, 0) scale(1.06);
  }
}

/* ── Composición ───────────────────────────────────────────────────────────── */

.stage {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(24px, 6vw, 72px) clamp(20px, 5vw, 48px);
}

.card {
  width: min(660px, 100%);
  text-align: center;
  padding: clamp(32px, 6vw, 56px) clamp(22px, 5vw, 52px);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  background: var(--surface);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow-lg);
  animation: rise 900ms var(--ease-out) both;
}

/* ── Marca ─────────────────────────────────────────────────────────────────── */

.mark {
  display: flex;
  justify-content: center;
  margin-bottom: var(--s-6);
  animation: rise 900ms var(--ease-out) 80ms both;
}

.mark svg {
  display: block;
}

.mark-line {
  stroke-dasharray: 78;
  stroke-dashoffset: 78;
  animation: trace 2.6s var(--ease-out) 400ms infinite;
}

.brand {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.5rem, 9vw, 4.25rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  animation: rise 900ms var(--ease-out) 140ms both;
}

.brand-i {
  color: var(--brand-text);
  font-style: italic;
}

.brand-bero {
  color: var(--text);
}

.brand-fit {
  background: linear-gradient(100deg, var(--brand-text) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.eyebrow {
  margin: var(--s-4) 0 0;
  font-size: clamp(0.66rem, 2.2vw, 0.75rem);
  font-weight: 600;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--text-subtle);
  animation: rise 900ms var(--ease-out) 220ms both;
}

/* ── Mensaje ───────────────────────────────────────────────────────────────── */

.headline {
  margin: clamp(24px, 5vw, 36px) 0 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.5rem, 5.2vw, 2.25rem);
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: var(--text);
  animation: rise 900ms var(--ease-out) 300ms both;
}

.headline::after {
  content: '';
  display: inline-block;
  width: 0.42em;
  height: 0.42em;
  margin-left: 0.5em;
  vertical-align: 0.12em;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 0 rgba(224, 122, 86, 0.45);
  animation: pulse 2.8s var(--ease-out) infinite;
}

.lede {
  margin: var(--s-4) auto 0;
  max-width: 42ch;
  font-size: clamp(0.98rem, 2.6vw, 1.1rem);
  line-height: 1.68;
  color: var(--text-muted);
  text-wrap: balance;
  animation: rise 900ms var(--ease-out) 380ms both;
}

.rule {
  width: min(180px, 55%);
  height: 1px;
  margin: clamp(28px, 5vw, 40px) auto clamp(20px, 4vw, 28px);
  border: 0;
  background: linear-gradient(90deg, transparent, var(--border-strong), transparent);
  animation: rise 900ms var(--ease-out) 460ms both;
}

.footnote {
  margin: 0;
  font-size: clamp(0.78rem, 2.2vw, 0.875rem);
  letter-spacing: 0.06em;
  color: var(--text-subtle);
  animation: rise 900ms var(--ease-out) 540ms both;
}

/* ── Animaciones ───────────────────────────────────────────────────────────── */

@keyframes rise {
  from {
    opacity: 0;
    transform: translate3d(0, 14px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes trace {
  0% {
    stroke-dashoffset: 78;
    opacity: 0.25;
  }
  35% {
    opacity: 1;
  }
  70%,
  100% {
    stroke-dashoffset: -78;
    opacity: 0.25;
  }
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(224, 122, 86, 0.45);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(224, 122, 86, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(224, 122, 86, 0);
  }
}

/* ── Responsive fino ───────────────────────────────────────────────────────── */

@media (max-width: 480px) {
  .card {
    border-radius: var(--r-lg);
  }

  .eyebrow {
    letter-spacing: 0.24em;
  }
}

@media (min-width: 1024px) {
  .card {
    padding: 64px 64px 56px;
  }
}

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