/* TrackRoot web · base: tokens, type, layout, header, footer and the pieces shared by every page. */

@font-face { font-family: "Montserrat"; font-weight: 700; font-style: normal; font-display: swap; src: url(fonts/Montserrat_700Bold.woff) format("woff"); }
@font-face { font-family: "Montserrat"; font-weight: 800; font-style: normal; font-display: swap; src: url(fonts/Montserrat_800ExtraBold.woff) format("woff"); }
@font-face { font-family: "Nunito Sans"; font-weight: 400; font-style: normal; font-display: swap; src: url(fonts/NunitoSans_400Regular.woff) format("woff"); }
@font-face { font-family: "Nunito Sans"; font-weight: 700; font-style: normal; font-display: swap; src: url(fonts/NunitoSans_700Bold.woff) format("woff"); }
@font-face { font-family: "Nunito Sans"; font-weight: 800; font-style: normal; font-display: swap; src: url(fonts/NunitoSans_800ExtraBold.woff) format("woff"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 600; font-style: normal; font-display: swap; src: url(fonts/BarlowCondensed_600SemiBold.woff) format("woff"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 700; font-style: normal; font-display: swap; src: url(fonts/BarlowCondensed_700Bold.woff) format("woff"); }

:root {
  color-scheme: light dark;
  /* brand */
  --olive: #5c743a;
  --olive-strong: #465a2b;
  --olive-soft: #e3e9d3;
  --earth: #a0774b;
  --earth-strong: #7d5a35;
  --earth-soft: #efe2d1;
  --ochre: #f0cc42;
  --ochre-strong: #9a7406;
  --ochre-soft: #fbf0c6;
  --med: #2b3b4b;
  --med-soft: #dbe3ea;
  --stone: #e8d9c8;
  --logo: #3b4a22;
  /* neutrals */
  --bg: #f4eee5;
  --bg-page: #ebe2d4;
  --surface: #fffcf7;
  --surface-2: #f1e9dd;
  --surface-3: #e7dccc;
  --ink: #22303c;
  --ink-2: #566370;
  --ink-3: #6f7679;
  --line: #ddd0bd;
  --line-strong: #c9b9a2;
  --on-accent: #fffcf7;
  --on-ochre: #2b3b4b;
  /* semantic */
  --ok: #4f7a2c;
  --warn: #c58a00;
  --danger: #b8432b;
  --danger-soft: #f6ddd5;
  --on-danger: #ffffff;
  --info: #2f6f9a;
  --link: var(--olive-strong);
  --focus: #2f6f9a;
  /* GR waymark */
  --gr-red: #c8102e;
  --gr-white: #ffffff;
  /* map */
  --map-land: #e9dfcf;
  --map-province: #f5efe4;
  --map-border: #b9a68a;
  --map-sea: #c9d9e1;
  --map-sea-line: #a9c1cf;
  --map-relief: #a0774b;
  --map-label: #4a4436;
  --map-halo: rgba(255, 252, 247, 0.9);
  --route: #a0774b;
  --route-done: #5c743a;
  --route-active: #e0b21c;
  --user-dot: #2f6f9a;
  /* place categories */
  --cat-patrimonio: #a0774b;
  --cat-mirador: #2b3b4b;
  --cat-naturaleza: #5c743a;
  --cat-agua: #2f7fae;
  --cat-pueblo: #b88a0b;
  --cat-servicio: #6b6f73;

  --font-head: "Montserrat", "Segoe UI", system-ui, sans-serif;
  --font-display: var(--font-head);
  --font-body: "Nunito Sans", "Segoe UI", system-ui, sans-serif;
  --font-data: "Barlow Condensed", "Arial Narrow", "Segoe UI", sans-serif;

  --fs-2xs: 11px;
  --fs-xs: 12px;
  --fs-sm: 13.5px;
  --fs-base: 15px;
  --fs-md: 17px;
  --fs-lg: 20px;
  --fs-xl: 24px;

  --r-xs: 6px;
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 22px;
  --r-xl: 28px;
  --r-pill: 999px;
  --shadow-1: 0 1px 2px rgba(43, 59, 75, 0.08), 0 1px 1px rgba(43, 59, 75, 0.04);
  --shadow-2: 0 6px 18px rgba(43, 59, 75, 0.12), 0 2px 4px rgba(43, 59, 75, 0.06);
  --shadow-3: 0 18px 50px rgba(30, 40, 50, 0.22);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --gutter: 1rem;
  --header-h: 3.75rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --olive: #93b25e;
    --olive-strong: #aecb78;
    --olive-soft: #26321c;
    --earth: #c89c6c;
    --earth-strong: #ddb68a;
    --earth-soft: #3a2d20;
    --ochre-strong: #f0cc42;
    --ochre-soft: #3a3116;
    --med: #9bbad3;
    --med-soft: #1e2d3b;
    --stone: #3a352d;
    --logo: #b9cf8e;
    --bg: #121a21;
    --bg-page: #0d1318;
    --surface: #19232c;
    --surface-2: #202c36;
    --surface-3: #283642;
    --ink: #ede4d6;
    --ink-2: #aab2b8;
    --ink-3: #8a949b;
    --line: #2c3a46;
    --line-strong: #3b4b58;
    --on-accent: #10171d;
    --on-ochre: #1a232b;
    --ok: #93b25e;
    --warn: #f0cc42;
    --danger: #ef7a5f;
    --danger-soft: #3b211b;
    --on-danger: #10171d;
    --info: #7fb4dc;
    --focus: #f0cc42;
    --map-land: #18212a;
    --map-province: #1f2a33;
    --map-border: #4a5a66;
    --map-sea: #0f2232;
    --map-sea-line: #1b3a52;
    --map-relief: #c89c6c;
    --map-label: #d9cfbf;
    --map-halo: rgba(18, 26, 33, 0.85);
    --route: #c89c6c;
    --route-done: #93b25e;
    --route-active: #f0cc42;
    --user-dot: #6fb3e6;
    --cat-patrimonio: #c89c6c;
    --cat-mirador: #9bbad3;
    --cat-naturaleza: #93b25e;
    --cat-agua: #5fb0e0;
    --cat-pueblo: #e3bb3c;
    --cat-servicio: #9aa1a7;
    --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-2: 0 8px 22px rgba(0, 0, 0, 0.45);
    --shadow-3: 0 18px 50px rgba(0, 0, 0, 0.6);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { max-width: 100%; }
img { display: block; }
[hidden] { display: none !important; }
h1, h2, h3 { font-family: var(--font-head); font-weight: 800; line-height: 1.15; letter-spacing: -0.015em; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(1.75rem, 5vw, 2.6rem); }
h2 { font-size: clamp(1.4rem, 3.6vw, 2rem); }
h3 { font-size: 1.1rem; font-weight: 700; }
p { margin: 0; }
a { color: var(--link); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--ochre); color: var(--on-ochre); }
code { font: 600 0.9em var(--font-data); background: var(--surface-2); padding: 0.1em 0.4em; border-radius: 4px; }

.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: -999px; top: 0.5rem; z-index: 100; background: var(--ink); color: var(--bg); padding: 0.6rem 1rem; border-radius: var(--r-sm); }
.skip:focus { left: 0.5rem; }
.wrap { width: min(100% - 2 * var(--gutter), 72rem); margin-inline: auto; }
.muted { color: var(--ink-2); font-size: 0.95rem; }
.icon { width: 1.25rem; height: 1.25rem; flex: none; }
.icon--fill { fill: currentColor; stroke: none; }
.icon--inline { width: 1em; height: 1em; vertical-align: -0.12em; margin-left: 0.15em; }

/* Header of the secondary pages: just the brand */
.top { background: var(--bg); border-bottom: 1px solid var(--line); }
.top__bar { display: flex; align-items: center; min-height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; font: 800 1.15rem/1 var(--font-head); letter-spacing: -0.02em; color: var(--ink); text-decoration: none; }
.brand img { border-radius: 10px; }
.brand--small { font-size: 1rem; }
.brand--small img { border-radius: 8px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem;
  min-height: 3rem; padding: 0.5rem 1.25rem; border-radius: 999px; border: 2px solid transparent;
  font: 800 0.95rem/1.2 var(--font-body); text-decoration: none; text-align: center; cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.btn--sm { min-height: 2.5rem; padding: 0.3rem 1rem; font-size: 0.875rem; }
.btn--primary { background: var(--olive); color: var(--on-accent); }
.btn--primary:hover { background: var(--olive-strong); }
.btn--outline, .btn--ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn--outline:hover, .btn--ghost:hover { border-color: var(--ink); }
.btn--danger { background: var(--danger); color: var(--on-danger); }
.btn--danger:hover { filter: brightness(0.92); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.textlink { font-weight: 800; text-decoration: none; }
.textlink:hover { text-decoration: underline; }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.1rem; }

/* Store buttons (landing and download page) */
.ld-store {
  display: inline-flex; align-items: center; gap: 12px;
  min-height: 58px; padding: 0 22px 0 12px; border-radius: var(--r-md);
  background: var(--med); color: var(--surface); text-decoration: none; text-align: left;
  box-shadow: var(--shadow-2);
  transition: transform 0.15s var(--ease), box-shadow 0.2s;
}
.ld-store:hover { transform: translateY(-2px); box-shadow: var(--shadow-3); }
.ld-store:active { transform: translateY(0) scale(0.98); }
.ld-store:focus-visible { outline-offset: 3px; border-radius: var(--r-md); }
.ld-store__icon { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; flex: none; background: color-mix(in srgb, var(--surface) 16%, transparent); }
.ld-store__icon svg { width: 22px; height: 22px; }
.ld-store__text { display: grid; gap: 3px; }
.ld-store__small { font: 800 10px/1 var(--font-body); letter-spacing: 0.14em; text-transform: uppercase; color: color-mix(in srgb, var(--surface) 78%, transparent); }
.ld-store__name { font: 800 var(--fs-md)/1 var(--font-display); letter-spacing: -0.01em; }

/* Footer: small, on the page background */
.foot { border-top: 1px solid var(--line); padding-block: 1.5rem 2rem; font-size: 0.875rem; color: var(--ink-2); }
.foot a { color: var(--ink); font-weight: 700; }
.foot__links { display: flex; flex-wrap: wrap; gap: 0.35rem 1.25rem; margin: 0 0 0.9rem; padding: 0; list-style: none; }
.foot__links a { text-decoration: none; }
.foot__links a:hover { text-decoration: underline; }
.foot p + p { margin-top: 0.35rem; }

@media (min-width: 64rem) { :root { --gutter: 1.5rem; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}
