/* VXO Trail — shared styles */
:root {
  --pine:       #12241a;
  --pine-2:     #1b3326;
  --moss:       #2f4d39;
  --birch:      #f2efe6;
  --paper:      #faf8f2;
  --ink:        #14201a;
  --ink-soft:   #3b4a41;
  --muted:      #66746b;
  --lingon:     #e0442e;
  --lingon-dk:  #c23520;
  --line:       rgba(20, 32, 26, 0.14);
  --line-light: rgba(242, 239, 230, 0.18);
  --error:      #b3261e;

  --f-display: 'Archivo', system-ui, sans-serif;
  --f-body:    'Archivo', system-ui, sans-serif;
  --f-serif:   'Fraunces', Georgia, serif;

  --gutter: 1.25rem;
  --max: 1120px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--lingon); outline-offset: 3px; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

h1, h2, h3 {
  font-family: var(--f-display);
  font-variation-settings: 'wdth' 112;
  font-weight: 850;
  line-height: 0.95;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}
h2 { font-size: clamp(2.3rem, 8vw, 4.5rem); margin-bottom: 1.25rem; }
h3 { font-size: 1.5rem; }
em, .serif { font-family: var(--f-serif); font-style: italic; font-weight: 500; text-transform: none; letter-spacing: -0.01em; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--lingon);
  margin-bottom: 1rem;
}
.eyebrow::before { content: ''; width: 1.6rem; height: 2px; background: currentColor; }
.lead { font-size: 1.15rem; color: var(--ink-soft); max-width: 38rem; }

section { padding: 4.5rem 0; }

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem;
  min-height: 3.25rem; padding: 0.9rem 1.6rem;
  font-family: var(--f-display); font-weight: 800; font-size: 1rem;
  letter-spacing: 0.06em; text-transform: uppercase; text-decoration: none;
  border: 2px solid transparent; border-radius: 999px; cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.2s, border-color 0.2s;
}
.btn-primary { background: var(--lingon); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--lingon-dk); transform: translateY(-1px); }
.btn-ghost { border-color: currentColor; color: inherit; background: transparent; }
.btn-ghost:hover { background: var(--birch); color: var(--ink); border-color: var(--birch); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

/* ---------- NAV ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(18, 36, 26, 0.92);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  color: var(--birch);
  border-bottom: 1px solid var(--line-light);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 4rem; gap: 1rem; }
.wordmark {
  display: flex; align-items: center; gap: 0.65rem; text-decoration: none;
  font-family: var(--f-display); font-weight: 900; font-variation-settings: 'wdth' 125;
  font-size: 1.15rem; letter-spacing: 0.04em; text-transform: uppercase;
}
.wordmark img { height: 36px; width: auto; }
.wordmark b { color: var(--lingon); }
.nav-links { display: none; gap: 1.6rem; list-style: none; }
.nav-links a { text-decoration: none; font-size: 0.85rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; opacity: 0.8; }
.nav-links a:hover { opacity: 1; }
.nav .btn { min-height: 2.5rem; padding: 0.5rem 1.1rem; font-size: 0.85rem; }

/* ---------- HERO ---------- */
.hero {
  position: relative; overflow: hidden;
  background: var(--pine); color: var(--birch);
  padding: 3.5rem 0 3rem;
}
.hero-topo { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.22; pointer-events: none; }
.hero .container { position: relative; }
.hero-kicker { color: var(--lingon); }
.hero h1 {
  font-size: clamp(3.6rem, 19vw, 10rem);
  font-variation-settings: 'wdth' 125;
  line-height: 0.85;
  margin-bottom: 1.5rem;
}
.hero h1 span { display: block; }
.hero h1 .outline { color: transparent; -webkit-text-stroke: 2px var(--birch); }
.hero-claim { font-size: clamp(1.25rem, 4.5vw, 1.75rem); line-height: 1.3; max-width: 34rem; margin-bottom: 2rem; }
.hero-claim em { color: var(--lingon); }

.hero-facts {
  display: grid; grid-template-columns: 1fr; gap: 0;
  border-top: 1px solid var(--line-light);
  margin-bottom: 2rem;
}
.fact { padding: 1rem 0; border-bottom: 1px solid var(--line-light); display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.fact .k { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; opacity: 0.65; }
.fact .v { font-family: var(--f-display); font-weight: 800; font-size: 1.2rem; text-align: right; text-transform: uppercase; letter-spacing: 0.01em; }
.fact .v small { display: block; font-family: var(--f-body); font-weight: 400; font-size: 0.8rem; text-transform: none; opacity: 0.7; letter-spacing: 0; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.price-stamp {
  display: none;
  position: absolute; right: var(--gutter); top: 0.5rem;
  width: 15rem; height: 15rem; border-radius: 50%;
  background: var(--lingon); color: #fff;
  align-items: center; justify-content: center; flex-direction: column; text-align: center;
  transform: rotate(-8deg);
  box-shadow: 0 20px 60px rgba(0,0,0,0.35);
}
.price-stamp .n { font-family: var(--f-display); font-weight: 900; font-variation-settings: 'wdth' 125; font-size: 4.6rem; line-height: 0.9; letter-spacing: -0.03em; }
.price-stamp .u { font-family: var(--f-display); font-weight: 800; font-size: 1.4rem; letter-spacing: 0.1em; }
.price-stamp .s { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; margin-top: 0.4rem; opacity: 0.9; }

/* ---------- WHY 500 ---------- */
.why { background: var(--paper); }
.why h2 .num { color: var(--lingon); }
.compare { margin: 2.5rem 0 3rem; display: grid; gap: 1.25rem; }
.bar-row { display: grid; gap: 0.4rem; }
.bar-label { display: flex; justify-content: space-between; align-items: baseline; font-weight: 700; font-size: 0.95rem; }
.bar-label .p { font-family: var(--f-display); font-weight: 900; font-size: 1.6rem; font-variation-settings: 'wdth' 115; }
.bar { height: 2.75rem; border-radius: 6px; background: var(--birch); overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: 6px; transform-origin: left; transition: transform 1.1s cubic-bezier(.2,.7,.2,1); }
.bar-typical > span { width: 100%; background: repeating-linear-gradient(-45deg, #b7bfb9 0 10px, #c7cec9 10px 20px); }
.bar-vxo > span { width: 33.33%; background: var(--lingon); }
.compare.pre .bar > span { transform: scaleX(0); }
.bar-row.vxo .bar-label .p { color: var(--lingon); }
.compare-note { font-size: 0.85rem; color: var(--muted); }

.principles { display: grid; gap: 1rem; }
.principle { background: var(--birch); border-radius: 14px; padding: 1.5rem; }
.principle .i { font-family: var(--f-display); font-weight: 900; color: var(--lingon); font-size: 0.9rem; letter-spacing: 0.1em; margin-bottom: 0.6rem; }
.principle h3 { margin-bottom: 0.6rem; font-size: 1.35rem; }
.principle p { color: var(--ink-soft); font-size: 0.98rem; }

.manifesto {
  margin-top: 3rem; padding: 2rem 1.5rem; border-radius: 14px;
  background: var(--pine); color: var(--birch);
  font-family: var(--f-serif); font-style: italic; font-size: clamp(1.35rem, 4.5vw, 2rem); line-height: 1.3;
}
.manifesto cite { display: block; margin-top: 1rem; font-family: var(--f-body); font-style: normal; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; opacity: 0.7; }

/* ---------- DISTANCES ---------- */
.distances { background: var(--birch); }
.dist-grid { display: grid; gap: 1.25rem; margin-top: 2.5rem; }
.dist {
  position: relative; overflow: hidden;
  background: var(--paper); border: 1px solid var(--line); border-radius: 18px;
  padding: 1.75rem 1.5rem 1.5rem;
  display: flex; flex-direction: column;
}
.dist.long { background: var(--pine); color: var(--birch); border-color: var(--pine); }
.dist .km {
  font-family: var(--f-display); font-weight: 900; font-variation-settings: 'wdth' 125;
  font-size: clamp(5rem, 24vw, 8rem); line-height: 0.82; letter-spacing: -0.04em;
}
.dist .km small { font-size: 0.32em; letter-spacing: 0; margin-left: 0.15em; }
.dist .tag { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--lingon); margin: 0.9rem 0 0.5rem; }
.dist p { color: inherit; opacity: 0.85; margin-bottom: 1.25rem; }
.dist dl { display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem 1rem; border-top: 1px solid var(--line); padding-top: 1.1rem; margin-bottom: 1.5rem; }
.dist.long dl { border-color: var(--line-light); }
.dist dt { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; opacity: 0.6; }
.dist dd { font-weight: 700; }
.dist .foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.dist .price { font-family: var(--f-display); font-weight: 900; font-size: 2rem; font-variation-settings: 'wdth' 115; }
.dist.long .btn-ghost:hover { background: var(--birch); color: var(--ink); }

/* ---------- COURSE ---------- */
.course { background: var(--paper); }
.course-grid { display: grid; gap: 2rem; align-items: center; }
.course-map {
  position: relative; aspect-ratio: 4 / 3; border-radius: 18px; overflow: hidden;
  background: var(--moss); color: var(--birch);
}
.course-map svg { width: 100%; height: 100%; }
.course-map .badge {
  position: absolute; right: 1rem; top: 1rem;
  background: var(--paper); color: var(--ink); border-radius: 999px;
  padding: 0.45rem 0.9rem; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
}
.places { display: grid; gap: 1rem; margin-top: 1.75rem; }
.place { border-left: 3px solid var(--lingon); padding-left: 1rem; }
.place h3 { font-size: 1.25rem; margin-bottom: 0.25rem; }
.place p { color: var(--ink-soft); font-size: 0.98rem; }

/* ---------- PARTICIPANTS ---------- */
.startlist { background: var(--pine); color: var(--birch); }
.startlist .eyebrow { color: var(--lingon); }
.counts { display: flex; gap: 2.5rem; flex-wrap: wrap; margin: 1.5rem 0 2rem; }
.count .n { font-family: var(--f-display); font-weight: 900; font-variation-settings: 'wdth' 125; font-size: clamp(3.5rem, 14vw, 5.5rem); line-height: 0.9; color: var(--lingon); }
.count .l { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; opacity: 0.7; }
.runner-list { list-style: none; display: grid; grid-template-columns: 1fr; gap: 0; border-top: 1px solid var(--line-light); }
.runner-list li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.7rem 0; border-bottom: 1px solid var(--line-light); }
.runner-list .club { opacity: 0.6; font-size: 0.9rem; }
.runner-list .d { font-family: var(--f-display); font-weight: 800; color: var(--lingon); white-space: nowrap; }
.empty { font-family: var(--f-serif); font-style: italic; font-size: 1.2rem; opacity: 0.8; }

/* ---------- FORM ---------- */
.register { background: var(--birch); }
.reg-wrap { max-width: 44rem; }
.summary {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  background: var(--paper); border: 1px solid var(--line); border-radius: 14px;
  padding: 1.1rem 1.25rem; margin: 2rem 0;
  font-weight: 700;
}
.summary .p { font-family: var(--f-display); font-weight: 900; font-size: 1.8rem; color: var(--lingon); font-variation-settings: 'wdth' 115; }

form { display: grid; gap: 1.5rem; }
fieldset { border: 0; display: grid; gap: 1.25rem; }
legend {
  font-family: var(--f-display); font-weight: 850; font-variation-settings: 'wdth' 112;
  font-size: 1.15rem; letter-spacing: 0.02em; text-transform: uppercase;
  padding-bottom: 0.5rem; margin-bottom: 0.25rem; border-bottom: 2px solid var(--ink); width: 100%;
}
.row { display: grid; gap: 1.25rem; }
.field { display: grid; gap: 0.4rem; }
.field > label, .field > .label { font-size: 0.82rem; font-weight: 700; letter-spacing: 0.04em; color: var(--ink-soft); }
.field .opt { font-weight: 400; color: var(--muted); }
.field input, .field textarea, .field select {
  width: 100%; min-height: 3.1rem;
  background: var(--paper); color: var(--ink);
  border: 1.5px solid var(--line); border-radius: 10px;
  font: inherit; font-size: 1rem;
  padding: 0.75rem 0.9rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field textarea { min-height: 6rem; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(224, 68, 46, 0.18); }
.field input[aria-invalid="true"] { border-color: var(--error); }

.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
.choices.three { grid-template-columns: 1fr 1fr 1fr; }
.choice { position: relative; cursor: pointer; }
.choice input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.choice span {
  display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center;
  min-height: 3.1rem; padding: 0.7rem 0.5rem;
  background: var(--paper); border: 1.5px solid var(--line); border-radius: 10px;
  font-weight: 700; line-height: 1.2; transition: all 0.15s;
}
.choice span small { font-weight: 400; font-size: 0.78rem; color: var(--muted); margin-top: 0.15rem; }
.choice.big span { font-family: var(--f-display); font-weight: 900; font-size: 1.6rem; font-variation-settings: 'wdth' 120; min-height: 4.5rem; }
.choice input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--birch); }
.choice input:checked + span small { color: var(--birch); opacity: 0.75; }
.choice input:focus-visible + span { outline: 3px solid var(--lingon); outline-offset: 2px; }

.check { display: flex; gap: 0.8rem; align-items: flex-start; cursor: pointer; font-size: 0.97rem; }
.check input { width: 1.25rem; height: 1.25rem; margin-top: 0.15rem; accent-color: var(--lingon); flex-shrink: 0; }
.check small { display: block; color: var(--muted); font-size: 0.85rem; }

.form-error {
  display: none; padding: 0.9rem 1rem; border-radius: 10px;
  background: rgba(179, 38, 30, 0.08); border: 1px solid rgba(179, 38, 30, 0.35); color: var(--error);
  font-size: 0.95rem;
}
.form-error.show { display: block; }
form .btn-primary { width: 100%; min-height: 3.75rem; font-size: 1.1rem; }
.terms { font-size: 0.85rem; color: var(--muted); }
.spinner { width: 1rem; height: 1rem; border: 2px solid #fff; border-top-color: transparent; border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- FAQ ---------- */
.faq { background: var(--paper); }
.faq-list { margin-top: 2rem; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: 1.15rem 0; font-weight: 700; font-size: 1.05rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-family: var(--f-display); font-weight: 900; font-size: 1.6rem; line-height: 1; color: var(--lingon); transition: transform 0.2s; flex-shrink: 0; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 0 1.25rem; color: var(--ink-soft); max-width: 42rem; }

/* ---------- CONTACT / FOOTER ---------- */
.contact { background: var(--lingon); color: #fff; text-align: left; }
.contact h2 { color: #fff; }
.contact a.mail {
  display: inline-block; margin-top: 0.5rem;
  font-family: var(--f-display); font-weight: 900; font-variation-settings: 'wdth' 110;
  font-size: clamp(1.15rem, 5.2vw, 3rem); text-decoration: none; overflow-wrap: anywhere;
  border-bottom: 3px solid rgba(255,255,255,0.5);
}
.contact a.mail:hover { border-color: #fff; }
.contact p { max-width: 36rem; margin-top: 1rem; opacity: 0.92; }

footer { background: var(--pine); color: var(--birch); padding: 2.5rem 0; font-size: 0.85rem; }
.foot-inner { display: flex; flex-direction: column; gap: 1.25rem; }
.foot-inner .org { display: flex; align-items: center; gap: 0.9rem; text-decoration: none; }
.foot-inner .org img { height: 52px; width: auto; }
.foot-inner .meta { opacity: 0.65; }

/* ---------- TACK PAGE ---------- */
.tack { min-height: calc(100vh - 4rem); background: var(--birch); padding: 3.5rem 0 4.5rem; }
.tack h1 { font-size: clamp(2.8rem, 12vw, 5.5rem); margin-bottom: 1.25rem; }
.tack h1 .accent { color: var(--lingon); }
.pay-box { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 0.5rem 1.25rem; margin: 2rem 0; }
.pay-row { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: 0.9rem 0; border-bottom: 1px solid var(--line); }
.pay-row:last-child { border-bottom: 0; }
.pay-row .k { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.pay-row .v { font-weight: 700; text-align: right; }
.pay-row .v.big { font-family: var(--f-display); font-weight: 900; font-size: 1.6rem; color: var(--lingon); }
.hidden { display: none !important; }

/* ---------- LARGER SCREENS ---------- */
@media (min-width: 700px) {
  :root { --gutter: 2rem; }
  section { padding: 6rem 0; }
  .hero-facts { grid-template-columns: repeat(4, 1fr); border-top: 0; }
  .fact { flex-direction: column; justify-content: flex-start; gap: 0.35rem; border-bottom: 0; border-left: 1px solid var(--line-light); padding: 0.4rem 1.1rem; }
  .fact:first-child { border-left: 0; padding-left: 0; }
  .fact .v { text-align: left; }
  .principles { grid-template-columns: repeat(3, 1fr); }
  .dist-grid { grid-template-columns: 1fr 1fr; }
  .row.two { grid-template-columns: 1fr 1fr; }
  .runner-list { grid-template-columns: 1fr 1fr; column-gap: 2.5rem; }
  .manifesto { padding: 3rem; }
  .foot-inner { flex-direction: row; justify-content: space-between; align-items: center; }
}
@media (min-width: 960px) {
  .nav-links { display: flex; }
  .hero { padding: 6rem 0 5rem; }
  .price-stamp { display: flex; top: 1rem; }
  .hero h1 { max-width: 70%; }
  .course-grid { grid-template-columns: 1.1fr 1fr; gap: 4rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .bar > span { transition: none; }
}
