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

:root {
  --cream:     #F6EDD8;
  --parchment: #EDE0C0;
  --ink:       #1E120A;
  --burgundy:  #6B1E2E;
  --wine:      #4A1020;
  --amber:     #B87333;
  --gold:      #C9973A;
  --muted:     #5C4A38;  /* antes #7A6450 — más oscuro para pasar WCAG AA */
  --soft:      #F0E4CA;
}

html { scroll-behavior: smooth; }

body {
  background: var(--cream);
  color: var(--ink);
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 18px;
  line-height: 1.7;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 1000;
  opacity: 0.6;
}

main {
  display: block; /* comportamiento por defecto en todos los navegadores */
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: var(--wine);
  color: var(--cream);
  padding: 0.5rem 1.2rem;
  font-family: 'Cinzel', serif;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-decoration: none;
  z-index: 9999;
  transition: top 0.2s;
}

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

/* Animaciones globales */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes arrowPulse {
  0%, 100% { opacity: 0.4; }
  50%       { opacity: 1; }
}
@keyframes dotPulse {
  0%, 80%, 100% { opacity: 0.2; transform: scale(0.8); }
  40%           { opacity: 1;   transform: scale(1); }
}

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Botones */
.btn-primary {
  display: inline-block;
  padding: 0.85rem 2.4rem;
  background: var(--burgundy);
  color: var(--cream);
  font-family: 'EB Garamond', serif;
  font-size: 0.95rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.3s, transform 0.2s;
  border: none;
  cursor: pointer;
}
.btn-primary:hover { background: var(--wine); transform: translateY(-2px); }

.btn-outline {
  display: inline-block;
  padding: 0.85rem 2.4rem;
  border: 1px solid var(--amber);
  color: var(--amber);
  font-family: 'EB Garamond', serif;
  font-size: 0.95rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.3s, color 0.3s, transform 0.2s;
  cursor: pointer;
  background: transparent;
}
.btn-outline:hover { background: var(--amber); color: var(--cream); transform: translateY(-2px); }

/* Elementos compartidos */
section { padding: 7rem 2rem; position: relative; }

.section-inner { max-width: 900px; margin: 0 auto; }

.section-label {
  font-family: 'Cinzel', serif;
  font-size: 0.65rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 1.5rem;
  display: block;
}

.section-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 400;
  color: var(--wine);
  line-height: 1.2;
  margin-bottom: 2rem;
}
.section-title em { font-style: italic; }

.ornamental-line {
  width: 50px;
  height: 2px;
  background: var(--amber);
  margin: 1.5rem 0;
}

.pull-quote {
  border-left: 2px solid var(--amber);
  padding: 1rem 1.5rem;
  margin: 2.5rem 0;
  font-size: 1.2rem;
  font-style: italic;
  color: var(--burgundy);
  line-height: 1.6;
}

/* Links en contexto de prosa */
a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 4px;
  border-radius: 2px;
}

/* ── Scroll progress bar ─────────────────────────────────── */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(
    to right,
    var(--burgundy),
    var(--amber),
    var(--gold)
  );
  z-index: 999;
  transition: width 0.1s linear;
  transform-origin: left;
}

@media (max-width: 768px) {
  section { padding: 5rem 1.5rem; }
}