/* ==========================================================================
   Base: reset, tipografía, estructura de secciones y utilidades
   ========================================================================== */

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

* {
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

body.menu-open {
  overflow: hidden;
}

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

a {
  color: inherit;
}

button,
input,
textarea {
  font: inherit;
  color: inherit;
}

ul,
ol {
  list-style: none;
}

p {
  text-wrap: pretty;
}

b,
strong {
  font-weight: 600;
}

h1,
h2,
h3,
h4 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.01em;
  text-wrap: balance;
  font-variant-numeric: lining-nums;
}

h1 {
  font-size: var(--fs-h1);
}

h2 {
  font-size: var(--fs-h2);
}

h3 {
  font-size: var(--fs-h3);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.section--deep :focus-visible,
.section--night :focus-visible {
  outline-color: var(--accent-light);
}

/* Estructura */
.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gut);
}

.wrap--narrow {
  max-width: 880px;
}

.section {
  position: relative;
  padding-block: var(--section-y);
  overflow-x: clip; /* red de seguridad: ningún adorno decorativo ensancha la página */
}

.section--paper {
  background: var(--paper);
}

.section--blush {
  background: var(--blush);
}

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

.section--night {
  background:
    radial-gradient(90% 60% at 50% 0%, rgba(174, 69, 96, 0.35), rgba(174, 69, 96, 0) 70%),
    var(--deep-2);
  color: var(--white);
}

.section-head {
  display: grid;
  gap: var(--sp-3);
  margin-bottom: var(--sp-6);
}

@media (min-width: 860px) {
  .section-head--split {
    grid-template-columns: 1fr 1fr;
    gap: clamp(2rem, 6vw, 6rem);
    align-items: end;
  }
}

/* Texto */
.kicker {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-ink);
  margin-bottom: 0.75rem;
}

.kicker::before {
  content: "";
  display: inline-block;
  width: 28px;
  height: 1px;
  margin-right: 0.75rem;
  vertical-align: middle;
  background: currentColor;
  opacity: 0.7;
}

.section--deep .kicker,
.section--night .kicker {
  color: var(--gold-light);
}

.lead {
  font-size: var(--fs-lead);
  color: var(--muted);
}

.section--deep .lead,
.section--night .lead {
  color: rgba(255, 255, 255, 0.78);
}

.script {
  font-family: var(--script);
  font-weight: 400;
  color: var(--accent);
  letter-spacing: 0;
}

.section--deep .script,
.section--night .script {
  color: var(--accent-light);
}

.muted {
  color: var(--muted);
  font-size: var(--fs-small);
}

.section--deep .muted,
.section--night .muted {
  color: rgba(255, 255, 255, 0.65);
}

.copy > * + * {
  margin-top: var(--sp-3);
}

.copy p {
  color: var(--muted);
}

.section--deep .copy p,
.section--night .copy p {
  color: rgba(255, 255, 255, 0.8);
}

.note {
  border-left: 2px solid var(--accent);
  padding-left: 1rem;
  font-size: 0.95rem;
  color: var(--muted);
  margin-top: var(--sp-4);
}

.section--deep .note {
  border-color: var(--accent-light);
  color: rgba(255, 255, 255, 0.78);
}

/* Accesibilidad */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: var(--gut);
  top: -4rem;
  z-index: 100;
  background: var(--deep);
  color: #fff;
  padding: 0.75rem 1.25rem;
  border-radius: var(--pill);
  text-decoration: none;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 0.75rem;
}

/* Secciones oscuras con borde superior curvo */
.section--deep,
.section--night {
  z-index: 1;
  margin-top: calc(var(--r-xl) * -0.6);
  padding-top: calc(var(--section-y) + var(--r-xl) * 0.6);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
}
