/* Perrun: corré con tu perro.
   Palette: border collie ink + white coat, jacarandá (Buenos Aires in spring), pelota yellow (Brodi's ball). */
:root {
  --ink: #1c1530;
  --ink-2: #2a2145;
  --coat: #ffffff;
  --lila: #f1ebff;
  --jacaranda: #7a4fe0;
  --jacaranda-deep: #5a34c4;
  --pelota: #ffd60a;
  --merle: #6f6a80;
  --merle-light: #b9b3cc;
  --ok: #1f9d6b;
  --error: #c4304f;

  --display: "Archivo", "Arial Narrow", system-ui, sans-serif;
  --hand: "Caveat Brush", "Comic Sans MS", cursive;

  --gutter: clamp(16px, 4vw, 48px);
  --max: 1180px;
  --radius-lg: 28px;
  --radius-sm: 12px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--coat);
  color: var(--ink);
  font-family: var(--display);
  font-variation-settings: "wdth" 100;
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, video, svg { display: block; max-width: 100%; }
a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }

:focus-visible {
  outline: 3px solid var(--pelota);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip {
  position: absolute; left: -999px; top: 8px;
  background: var(--pelota); color: var(--ink); padding: 8px 14px; border-radius: 999px; z-index: 50;
}
.skip:focus { left: 8px; }

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

/* ---------- Wordmark + nav ---------- */
.wordmark {
  font-weight: 900;
  font-style: italic;
  font-variation-settings: "wdth" 125;
  letter-spacing: -0.03em;
  text-decoration: none;
  font-size: 1.6rem;
  line-height: 1;
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
}
.wordmark .ball-dot {
  width: 0.34em; height: 0.34em; border-radius: 50%;
  background: var(--pelota);
  display: inline-block;
  transform: translateY(-0.02em);
}

.nav {
  position: absolute; inset: 0 0 auto 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px var(--gutter);
  color: var(--coat);
}
.nav-links { display: flex; gap: 22px; align-items: center; }
.nav-links a:not(.btn) { text-decoration: none; opacity: .8; font-size: .95rem; }
.nav-links a:not(.btn):hover { opacity: 1; }
@media (max-width: 640px) { .nav-links a:not(.btn) { display: none; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 15px 26px;
  border-radius: 999px;
  border: 2px solid transparent;
  font-weight: 750;
  font-variation-settings: "wdth" 110;
  text-decoration: none;
  cursor: pointer;
  transition: transform .18s ease, background-color .18s ease, color .18s ease;
  line-height: 1.1;
}
.btn:active { transform: scale(.97); }
.btn-ball { background: var(--pelota); color: var(--ink); }
.btn-ball:hover { background: #ffe14d; }
.btn-ghost { border-color: currentColor; background: transparent; }
.btn-ghost:hover { background: rgba(255,255,255,.08); }
.btn-small { padding: 10px 18px; font-size: .95rem; }
.btn-ink { background: var(--ink); color: var(--coat); }
.btn-ink:hover { background: var(--ink-2); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: var(--ink);
  color: var(--coat);
  min-height: 100svh;
  padding: 120px 0 64px;
  display: flex; align-items: center;
  overflow: hidden;
  isolation: isolate;
}
.hero::before {
  /* early-morning glow: jacarandá sky low on the horizon */
  content: ""; position: absolute; z-index: -1;
  width: 120vmax; height: 120vmax; left: 50%; bottom: -95vmax;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(122,79,224,.55), rgba(122,79,224,0));
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, .75fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }

.hero h1 {
  margin: 0 0 28px;
  font-size: clamp(3.4rem, 7.2vw, 8rem);
  line-height: .86;
  font-weight: 850;
  font-variation-settings: "wdth" 118;
  letter-spacing: -0.035em;
}
.hero h1 .line { display: block; }
h1 .stop {
  display: inline-block;
  width: .26em; height: .26em;
  margin-left: .04em;
  border-radius: 50%;
  background: var(--pelota);
  vertical-align: baseline;
  position: relative;
  will-change: transform;
}
.hero-lede {
  max-width: 34rem;
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  color: #dcd5ef;
  margin: 0 0 32px;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }

.trail {
  position: absolute; left: 0; right: 0; bottom: 26px; height: 40px;
  pointer-events: none; z-index: -1;
}
.trail .paw {
  position: absolute; width: 22px; height: 22px; fill: rgba(255,255,255,.14);
  opacity: 0; transform: scale(.6);
}
.trail.on .paw { animation: paw-in .5s ease forwards; }
@keyframes paw-in { to { opacity: 1; transform: scale(1); } }

/* POV viewfinder: placeholder road until Brodi's videos arrive */
.pov {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: linear-gradient(180deg, #2b1f55 0%, #5a34c4 38%, #f3b54a 55%, #2a2145 56%, #1c1530 100%);
  box-shadow: 0 0 0 1px rgba(255,255,255,.12) inset;
}
@media (max-width: 900px) { .pov { aspect-ratio: 4 / 3; max-height: 420px; } }
.pov video, .pov img.pov-media {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.road {
  position: absolute; left: -40%; right: -40%; top: 55.5%; bottom: -60%;
  transform-origin: 50% 0;
  transform: perspective(260px) rotateX(62deg);
  background:
    linear-gradient(90deg, transparent 49.2%, var(--pelota) 49.2%, var(--pelota) 50.8%, transparent 50.8%) 0 0 / 100% 90px,
    linear-gradient(90deg, rgba(255,255,255,0) 18%, rgba(255,255,255,.22) 18.4%, rgba(255,255,255,0) 18.8%, rgba(255,255,255,0) 81.2%, rgba(255,255,255,.22) 81.6%, rgba(255,255,255,0) 82%),
    #241b3e;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 22%);
  mask-image: linear-gradient(180deg, transparent 0%, #000 22%);
  animation: road 0.9s linear infinite;
}
.road { background-repeat: repeat-y, no-repeat, no-repeat; }
@keyframes road { from { background-position: 0 0, 0 0, 0 0; } to { background-position: 0 90px, 0 0, 0 0; } }
.trees { position: absolute; inset: 0; pointer-events: none; }
.trees span {
  position: absolute; top: 46%; width: 70px; height: 70px; border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, #9b77f0, #6a42d6 70%);
  opacity: .9;
  animation: tree 2.4s linear infinite;
}
.trees span:nth-child(odd) { left: 50%; --dir: -1; }
.trees span:nth-child(even) { left: 50%; --dir: 1; }
.trees span:nth-child(2) { animation-delay: -.6s; }
.trees span:nth-child(3) { animation-delay: -1.2s; }
.trees span:nth-child(4) { animation-delay: -1.8s; }
@keyframes tree {
  0% { transform: translate(calc(var(--dir) * 30px), 0) scale(.15); opacity: 0; }
  15% { opacity: .9; }
  100% { transform: translate(calc(var(--dir) * 340px), -40px) scale(2.6); opacity: .9; }
}
.hud {
  position: absolute; inset: 16px; display: flex; flex-direction: column; justify-content: space-between;
  font-variation-settings: "wdth" 90;
  font-weight: 650; font-size: .85rem; color: #fff;
  pointer-events: none;
  text-shadow: 0 1px 6px rgba(0,0,0,.35);
}
.hud-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.rec { display: inline-flex; align-items: center; gap: 7px; }
.rec::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: #ff4d6d; animation: blink 1.2s steps(2, start) infinite; }
@keyframes blink { to { visibility: hidden; } }
.hud-stat { font-size: 1.6rem; font-weight: 850; line-height: 1; font-variation-settings: "wdth" 112; }
.hud-stat small { display: block; font-size: .75rem; font-weight: 600; opacity: .8; margin-top: 4px; }
.hud-corner { position: absolute; width: 22px; height: 22px; border: 2px solid rgba(255,255,255,.7); }
.hud-corner.tl { top: 0; left: 0; border-right: 0; border-bottom: 0; border-top-left-radius: 8px; }
.hud-corner.tr { top: 0; right: 0; border-left: 0; border-bottom: 0; border-top-right-radius: 8px; }
.hud-corner.bl { bottom: 0; left: 0; border-right: 0; border-top: 0; border-bottom-left-radius: 8px; }
.hud-corner.br { bottom: 0; right: 0; border-left: 0; border-top: 0; border-bottom-right-radius: 8px; }
.hud-inner { position: relative; height: 100%; padding: 10px 12px; display: flex; flex-direction: column; justify-content: space-between; }

/* ---------- Route (the page is a 3 km run) ---------- */
.route { position: relative; padding: 96px 0 40px; }
.route-track {
  position: absolute; top: 120px; bottom: 120px;
  left: calc(var(--gutter) + 20px);
  width: 4px; border-radius: 4px;
  background: repeating-linear-gradient(180deg, var(--merle-light) 0 10px, transparent 10px 20px);
}
@media (min-width: 1180px) { .route-track { left: calc((100vw - var(--max)) / 2 + var(--gutter) + 20px); } }
.route-fill {
  position: absolute; left: 0; top: 0; width: 100%; height: 0;
  background: var(--jacaranda); border-radius: 4px;
}
.runner {
  position: absolute; left: 50%; top: 0;
  transform: translate(-50%, -50%);
  display: flex; align-items: center; gap: 10px;
  pointer-events: none;
}
.runner-dot {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--ink); color: var(--pelota);
  display: grid; place-items: center;
  box-shadow: 0 0 0 5px var(--coat);
  flex: none;
}
.runner-dot svg { width: 22px; height: 22px; fill: currentColor; }
.runner-km {
  position: absolute; right: 50px; white-space: nowrap;
  background: var(--ink); color: var(--coat);
  font-weight: 800; font-variation-settings: "wdth" 110; font-size: .85rem;
  padding: 4px 10px; border-radius: 999px;
  font-feature-settings: "tnum";
}
@media (max-width: 1299px) { .runner-km { display: none; } }

.stop-section {
  position: relative;
  padding: 24px 0 120px calc(20px + 72px);
}
@media (max-width: 720px) { .stop-section { padding-left: 64px; padding-bottom: 96px; } }
.km {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 800; font-variation-settings: "wdth" 112;
  color: var(--jacaranda-deep); font-size: 1rem; margin-bottom: 14px;
}
.km-flag {
  position: absolute; left: 6px; top: 22px;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--coat); border: 4px solid var(--jacaranda);
}
@media (min-width: 1180px) { .km-flag { left: 6px; } }
.stop-section h2 {
  margin: 0 0 20px;
  font-size: clamp(2.2rem, 5.4vw, 4.4rem);
  line-height: .95;
  font-weight: 850;
  font-variation-settings: "wdth" 115;
  letter-spacing: -0.03em;
  max-width: 16ch;
}
.stop-section p { max-width: 38rem; margin: 0 0 16px; }
.stop-section p.big { font-size: clamp(1.15rem, 1.8vw, 1.4rem); line-height: 1.45; }

.note {
  font-family: var(--hand);
  color: var(--jacaranda);
  font-size: clamp(1.4rem, 2.4vw, 1.9rem);
  line-height: 1.1;
  display: inline-block;
  transform: rotate(-4deg);
  margin-top: 10px;
}
.note::before { content: "Brodi: "; color: var(--merle); font-size: .7em; }

.rules {
  list-style: none; padding: 0; margin: 28px 0 0;
  display: grid; gap: 0;
  max-width: 46rem;
  border-top: 2px solid var(--ink);
}
.rules li {
  display: grid; grid-template-columns: minmax(150px, 220px) 1fr; gap: 6px 28px;
  padding: 18px 0; border-bottom: 1px solid #dcd6ea;
}
.rules strong { font-weight: 800; font-variation-settings: "wdth" 108; font-size: 1.1rem; }
.rules span { color: #4a445c; }
@media (max-width: 640px) { .rules li { grid-template-columns: 1fr; } }
.rules li.limit strong { color: var(--jacaranda-deep); }

.perks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 28px; max-width: 46rem; }
@media (max-width: 640px) { .perks { grid-template-columns: 1fr; } }
.perk { background: var(--lila); border-radius: var(--radius-sm); padding: 20px 22px; }
.perk h3 { margin: 0 0 6px; font-size: 1.15rem; font-weight: 800; font-variation-settings: "wdth" 108; }
.perk p { margin: 0; color: #4a445c; font-size: 1rem; }

/* ---------- Form ---------- */
.signup {
  background: var(--ink); color: var(--coat);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 4vw, 44px);
  margin-top: 28px;
  max-width: 46rem;
  position: relative;
  overflow: hidden;
}
.signup h3 { margin: 0 0 4px; font-size: 1.5rem; font-weight: 850; font-variation-settings: "wdth" 112; }
.signup .sub { margin: 0 0 24px; color: #cfc7e6; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 16px; }
@media (max-width: 640px) { .fields { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field label, .field legend { font-weight: 650; font-size: .95rem; }
.field label .opt { color: var(--merle-light); font-weight: 500; }
.field input[type="text"], .field input[type="tel"], .field input[type="email"], .field textarea {
  width: 100%;
  background: var(--ink-2);
  border: 2px solid #3d3360;
  border-radius: var(--radius-sm);
  padding: 13px 14px;
  font-size: 1rem;
  color: var(--coat);
  transition: border-color .15s ease;
}
.field textarea { min-height: 96px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: #8f86ab; }
.field input:focus, .field textarea:focus { border-color: var(--pelota); outline: none; }
.field[aria-invalid="true"] input { border-color: #ff8fa6; }
.field .err { color: #ff9fb3; font-size: .9rem; min-height: 0; }
fieldset.field { border: 0; padding: 0; margin: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
  display: inline-block; padding: 9px 16px; border-radius: 999px;
  border: 2px solid #3d3360; cursor: pointer; font-weight: 600; font-size: .95rem;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.chip input:checked + span { background: var(--pelota); border-color: var(--pelota); color: var(--ink); }
.chip input:focus-visible + span { outline: 3px solid var(--pelota); outline-offset: 2px; }
.consent { display: flex; gap: 12px; align-items: flex-start; font-size: .95rem; color: #dcd5ef; cursor: pointer; }
.consent input { width: 22px; height: 22px; accent-color: var(--pelota); flex: none; margin-top: 1px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-foot { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; margin-top: 22px; }
.form-status { font-size: .95rem; color: #ff9fb3; }
.btn[disabled] { opacity: .7; cursor: progress; }

.done { display: none; text-align: left; }
.signup.is-done form { display: none; }
.signup.is-done .done { display: block; }
.done h3 { font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1; margin-bottom: 12px; }
.done p { color: #dcd5ef; max-width: 32rem; }
.done .btn { margin-top: 10px; }
.burst { position: absolute; inset: 0; pointer-events: none; }
.burst .paw { position: absolute; width: 26px; height: 26px; fill: var(--pelota); }

/* ---------- Gear teaser ---------- */
.gear { background: var(--lila); padding: clamp(64px, 9vw, 120px) 0; overflow: hidden; }
.gear-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: center; }
@media (max-width: 860px) { .gear-grid { grid-template-columns: 1fr; } }
.gear h2 {
  margin: 0 0 18px; font-size: clamp(2.4rem, 6vw, 5rem); line-height: .92;
  font-weight: 850; font-variation-settings: "wdth" 118; letter-spacing: -0.03em;
}
.gear p { max-width: 32rem; margin: 0 0 14px; }
.gear-list { list-style: none; margin: 0; padding: 0; }
.gear-list li {
  font-size: clamp(1.6rem, 3.6vw, 2.6rem);
  font-weight: 800; font-variation-settings: "wdth" 120; font-style: italic;
  letter-spacing: -0.02em; line-height: 1.15;
  padding: 10px 0; border-bottom: 2px solid var(--ink);
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
}
.gear-list li small {
  font-style: normal; font-size: .9rem; font-weight: 600; font-variation-settings: "wdth" 100;
  color: var(--jacaranda-deep); letter-spacing: 0; white-space: nowrap;
}

/* ---------- Instagram ---------- */
.follow { padding: clamp(64px, 9vw, 112px) 0; }
.follow h2 {
  margin: 0 0 28px; font-size: clamp(2.2rem, 5vw, 3.8rem); line-height: .95;
  font-weight: 850; font-variation-settings: "wdth" 115; letter-spacing: -0.03em;
}
.handles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 700px) { .handles { grid-template-columns: 1fr; } }
.handle {
  display: block; text-decoration: none;
  border: 2px solid var(--ink); border-radius: var(--radius-lg);
  padding: 26px 28px;
  transition: background-color .2s ease, color .2s ease, transform .2s ease;
}
.handle:hover { background: var(--ink); color: var(--coat); transform: translateY(-3px); }
.handle .at {
  font-size: clamp(1.6rem, 3.4vw, 2.4rem); font-weight: 850; font-variation-settings: "wdth" 115;
  letter-spacing: -0.02em; line-height: 1; overflow-wrap: anywhere;
}
.handle p { margin: 10px 0 0; opacity: .8; }

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: #cfc7e6; padding: 48px 0 40px; font-size: .95rem; }
.footer-grid { display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; align-items: flex-end; }
.footer .wordmark { color: var(--coat); font-size: 2.6rem; }
.footer a { text-decoration: none; }
.footer a:hover { text-decoration: underline; }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; }
.footer small { display: block; margin-top: 18px; color: #8f86ab; max-width: 40rem; }

/* ---------- /manada page ---------- */
.manada-hero { background: var(--ink); color: var(--coat); padding: 120px 0 0; position: relative; overflow: hidden; }
.manada-hero h1 {
  margin: 0 0 18px; font-size: clamp(3rem, 9vw, 7.4rem); line-height: .86;
  font-weight: 850; font-variation-settings: "wdth" 118; letter-spacing: -0.035em;
}
.manada-hero .hero-lede { margin-bottom: 0; }
.manada-body { background: var(--ink); color: var(--coat); padding: 32px 0 96px; }
.manada-body .signup { margin: 0; padding-left: 0; padding-right: 0; max-width: 46rem; }
.manada-cols { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, .8fr); gap: 56px; align-items: start; }
@media (max-width: 900px) { .manada-cols { grid-template-columns: 1fr; gap: 32px; } }
.aside-list { list-style: none; margin: 0; padding: 0; border-top: 2px solid rgba(255,255,255,.2); }
.aside-list li { padding: 16px 0; border-bottom: 1px solid rgba(255,255,255,.12); color: #dcd5ef; }
.aside-list strong { display: block; color: var(--coat); font-weight: 800; font-variation-settings: "wdth" 108; }
.aside h2 { font-size: 1.4rem; margin: 0 0 12px; font-weight: 850; font-variation-settings: "wdth" 112; }
.aside .note { color: var(--pelota); }
.aside .note::before { color: #8f86ab; }

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  .road, .trees span, .rec::before { animation: none !important; }
  .trees span { opacity: 0; }
  .trail .paw { opacity: 1; transform: none; animation: none !important; }
  .handle, .btn { transition: none; }
}

/* ---------- Waitlist link in "Lo que viene" (added 2026-10-17) ---------- */
.gear-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; margin-top: 26px; }
.gear-cta .hint { margin: 0; font-size: .95rem; color: #4a445c; max-width: 22rem; }
.gear-cta .hint strong { color: var(--jacaranda-deep); }
