/* ==============================================================
   Débora & Manuel — The Race of a Lifetime · 27.03.2027
   Race roadbook × alpine romance.
   Paper cream / pine ink / sunrise coral.
   Mobile-first. No build step.
   ============================================================== */

:root {
  --ink: #1c2b21;
  --ink-soft: #3d4a40;
  --paper: #f3efe4;
  --paper-deep: #eae4d2;
  --coral: #e4572e;
  --coral-deep: #c33f1b;
  --sun: #f2b441;
  --moss: #5c7355;
  --white: #fdfcf8;

  --font-display: "Archivo", sans-serif;
  --font-body: "Fraunces", serif;
  --font-mono: "IBM Plex Mono", monospace;

  --shadow-card: 0 18px 40px -18px rgba(28, 43, 33, 0.35);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-optical-sizing: auto;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.65;
  overflow-x: hidden;
}

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

.mono {
  font-family: var(--font-mono);
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  font-weight: 500;
}

.muted { opacity: 0.65; font-style: italic; }

/* Topographic contour texture (shared) */
.topo-bg {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='420' height='420' viewBox='0 0 420 420'%3E%3Cg fill='none' stroke='%231c2b21' stroke-opacity='0.06' stroke-width='1.4'%3E%3Cpath d='M60 210c0-83 67-150 150-150s150 67 150 150-67 150-150 150S60 293 60 210z'/%3E%3Cpath d='M95 210c0-63 52-115 115-115s115 52 115 115-52 115-115 115S95 273 95 210z'/%3E%3Cpath d='M130 210c0-44 36-80 80-80s80 36 80 80-36 80-80 80-80-36-80-80z'/%3E%3Cpath d='M165 210c0-25 20-45 45-45s45 20 45 45-20 45-45 45-45-20-45-45z'/%3E%3C/g%3E%3C/svg%3E");
}

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-variation-settings: "wdth" 110;
  font-weight: 800;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-decoration: none;
  border: 2px solid var(--ink);
  padding: 0.9rem 1.8rem;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.btn--solid {
  background: var(--coral);
  color: var(--white);
  border-color: var(--coral-deep);
  box-shadow: 4px 4px 0 var(--ink);
}
.btn--solid:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--ink); }
.btn--solid:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }

.btn--light {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--paper);
  box-shadow: 4px 4px 0 rgba(0,0,0,0.45);
}
.btn--light:hover { transform: translate(-2px, -2px); }

.btn--disabled { opacity: 0.6; pointer-events: none; }
.btn--big { font-size: 1.1rem; padding: 1.1rem 2.4rem; }
.btn--full { width: 100%; }

/* ==============================================================
   HERO
   ============================================================== */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 4rem 1.5rem 5.5rem;
  color: var(--white);
  overflow: hidden;
  background: var(--ink);
}

.hero__bg {
  position: absolute;
  inset: 0;
  background: url("media/_mg_0435.jpg") center 38% / cover no-repeat;
  filter: saturate(0.9);
}
.hero__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(28,43,33,0.55) 0%, rgba(28,43,33,0.25) 35%, rgba(28,43,33,0.78) 100%);
}

.hero__topo {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='420' height='420' viewBox='0 0 420 420'%3E%3Cg fill='none' stroke='%23f3efe4' stroke-opacity='0.07' stroke-width='1.4'%3E%3Cpath d='M60 210c0-83 67-150 150-150s150 67 150 150-67 150-150 150S60 293 60 210z'/%3E%3Cpath d='M95 210c0-63 52-115 115-115s115 52 115 115-52 115-115 115S95 273 95 210z'/%3E%3Cpath d='M130 210c0-44 36-80 80-80s80 36 80 80-36 80-80 80-80-36-80-80z'/%3E%3C/g%3E%3C/svg%3E");
  mix-blend-mode: screen;
  pointer-events: none;
}

.hero__content {
  position: relative;
  z-index: 2;
  max-width: 56rem;
  animation: hero-rise 1.1s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes hero-rise {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero__kicker {
  display: inline-block;
  color: var(--sun);
  border: 1px solid rgba(242, 180, 65, 0.55);
  padding: 0.45rem 1rem;
  margin-bottom: 1.6rem;
  backdrop-filter: blur(3px);
}

.hero__presents {
  font-style: italic;
  font-size: clamp(1.05rem, 2.5vw, 1.35rem);
  opacity: 0.92;
  margin-bottom: 0.6rem;
}

.hero__title {
  font-family: var(--font-display);
  font-variation-settings: "wdth" 125;
  font-weight: 900;
  text-transform: uppercase;
  line-height: 0.92;
  font-size: clamp(3rem, 12vw, 8.5rem);
  letter-spacing: -0.01em;
  margin-bottom: 1.8rem;
  text-shadow: 0 10px 40px rgba(0,0,0,0.35);
}

.hero__title-line { display: block; }
.hero__title-line--accent {
  color: var(--coral);
  font-family: var(--font-body);
  font-style: italic;
  font-weight: 400;
  text-transform: lowercase;
  font-size: 0.42em;
  line-height: 1.15;
  letter-spacing: 0.02em;
  -webkit-text-stroke: 0;
  text-shadow: none;
  color: var(--sun);
}

.hero__bib {
  display: inline-flex;
  flex-direction: column;
  gap: 0.45rem;
  background: rgba(243, 239, 228, 0.12);
  border: 1px solid rgba(243, 239, 228, 0.4);
  padding: 0.9rem 1.6rem;
  margin-bottom: 2.2rem;
  backdrop-filter: blur(4px);
}
.hero__bib-row { font-size: 0.78rem; }
.hero__bib-divider {
  height: 1px;
  background: repeating-linear-gradient(90deg, rgba(243,239,228,0.6) 0 8px, transparent 8px 16px);
}

.hero__cta {
  display: inline-block;
  font-family: var(--font-display);
  font-variation-settings: "wdth" 110;
  font-weight: 800;
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-decoration: none;
  color: var(--ink);
  background: var(--sun);
  padding: 1rem 2.4rem;
  box-shadow: 5px 5px 0 rgba(0,0,0,0.4);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.hero__cta:hover { transform: translate(-2px, -2px); box-shadow: 8px 8px 0 rgba(0,0,0,0.4); }

.scroll-hint {
  position: absolute;
  bottom: 1.4rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  color: var(--white);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  opacity: 0.85;
}
.scroll-hint__line {
  width: 1px;
  height: 44px;
  background: var(--white);
  animation: hint-pulse 2s ease-in-out infinite;
  transform-origin: top;
}
@keyframes hint-pulse {
  0%, 100% { transform: scaleY(0.4); opacity: 0.4; }
  50% { transform: scaleY(1); opacity: 1; }
}

/* ---------------- Marquee ---------------- */
.marquee {
  background: var(--coral);
  color: var(--paper);
  overflow: hidden;
  border-top: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  padding: 0.65rem 0;
}
.marquee__track {
  display: flex;
  white-space: nowrap;
  width: max-content;
  animation: marquee 22s linear infinite;
  font-family: var(--font-display);
  font-variation-settings: "wdth" 115;
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.12em;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ==============================================================
   SECTION HEADS
   ============================================================== */
.section-head { text-align: center; max-width: 46rem; margin: 0 auto 3rem; padding: 0 1.5rem; }

.section-head__eyebrow {
  color: var(--coral);
  margin-bottom: 0.9rem;
}
.section-head__eyebrow--light { color: var(--sun); }

.section-head__title {
  font-family: var(--font-display);
  font-variation-settings: "wdth" 120;
  font-weight: 900;
  text-transform: uppercase;
  font-size: clamp(2rem, 6vw, 3.6rem);
  line-height: 1;
}
.section-head__title em {
  font-family: var(--font-body);
  font-style: italic;
  font-weight: 400;
  text-transform: lowercase;
  color: var(--coral);
}

/* ==============================================================
   ROUTE / HISTORIA
   ============================================================== */
.route {
  padding: 5.5rem 0 4rem;
  position: relative;
}
.route::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='420' height='420' viewBox='0 0 420 420'%3E%3Cg fill='none' stroke='%231c2b21' stroke-opacity='0.05' stroke-width='1.4'%3E%3Cpath d='M60 210c0-83 67-150 150-150s150 67 150 150-67 150-150 150S60 293 60 210z'/%3E%3Cpath d='M95 210c0-63 52-115 115-115s115 52 115 115-52 115-115 115S95 273 95 210z'/%3E%3Cpath d='M130 210c0-44 36-80 80-80s80 36 80 80-36 80-80 80-80-36-80-80z'/%3E%3C/g%3E%3C/svg%3E");
}

.route__intro {
  margin-top: 1.4rem;
  font-size: 1.05rem;
  color: var(--ink-soft);
}

.route__list {
  list-style: none;
  max-width: 60rem;
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
}

/* dashed trail line */
.route__list::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(1.5rem + 8px);
  border-left: 2px dashed rgba(28, 43, 33, 0.35);
}

.route__stop {
  position: relative;
  padding: 0 0 2.8rem 2.4rem;
}
.route__stop::before {
  content: "";
  position: absolute;
  left: 1px;
  top: 0.4rem;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--paper);
  border: 3px solid var(--coral);
}
.route__stop--final::before {
  background: var(--coral);
  box-shadow: 0 0 0 5px rgba(228, 87, 46, 0.25);
}

.route__photo {
  width: min(280px, 72vw);
  background: var(--white);
  padding: 10px 10px 14px;
  box-shadow: var(--shadow-card);
  transform: rotate(-2deg);
  margin-bottom: 1.1rem;
  transition: transform 0.3s ease;
}
.route__stop:nth-child(even) .route__photo { transform: rotate(2deg); }
.route__stop:hover .route__photo { transform: rotate(0deg) scale(1.02); }
.route__photo img { aspect-ratio: 4 / 5; object-fit: cover; width: 100%; }

.route__km { color: var(--coral); margin-bottom: 0.2rem; }

.route__place {
  font-family: var(--font-display);
  font-variation-settings: "wdth" 118;
  font-weight: 900;
  text-transform: uppercase;
  font-size: 1.5rem;
  line-height: 1.05;
  margin-bottom: 0.35rem;
}

.route__desc { color: var(--ink-soft); max-width: 34rem; }

/* song chip */
.song-chip {
  display: flex;
  align-items: center;
  gap: 1rem;
  max-width: max-content;
  margin: 1.5rem auto 0;
  background: var(--ink);
  color: var(--paper);
  padding: 1rem 1.6rem;
  border-radius: 999px;
  box-shadow: var(--shadow-card);
}
.song-chip__icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--coral);
  color: var(--white);
  flex-shrink: 0;
  animation: chip-bounce 2.4s ease-in-out infinite;
}
@keyframes chip-bounce {
  0%, 100% { transform: rotate(-6deg); }
  50% { transform: rotate(8deg); }
}
.song-chip__label { color: var(--sun); font-size: 0.62rem; }
.song-chip__name { font-style: italic; font-size: 1rem; }

/* ==============================================================
   STRIP GALLERY
   ============================================================== */
.strip {
  background: var(--ink);
  padding: 2.2rem 0;
  border-top: 2px solid var(--ink);
  overflow: hidden;
}
.strip__track {
  display: flex;
  gap: 1.2rem;
  padding: 0 1.5rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.strip__track::-webkit-scrollbar { display: none; }

.strip__track figure {
  flex: 0 0 auto;
  scroll-snap-align: center;
  width: 220px;
  background: var(--paper);
  padding: 8px 8px 10px;
  transform: rotate(-1.5deg);
}
.strip__track figure:nth-child(even) { transform: rotate(1.5deg); }
.strip__track img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}
.strip__track figcaption {
  text-align: center;
  padding-top: 8px;
  color: var(--ink);
  font-size: 0.6rem;
}

/* ==============================================================
   CHRONO
   ============================================================== */
.chrono {
  background: linear-gradient(165deg, var(--ink) 0%, #25382b 100%);
  color: var(--paper);
  text-align: center;
  padding: 5rem 1.5rem;
  position: relative;
  overflow: hidden;
}
.chrono::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='420' height='420' viewBox='0 0 420 420'%3E%3Cg fill='none' stroke='%23f3efe4' stroke-opacity='0.05' stroke-width='1.4'%3E%3Cpath d='M60 210c0-83 67-150 150-150s150 67 150 150-67 150-150 150S60 293 60 210z'/%3E%3Cpath d='M95 210c0-63 52-115 115-115s115 52 115 115-52 115-115 115S95 273 95 210z'/%3E%3C/g%3E%3C/svg%3E");
}

.chrono__title {
  font-family: var(--font-body);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  margin: 0.6rem 0 2.2rem;
  position: relative;
}

.chrono__display {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: clamp(0.4rem, 2vw, 1.2rem);
  position: relative;
}

.chrono__unit {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.chrono__num {
  display: block;
  min-width: 2.4ch;
  background: var(--paper);
  color: var(--ink);
  font-size: clamp(1.7rem, 6vw, 3.2rem);
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 0.45em 0.3em;
  border-radius: 6px;
  box-shadow: inset 0 -4px 0 rgba(28,43,33,0.18), 0 12px 26px -12px rgba(0,0,0,0.6);
}

.chrono__label { font-size: 0.62rem; color: var(--sun); }

.chrono__sep {
  font-size: clamp(1.7rem, 6vw, 3.2rem);
  line-height: 1.5;
  color: var(--coral);
  animation: blink 1s steps(2, start) infinite;
}
@keyframes blink { to { visibility: hidden; } }

.chrono__date { margin-top: 2rem; opacity: 0.8; position: relative; }

/* ==============================================================
   STAGE / PROGRAMA
   ============================================================== */
.stage { padding: 5.5rem 0 4.5rem; }

.warmup {
  display: flex;
  flex-direction: column;
  max-width: 46rem;
  margin: 0 auto 3.5rem;
  border: 2px solid var(--ink);
  background: var(--white);
  box-shadow: 6px 6px 0 var(--moss);
}
.warmup__badge {
  background: var(--moss);
  color: var(--white);
  padding: 0.6rem 1.2rem;
}
.warmup__body { padding: 1.4rem 1.6rem 1.6rem; }
.warmup__title {
  font-family: var(--font-display);
  font-variation-settings: "wdth" 115;
  font-weight: 800;
  text-transform: uppercase;
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}
.warmup__note { margin-top: 0.9rem; color: var(--moss); }

.stage__day {
  text-align: center;
  color: var(--coral);
  margin-bottom: 1.5rem;
  font-size: 0.8rem;
}

/* --- elevation profile --- */
.stage__profile-wrap {
  max-width: 72rem;
  margin: 0 auto 3.5rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0 1.5rem;
}

.stage__profile-wrap > * { min-width: 760px; }

.stage__profile { width: 100%; display: block; }

.profile-grid line { stroke: rgba(28,43,33,0.12); stroke-dasharray: 4 8; }

.profile-fill {
  fill: rgba(92, 115, 85, 0.16);
  stroke: none;
}

.profile-line {
  fill: none;
  stroke: var(--ink);
  stroke-width: 3.5;
  stroke-linejoin: round;
  stroke-linecap: round;
  stroke-dasharray: 2200;
  stroke-dashoffset: 2200;
}
.stage__profile.is-drawn .profile-line {
  animation: draw-line 2.6s cubic-bezier(0.45, 0, 0.2, 1) forwards;
}
@keyframes draw-line { to { stroke-dashoffset: 0; } }

.profile-pts circle {
  fill: var(--paper);
  stroke: var(--coral);
  stroke-width: 3.5;
  opacity: 0;
}
.stage__profile.is-drawn .profile-pts circle {
  animation: pt-pop 0.4s ease forwards;
}
.stage__profile.is-drawn .profile-pts circle:nth-child(1) { animation-delay: 0.3s; }
.stage__profile.is-drawn .profile-pts circle:nth-child(2) { animation-delay: 0.6s; }
.stage__profile.is-drawn .profile-pts circle:nth-child(3) { animation-delay: 0.9s; }
.stage__profile.is-drawn .profile-pts circle:nth-child(4) { animation-delay: 1.2s; }
.stage__profile.is-drawn .profile-pts circle:nth-child(5) { animation-delay: 1.5s; }
.stage__profile.is-drawn .profile-pts circle:nth-child(6) { animation-delay: 1.9s; }
.stage__profile.is-drawn .profile-pts circle:nth-child(7) { animation-delay: 2.2s; }
.stage__profile.is-drawn .profile-pts circle:nth-child(8) { animation-delay: 2.5s; }
@keyframes pt-pop {
  from { opacity: 0; transform: scale(0.2); transform-origin: center; transform-box: fill-box; }
  to { opacity: 1; transform: scale(1); transform-origin: center; transform-box: fill-box; }
}

.profile-pt--peak { stroke: var(--sun); }
.profile-pt--meta { fill: var(--coral); }

.profile-flag line { stroke: var(--ink); stroke-width: 3; }
.profile-flag path { fill: var(--coral); }
.profile-flag {
  opacity: 0;
}
.stage__profile.is-drawn .profile-flag {
  animation: flag-rise 0.5s ease 2s forwards;
}
@keyframes flag-rise { to { opacity: 1; } }

/* checkpoint labels under profile */
.stage__cps {
  list-style: none;
  position: relative;
  height: 4.4rem;
  margin-top: 0.4rem;
}
.stage__cps li {
  position: absolute;
  left: var(--cp-x);
  transform: translateX(-50%);
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.stage__cps li:nth-child(odd) { top: 0; }
.stage__cps li:nth-child(even) { top: 2.1rem; }
.cp-time { color: var(--coral); font-size: 0.58rem; }
.cp-name {
  font-family: var(--font-display);
  font-variation-settings: "wdth" 112;
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.72rem;
  white-space: nowrap;
}

/* --- checkpoint cards --- */
.cps-cards {
  list-style: none;
  counter-reset: cp;
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: grid;
  gap: 1.2rem;
  grid-template-columns: 1fr;
}

.cps-card {
  counter-increment: cp;
  background: var(--white);
  border: 2px solid var(--ink);
  padding: 1.4rem 1.5rem 1.5rem;
  position: relative;
  box-shadow: 5px 5px 0 rgba(28,43,33,0.18);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.cps-card:hover { transform: translate(-2px, -2px); box-shadow: 8px 8px 0 rgba(28,43,33,0.22); }

.cps-card::before {
  content: counter(cp, decimal-leading-zero);
  position: absolute;
  top: 1.1rem;
  right: 1.2rem;
  font-family: var(--font-display);
  font-variation-settings: "wdth" 120;
  font-weight: 900;
  font-size: 1.8rem;
  color: rgba(28,43,33,0.12);
}

.cps-card__time { color: var(--coral); margin-bottom: 0.45rem; }

.cps-card h3 {
  font-family: var(--font-display);
  font-variation-settings: "wdth" 116;
  font-weight: 900;
  text-transform: uppercase;
  font-size: 1.35rem;
  margin-bottom: 0.35rem;
}

.cps-card p:last-child { color: var(--ink-soft); font-size: 0.95rem; }

.cps-card--peak {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
  box-shadow: 5px 5px 0 var(--sun);
}
.cps-card--peak .cps-card__time { color: var(--sun); }
.cps-card--peak p:last-child { color: rgba(243,239,228,0.8); }
.cps-card--peak::before { color: rgba(243,239,228,0.18); }

.cps-card--meta {
  background: var(--coral);
  color: var(--white);
  border-color: var(--coral-deep);
  box-shadow: 5px 5px 0 var(--ink);
}
.cps-card--meta .cps-card__time { color: var(--white); }
.cps-card--meta p:last-child { color: rgba(253,252,248,0.92); }
.cps-card--meta::before { color: rgba(255,255,255,0.25); }

/* ==============================================================
   VENUE
   ============================================================== */
.venue {
  background: var(--paper-deep);
  padding: 5rem 1.5rem;
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

.venue__media {
  position: relative;
  max-width: 26rem;
  margin: 0 auto;
  background: var(--white);
  padding: 12px 12px 16px;
  box-shadow: var(--shadow-card);
  transform: rotate(-2deg);
}
.venue__media img { aspect-ratio: 4 / 5; object-fit: cover; width: 100%; }
.venue__caption {
  text-align: center;
  padding-top: 10px;
  font-size: 0.62rem;
}

.venue__body { max-width: 32rem; margin: 0 auto; text-align: center; }
.venue__body .section-head__eyebrow { margin-bottom: 0.9rem; display: block; }
.venue__body .section-head__title { margin-bottom: 1.1rem; }
.venue__text { color: var(--ink-soft); margin-bottom: 1.6rem; }

.venue__notice {
  margin-top: 2rem;
  text-align: left;
  border-left: 3px solid var(--coral);
  background: var(--paper);
  padding: 1.1rem 1.3rem;
}
.venue__notice-title { color: var(--coral); margin-bottom: 0.3rem; }

/* ==============================================================
   RULES / DETALLES
   ============================================================== */
.rules { padding: 5.5rem 0; }

.rules__grid {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: grid;
  gap: 1.2rem;
  grid-template-columns: 1fr;
}

.rule {
  border: 2px solid var(--ink);
  background: var(--white);
  padding: 1.6rem 1.6rem 1.7rem;
  box-shadow: 5px 5px 0 rgba(28,43,33,0.18);
}

.rule__num { color: var(--coral); margin-bottom: 0.6rem; }

.rule h3 {
  font-family: var(--font-display);
  font-variation-settings: "wdth" 116;
  font-weight: 900;
  text-transform: uppercase;
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.rule p { color: var(--ink-soft); font-size: 0.97rem; }

.rule__pending {
  margin-top: 0.8rem;
  color: var(--moss);
  font-size: 0.62rem;
}

.rule--gift { background: var(--ink); color: var(--paper); border-color: var(--ink); box-shadow: 5px 5px 0 var(--coral); }
.rule--gift p { color: rgba(243,239,228,0.85); }

.rule__iban {
  margin-top: 1rem;
  display: flex;
  gap: 0.6rem;
  align-items: stretch;
  flex-wrap: wrap;
}
.rule__iban code {
  background: rgba(243,239,228,0.12);
  border: 1px dashed rgba(243,239,228,0.5);
  padding: 0.6rem 0.9rem;
  font-size: 0.78rem;
  flex: 1 1 auto;
}
.rule__copy {
  background: var(--coral);
  color: var(--white);
  border: none;
  padding: 0.6rem 1.1rem;
  cursor: pointer;
  font-size: 0.62rem;
}

/* ==============================================================
   ALBUM
   ============================================================== */
.album {
  background: linear-gradient(165deg, #25382b 0%, var(--ink) 100%);
  color: var(--paper);
  padding: 5rem 1.5rem;
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

.album__media {
  max-width: 22rem;
  margin: 0 auto;
  background: var(--paper);
  padding: 10px 10px 14px;
  transform: rotate(2deg);
  box-shadow: 0 24px 50px -20px rgba(0,0,0,0.7);
}
.album__media img { aspect-ratio: 4 / 5; object-fit: cover; }

.album__body { max-width: 30rem; margin: 0 auto; text-align: center; }
.album__title {
  font-family: var(--font-display);
  font-variation-settings: "wdth" 118;
  font-weight: 900;
  text-transform: uppercase;
  font-size: clamp(1.6rem, 5vw, 2.4rem);
  line-height: 1.05;
  margin: 0.8rem 0 1rem;
}
.album__body > p { color: rgba(243,239,228,0.85); margin-bottom: 1.8rem; }

/* ==============================================================
   RSVP
   ============================================================== */
.rsvp {
  padding: 6rem 1.5rem;
  text-align: center;
  position: relative;
  background:
    linear-gradient(0deg, rgba(243,239,228,0.92), rgba(243,239,228,0.92)),
    url("media/img_5362.jpg") center / cover fixed no-repeat;
}

.rsvp__inner { max-width: 40rem; margin: 0 auto; }
.rsvp__text { color: var(--ink-soft); margin: 1.1rem 0 2.2rem; }
.rsvp__deadline { margin-top: 1.6rem; color: var(--moss); }

/* ==============================================================
   FOOTER
   ============================================================== */
.footer {
  background: var(--ink);
  color: var(--paper);
  text-align: center;
  padding: 3.5rem 1.5rem;
}

.footer__monogram {
  font-family: var(--font-display);
  font-variation-settings: "wdth" 125;
  font-weight: 900;
  font-size: 2.6rem;
  letter-spacing: 0.04em;
}
.footer__monogram span { color: var(--coral); font-family: var(--font-body); font-style: italic; font-weight: 400; }

.footer__tag { margin: 0.8rem 0 0.5rem; color: var(--sun); }
.footer__love { font-style: italic; opacity: 0.75; }

/* ==============================================================
   MODAL + FORM
   ============================================================== */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: flex-end;
  justify-content: center;
}
.modal--open { display: flex; }
body.modal-open { overflow: hidden; }

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(28, 43, 33, 0.7);
  backdrop-filter: blur(3px);
}

.modal__panel {
  position: relative;
  z-index: 1;
  background: var(--paper);
  width: 100%;
  max-width: 36rem;
  max-height: 92svh;
  overflow-y: auto;
  padding: 2.2rem 1.6rem 2rem;
  border-top: 6px solid var(--coral);
  animation: panel-up 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes panel-up {
  from { transform: translateY(60px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.modal__close {
  position: absolute;
  top: 0.8rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  color: var(--ink);
  opacity: 0.6;
}
.modal__close:hover { opacity: 1; }

.modal__head { text-align: center; margin-bottom: 1.8rem; }
.modal__head-eyebrow { color: var(--coral); margin-bottom: 0.5rem; }
.modal__head h3 {
  font-family: var(--font-display);
  font-variation-settings: "wdth" 118;
  font-weight: 900;
  text-transform: uppercase;
  font-size: 1.7rem;
}

.form-row { margin-bottom: 1.2rem; text-align: left; }
.form-row--split {
  display: grid;
  gap: 1.2rem;
  grid-template-columns: 1fr;
}

.form-label {
  display: block;
  margin-bottom: 0.4rem;
  color: var(--ink-soft);
  font-size: 0.62rem;
}

.form-input {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
  background: var(--white);
  border: 2px solid rgba(28,43,33,0.35);
  padding: 0.75rem 0.9rem;
  transition: border-color 0.15s ease;
}
.form-input:focus { outline: none; border-color: var(--coral); }
textarea.form-input { resize: vertical; }

.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem; margin-top: 0.4rem; }
.seg__opt { position: relative; cursor: pointer; }
.seg__opt input { position: absolute; opacity: 0; }
.seg__opt span {
  display: block;
  text-align: center;
  border: 2px solid rgba(28,43,33,0.35);
  background: var(--white);
  padding: 0.75rem 0.6rem;
  font-size: 0.95rem;
  transition: all 0.15s ease;
}
.seg__opt input:checked + span {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
  box-shadow: 3px 3px 0 var(--coral);
}

.attendee-field {
  border: 2px dashed rgba(28,43,33,0.3);
  background: rgba(255,255,255,0.6);
  padding: 1rem 1rem 0.4rem;
  margin-bottom: 1rem;
}
.attendee-field__title {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  color: var(--coral);
  margin-bottom: 0.7rem;
}

.modal__result { text-align: center; padding: 1.5rem 0 0.5rem; }
.modal__result-icon { font-size: 3rem; margin-bottom: 0.8rem; }
.modal__result h3 {
  font-family: var(--font-display);
  font-variation-settings: "wdth" 116;
  font-weight: 900;
  text-transform: uppercase;
  font-size: 1.5rem;
  margin-bottom: 0.7rem;
}
.modal__result p { color: var(--ink-soft); margin-bottom: 1.6rem; }

/* ==============================================================
   FADE-IN ON SCROLL
   ============================================================== */
.fade-in { opacity: 0; transform: translateY(26px); transition: opacity 0.7s ease, transform 0.7s ease; }
.fade-in--visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001s !important; transition-duration: 0.001s !important; }
  html { scroll-behavior: auto; }
  .fade-in { opacity: 1; transform: none; }
}

/* ==============================================================
   BREAKPOINTS
   ============================================================== */
@media (min-width: 600px) {
  .form-row--split { grid-template-columns: 1fr 1fr; }
  .modal { align-items: center; padding: 2rem; }
  .modal__panel { border: 2px solid var(--ink); border-top: 6px solid var(--coral); padding: 2.6rem 2.4rem 2.4rem; }
  .cps-cards { grid-template-columns: repeat(2, 1fr); }
  .strip__track figure { width: 250px; }
}

@media (min-width: 900px) {
  .route__list::before { left: 50%; }
  .route__stop {
    width: 50%;
    padding: 0 3rem 3.5rem 0;
    text-align: right;
  }
  .route__stop .route__photo { margin-left: auto; }
  .route__stop .route__desc { margin-left: auto; }
  .route__stop::before { left: auto; right: -9px; }
  .route__stop:nth-child(even) {
    margin-left: 50%;
    padding: 0 0 3.5rem 3rem;
    text-align: left;
  }
  .route__stop:nth-child(even) .route__photo,
  .route__stop:nth-child(even) .route__desc { margin-left: 0; margin-right: auto; }
  .route__stop:nth-child(even)::before { right: auto; left: -9px; }
  .route__stop--final {
    width: 100%;
    margin-left: 0 !important;
    padding: 1rem 0 0;
    text-align: center !important;
  }
  .route__stop--final::before { left: 50% !important; right: auto !important; transform: translateX(-50%); top: -0.4rem; }
  .route__stop--final .route__photo,
  .route__stop--final .route__desc { margin: 0 auto 1.1rem !important; }

  .cps-cards { grid-template-columns: repeat(4, 1fr); }

  .venue {
    grid-template-columns: 1fr 1fr;
    max-width: 72rem;
    margin: 0 auto;
    padding: 6rem 3rem;
  }
  .venue__body { text-align: left; }
  .venue__notice { margin-left: 0; }

  .album {
    grid-template-columns: 1fr 1fr;
    max-width: 72rem;
    margin: 0 auto;
  }
  .album__body { text-align: left; }

  .rules__grid { grid-template-columns: repeat(2, 1fr); }
}
