:root {
  --bg: #f3f0e8;
  --bg-2: #e8e2d4;
  --fg: #1a1916;
  --muted: #5e584e;
  --line: #cfc6b4;
  --accent: #b84e1f;
  --accent-fg: #fff8f3;
  --header: rgba(243, 240, 232, 0.94);
  --measure: 42rem;
}

html[data-theme="dark"] {
  --bg: #121411;
  --bg-2: #1c201c;
  --fg: #ece7dc;
  --muted: #b1aa9c;
  --line: #31362f;
  --accent: #e07a45;
  --accent-fg: #1a100c;
  --header: rgba(18, 20, 17, 0.94);
}

html[data-theme="light"] { color-scheme: light; }
html[data-theme="dark"] { color-scheme: dark; }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 5rem; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--fg);
  font-family: system-ui, sans-serif;
  font-size: 1.05rem;
  line-height: 1.55;
}
main { flex: 1; }
h1, h2, h3 { font-weight: 650; letter-spacing: -0.03em; line-height: 1.12; }
h1 { font-size: clamp(2.4rem, 7vw, 4.6rem); margin: 0; }
h2 { font-size: clamp(1.4rem, 2vw, 1.8rem); margin: 0 0 0.8rem; }
h3 { font-size: 1.15rem; margin: 0 0 0.4rem; }
p { margin: 0.7rem 0 0; }
a { color: inherit; }
img, svg { max-width: 100%; }

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--accent);
  color: var(--accent-fg);
  padding: 0.5rem 0.8rem;
  z-index: 3;
}
.skip-link:focus { top: 0.5rem; }

.wrap {
  width: min(72rem, calc(100% - 2.4rem));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--header);
  border-bottom: 1px solid var(--line);
}
.header-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  padding: 0.85rem 0;
}
.wordmark {
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.brand-line {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}
.site-nav {
  display: flex;
  gap: 0.35rem 1rem;
}
.site-nav a {
  text-decoration: none;
  padding: 0.35rem 0;
}
.site-nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--accent); }
.tools {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
}
.langs { display: flex; }
.langs a, .theme-toggle {
  font: inherit;
  color: inherit;
  background: transparent;
  border: 1px solid var(--line);
  padding: 0.35rem 0.55rem;
  text-decoration: none;
  cursor: pointer;
}
.langs a + a { border-left: 0; }
.langs a[aria-current="true"] {
  border-color: var(--accent);
  color: var(--accent);
}

.hero { padding: 3.2rem 0 1rem; max-width: 46rem; }
.lede { font-size: 1.25rem; line-height: 1.4; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; margin-top: 1.4rem; }
.button {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-fg);
  text-decoration: none;
  border: 0;
  font: inherit;
  font-weight: 650;
  padding: 0.75rem 1.05rem;
  cursor: pointer;
}
.text-link { color: var(--fg); }
.band { margin-top: 3rem; }
.section-note { color: var(--muted); max-width: var(--measure); }

.cards {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15.5rem, 1fr));
  gap: 0.75rem;
}
.cards a {
  display: block;
  height: 100%;
  text-decoration: none;
  background: var(--bg-2);
  border: 1px solid var(--line);
  padding: 1rem 1.05rem 1.15rem;
}
.cards a:hover, .cards a:focus-visible { border-color: var(--accent); }
.cards p { color: var(--muted); }
.card-date { color: var(--accent); font-size: 0.85rem; letter-spacing: 0.04em; text-transform: uppercase; }

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: step;
  display: grid;
  gap: 1rem;
}
.steps li { border-top: 1px solid var(--line); padding-top: 0.85rem; }
.steps h3::before {
  counter-increment: step;
  content: counter(step) "  ";
  color: var(--accent);
}
@media (min-width: 800px) {
  .steps { grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
}

.limit {
  margin: 3rem 0 1rem;
  padding: 1.1rem 1.2rem;
  border-left: 4px solid var(--accent);
  background: var(--bg-2);
  max-width: var(--measure);
}

.page-head { padding-top: 2.4rem; max-width: var(--measure); }
.prose { max-width: 48rem; padding-bottom: 3rem; }
.prose-page { padding-bottom: 3rem; }
.prose section { margin-top: 1.8rem; }
.prose p { max-width: var(--measure); }
.prose ul { margin: 0.8rem 0 0; padding-left: 1.15rem; max-width: var(--measure); }
.prose li + li { margin-top: 0.35rem; }
.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding-top: 1.4rem;
  color: var(--muted);
  font-size: 0.92rem;
}
.crumbs a { color: var(--fg); }
.cta-note { color: var(--muted); font-size: 0.95rem; }
.related { margin-top: 2rem; }
.related ul { list-style: none; padding: 0; }
.related li + li { margin-top: 0.35rem; }

.contact-page form { margin-top: 1.4rem; max-width: 36rem; }
.form-row { margin-top: 1rem; }
.form-row label { display: block; font-weight: 650; margin-bottom: 0.3rem; }
.hint { font-weight: 400; color: var(--muted); }
input, select, textarea {
  width: 100%;
  font: inherit;
  color: inherit;
  background: var(--bg);
  border: 1px solid var(--line);
  padding: 0.6rem 0.7rem;
}
textarea { min-height: 9rem; resize: vertical; }
.errorlist { color: var(--accent); margin: 0.3rem 0 0; padding-left: 1.1rem; }
.is-invalid input, .is-invalid select, .is-invalid textarea { border-color: var(--accent); }
.hp {
  position: absolute;
  left: -10000px;
  height: 0;
  overflow: hidden;
}

.anticipo-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(16rem, 0.7fr);
  gap: 1rem;
  margin-top: 1.2rem;
  align-items: start;
}
.anticipo-map {
  height: min(70vh, 38rem);
  min-height: 22rem;
  background: var(--bg-2);
  border: 1px solid var(--line);
  z-index: 0;
}
.anticipo-note { color: var(--muted); font-size: 0.92rem; }
.anticipo-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); }
.anticipo-list li { border-top: 1px solid var(--line); }
.anticipo-list li:first-child { border-top: 0; }
.anticipo-list button {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.2rem 1rem;
  text-align: left;
  font: inherit;
  color: inherit;
  background: transparent;
  border: 0;
  padding: 0.7rem 0.85rem;
  cursor: pointer;
}
.anticipo-list button[aria-current="true"] { background: var(--bg-2); }
.anticipo-list .place { font-weight: 650; }
.anticipo-list .meta { color: var(--muted); grid-column: 1 / -1; font-size: 0.9rem; }
.anticipo-list .temp { font-variant-numeric: tabular-nums; }
.anticipo-pin {
  background: var(--bg);
  color: var(--fg);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.15rem 0.45rem;
  font-size: 0.78rem;
  font-weight: 650;
  white-space: nowrap;
  box-shadow: 0 1px 0 var(--line);
}
.anticipo-pin.is-wet { background: var(--accent); color: var(--accent-fg); border-color: transparent; }
@media (max-width: 800px) {
  .anticipo-layout { grid-template-columns: 1fr; }
  .anticipo-map { height: 24rem; }
}

.site-footer { border-top: 1px solid var(--line); margin-top: 2rem; }
.footer-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  justify-content: space-between;
  padding: 1.2rem 0 2rem;
  color: var(--muted);
}
.footer-bar p { margin: 0; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

@media (max-width: 720px) {
  .header-bar {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
  }
  .brand-line { display: none; }
  .tools { grid-column: 2; grid-row: 1; margin-left: 0; }
  .site-nav {
    grid-column: 1 / -1;
    width: auto;
    justify-content: flex-start;
    gap: 1.1rem;
  }
}
