/* ============================================================
   VELIORA — Base Styles
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,600;1,400;1,500&family=Poppins:wght@300;400;500;600&display=swap');
@import 'tokens.css';

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
  overscroll-behavior-y: none;
}

body {
  font-family: var(--font-ui);
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  overscroll-behavior-y: none;
}

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

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

ul, ol {
  list-style: none;
}

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

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
}

/* ── Typography Global ── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-editorial);
  font-weight: 400;
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--color-primary);
}

h1 { font-size: clamp(2.25rem, 4vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.75rem); }
h4 { font-size: var(--text-xl); font-family: var(--font-ui); font-weight: 500; letter-spacing: 0; }
h5 { font-size: var(--text-lg); font-family: var(--font-ui); font-weight: 500; }
h6 { font-size: var(--text-base); font-family: var(--font-ui); font-weight: 600; }

p { line-height: var(--leading-relaxed); }

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

html { overflow-x: hidden; }

/* ── Layout Utilities ── */
.container {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-8);
}

.container--text {
  max-width: var(--container-text);
  margin-inline: auto;
  padding-inline: var(--space-8);
}

.section {
  padding-block: var(--section-py);
}

.section--sm {
  padding-block: var(--section-py-sm);
}

.section--dark {
  background-color: var(--color-bg-dark);
  color: var(--color-white);
}

.section--dark h1,
.section--dark h2,
.section--dark h3 {
  color: var(--color-white);
}

.section--tinted {
  background-color: var(--color-bg-section);
}

/* ── Label / Overline ── */
.label {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  color: var(--color-accent-deep);
}

.label--light {
  color: var(--color-accent-light);
}

/* ── Divider ── */
.divider {
  display: block;
  width: 40px;
  height: 1px;
  background-color: var(--color-accent);
  margin-block: var(--space-6);
}

/* ── Reveal Animation ── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--transition-reveal), transform var(--transition-reveal);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 100ms; }
.reveal-delay-2 { transition-delay: 200ms; }
.reveal-delay-3 { transition-delay: 300ms; }
.reveal-delay-4 { transition-delay: 400ms; }
.reveal-delay-5 { transition-delay: 500ms; }

/* ── Focus styles ── */
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

/* ── View transitions (navegación con sensación de app) ── */
@keyframes vlr-out {
  to { opacity: 0; transform: translateY(-12px); }
}
@keyframes vlr-in {
  from { opacity: 0; transform: translateY(16px); }
}
::view-transition-old(root) { animation: vlr-out 240ms ease-out both; }
::view-transition-new(root) { animation: vlr-in 280ms ease-out both; }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}
