:root{
  /* Sendero de noche: dark is the identity now, light is the opt-out. */
  --ground:#0A0F0A;
  --ground-raised:#131C10;
  --ink:#EAF5E2;
  --ink-dim:#8FA382;
  --teal:#2FE0F5;
  --teal-soft:rgba(47,224,245,.14);
  --violet:#A6FF4D;
  --violet-soft:rgba(166,255,77,.14);
  --line: rgba(234,245,226,.16);
  --ink-deep:#050805;
  --readout-a:#2FE0F5;
  --readout-b:#A6FF4D;
}
:root[data-theme="light"]{
  --ground:#F4F7EF;
  --ground-raised:#E8EEE0;
  --ink:#16210F;
  --ink-dim:#57624A;
  --teal:#006E86;
  --teal-soft:#CFE9EF;
  --violet:#3A6B15;
  --violet-soft:#DEEFC9;
  --line: rgba(22,33,15,.14);
  --ink-deep:#14170F;
  --readout-a:#0089A8;
  --readout-b:#4E8F1C;
}

*{box-sizing:border-box;}
html,body{margin:0;padding:0;}
/* Without this, <picture> (an unstyled inline box) sits between an <img>
   and its flex/grid/absolute-positioning parent, breaking every layout
   that depends on the img being a direct child (the hero flex split,
   percentage heights, etc). display:contents removes the wrapper from
   the box tree so the img behaves exactly as if picture weren't there. */
picture{display:contents;}
body{
  background:var(--ground);
  color:var(--ink);
  font-family:'Karla',system-ui,sans-serif;
  -webkit-font-smoothing:antialiased;
}
::selection{ background:var(--teal); color:var(--ground); }

.page{ padding:0 0 90px; }
.wrap{ max-width:820px; margin:0 auto; }

.masthead{
  display:flex; align-items:center; justify-content:space-between;
  padding:14px 20px;
  font-family:'IBM Plex Mono',monospace;
  font-size:11px; letter-spacing:.1em; text-transform:uppercase;
  color:var(--ink-dim);
  max-width:820px; margin:12px auto 0;
  position:sticky; top:10px; z-index:70;
  border:1px solid var(--line); border-radius:16px;
  background:var(--ground);
  background:color-mix(in srgb, var(--ground) 74%, transparent);
  backdrop-filter:blur(16px) saturate(140%);
  -webkit-backdrop-filter:blur(16px) saturate(140%);
  transition:padding .25s ease;
}
/* Past the hero, the brand photos are dead weight on a long scroll --
   collapse them once the visitor has started reading. */
.masthead.is-compact{ padding-top:8px; padding-bottom:8px; }
.masthead .place{ color:var(--ink); font-weight:600; }
/* Small phones: the masthead carries brand + place + language + theme, which
   stops fitting on one line once the language switch is there. */
@media (max-width:480px){
  .masthead{ flex-wrap:wrap; gap:10px 12px; }
  .masthead-right{ margin-left:auto; }
}

.lang-switch{
  display:inline-flex; align-items:center; justify-content:center;
  min-width:26px; height:26px; padding:0 7px; border-radius:13px;
  border:1px solid var(--line); background:none;
  color:var(--ink-dim); text-decoration:none;
  font-family:'IBM Plex Mono',monospace; font-size:10.5px; font-weight:600;
  letter-spacing:.06em; flex-shrink:0;
}
.lang-switch:hover{ border-color:var(--teal); color:var(--teal); box-shadow:0 0 14px -2px var(--teal); }
.info-chip{
  display:inline-flex; align-items:center; justify-content:center;
  min-width:26px; height:26px; padding:0 9px; border-radius:13px;
  border:1px solid var(--line); background:none;
  color:var(--ink-dim); cursor:pointer;
  font-family:'IBM Plex Mono',monospace; font-size:10.5px; font-weight:600;
  letter-spacing:.06em; flex-shrink:0;
}
.info-chip:hover{ border-color:var(--teal); color:var(--teal); box-shadow:0 0 14px -2px var(--teal); }
.theme-toggle{
  display:inline-flex; align-items:center; justify-content:center;
  width:26px; height:26px; border-radius:50%;
  border:1px solid var(--line); background:none; color:var(--ink-dim);
  cursor:pointer; flex-shrink:0; padding:0;
}
.theme-toggle:hover{ border-color:var(--teal); color:var(--teal); }
.theme-toggle .icon-sun{ display:none; }
:root[data-theme="light"] .theme-toggle .icon-sun{ display:block; }
:root[data-theme="light"] .theme-toggle .icon-moon{ display:none; }
.masthead-right{ display:flex; align-items:center; gap:10px; }
.brand{
  display:flex; align-items:center; gap:14px;
  max-width:600px; max-height:120px; overflow:hidden;
  transition:max-width .3s ease, max-height .3s ease, opacity .2s ease;
}
.masthead.is-compact .brand{ max-width:0; max-height:0; opacity:0; }
.brand-name{
  font-family:'Fraunces',serif;
  font-size:16px; font-weight:700;
  letter-spacing:0; text-transform:none;
  color:var(--ink);
}
.brand-name em{ font-style:italic; font-weight:600; color:var(--readout-a); }
.logo-mark{
  position:relative;
  width:120px; height:99px;
  flex-shrink:0;
}
.logo-photo{
  position:absolute;
  border-radius:50%;
  object-fit:cover;
  filter:contrast(1.18) saturate(1.35);
  box-shadow:0 0 0 4px var(--ground);
}
.logo-photo-a{
  width:84px; height:84px;
  left:0; top:6px;
  border:3px solid var(--teal);
  z-index:1;
}
.logo-photo-b{
  width:66px; height:66px;
  left:54px; top:27px;
  border:3px solid var(--violet);
  z-index:2;
}

/* ---- hero photo ---- */
.hero-photo{
  position:relative;
  margin-top:26px;
  min-height:82vh;
  overflow:hidden;
  display:flex;
  isolation:isolate;
}
.hero-photo-duo{ position:absolute; inset:0; display:flex; gap:2px; background:var(--ground); }
.hero-photo-img{
  position:relative; width:50%; height:100%; flex:1 1 50%;
  object-fit:cover; object-position:70% 55%;
  transform:scale(1.04);
  filter:contrast(1.34) saturate(1.55) brightness(1.05);
  animation: kenburns 24s ease-in-out infinite alternate;
}
.hero-photo-duo .hero-photo-img:last-child{
  object-position:62% 48%;
  animation-direction:alternate-reverse;
}
@media (max-width:700px){
  /* Side by side, two narrow vertical slices lose the bike in both
     photos. Stack them instead -- each keeps its full width, so the
     crop only has to solve one dimension (height) per photo. */
  .hero-photo{ min-height:72vh; }
  .hero-photo-duo{ flex-direction:column; }
  .hero-photo-img{
    width:100%; height:50%;
    object-position:64% 58%;
    transform:scale(1.02); animation:none;
  }
  .hero-photo-duo .hero-photo-img:last-child{ object-position:66% 42%; }
}
@keyframes kenburns{
  from{ transform:scale(1.04) translate3d(0,0,0); }
  to{ transform:scale(1.15) translate3d(-1.2%,-1%,0); }
}
.hero-scrim{
  position:absolute; inset:0;
  background:
    linear-gradient(180deg, rgba(9,11,7,.35) 0%, rgba(9,11,7,.22) 20%, rgba(9,11,7,.38) 42%, rgba(9,11,7,.55) 66%, rgba(9,11,7,.78) 100%);
}
.hero-photo-content{
  position:relative; z-index:1;
  display:flex; flex-direction:column; justify-content:flex-end;
  width:100%; max-width:820px; margin:0 auto;
  padding:32px 24px 44px;
}
.eyebrow{
  font-family:'IBM Plex Mono',monospace;
  font-size:11px; letter-spacing:.13em; text-transform:uppercase;
  color:var(--ink-dim);
  display:flex; gap:8px; align-items:center; flex-wrap:wrap;
  margin:0 0 14px;
}
.eyebrow .sep{ opacity:.5; }
.eyebrow-light{ color:rgba(245,243,236,.85); text-shadow:0 1px 10px rgba(0,0,0,.4); }
.hero-photo h1{
  font-family:'Fraunces',serif;
  font-weight:900;
  font-size:clamp(2.9rem, 11vw, 5.6rem);
  line-height:.92;
  letter-spacing:-.015em;
  text-wrap:balance;
  margin:0 0 18px;
  color:#F7F5EF;
  text-shadow:0 2px 22px rgba(0,0,0,.45);
}
.hero-photo h1 em{ font-style:italic; font-weight:600; color:var(--readout-a); }
.hero-lead{
  font-family:'Karla',sans-serif;
  font-size:17.5px; line-height:1.6;
  color:rgba(245,243,236,.9);
  margin:0;
  max-width:50ch;
  text-shadow:0 1px 14px rgba(0,0,0,.4);
}
/* ---- readout strip ---- */
.readout{ background:var(--ink-deep); }
.readout-inner{
  max-width:820px; margin:0 auto;
  display:grid; grid-template-columns:repeat(2,1fr); gap:26px 18px;
  padding:34px 24px;
}
@media (min-width:640px){
  .readout-inner{ grid-template-columns:repeat(4,1fr); }
}
.readout-item .v{
  font-family:'IBM Plex Mono',monospace; font-weight:600;
  font-size:clamp(1.55rem, 5vw, 2.05rem);
  font-variant-numeric:tabular-nums;
  color:var(--readout-a);
  display:block;
}
.readout-item .v small{ font-size:.55em; font-weight:500; opacity:.75; }
.readout-item:nth-child(2n) .v{ color:var(--readout-b); }
.readout-item .k{
  display:block; margin-top:5px;
  font-family:'IBM Plex Mono',monospace; font-size:10px;
  letter-spacing:.07em; text-transform:uppercase;
  color:rgba(237,234,224,.5);
}

/* ---- featured route panel ---- */
.featured{ max-width:820px; margin:64px auto 0; padding:0 24px; }
.featured > .eyebrow{ color:var(--ink-dim); margin-bottom:16px; }
.activity-filter{
  display:flex; gap:8px; margin-bottom:20px;
  width:max-content; max-width:100%;
  position:sticky; top:76px; z-index:60;
  padding:8px; border:1px solid var(--line); border-radius:14px;
  background:var(--ground);
  background:color-mix(in srgb, var(--ground) 74%, transparent);
  backdrop-filter:blur(14px) saturate(140%);
  -webkit-backdrop-filter:blur(14px) saturate(140%);
  transition:top .25s ease;
}
/* The masthead is always compact by the time this filter bar can reach
   its sticky position, so it can sit right under the shorter header. */
.masthead.is-compact ~ .featured .activity-filter{ top:64px; }
.range-filters{ display:flex; flex-wrap:wrap; gap:20px 32px; margin-bottom:24px; }
.range-filter{ flex:1 1 200px; min-width:180px; }
.range-filter label{
  display:block; margin-bottom:8px;
  font-family:'IBM Plex Mono',monospace; font-size:11px; color:var(--ink-dim);
  letter-spacing:.03em;
}
.range-filter label b{ color:var(--ink); font-weight:600; }
.dual-range{ position:relative; height:18px; }
.dual-range-track{
  position:absolute; top:50%; left:0; right:0; height:4px;
  transform:translateY(-50%); border-radius:2px; background:var(--line);
}
.dual-range-fill{ position:absolute; top:0; bottom:0; border-radius:2px; background:var(--teal); }
.dual-range input[type="range"]{
  -webkit-appearance:none; appearance:none;
  position:absolute; top:0; left:0; margin:0;
  width:100%; height:18px; background:transparent; outline:none;
  cursor:pointer; pointer-events:none;
}
.dual-range input[type="range"]::-webkit-slider-runnable-track{ background:transparent; }
.dual-range input[type="range"]::-moz-range-track{ background:transparent; border:none; }
.dual-range input[type="range"]::-webkit-slider-thumb{
  -webkit-appearance:none; appearance:none; pointer-events:auto;
  width:18px; height:18px; border-radius:50%;
  background:var(--teal); border:3px solid var(--ground);
  box-shadow:0 0 0 1.5px var(--teal);
  cursor:pointer;
}
.dual-range input[type="range"]::-moz-range-thumb{
  pointer-events:auto;
  width:18px; height:18px; border-radius:50%;
  background:var(--teal); border:3px solid var(--ground);
  box-shadow:0 0 0 1.5px var(--teal);
  cursor:pointer;
}
.dual-range input[type="range"]:focus-visible::-webkit-slider-thumb{
  box-shadow:0 0 0 1.5px var(--teal), 0 0 0 4px var(--ground), 0 0 0 6px var(--teal);
}
.dual-range input[type="range"]:focus-visible::-moz-range-thumb{
  box-shadow:0 0 0 1.5px var(--teal), 0 0 0 4px var(--ground), 0 0 0 6px var(--teal);
}
.dual-range input[type="range"].range-min{ z-index:3; }
.dual-range input[type="range"].range-max{ z-index:4; }
.dual-range input[type="range"].range-top{ z-index:5; }
.activity-chip{
  font-family:'IBM Plex Mono',monospace; font-size:11.5px; font-weight:600;
  letter-spacing:.04em; text-transform:uppercase;
  padding:8px 14px; border-radius:100px;
  border:1px solid var(--line); background:var(--ground);
  color:var(--ink-dim); cursor:pointer;
  transition:background .2s ease, color .2s ease, border-color .2s ease;
}
.activity-chip.active{ background:var(--teal); border-color:var(--teal); color:var(--ground); }
.activity-chip:not(.active):hover{ border-color:var(--teal); color:var(--ink); }
.feat-panel.is-hidden{ display:none; }
.filter-empty{
  display:none;
  font-family:'IBM Plex Mono',monospace; font-size:12px; color:var(--ink-dim);
  padding:20px 0;
}
.filter-empty.visible{ display:block; }

/* ---- signpost hub: all routes fork from the same trailhead ---- */
.signpost{
  position:relative;
  margin:0 0 40px;
  padding:8px 0 0;
}
.signpost-hub-row{ display:flex; justify-content:center; margin-bottom:18px; }
.signpost-hub{
  font-family:'IBM Plex Mono',monospace; font-size:11px; font-weight:700;
  letter-spacing:.1em; text-transform:uppercase;
  color:var(--ground); background:var(--ink);
  padding:9px 18px; border-radius:100px;
}
.signpost-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(230px, 1fr));
  align-items:start;
  gap:10px;
}
.signpost-sign{
  position:relative;
  display:flex; align-items:center; gap:10px;
  padding:12px 16px;
  border-radius:10px;
  font-family:'IBM Plex Mono',monospace; font-size:12px; font-weight:700;
  text-decoration:none; color:var(--ground);
  transition:transform .15s ease, box-shadow .15s ease;
}
.signpost-sign:hover{ transform:translateY(-2px); box-shadow:0 8px 20px rgba(0,0,0,.28); }
.signpost-sign[data-activity="bici"]{ background:var(--teal); }
.signpost-sign[data-activity="senderismo"]{ background:var(--violet); }
.signpost-sign[data-activity="senderismo,bici"]{ background:linear-gradient(135deg, var(--violet) 50%, var(--teal) 50%); }
.signpost-icon{ width:16px; height:16px; flex-shrink:0; }
.signpost-name{ flex:1; text-transform:uppercase; letter-spacing:.02em; line-height:1.25; }
.signpost-km{ font-weight:700; opacity:.75; white-space:nowrap; }
.signpost-sign.is-hidden{ display:none; }
@media (max-width:480px){
  .signpost-grid{ grid-template-columns:1fr; }
  .signpost-sign{ font-size:10.5px; padding:10px 14px; gap:7px; }
  .signpost-icon{ width:14px; height:14px; }
}

.feat-panel{
  border:1px solid var(--line);
  background:var(--ground-raised);
  display:grid; grid-template-columns:1fr;
  overflow:hidden;
}
.feat-panel + .feat-panel{ margin-top:20px; }
@media (min-width:660px){
  .feat-panel{ grid-template-columns:1fr 1.15fr; }
  .feat-panel--alt{ grid-template-columns:1.15fr 1fr; }
  .feat-panel--alt .feat-photo{ order:2; }
  .feat-panel--alt .feat-body{ order:1; }
}
.feat-photo{ position:relative; aspect-ratio:4/3; overflow:hidden; }
@media (min-width:660px){ .feat-photo{ aspect-ratio:auto; } }
.feat-photo img{
  position:absolute; inset:0; width:100%; height:100%; object-fit:cover;
  transition:transform .6s cubic-bezier(.2,.7,.2,1);
  filter:contrast(1.1) saturate(1.28);
}
.feat-panel:hover .feat-photo img{ transform:scale(1.045); }
.feat-body{
  padding:30px 26px 32px;
  display:flex; flex-direction:column; gap:16px;
}
.feat-body h2{
  font-family:'Fraunces',serif; font-weight:900;
  font-size:clamp(1.9rem, 6vw, 2.6rem);
  line-height:.98; margin:0; text-wrap:balance;
}
.feat-body h2 em{ font-style:italic; font-weight:600; color:var(--violet); }
.feat-body > p{
  font-family:'Karla',sans-serif; font-size:15.5px; line-height:1.6;
  color:var(--ink-dim); margin:0; max-width:44ch;
}
.feat-chart{ height:56px; margin-top:2px; }
.feat-chart svg{ width:100%; height:100%; display:block; }
.feat-facts{ display:flex; flex-wrap:wrap; gap:8px; }
.feat-facts .fact{
  border:1px solid var(--line); padding:9px 13px; min-width:84px;
  background:var(--ground);
}
.feat-facts .fact .v{
  font-family:'IBM Plex Mono',monospace; font-weight:600; font-size:16px;
  font-variant-numeric:tabular-nums; display:block; color:var(--ink);
}
.feat-facts .fact .k{
  font-family:'IBM Plex Mono',monospace; font-size:9.5px;
  letter-spacing:.06em; text-transform:uppercase; color:var(--ink-dim);
}
.feat-cta{
  align-self:flex-start;
  display:inline-flex; align-items:center; gap:8px;
  font-family:'IBM Plex Mono',monospace; font-size:12.5px; font-weight:600;
  letter-spacing:.03em; text-transform:uppercase;
  color:var(--ground); background:var(--teal);
  padding:12px 19px; text-decoration:none;
  margin-top:4px;
  transition:background .2s ease;
}
.feat-cta:hover{ background:var(--violet); }
.story-mode-link{ margin:0 0 20px; }

.soon{
  margin:40px auto 0; max-width:820px;
  font-family:'IBM Plex Mono',monospace; font-size:11.5px; color:var(--ink-dim);
  border-top:1px solid var(--line); padding:16px 24px 0;
}

.map-section{ max-width:820px; margin:56px auto 0; padding:0 24px; }
.map-section > .eyebrow{ margin-bottom:14px; }
.map-box{
  position:relative;
  border:1px solid var(--line);
  aspect-ratio:4/3;
  background:var(--ground-raised);
  overflow:hidden;
}
@media (min-width:640px){ .map-box{ aspect-ratio:16/9; } }
.map-box iframe{ width:100%; height:100%; border:0; display:block; filter:grayscale(.15) contrast(1.02); }
.map-note{
  margin-top:10px;
  font-family:'IBM Plex Mono',monospace; font-size:10.5px; color:var(--ink-dim);
}
.directions-cta{
  margin-top:14px;
  display:inline-flex; align-items:center; gap:8px;
  font-family:'IBM Plex Mono',monospace; font-size:12.5px; font-weight:600;
  letter-spacing:.03em; text-transform:uppercase;
  color:var(--ground); background:var(--teal);
  padding:12px 19px; text-decoration:none;
  transition:background .2s ease;
}
.directions-cta:hover{ background:var(--violet); }
.route-map-box{
  position:relative;
  border:1px solid var(--line);
  aspect-ratio:4/3;
  background:var(--ground-raised);
  overflow:hidden;
}
@media (min-width:640px){ .route-map-box{ aspect-ratio:16/9; } }
.route-map-box.is-expanded{ aspect-ratio:auto; height:80vh; }
.route-map-box .leaflet-container{ width:100%; height:100%; background:var(--ground-raised); font-family:'Karla',sans-serif; }
.leaflet-popup-content-wrapper{
  background:var(--ground-raised) !important; color:var(--ink) !important;
  border:1px solid var(--line); border-radius:10px;
  box-shadow:0 8px 24px rgba(0,0,0,.35);
}
.leaflet-popup-tip{ background:var(--ground-raised) !important; border:1px solid var(--line); }
.leaflet-popup-content{ margin:12px 14px; font-family:'Karla',sans-serif; min-width:180px; }
.leaflet-popup-close-button{ color:var(--ink-dim) !important; }
.route-popup-chart{ display:block; width:100%; height:52px; margin-bottom:8px; }
.route-popup h3{ font-family:'Fraunces',serif; font-size:16px; margin:0 0 8px; color:var(--ink) !important; }
.route-popup .route-popup-facts{
  display:flex; gap:12px; flex-wrap:wrap; margin-bottom:8px;
  font-family:'IBM Plex Mono',monospace; font-size:11px; color:var(--ink-dim) !important;
}
.route-popup .route-popup-facts b{ color:var(--ink) !important; font-weight:600; }
.route-popup .route-popup-dir{ font-size:12px; color:var(--ink-dim) !important; margin-bottom:10px; }
.route-popup a{
  display:inline-block; font-family:'IBM Plex Mono',monospace; font-size:11px;
  font-weight:600; text-transform:uppercase; letter-spacing:.04em;
  color:var(--teal); text-decoration:none;
}
.route-popup a:hover{ text-decoration:underline; }
.map-expand-btn{
  position:absolute; z-index:400; top:10px; right:10px;
  display:flex; align-items:center; justify-content:center;
  width:32px; height:32px; padding:0; border:1px solid var(--line); border-radius:8px;
  background:var(--ground); color:var(--ink); opacity:.85; cursor:pointer;
  transition:opacity .2s ease, transform .2s ease;
  background:color-mix(in srgb, var(--ground) 72%, transparent);
  backdrop-filter:blur(10px); -webkit-backdrop-filter:blur(10px);
}
.map-expand-btn:hover{ opacity:1; }
.map-expand-btn.is-active svg{ transform:rotate(180deg); }
.map-legend{ display:flex; flex-wrap:wrap; gap:8px 16px; margin-top:12px; font-family:'IBM Plex Mono',monospace; font-size:10.5px; color:var(--ink-dim); }
.map-legend-item{ display:inline-flex; align-items:center; gap:6px; }
.map-legend-item .dot{ width:10px; height:10px; border-radius:50%; display:inline-block; flex-shrink:0; }
.map-legend-item .dot.bici{ background:var(--teal); }
.map-legend-item .dot.senderismo{ background:var(--violet); }

footer{
  margin:60px auto 0; max-width:820px; padding:22px 24px 0; border-top:1px solid var(--line);
  font-family:'IBM Plex Mono',monospace; font-size:11px; color:var(--ink-dim);
}

@media (prefers-reduced-motion: reduce){
  .hero-photo-img{ animation:none; }
}

@media (min-width:1024px){
  .wrap,
  .masthead,
  .hero-photo-content,
  .readout-inner,
  .featured,
  .soon,
  .map-section,
  footer,
  .mini-gallery{ max-width:1100px; }
}

/* ---- mini gallery (banner de acción) ---- */
.mini-gallery{ max-width:820px; margin:64px auto 0; padding:0 24px; }
.mini-gallery > .eyebrow{ margin-bottom:16px; }
.mini-gallery .gallery-grid{
  display:grid; grid-template-columns:repeat(3,1fr); gap:8px;
}
.mini-gallery .gallery-item{
  position:relative; aspect-ratio:1/1; overflow:hidden;
  border:1px solid var(--line); padding:0; background:none; cursor:zoom-in;
}
.mini-gallery .gallery-item img{ width:100%; height:100%; object-fit:cover; display:block; transition:transform .5s cubic-bezier(.2,.7,.2,1); filter:contrast(1.1) saturate(1.28); }
.mini-gallery .gallery-item:hover img{ transform:scale(1.06); }
.mini-gallery .gallery-item .photo-zoom{
  position:absolute; right:8px; bottom:8px;
  font-family:'IBM Plex Mono',monospace; font-size:11px;
  color:#fff; background:rgba(20,23,15,.6); width:22px; height:22px;
  display:flex; align-items:center; justify-content:center;
}

.lightbox{
  position:fixed; inset:0; z-index:100;
  background:rgba(10,12,8,.8);
  backdrop-filter:blur(14px); -webkit-backdrop-filter:blur(14px);
  display:none; align-items:center; justify-content:center;
  padding:24px;
}
.lightbox.open{ display:flex; }
.lightbox img{ max-width:100%; max-height:100%; box-shadow:0 20px 60px rgba(0,0,0,.5); }
.lightbox-close{
  position:absolute; top:18px; right:18px;
  width:38px; height:38px; border-radius:50%;
  background:rgba(255,255,255,.12); border:1px solid rgba(255,255,255,.3);
  color:#fff; font-size:16px; cursor:pointer;
}

.info-modal{
  position:fixed; inset:0; z-index:100;
  background:rgba(10,12,8,.8);
  backdrop-filter:blur(14px); -webkit-backdrop-filter:blur(14px);
  display:none; align-items:center; justify-content:center;
  padding:24px;
}
.info-modal.open{ display:flex; }
.info-modal-card{
  position:relative;
  width:100%; max-width:480px; max-height:calc(100vh - 48px);
  overflow-y:auto; border-radius:20px;
  background:var(--ground); border:1px solid var(--line);
  padding:28px 24px 24px;
  box-shadow:0 20px 60px rgba(0,0,0,.5);
}
.info-modal-card .parada{ margin:0 0 24px; }
.info-modal-card > .eyebrow{ margin-bottom:14px; }
.info-modal-close{
  /* Fixed to the viewport, not the card -- the card's content (map,
     parking notes...) scrolls, and a merely-absolute close button would
     scroll away with it, leaving no way to close the dialog on a short
     screen where it fills the viewport and there's no backdrop to tap. */
  position:fixed; top:20px; right:20px; z-index:110;
  width:32px; height:32px; border-radius:50%;
  background:var(--ground-raised); border:1px solid var(--line);
  color:var(--ink-dim); font-size:14px; cursor:pointer;
}
.info-modal-close:hover{ border-color:var(--teal); color:var(--teal); }
.to-top{
  position:fixed; right:18px; bottom:18px; z-index:60;
  width:46px; height:46px; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  background:var(--teal); color:var(--ground); border:none; cursor:pointer;
  box-shadow:0 6px 20px rgba(20,23,15,.25);
  opacity:0; transform:translateY(8px); pointer-events:none;
  transition:opacity .25s ease, transform .25s ease, background .2s ease;
}
.to-top.visible{ opacity:1; transform:translateY(0); pointer-events:auto; }
.to-top:hover{ background:var(--violet); }
@media (prefers-reduced-motion: reduce){ .to-top{ transition:opacity .01ms; } }

/* ---- Sendero de noche: glow + rounded language ---- */
.theme-toggle{ border-radius:50%; }
.theme-toggle:hover{ box-shadow:0 0 14px -2px var(--teal); }
.to-top{ box-shadow:0 4px 16px rgba(0,0,0,.5), 0 0 26px -8px var(--teal); }
.logo-photo{ box-shadow:0 0 0 4px var(--ground), 0 0 18px -4px var(--teal); }

.wikiloc-link, .directions-cta, .back-home-link, .feat-cta{
  border-radius:12px;
  box-shadow:0 0 24px -10px var(--teal);
}
.wikiloc-link:hover, .directions-cta:hover, .back-home-link:hover, .feat-cta:hover{
  box-shadow:0 0 30px -8px var(--violet);
}
.wikiloc-link.ghost{ box-shadow:none; }
.wikiloc-link.ghost:hover{ box-shadow:0 0 20px -10px var(--teal); }

.feat-panel{ border-radius:22px; }
.feat-panel[data-activity="bici"]{ box-shadow:0 0 0 1px var(--line), 0 0 40px -16px var(--teal); }
.feat-panel[data-activity="senderismo"]{ box-shadow:0 0 0 1px var(--line), 0 0 40px -16px var(--violet); }
.feat-panel[data-activity="senderismo,bici"]{ box-shadow:0 0 0 1px var(--line), 0 0 40px -16px var(--violet), 0 0 40px -16px var(--teal); }

.fact{ border-radius:14px; }
.fact .v{ text-shadow:0 0 14px currentColor; }
.feat-facts .fact .v{ text-shadow:0 0 12px currentColor; }
.readout-item .v{ text-shadow:0 0 18px currentColor; }
.elev-tags .v{ text-shadow:0 0 14px currentColor; }

.activity-chip.active{ box-shadow:0 0 18px -3px currentColor; }
.range-filter input[type="range"]::-webkit-slider-thumb{ box-shadow:0 0 0 3px var(--ground), 0 0 14px var(--teal); }
.range-filter input[type="range"]::-moz-range-thumb{ box-shadow:0 0 0 3px var(--ground), 0 0 14px var(--teal); }

.photo-slot, .gallery-item, .mini-gallery .gallery-item{ border-radius:16px; }
.route-map-box, .map-box{ border-radius:20px; }
.hero-chart{ border-radius:20px; }
.hero-chart svg path[fill="none"], .feat-chart svg path[fill="none"]{ filter:drop-shadow(0 0 6px var(--teal)); }
.elev-marker circle{ filter:drop-shadow(0 0 5px var(--teal)); }

.parada{
  margin:0 0 24px;
  background:var(--violet-soft);
  border-left:3px solid var(--violet);
  padding:22px 24px 24px;
  display:flex; flex-direction:column; gap:8px;
}
.parada .k{ font-family:'IBM Plex Mono',monospace; font-size:11px; letter-spacing:.12em; text-transform:uppercase; color:var(--violet); }
.parada h2{ font-family:'Fraunces',serif; font-weight:600; font-style:italic; font-size:1.5rem; margin:0; color:var(--ink); }
.parada p{ font-family:'Karla',sans-serif; font-size:14.5px; color:var(--ink-dim); line-height:1.6; margin:2px 0 0; max-width:52ch; }
.parada{ border-radius:0 16px 16px 0; box-shadow:0 0 32px -16px var(--violet); }
.parada{
  background:var(--violet-soft);
  background:color-mix(in srgb, var(--violet-soft) 90%, transparent);
  backdrop-filter:blur(10px); -webkit-backdrop-filter:blur(10px);
}

/* ---- ambient fx: faint grid + soft glow behind the page ---- */
.page{ position:relative; z-index:1; }
.fx-world{ position:fixed; inset:0; z-index:0; pointer-events:none; overflow:hidden; }
.fx-grid{
  position:absolute; inset:0; opacity:.12;
  background-image:
    linear-gradient(rgba(234,245,226,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(234,245,226,.06) 1px, transparent 1px);
  background-size:48px 48px;
  mask-image:linear-gradient(to bottom, #000, transparent 75%);
  -webkit-mask-image:linear-gradient(to bottom, #000, transparent 75%);
}
:root[data-theme="light"] .fx-grid{ opacity:.05; }
.fx-glow{ position:absolute; width:60vw; height:60vw; border-radius:50%; filter:blur(90px); opacity:.14; }
.fx-glow.a{ top:-22vw; left:-16vw; background:var(--teal); }
.fx-glow.b{ top:8vw; right:-22vw; background:var(--violet); }
:root[data-theme="light"] .fx-glow{ opacity:.10; }
