/* Events (/events/). Adds to site.css; never redefines tokens or primitives.
   The rides are the page's authored moment: each tour drawn as a hand-tinted piece of map over the
   antique ground, with the trail drawing itself and the small bike riding it as the map scrolls in. */

.ev-icon { width: 1.05em; height: 1.05em; flex: none; }

/* ------------------------------------------------------------------ opening */
.ev-open { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: var(--s2) clamp(32px, 5vw, 80px); align-items: end;
  padding-top: calc(var(--bar-h) + clamp(64px, 7vw, 104px)); padding-bottom: clamp(28px, 4vw, 56px); }
.ev-open h1 { max-width: 19ch; }
.ev-open .lede { margin-top: 1.1rem; }
.ev-jump ul { margin: 0; background: var(--cream); border-radius: var(--radius); padding: 6px clamp(14px, 1.6vw, 22px); }
.ev-jump li + li { border-top: 1px solid var(--rule); }
.ev-jump a { display: grid; grid-template-columns: 1fr auto; column-gap: 1rem; align-items: center; padding: .8rem 0; min-height: 56px;
  color: var(--ink); text-decoration: none; }
.ev-jump-h { font: 700 var(--step-1)/1.2 var(--display); }
.ev-jump-s { grid-row: 2; font-size: var(--step--1); color: var(--text-soft); line-height: 1.4; margin-top: .15rem; }
.ev-jump .ev-icon { grid-row: 1 / span 2; grid-column: 2; color: var(--link); transform: rotate(90deg); transition: transform .3s var(--ease); }
@media (hover: hover) and (pointer: fine) {
.ev-jump a:hover .ev-jump-h { color: var(--link); }
}
@media (hover: hover) and (pointer: fine) {
.ev-jump a:hover .ev-icon { transform: rotate(90deg) translateX(3px); }
}
.ev-jump a:active { opacity: .8; }

/* ------------------------------------------------------------------ the rides */
.ride { width: 100%; max-width: calc(var(--page-max) + var(--gutter) * 2); margin-inline: auto; padding: clamp(24px, 4vh, 48px) var(--gutter);
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); grid-template-areas: 'map head' 'map body';
  grid-template-rows: auto 1fr; column-gap: clamp(24px, 3vw, 48px); align-items: start;
  align-content: center; scroll-margin-top: var(--bar-h); }
.ride-flip { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); grid-template-areas: 'head map' 'body map'; }
.ride-head { grid-area: head; background: var(--cream); border-radius: var(--radius) var(--radius) 0 0; padding: clamp(22px, 2.6vw, 36px) clamp(22px, 2.6vw, 36px) 0; }
.ride-head h3 { font-size: var(--step-3); line-height: 1.08; font-weight: 750; }
.ride-status { margin-top: .8rem; padding-left: 1rem; border-left: 3px solid var(--teal-ink); font-weight: 600; line-height: 1.45; }
.ride-status.is-pending { border-left-color: #a5562d; }
.ride-body { grid-area: body; background: var(--cream); border-radius: 0 0 var(--radius) var(--radius); padding: 1.1rem clamp(22px, 2.6vw, 36px) clamp(22px, 2.6vw, 36px); }
.ride-text p + p { margin-top: .8em; }
.ride-actions { margin-top: 1.3rem; }
.ride-cta { min-height: 56px; padding: .7em 1.4em; font-size: var(--step-0); white-space: normal; text-align: left; }
.ride-cta .ev-icon { width: .95em; height: .95em; }
.ride-more { margin-top: .9rem; font-size: var(--step--1); line-height: 1.55; }
.ride-more:empty { display: none; }

.ride-map { grid-area: map; align-self: center; margin: 0; }
.ride-map-frame { position: relative; width: min(100%, calc((100svh - var(--bar-h) - 90px) * 1.1)); margin-inline: auto; aspect-ratio: 1000 / 893; }
.ride-africa .ride-map-frame { aspect-ratio: 1000 / 907; }
.ride-map-frame svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.map-base { mix-blend-mode: multiply; }
.ride-map-cap { margin: .4rem auto 0; max-width: 52ch; text-align: center; font-size: var(--step--1); line-height: 1.45; color: var(--text-soft); }

/* the drawn map, in the antique map's ink */
.map-sea { fill: #a7c9c7; opacity: .62; }
.map-grat { fill: none; stroke: var(--map-grid); stroke-opacity: .22; stroke-width: .8px; vector-effect: non-scaling-stroke; }
.map-waterline path { fill: none; stroke: var(--map-waterline); stroke-linejoin: round; }
.wl-3 { stroke-width: 34px; stroke-opacity: .10; }
.wl-2 { stroke-width: 18px; stroke-opacity: .16; }
.wl-1 { stroke-width: 7px; stroke-opacity: .28; }
.map-land { fill: var(--map-land); }
.map-coast { fill: none; stroke: var(--map-coast); stroke-width: 1.3px; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.map-border { fill: none; stroke: #6b4d26; stroke-opacity: .55; stroke-width: 1px; stroke-dasharray: 5 4; vector-effect: non-scaling-stroke; }
.mtn { fill: #f1e4bd; stroke: var(--map-coast); stroke-width: 1.1px; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.mtn-shade { fill: none; stroke: var(--map-coast); stroke-width: .9px; stroke-linecap: round; vector-effect: non-scaling-stroke; }

.map-label { font-family: var(--display); fill: #3a2a12; }
.map-label-sea { font-size: 19px; font-weight: 500; fill: #1f5457; letter-spacing: .14em; font-style: italic; }
.map-label-land { font-size: 21px; font-weight: 600; fill-opacity: .72; letter-spacing: .1em; }
.map-label-feature { font-size: 19px; font-weight: 700; }
.map-label-note { font-size: 18px; font-weight: 500; fill: #1f5457; letter-spacing: .08em; font-style: italic; }
.map-flag { position: absolute; left: 3%; top: 4%; z-index: 2; margin: 0; padding: .5rem .8rem .55rem; max-width: 15em; background: var(--cream);
  border-left: 3px solid #a5562d; border-radius: 0 var(--radius-media) var(--radius-media) 0; font-size: var(--step--1); line-height: 1.35; box-shadow: 0 6px 14px -10px rgba(20, 12, 4, .6); }
.map-flag span { display: block; }
.map-flag-main { font-weight: 700; }
.map-place { font: 700 19px/1 var(--sans); fill: var(--ink); paint-order: stroke; stroke: #f6efda; stroke-width: 4px; stroke-linejoin: round; }

.leg-reveal { fill: none; stroke: #fff; stroke-width: 70; stroke-linecap: round; stroke-linejoin: round; }
.leg-bed { fill: none; stroke: #9c7442; stroke-opacity: .92; stroke-width: 8px; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.leg-tread { fill: none; stroke: #2e200b; stroke-opacity: .8; stroke-width: 1.6px; stroke-dasharray: 1.4 4.6; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.leg-ferry { fill: none; stroke: #1f5457; stroke-width: 2.4px; stroke-dasharray: 7 7; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.ride-africa .leg-bed { stroke: #b08a55; stroke-opacity: .8; }
.map-dot { r: 6px; fill: var(--ink); stroke: #f6efda; stroke-width: 2.5px; vector-effect: non-scaling-stroke; }
.map-dot-end { r: 9px; fill: var(--teal-ink); }
.map-bike { filter: drop-shadow(2px 4px 2px rgba(20, 12, 4, .45)); }

/* ------------------------------------------------------------------ live shows */
.ev-live { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--s2) clamp(28px, 4vw, 64px); align-items: start;
  padding-top: clamp(24px, 3vw, 40px); scroll-margin-top: var(--bar-h); }
.ev-live-intro { position: sticky; top: calc(var(--bar-h) + 32px); }
.ev-live-intro > p { margin-top: 1rem; max-width: 52ch; }
.ev-next { margin-top: var(--s1); padding-top: var(--s1); border-top: 2px solid var(--ink); }
.ev-next > * + * { margin-top: .9rem; }
.ev-next h3 { font-size: var(--step-2); }
.ev-none { font-size: var(--step-1); line-height: 1.45; max-width: 40ch; }
.next-row { padding-block: .6rem; border-bottom: 1px solid var(--rule); }
.next-when { font-weight: 700; }
.next-title { font: 700 var(--step-1)/1.3 var(--display); }
.ev-small { font-size: var(--step--1); line-height: 1.55; }
.ev-announced { font-size: var(--step--1); }

.ev-past h3 { font-size: var(--step-2); }
.ev-past-note { margin-top: .4rem; font-size: var(--step--1); color: color-mix(in srgb, var(--panel-text) 75%, transparent); }
.ev-past { columns: 2 17rem; column-gap: clamp(24px, 3vw, 44px); }
.ev-past > h3, .ev-past > .ev-past-note { column-span: all; }
.ev-past-note { margin-bottom: var(--s1); }
.past-year { break-inside: avoid-column; padding-bottom: 1.1rem; }
.past-y { font: 700 var(--step-1)/1.2 var(--display); padding-bottom: .25rem; border-bottom: 1.5px solid currentColor; }
.past-row { padding-block: .55rem; border-bottom: 1px solid var(--rule); font-size: var(--step--1); line-height: 1.45; break-inside: avoid; }
.past-row:last-child { border-bottom: 0; }
.past-title { font-weight: 650; font-size: var(--step-0); line-height: 1.35; }
.past-title a { color: var(--ink); text-decoration-color: color-mix(in srgb, var(--ink) 35%, transparent); }
@media (hover: hover) and (pointer: fine) {
.past-title a:hover { color: var(--link); }
}
.past-when, .past-where { color: color-mix(in srgb, var(--panel-text) 78%, transparent); }

/* ------------------------------------------------------------------ book Charley */
.ev-book { padding-top: clamp(56px, 8vw, 112px); scroll-margin-top: var(--bar-h); }
.ev-book-panel { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: var(--s2) clamp(28px, 4vw, 64px); align-items: center;
  background: var(--brown); color: rgba(243, 236, 214, .88); border-radius: var(--radius); padding: clamp(26px, 4vw, 56px); }
.ev-book-panel h2 { color: var(--cream); }
.ev-book-text > * + * { margin-top: 1rem; }
.ev-book-text p:not(.ev-small) { font-size: var(--step-1); line-height: 1.5; }
.ev-book-links { margin: 0; display: grid; gap: 12px; }
.big-link { display: flex; align-items: center; gap: 1rem; min-height: 76px; padding: .9rem 1.2rem; border-radius: var(--radius);
  background: var(--cream); color: var(--ink); text-decoration: none; transition: background-color .2s var(--ease), transform .15s var(--ease); }
.big-link > .ev-icon { width: 28px; height: 28px; color: var(--link); }
.big-link-k { display: block; font-size: var(--step--1); font-weight: 600; color: var(--text-soft); }
.big-link-v { display: block; font: 700 var(--step-2)/1.15 var(--display); overflow-wrap: anywhere; }
@media (hover: hover) and (pointer: fine) {
.big-link:hover { background: var(--panel-hover); color: var(--ink); }
}
.big-link:active { transform: scale(.985); }
.ev-book-panel :focus-visible { outline-color: var(--teal-2); }

.ev-onward { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px clamp(20px, 3vw, 44px); margin-top: var(--s2); }
.onward { display: grid; grid-template-columns: 1fr auto; column-gap: 1rem; align-items: center; padding: 1rem 0; border-top: 2px solid var(--ink);
  color: var(--ink); text-decoration: none; min-height: 64px; }
.onward-h { font: 700 var(--step-2)/1.15 var(--display); }
.onward-s { grid-row: 2; font-size: var(--step--1); color: var(--text-soft); margin-top: .2rem; }
.onward .ev-icon { grid-row: 1 / span 2; grid-column: 2; width: 26px; height: 26px; color: var(--link); transition: transform .3s var(--ease); }
@media (hover: hover) and (pointer: fine) {
.onward:hover .onward-h { color: var(--link); }
}
@media (hover: hover) and (pointer: fine) {
.onward:hover .ev-icon { transform: translateX(4px); }
}

/* ------------------------------------------------------------------ tablet and phone */
@media (max-width: 1000px) {
  .ev-open { grid-template-columns: minmax(0, 1fr); align-items: start; }
  .ev-jump { max-width: 36rem; }
  .ride, .ride-flip { grid-template-columns: minmax(0, 1fr); grid-template-areas: 'head' 'map' 'body'; grid-template-rows: auto; min-height: 0; }
  .ride-head { border-radius: var(--radius) var(--radius) 0 0; padding-bottom: 1.1rem; }
  .ride-map { background: transparent; margin-block: 4px 12px; }
  .ride-map-frame { width: min(100%, 640px); }
  .ride-body { border-radius: var(--radius); }
  .ev-live { grid-template-columns: minmax(0, 1fr); }
  .ev-live-intro { position: static; }
  .ev-book-panel { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 700px) {
  .ev-open { padding-top: calc(var(--bar-h) + 52px); gap: var(--s1); }
  .ev-open h1 { font-size: clamp(2rem, 8.6vw, 2.5rem); }
  .ev-jump a { min-height: 52px; padding: .65rem 0; }
  .ev-jump-s { display: none; }
  .ride { padding-inline: 12px; padding-block: 20px; }
  .ride-head h3 { font-size: clamp(1.7rem, 7.4vw, 2.1rem); }
  .ride-map-frame { width: calc(100% + 24px); margin-inline: -12px; }
  .map-label-sea { font-size: 30px; }
  .map-label-land { font-size: 32px; }
  .map-label-feature { font-size: 30px; }
  .map-place { font-size: 33px; stroke-width: 6px; }
  .map-flag { left: 12px; top: 8px; font-size: 1rem; max-width: 12.5em; }
  .map-dot { r: 10px; }
  .map-dot-end { r: 14px; }
  .map-label-note { font-size: 26px; }
  .map-label-land { fill-opacity: .6; }
  .ride-cta { width: 100%; }
  .ev-book .ev-book-panel { margin-inline: calc(var(--gutter) * -1); border-radius: 0; padding: 32px 18px; }
  .big-link > .ev-icon { width: 22px; height: 22px; }
  .ev-live { padding-top: 24px; }
  .ev-past { columns: 1; }
  .big-link { min-height: 72px; padding: .8rem 1rem; }
  .big-link-v { font-size: clamp(1.25rem, 5.6vw, 1.5rem); }
  .ev-onward { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
@media (hover: hover) and (pointer: fine) {
.onward:hover .ev-icon, .ev-jump a:hover .ev-icon { transform: none; }
}
}

.ride-status, .next-when, .past-when { font-variant-numeric: tabular-nums; }
