/* Kirina Maoly Alba — Base: reset, tipografía, layout y utilidades */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: var(--lh-body);
  color: var(--color-ink);
  background: var(--color-ivory);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

img, picture, svg, video { display: block; max-width: 100%; }
img { height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
a { color: inherit; text-decoration: none; }
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }
:where(h1, h2, h3, h4, p) { overflow-wrap: break-word; }

::selection { background: var(--color-primary-soft); color: var(--color-noir); }

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

/* ── Tipografía ── */
.display, h1, h2, h3, .h1, .h2, .h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: var(--lh-heading);
  letter-spacing: -0.01em;
  color: var(--color-ink);
}
.display { font-size: var(--fs-display); line-height: 1.02; }
h1, .h1 { font-size: var(--fs-h1); line-height: 1.08; }
h2, .h2 { font-size: var(--fs-h2); line-height: 1.12; letter-spacing: 0; }
h3, .h3 { font-size: var(--fs-h3); line-height: 1.2; letter-spacing: 0; }
h4, .h4 {
  font-family: var(--font-body);
  font-size: var(--fs-h4);
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: 0.01em;
}
.display em, h1 em, h2 em, h3 em {
  font-style: italic;
  font-weight: 500;
  color: var(--color-primary);
}
p { color: var(--color-cocoa); max-width: 65ch; }
.lead { font-size: var(--fs-lead); font-weight: 300; line-height: 1.6; color: var(--color-ink); }
.small { font-size: var(--fs-small); }
strong { font-weight: 500; color: var(--color-ink); }

.overline {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: var(--fs-overline);
  font-weight: 500;
  letter-spacing: var(--ls-overline);
  text-transform: uppercase;
  color: var(--color-primary);
}
.overline::before {
  content: "";
  width: 32px;
  height: 1px;
  background: currentColor;
}
.overline--center::after {
  content: "";
  width: 32px;
  height: 1px;
  background: currentColor;
}

/* ── Layout ── */
.container {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--text { max-width: calc(var(--container-text) + 2 * var(--gutter)); }

.section { padding-block: var(--section-y); position: relative; }
.section--white { background: var(--color-white); }
.section--blush { background: var(--color-blush); }
.section--mist { background: var(--color-mist); }
.section--noir { background: var(--grad-noir); color: var(--color-ivory); }
.section--noir :is(h1, h2, h3, h4) { color: var(--color-ivory); }
.section--noir p { color: rgba(251, 247, 243, .72); }
.section--noir .overline { color: var(--color-primary-soft); }

.section-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  text-align: center;
  margin-bottom: var(--space-8);
}
.section-head p { margin-inline: auto; }
.section-head--left { align-items: flex-start; text-align: left; }
.section-head--left p { margin-inline: 0; }

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

/* ── Utilidades ── */
.visually-hidden {
  position: absolute !important;
  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;
  left: var(--space-4);
  top: -100px;
  z-index: var(--z-modal);
  padding: var(--space-3) var(--space-5);
  background: var(--color-noir);
  color: var(--color-ivory);
  border-radius: var(--radius-pill);
  transition: top var(--dur-base) var(--ease-out);
}
.skip-link:focus { top: var(--space-4); }
.text-center { text-align: center; }
.mt-6 { margin-top: var(--space-6); }
.mt-7 { margin-top: var(--space-7); }

/* ── Aparición al hacer scroll ── */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--dur-reveal) var(--ease-out), transform var(--dur-reveal) var(--ease-out);
  transition-delay: calc(var(--i, 0) * 80ms);
}
.js [data-reveal].is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js [data-reveal] { opacity: 1; transform: none; }
}
