:root {
  color-scheme: light;
  --paper: #f5efe6;
  --ink: #29221e;
  --muted: #62554a;
  --rust: #923e28;
  --rule: #d8c7b7;
  --night: #241e1a;
  --light: #f7efe4;
  --sand: #eab487;
  --serif: Georgia, 'Times New Roman', serif;
  --sans: system-ui, -apple-system, 'Segoe UI', sans-serif;
  --wrap: 76rem;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 1rem/1.6 var(--sans); }
img { display: block; max-width: 100%; }
button, input { font: inherit; }
a { color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
button:focus-visible, a:focus-visible { outline: 3px solid #d47656; outline-offset: 4px; }
#contenido:focus { outline: 0; }
section[id] { scroll-margin-top: 1.25rem; }
.wrap { width: min(calc(100% - 6rem), var(--wrap)); margin-inline: auto; }
.skip { position: absolute; top: .5rem; left: 1rem; padding: .6rem 1rem; background: var(--light); z-index: 5; transform: translateY(-160%); }
.skip:focus { transform: none; }

.site-header { background: #201a17; color: var(--light); border-bottom: 1px solid #ebd1a833; }
.home-page { position: relative; }
.home-page .site-header { position: absolute; inset: 0 0 auto; z-index: 2; background: transparent; }
.header-inner, .footer-inner { min-height: 4.65rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.header-inner { min-height: 6.7rem; }
.brand { display: inline-flex; align-items: center; gap: .85rem; text-decoration: none; }
.brand-icon { flex: 0 0 auto; width: 4.1rem; height: auto; }
.brand-wordmark { width: 11.6rem; height: auto; }
.site-footer .brand-icon { width: 2.9rem; }
.site-footer .brand-wordmark { width: 8.4rem; }
.site-header nav { display: flex; gap: clamp(1.1rem, 3vw, 2.45rem); align-items: center; }
.site-header nav a { display: inline-block; padding: .55rem 0; text-decoration: none; font-size: .9rem; font-weight: 550; }
.site-header nav a:hover, .site-footer a:hover { color: var(--sand); }

.hero { position: relative; isolation: isolate; display: flex; align-items: center; min-height: min(45rem, max(38rem, 81svh)); background: #463124; color: var(--light); }
.hero-image, .hero::after { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.hero-image { object-fit: cover; object-position: 58% 55%; }
.hero::after { content: ''; background: linear-gradient(180deg, #191715ee 0%, #191715b8 17%, transparent 47%), linear-gradient(90deg, #151511f1 0%, #201b16cf 26%, #2a20175f 58%, #221a1603 85%), linear-gradient(0deg, #21170e64, transparent 42%); }
.hero::before, .journal::before { content: ''; position: absolute; pointer-events: none; background-repeat: no-repeat; background-size: cover; }
.hero::before {
  inset: 0;
  background-image: url('/assets/curvas-arena.webp');
  background-position: 52% 24%;
  opacity: .42;
  mask-image: linear-gradient(102deg, #0004 0%, #0001 32%, #000 67%), linear-gradient(#000 0%, #000a 26%, #0006 61%, transparent 97%);
  mask-composite: intersect;
}
.hero-inner { position: relative; padding-block: 11.5rem 4.4rem; }
.journal { position: relative; isolation: isolate; }
.journal::before {
  inset: 0 0 0 auto;
  width: min(82%, 84rem);
  z-index: -1;
  background-image: url('/assets/curvas-papel.webp');
  background-position: 64% 32%;
  opacity: .27;
  mask-image: linear-gradient(101deg, transparent, #000a 35%, #000 85%), linear-gradient(#000, #000a 54%, transparent);
  mask-composite: intersect;
}
.eyebrow { font-size: .875rem; font-weight: 700; letter-spacing: .105em; line-height: 1.35; text-transform: uppercase; }
.hero-kicker { color: #f0bb93; display: flex; align-items: center; gap: .65rem; margin: 0 0 1.35rem; }
.hero-kicker span { width: 1.55rem; border-top: 1px solid currentColor; }
.hero h1 { margin: 0; font: 400 clamp(4rem, 8.4vw, 7.5rem)/.83 var(--serif); letter-spacing: -.072em; }
.hero h1 em { display: block; color: #efbb90; font-weight: 400; }
.hero-intro { max-width: 27rem; margin: 1.75rem 0 1.8rem; color: #f7eee4; font-size: clamp(1.04rem, 1.6vw, 1.26rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 3rem; padding: .55rem 1.1rem; border: 1px solid transparent; border-radius: .22rem; font-weight: 690; font-size: .9rem; text-decoration: none; }
.primary { background: #a34730; color: #fff8f2; }
.primary:hover { background: #883a28; }
.outline { color: var(--light); border-color: #fbede698; background: #2c211c78; }
.outline:hover { background: #392921; }
.hero-caption { position: absolute; right: max(1.3rem, calc((100% - var(--wrap)) / 2)); bottom: 1.2rem; color: #fff5ed; background: #21170eac; padding: .18rem .55rem; border-radius: .15rem; font-size: .8rem; }

.section-pad { padding-block: clamp(3.15rem, 6.75vw, 6.4rem); }
.section-heading { display: flex; align-items: center; gap: 1.6rem; margin-bottom: 1.9rem; }
h2 { margin: 0; font: 400 clamp(2.45rem, 5vw, 4.4rem)/1 var(--serif); letter-spacing: -.06em; }
.heading-line { flex: 1 1 0; border-top: 1px solid var(--rule); }
.story-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1rem, 2.1vw, 1.75rem); }
.story-grid.single-story { grid-template-columns: minmax(0, 1fr); }
.single-story .card-link { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }
.single-story .card-copy { align-self: center; padding: clamp(1.3rem, 4vw, 3.5rem); }
.story-card { min-width: 0; border: 1px solid #d9cbbc; background: #fcf8f2; }
.card-link { display: flex; flex-direction: column; height: 100%; text-decoration: none; }
.card-image { aspect-ratio: 1.64; overflow: hidden; background: #d4c5b5; }
.card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .32s ease; }
.card-link:hover .card-image img { transform: scale(1.04); }
.card-copy { display: flex; flex-direction: column; flex: 1; align-items: start; padding: clamp(1rem, 2.05vw, 1.7rem); }
.card-copy h3 { margin: .1rem 0 .65rem; font: 400 clamp(1.65rem, 2.65vw, 2.65rem)/1.04 var(--serif); letter-spacing: -.045em; }
.card-copy p { margin: 0 0 1rem; color: var(--muted); }
.card-copy .card-meta { margin: 0 0 .7rem; color: var(--rust); font-size: .875rem; }
.card-meta span { padding-inline: .15rem; }
.text-link { display: inline-block; width: fit-content; color: var(--rust); text-decoration: underline; text-underline-offset: .27em; text-decoration-thickness: 1px; font-weight: 690; font-size: .9rem; }
.card-copy .text-link { margin-top: auto; }
.text-link:hover, .card-link:hover .text-link { text-decoration-thickness: 2px; }

.routes { background: #28211c; color: var(--light); }
.routes .section-heading { margin-bottom: .8rem; }
.routes .heading-line { border-color: #6a5141; }
.section-intro { margin: 0 0 1.45rem; color: #e1d2c6; }
.route-destinations { display: flex; flex-wrap: wrap; gap: .55rem; margin-bottom: 1.2rem; }
.route-destinations button { padding: .5rem .87rem; min-height: 2.75rem; color: var(--light); background: #302621; border: 1px solid #816451; border-radius: .2rem; font-size: .9rem; }
.route-destinations button:hover { background: #48352a; }
.route-destinations button[aria-pressed="true"] { color: #291c15; background: #e9b58c; border-color: #e9b58c; font-weight: 700; }
.route-explorer { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(19rem, 1fr); border: 1px solid #755a46; }
.map-panel { min-width: 0; min-height: 30rem; isolation: isolate; position: relative; display: flex; flex-direction: column; justify-content: space-between; background: #241e1b; overflow: hidden; }
#route-map, .map-points { position: absolute; inset: 0; width: 100%; height: 100%; }
#route-map { z-index: -1; }
.map-points { pointer-events: none; }
.map-heading, .map-footer { display: flex; justify-content: space-between; align-items: start; gap: .6rem; padding: 1.1rem 1.2rem; z-index: 1; }
.map-heading .eyebrow, .map-north, #map-source { color: #efdbca; background: #241d19dc; padding: .18rem .45rem; border-radius: .17rem; }
.map-north { font-size: .9rem; font-weight: 700; letter-spacing: .06em; white-space: nowrap; }
.map-footer { align-items: end; flex-wrap: wrap; }
.map-footer .map-button { margin-left: auto; }
#map-source { font-size: .8rem; }
.map-button { color: var(--light); background: #302721; border: 1px solid #9a7257; padding: .45rem .65rem; min-height: 2.5rem; border-radius: .2rem; font-size: .875rem; white-space: nowrap; }
.map-button:hover { background: #52392a; }
.map-button:disabled { opacity: .76; cursor: default; }
.map-point { pointer-events: auto; transform: translate(-50%, -50%); position: absolute; display: grid; place-items: center; width: 2.1rem; height: 2.1rem; padding: 0; border-radius: 50%; color: #342017; border: 2px solid #2d231e; background: #f3c49c; font-size: .875rem; font-weight: 750; }
.map-point:hover { background: #ffddbe; }
.itinerary { border-left: 1px solid #755a46; min-width: 0; padding: clamp(1.15rem, 2.4vw, 2rem); background: #342922; }
.route-heading .eyebrow { margin: 0 0 .55rem; color: var(--sand); }
.route-heading h3 { margin: 0 0 .4rem; font: 400 clamp(1.8rem, 3vw, 2.6rem)/1.04 var(--serif); letter-spacing: -.04em; }
.route-heading p:last-child { color: #e5d5c8; margin: 0 0 1rem; font-size: .95rem; }
.stage-list { padding: 0; margin: 0; list-style: none; border-top: 1px solid #735846; }
.stage-list li { border-bottom: 1px solid #735846; }
.stage-list button { color: var(--light); display: grid; grid-template-columns: 1.75rem minmax(0, 1fr) auto; width: 100%; align-items: center; gap: .45rem; padding: .65rem .3rem; text-align: left; border: 0; background: transparent; min-height: 2.65rem; font-size: .9rem; }
.stage-list button:hover, .stage-list button[aria-pressed="true"] { background: #503729; }
.stage-number { color: #edbb95; font-variant-numeric: tabular-nums; }
.stage-distance { color: #e1c9b5; white-space: nowrap; font-size: .875rem; }
.stage-detail { color: #f4dfcc; margin-top: .7rem; font-size: .9rem; }
.stage-detail p { margin: .25rem 0; }
.stage-detail p + p { color: #e1c9b5; }
#route-story { color: #f2bd94; margin-top: .8rem; }
#reset-stage { display: block; margin-top: .8rem; }

.route-map-dialog { position: fixed; inset: 0; width: min(68rem, calc(100% - 2rem)); max-height: calc(100dvh - 2rem); margin: auto; padding: 0; background: #342922; color: var(--light); border: 1px solid #9a7257; border-radius: .28rem; box-shadow: 0 1.1rem 3rem #0007; }
.route-map-dialog::backdrop { background: #18120fbd; }
.full-map-header { display: flex; justify-content: space-between; align-items: center; gap: .8rem; padding: 1rem 1.25rem; }
.full-map-header h3 { margin: 0; font: 400 clamp(1.3rem, 4vw, 2.15rem)/1.1 var(--serif); }
.full-map-header p { margin: .25rem 0 0; font-size: .875rem; color: #f0ccb1; }
.full-map { position: relative; height: min(59dvh, 37rem); min-height: 13rem; background: #e6ded0; color: #28211c; }
.full-map-waypoints { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem .8rem; padding: 0 1.25rem .85rem; }
.full-map-waypoints label { font-size: .875rem; }
.full-map-waypoints select { font: inherit; font-size: .875rem; color: var(--light); background: #302721; border: 1px solid #9a7257; border-radius: .2rem; padding: .4rem .6rem; min-width: 0; max-width: 100%; min-height: 2.25rem; }
.full-map-waypoints select:focus-visible, .full-map .route-waypoint:focus-visible { outline: 3px solid #d47656; outline-offset: 2px; }
.full-map .route-waypoint { background: #255e67; border: 2px solid #fffdf6; border-radius: 50%; box-shadow: 0 1px 3px #322b1b99; }
.full-map-status { font-size: .875rem; padding: .75rem 1.25rem; margin: 0; }
.full-map .leaflet-tile { max-width: none; }
.full-map .leaflet-control-attribution { font-size: .75rem; }

.about { border-top: 1px solid var(--rule); }
.about-inner { display: grid; grid-template-columns: minmax(12rem, .85fr) minmax(0, 1.4fr); align-items: start; gap: 1.5rem; }
.about-byline { color: var(--rust); margin: .65rem 0 0; font-size: 1rem; font-weight: 700; }
.about-copy > p { margin: 0; color: var(--muted); max-width: 38rem; }
.about blockquote { margin: 1.4rem 0 0; padding-left: 1rem; border-left: 2px solid #aa5439; font: italic 400 clamp(1.3rem, 2.2vw, 1.85rem)/1.33 var(--serif); }
.site-footer { border-top: 1px solid #ffffff21; color: var(--light); background: #201a17; }
.footer-inner { flex-wrap: wrap; min-height: 5.5rem; padding-block: .9rem; }
.footer-inner > span, .footer-inner > a:last-child { font-size: .875rem; color: #e0cbbc; }
.footer-inner > a:last-child { text-underline-offset: .24em; }

.article-main { padding: clamp(2.4rem, 6vw, 5.2rem) 0; }
.article-head { max-width: 56rem; }
.article-head .eyebrow { color: var(--rust); margin-top: 1.6rem; }
.article-head h1 { font: 400 clamp(3rem, 8.5vw, 7rem)/.95 var(--serif); letter-spacing: -.065em; margin: .65rem 0 1.05rem; }
.article-lede { color: var(--muted); font-size: clamp(1.1rem, 2vw, 1.35rem); max-width: 41rem; }
.article-byline, .article-figure figcaption, .editor-note { color: var(--muted); font-size: .875rem; }
.article-figure { max-width: 64rem; margin-block: 2rem; }
.article-figure img { width: 100%; height: auto; aspect-ratio: 2; object-fit: cover; }
.article-figure figcaption { margin-top: .45rem; }
.reading { width: min(calc(100% - 6rem), 43rem); margin-inline: auto; font-size: clamp(1.05rem, 1.65vw, 1.24rem); line-height: 1.75; }
.story-entry .article-head h1 { font-size: clamp(2.125rem, 5.3vw, 4.25rem); line-height: 1.02; }
.story-entry .article-lede { font-size: clamp(1rem, 1.6vw, 1.18rem); }
.story-entry .reading { width: min(calc(100% - 1.5rem), 50rem); max-width: none; font-size: clamp(1rem, 1.4vw, 1.1rem); line-height: 1.62; }
.story-entry .reading h2 { font-size: clamp(1.3rem, 2.5vw, 1.7rem); line-height: 1.2; }
.story-entry .reading h3 { font-size: clamp(1.12rem, 2vw, 1.4rem); line-height: 1.25; }
.reading blockquote { color: #533e33; margin: 1.3rem 0; border-left: 2px solid #b5664a; padding-left: 1rem; font-family: var(--serif); font-style: italic; }
.article-route { margin-top: 2rem; }
.next-story { border-top: 1px solid var(--rule); margin-top: 2.2rem; padding-top: 1rem; }
.next-story p { color: var(--rust); margin: 0; }
.next-story a { font: 400 1.85rem/1.18 var(--serif); text-underline-offset: .2em; }

@media (max-width: 900px) {
  .wrap, .reading { width: min(calc(100% - 3rem), var(--wrap)); }
  .reading { max-width: 43rem; }
  .route-explorer { grid-template-columns: minmax(0, 1.14fr) minmax(17rem, 1fr); }
  .story-grid { gap: .85rem; }
}

@media (max-width: 680px) {
  .wrap, .reading { width: calc(100% - 2rem); }
  .header-inner { min-height: auto; flex-direction: column; padding-block: .9rem .4rem; gap: .55rem; }
  .site-header nav { width: 100%; max-width: 23rem; justify-content: space-between; gap: .5rem; }
  .brand-icon { width: 3.2rem; }
  .brand-wordmark { width: 9.2rem; }
  .home-page .site-header { position: relative; background: #201a17; }
  .hero { min-height: 0; }
  .hero-image { object-position: 71% 60%; }
  .hero::after { background: linear-gradient(180deg, #191715f5, #191715b3 21%, transparent 48%), linear-gradient(90deg, #1a1712ee 0%, #231a13ac 59%, #231a1349 100%), linear-gradient(0deg, #21170e66, transparent 54%); }
  .hero::before { background-size: auto 100%; background-position: 71% top; opacity: .40; mask-image: linear-gradient(110deg, #0004, #000d 75%), linear-gradient(#000 0%, #0007 38%, transparent 92%); }
  .hero-inner { padding-block: 2rem 3.75rem; }
  .hero h1 { font-size: clamp(3.1rem, 11.6vw, 4.9rem); }
  .journal::before { width: 100%; opacity: .22; }
  .hero-caption { bottom: .65rem; right: 1rem; }
  .hero-intro { max-width: 19rem; }
  .section-heading { gap: 1rem; margin-bottom: 1.3rem; }
  .story-grid, .single-story .card-link { grid-template-columns: 1fr; gap: 1rem; }
  .single-story .card-link { gap: 0; }
  .card-image { aspect-ratio: 1.95; }
  .card-copy { padding: 1rem 1.15rem 1.2rem; }
  .card-copy h3 { font-size: 2rem; }
  .route-explorer, .about-inner { grid-template-columns: 1fr; }
  .map-panel { min-height: 20rem; }
  .map-heading, .map-footer { padding: .75rem; }
  .full-map-header { padding: .8rem; }
  .full-map-waypoints { padding: 0 .8rem .8rem; }
  .itinerary { border-left: 0; border-top: 1px solid #755a46; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

/* Editorial tools and navigation */
[hidden] { display: none !important; }
.language-picker { position: relative; z-index: 5; }
.language-picker summary { cursor: pointer; padding: .55rem .25rem; font-size: .82rem; }
.language-picker ul { position: absolute; right: 0; margin: 0; padding: .45rem .75rem; list-style: none; width: max-content; max-width: min(16rem, 80vw); background: #2a221c; color: #fff3e6; border: 1px solid #856951; border-radius: .25rem; }
.language-picker ul li + li { border-top: 1px solid #594539; }
.language-picker ul span { display: block; padding: .45rem 0; color: #edd1bb; font-size: .82rem; }
.language-picker a[aria-current] { color: var(--sand); }
.catalog { padding-block: clamp(2rem, 7vw, 5rem); }
.catalog-section + .catalog-section { margin-top: 2rem; }
.catalog-section h2 a { color: inherit; text-underline-offset: .12em; }
.entry-list { list-style: none; padding: 0; display: grid; gap: .85rem; }
.entry-list .entry-card { display: flex; gap: 1rem; padding: .9rem; border: 1px solid #d3c2b1; color: inherit; text-decoration: none; background: #fcf7efbd; }
.entry-list .entry-card:hover h3 { text-decoration: underline; text-underline-offset: .15em; }
.entry-list img { width: clamp(6rem, 18vw, 13rem); height: auto; max-height: 9rem; object-fit: cover; align-self: flex-start; }
.entry-list h3, .entry-list p { margin: .3rem 0; }
.entry-list small { color: #733424; }
.search-block { margin-block: 1rem 2rem; padding: 1rem; border: 1px solid #d3c2b1; background: #fcf7efbd; }
.search-block label { display: block; color: #55382d; font-weight: 650; margin-bottom: .35rem; }
.search-block input, [data-copy-fallback] { width: min(100%, 34rem); color: #2a211b; font: inherit; padding: .6rem; border: 1px solid #9f7a62; border-radius: .2rem; background: #fffdfa; }
.search-block ul { list-style: none; padding: 0; margin: 0; }
.search-block li { padding: .45rem 0; border-top: 1px solid #d4c0ae; }
.search-block li small { display: block; color: #603d32; }
.search-block a { color: #8b321f; }
.content-actions, .trip-navigation, .map-controls { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem; }
.content-actions { margin-block: 1rem; }
.content-actions .button { cursor: pointer; font-family: inherit; }
.content-actions .button:not(.primary) { border: 1px solid #9f7a62; color: #6c3020; background: #fffaf1; }
.story-section, .trip-navigation { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid #d3c2b1; }
.story-section h2 { margin: 0 0 .65rem; }
.trip-navigation { justify-content: space-between; }
.article-title { display: flex; align-items: flex-start; gap: .2em; }
.article-title-mark { flex: none; width: .72em; height: .72em; margin-block-start: .09em; }
.article-title-text { min-width: 0; overflow-wrap: anywhere; }
.inline-photo, .reel-block { margin: 1.4rem 0; }
.inline-photo img, .reel-block img, .reading > p > img { display: block; max-width: 100%; max-height: 40rem; object-fit: contain; height: auto; }
.inline-photo figcaption, .reel-block figcaption { font-size: .88em; color: #60473b; }
.map-controls { padding: 0 1.25rem .75rem; }
.map-controls input { flex: 1 1 7rem; min-width: 5rem; accent-color: #edb58a; }
.map-controls a { color: #f3c496; }
.action-status:empty, [data-search-status]:empty { display: none; }
@media (max-width: 43rem) {
  .site-header nav { flex-wrap: wrap; justify-content: center; max-width: none; column-gap: .75rem; }
  .entry-list .entry-card { gap: .6rem; }
  .map-controls { padding-inline: .8rem; }
}

.trip-context { margin-block: .7rem; font-size: .85rem; }
.trip-context p { display: flex; flex-wrap: wrap; gap: .15rem .55rem; align-items: baseline; margin: .25rem 0; }
.trip-context span { font-weight: 700; color: #75402e; }
.trip-context .text-link { font-size: inherit; }
.entry-list > li .trip-context { margin: 0; padding: .4rem .9rem; border: 1px solid #d3c2b1; border-top: 0; background: #f4ebdf; }
.card-copy .card-trip { font-size: .85rem; color: #75402e; font-weight: 650; }
.route-facts { display: flex; flex-wrap: wrap; gap: .75rem 1.75rem; }
.route-facts dt, .trip-stages time { color: #75402e; font-weight: 650; font-size: .88rem; }
.route-facts dd { margin: 0; }
.trip-stages { list-style: none; padding: 0; margin: 0; }
.trip-stages li { padding-block: 1rem; border-bottom: 1px solid #d3c2b1; }
.trip-stages h3, .trip-stages p { margin: .25rem 0; }
.trip-stages .content-actions { margin: .5rem 0 0; gap: .45rem 1rem; }
.trip-stages .content-actions span { font-size: .88rem; color: #605044; }

.reading .story-photos {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 1rem;
  margin-block: 1.25rem 1.75rem;
}
.reading .story-photos figure {
  flex: 0 1 14rem;
  min-width: 0;
  margin: 0;
}
.reading .story-photos img {
  display: block;
  width: 100%;
  height: auto;
}
.reading .story-photos figcaption {
  margin-top: .4rem;
  font-size: .875rem;
  color: var(--muted);
}
@media (max-width: 560px) {
  .reading .story-photos { gap: .75rem; }
  .reading .story-photos figure { flex-basis: min(12rem, calc((100% - .75rem) / 2)); }
}
