:root {
  --rose: #f26fae;
  --rose-dark: #a91f61;
  --rose-soft: #ffe4ef;
  --cream: #fff8ef;
  --paper: #fffdf9;
  --ink: #352333;
  --muted: #735b69;
  --sea: #21748a;
  --sea-soft: #dff7f6;
  --leaf: #44785c;
  --sun: #f4bd52;
  --line: #efd6df;
  --shadow: 0 18px 45px rgba(95, 37, 67, 0.16);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  color: var(--ink);
  background: var(--cream);
  font-family:
    "Avenir Next", "Nunito", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont,
    sans-serif;
  letter-spacing: 0;
}

button,
a {
  font: inherit;
}

a {
  color: inherit;
}

.cover {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  min-height: 100vh;
  overflow: hidden;
  background-image: url("./assets/fairytale-basque-hero.png");
  background-position: center;
  background-size: cover;
  transition:
    opacity 0.7s ease,
    transform 0.7s ease,
    visibility 0.7s ease;
}

.cover__scrim {
  position: absolute;
  inset: 0;
  background: rgba(76, 24, 50, 0.2);
}

.cover__content {
  position: relative;
  z-index: 2;
  display: grid;
  justify-items: center;
  gap: 18px;
  width: min(92vw, 680px);
  padding: 42px 26px;
  color: #fff;
  text-align: center;
  text-shadow: 0 4px 22px rgba(58, 14, 38, 0.6);
}

.cover__kicker,
.eyebrow {
  margin: 0;
  color: var(--rose-dark);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.cover__kicker {
  color: #fff6fb;
  text-shadow: 0 3px 15px rgba(58, 14, 38, 0.7);
}

.cover h1 {
  margin: 0;
  max-width: 100%;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3.1rem, 12vw, 7.6rem);
  font-weight: 800;
  line-height: 0.92;
  letter-spacing: 0;
}

.reveal-button,
.day-filter,
.choice-card__button,
.ticket-copy,
.map-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  border: 0;
  border-radius: var(--radius);
  cursor: pointer;
  text-decoration: none;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    background-color 0.18s ease,
    color 0.18s ease;
}

.reveal-button {
  padding: 15px 22px;
  color: #fff;
  background: var(--rose-dark);
  box-shadow: 0 18px 40px rgba(82, 20, 49, 0.34);
  font-size: clamp(1rem, 4vw, 1.18rem);
  font-weight: 850;
}

.reveal-button:hover,
.day-filter:hover,
.choice-card__button:hover,
.ticket-copy:hover,
.map-link:hover {
  transform: translateY(-2px);
}

.reveal-button svg,
.day-filter svg,
.choice-card__button svg,
.ticket-copy svg,
.map-link svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.heart-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
}

.floating-heart {
  position: absolute;
  width: 16px;
  height: 16px;
  background: #ff9bc8;
  transform: rotate(45deg);
  opacity: 0;
  animation: floatHeart 1.35s ease forwards;
}

.floating-heart::before,
.floating-heart::after {
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: inherit;
  content: "";
}

.floating-heart::before {
  left: -8px;
}

.floating-heart::after {
  top: -8px;
}

@keyframes floatHeart {
  0% {
    opacity: 0;
    transform: translateY(18px) rotate(45deg) scale(0.6);
  }
  18% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateY(-118px) rotate(45deg) scale(1.25);
  }
}

body.is-revealed .cover {
  visibility: hidden;
  opacity: 0;
  transform: translateY(-16px);
}

.cover.is-closing {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-16px);
}

.cover[hidden] {
  display: none;
}

.app {
  min-height: 100vh;
}

.band {
  padding: 62px max(20px, calc((100vw - 1160px) / 2));
}

.hero {
  position: relative;
  min-height: 78vh;
  padding-top: 24px;
  background-image: url("./assets/fairytale-basque-hero.png");
  background-position: center;
  background-size: cover;
}

.hero::before {
  position: absolute;
  inset: 0;
  background: rgba(54, 17, 39, 0.28);
  content: "";
}

.hero > * {
  position: relative;
  z-index: 1;
}

.topbar {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 25;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 0;
}

.topbar a {
  min-height: 38px;
  padding: 9px 13px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: var(--radius);
  color: #fff;
  background: rgba(64, 23, 43, 0.34);
  text-decoration: none;
  text-shadow: 0 2px 8px rgba(40, 12, 28, 0.42);
  backdrop-filter: blur(10px);
}

.hero__grid {
  padding-top: clamp(90px, 18vh, 180px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  gap: 24px;
  align-items: end;
}

.hero__copy {
  max-width: 680px;
  color: #fff;
  text-shadow: 0 4px 22px rgba(58, 14, 38, 0.65);
}

.hero__copy .eyebrow {
  color: #ffddeb;
}

.hero__copy h2 {
  margin: 8px 0 14px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 5vw, 4.8rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.hero__copy p:last-child {
  margin: 0;
  max-width: 56ch;
  color: #fff8fb;
  font-size: 1.05rem;
  line-height: 1.65;
}

.hero__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.hero__stats div {
  display: grid;
  place-items: center;
  min-height: 112px;
  padding: 16px 10px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: var(--radius);
  color: #fff;
  background: rgba(255, 255, 255, 0.2);
  box-shadow: 0 12px 28px rgba(58, 14, 38, 0.18);
  text-align: center;
  backdrop-filter: blur(10px);
}

.hero__stats strong {
  font-size: clamp(1.8rem, 6vw, 3rem);
  line-height: 1;
}

.hero__stats span {
  color: #fff8fb;
  font-size: 0.86rem;
  font-weight: 750;
}

.section-heading {
  display: grid;
  gap: 8px;
  margin-bottom: 22px;
}

.section-heading h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1;
  letter-spacing: 0;
}

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

.choices-section {
  background: var(--sea-soft);
}

.timeline-section {
  background: var(--cream);
}

.map-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.route-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff7fb;
  box-shadow: 0 12px 28px rgba(84, 35, 61, 0.08);
}

.route-actions__copy {
  display: grid;
  gap: 3px;
}

.route-actions__copy strong {
  color: var(--rose-dark);
}

.route-actions__copy span {
  color: var(--muted);
  line-height: 1.4;
}

.route-actions__buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.day-filter {
  padding: 10px 13px;
  border: 1px solid var(--line);
  color: var(--ink);
  background: #fff;
  font-weight: 800;
}

.day-filter.is-active {
  color: #fff;
  background: var(--rose-dark);
  box-shadow: 0 10px 25px rgba(169, 31, 97, 0.22);
}

.map-shell {
  position: relative;
  min-height: 360px;
  overflow: hidden;
  overscroll-behavior: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.map {
  height: clamp(380px, 58vh, 650px);
  width: 100%;
  pointer-events: none;
}

.map-shell.is-map-active .map {
  pointer-events: auto;
}

.map-activation {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  max-width: calc(100% - 28px);
  min-height: 42px;
  padding: 10px 13px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: var(--radius);
  color: #fff;
  background: rgba(169, 31, 97, 0.92);
  box-shadow: 0 14px 30px rgba(71, 24, 45, 0.26);
  cursor: pointer;
  font-weight: 850;
  backdrop-filter: blur(10px);
}

.map-activation svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.map-shell.is-map-active .map-activation {
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
}

.map-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  color: var(--muted);
  background: var(--paper);
  text-align: center;
}

.map-fallback[hidden] {
  display: none;
}

.leaflet-container {
  font-family: inherit;
  overscroll-behavior: auto;
}

.marker-pin {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 3px solid #fff;
  border-radius: 50% 50% 50% 8px;
  color: #fff;
  background: var(--rose-dark);
  box-shadow: 0 9px 20px rgba(79, 28, 55, 0.28);
  font-size: 0.8rem;
  font-weight: 900;
  transform: rotate(-45deg);
}

.marker-pin span {
  transform: rotate(45deg);
}

.marker-pin[data-kind="ticket"] {
  background: var(--sun);
  color: #402514;
}

.marker-pin[data-kind="optional"] {
  background: var(--sea);
}

.popup {
  min-width: 220px;
}

.popup strong {
  display: block;
  margin-bottom: 4px;
  color: var(--rose-dark);
  font-size: 1rem;
}

.popup p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.map-link {
  min-height: 38px;
  margin-top: 10px;
  padding: 8px 10px;
  color: #fff !important;
  background: var(--sea);
  font-weight: 800;
}

.route-map-link,
.stop-map-link {
  margin-top: 0;
}

.route-map-link--soft {
  border: 1px solid var(--line);
  color: var(--rose-dark) !important;
  background: #fff;
}

.choice-grid,
.ticket-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.choice-card,
.ticket-card,
.stop-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: 0 14px 32px rgba(84, 35, 61, 0.1);
}

.choice-card {
  display: grid;
  gap: 14px;
  padding: 20px;
}

.choice-card.is-selected {
  border-color: var(--rose);
  box-shadow: 0 18px 36px rgba(242, 111, 174, 0.2);
}

.choice-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.choice-card h3,
.ticket-card h3,
.stop-card h3 {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.25;
}

.choice-card p,
.ticket-card p,
.stop-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.choice-card__icon,
.ticket-card__icon,
.stop-card__icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: var(--rose-dark);
  background: var(--rose-soft);
  flex: 0 0 auto;
}

.choice-card__icon svg,
.ticket-card__icon svg,
.stop-card__icon svg {
  width: 21px;
  height: 21px;
}

.choice-card__button {
  justify-self: start;
  padding: 10px 13px;
  color: var(--rose-dark);
  background: var(--rose-soft);
  font-weight: 850;
}

.choice-card.is-selected .choice-card__button {
  color: #fff;
  background: var(--rose-dark);
}

.selection-strip {
  margin-top: 18px;
  padding: 16px 18px;
  border-left: 5px solid var(--rose);
  border-radius: var(--radius);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
  line-height: 1.55;
}

.timeline {
  display: grid;
  gap: 28px;
}

.day-block {
  display: grid;
  gap: 12px;
}

.day-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
}

.day-title h3 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.5rem, 4vw, 2.2rem);
}

.day-title span {
  color: var(--muted);
  font-weight: 750;
}

.stop-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.stop-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 14px;
  padding: 18px;
}

.stop-card.is-optional {
  border-color: #89cfe0;
}

.stop-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.stop-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 9px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 26px;
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--rose-dark);
  background: var(--rose-soft);
}

.pill--sea {
  color: var(--sea);
  background: var(--sea-soft);
}

.pill--sun {
  color: #6e4610;
  background: #fff0bf;
}

.ticket-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ticket-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 14px;
  padding: 20px;
}

.ticket-status {
  display: inline-flex;
  width: max-content;
  margin-bottom: 9px;
  padding: 4px 8px;
  border-radius: 999px;
  color: #fff;
  background: var(--leaf);
  font-size: 0.78rem;
  font-weight: 850;
}

.ticket-status.is-pending {
  color: #46290c;
  background: #ffe0a1;
}

.ticket-code {
  display: block;
  margin: 12px 0;
  padding: 10px;
  border: 1px dashed var(--rose);
  border-radius: var(--radius);
  color: var(--ink);
  background: #fff7fb;
  font-family: "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 0.92rem;
  overflow-wrap: anywhere;
}

.ticket-copy {
  min-height: 38px;
  padding: 8px 10px;
  color: #fff;
  background: var(--rose-dark);
  font-weight: 800;
}

.footer {
  display: grid;
  gap: 4px;
  padding: 30px 20px 44px;
  color: var(--muted);
  background: var(--paper);
  text-align: center;
}

.footer strong {
  color: var(--rose-dark);
}

@media (max-width: 860px) {
  .hero {
    min-height: auto;
  }

  .route-actions {
    grid-template-columns: 1fr;
  }

  .route-actions__buttons {
    justify-content: stretch;
  }

  .route-map-link {
    flex: 1 1 180px;
  }

  .hero__grid,
  .choice-grid,
  .ticket-grid,
  .stop-list {
    grid-template-columns: 1fr;
  }

  .topbar {
    justify-content: center;
  }

  .hero__copy {
    padding: 22px;
  }

  .hero__stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  body {
    padding-bottom: 76px;
  }

  .band {
    padding: 38px 14px;
  }

  .cover__content {
    padding: 32px 18px;
  }

  .cover h1 {
    font-size: clamp(3rem, 18vw, 5.2rem);
  }

  .hero {
    min-height: 86vh;
    padding-top: 18px;
    background-position: center top;
  }

  .topbar {
    position: fixed;
    top: auto;
    right: 10px;
    bottom: 10px;
    left: 10px;
    z-index: 20;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 5px;
    margin: 0;
    padding: 6px;
    border: 1px solid rgba(255, 255, 255, 0.65);
    border-radius: var(--radius);
    background: rgba(96, 30, 61, 0.88);
    box-shadow: 0 14px 34px rgba(58, 14, 38, 0.26);
    backdrop-filter: blur(12px);
  }

  .topbar a {
    display: grid;
    place-items: center;
    min-height: 42px;
    padding: 8px 4px;
    border: 0;
    background: transparent;
    box-shadow: none;
    font-size: 0.78rem;
    font-weight: 850;
    text-align: center;
  }

  .hero__copy {
    padding: 0;
  }

  .hero__copy h2 {
    font-size: clamp(2.15rem, 12vw, 3.2rem);
  }

  .hero__copy p:last-child {
    font-size: 1rem;
  }

  .hero__stats {
    grid-template-columns: 1fr;
  }

  .map-toolbar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .day-filter {
    width: 100%;
  }

  .route-actions {
    padding: 12px;
  }

  .route-actions__buttons,
  .stop-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .route-map-link,
  .stop-map-link,
  .ticket-copy {
    width: 100%;
  }

  .map-shell {
    min-height: 310px;
  }

  .map {
    height: clamp(320px, 52vh, 430px);
  }

  .map-activation {
    right: 10px;
    bottom: 10px;
    left: 10px;
    width: auto;
  }

  .leaflet-control-attribution {
    max-width: 210px;
    font-size: 0.65rem;
  }

  .stop-card,
  .ticket-card {
    grid-template-columns: 1fr;
  }

  .stop-card,
  .choice-card,
  .ticket-card {
    padding: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
