/* Clear Call — calm, grounded, high contrast */
:root {
  --bg: #f6f4f0;
  --bg-alt: #ebe7e0;
  --ink: #1a1a18;
  --ink-muted: #4a4a45;
  --accent: #2c4a3e;
  --accent-hover: #1e342c;
  --border: #cfc9be;
  --focus: #2c4a3e;
  --max: 42rem;
  --wide: 56rem;
  --space: 1.25rem;
  --radius: 6px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Code", "SF Mono", Menlo, monospace;
}

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

html {
  font-size: 112.5%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img { max-width: 100%; height: auto; }

a {
  color: var(--accent);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.15em;
}
a:hover { color: var(--accent-hover); }
a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--bg);
  padding: 0.5rem 1rem;
  z-index: 100;
}
.skip-link:focus { left: 0; }

/* Header / Nav */
.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-inner {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0.75rem var(--space);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  justify-content: space-between;
}
.brand {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.02em;
}
.brand:hover { color: var(--accent); }
.brand span { font-weight: 500; color: var(--ink-muted); }

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  align-items: center;
}
.nav a {
  color: var(--ink-muted);
  text-decoration: none;
  font-size: 0.92rem;
}
.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
}

.lang-toggle {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-alt);
}
.lang-toggle button {
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  border: none;
  background: transparent;
  color: var(--ink-muted);
  padding: 0.3rem 0.55rem;
  cursor: pointer;
}
.lang-toggle button[aria-pressed="true"] {
  background: var(--accent);
  color: #fff;
}
.lang-toggle button:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: -2px;
}

/* Main */
main {
  flex: 1;
  max-width: var(--wide);
  width: 100%;
  margin: 0 auto;
  padding: 2rem var(--space) 3rem;
}
.prose { max-width: var(--max); }

h1, h2, h3 {
  line-height: 1.25;
  letter-spacing: -0.02em;
  font-weight: 700;
}
h1 { font-size: clamp(1.75rem, 4vw, 2.25rem); margin: 0 0 0.75rem; }
h2 { font-size: 1.35rem; margin: 2rem 0 0.6rem; }
h3 { font-size: 1.1rem; margin: 1.5rem 0 0.4rem; }

.lead {
  font-size: 1.15rem;
  color: var(--ink-muted);
  margin: 0 0 1.5rem;
}

.hero {
  padding: 1rem 0 2rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
}
.hero .tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.card-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
  margin: 1.5rem 0;
}
@media (min-width: 560px) {
  .card-grid { grid-template-columns: 1fr 1fr; }
}

.card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.15rem 1.25rem;
}
.card h2, .card h3 { margin-top: 0; }
.card p { margin: 0.4rem 0 0.8rem; color: var(--ink-muted); font-size: 0.95rem; }
.card a.btn { margin-top: 0.25rem; }

.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff !important;
  text-decoration: none !important;
  padding: 0.55rem 1rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.92rem;
  border: none;
  cursor: pointer;
}
.btn:hover { background: var(--accent-hover); }
.btn:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}
.btn-ghost {
  background: transparent;
  color: var(--accent) !important;
  border: 1px solid var(--border);
  text-decoration: none !important;
}
.btn-ghost:hover {
  background: var(--bg-alt);
  color: var(--accent-hover) !important;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.25rem 0;
}

.list-plain {
  list-style: none;
  padding: 0;
  margin: 0;
}
.list-plain li {
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
}
.list-plain li:first-child { padding-top: 0; }
.list-plain a {
  font-weight: 600;
  text-decoration: none;
  color: var(--ink);
}
.list-plain a:hover { color: var(--accent); text-decoration: underline; }
.meta {
  font-size: 0.85rem;
  color: var(--ink-muted);
  margin: 0.25rem 0 0;
}

.post-header { margin-bottom: 1.5rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border); }
.post-body p { margin: 0 0 1rem; }
.post-body ul { margin: 0 0 1rem; padding-left: 1.25rem; }
.post-body li { margin-bottom: 0.35rem; }

.pdf-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1rem;
}

/* Lang visibility */
[data-lang-section] { display: none; }
html[lang="es"] [data-lang-section="es"],
html[lang="en"] [data-lang-section="en"] { display: block; }
html[lang="es"] [data-lang-inline="es"],
html[lang="en"] [data-lang-inline="en"] { display: inline; }
[data-lang-inline] { display: none; }

/* When both shown (no-js fallback): show both stacked */
html.no-js [data-lang-section] { display: block; }
html.no-js [data-lang-inline] { display: inline; }
html.no-js .lang-toggle { display: none; }
html.no-js [data-lang-section="en"] {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px dashed var(--border);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
  padding: 1.5rem var(--space) 2rem;
  font-size: 0.85rem;
  color: var(--ink-muted);
}
.footer-inner {
  max-width: var(--wide);
  margin: 0 auto;
}
.footer-inner p { margin: 0 0 0.6rem; max-width: 40rem; }
.footer-inner a { color: var(--ink-muted); }
.disclaimer {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  line-height: 1.5;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* Soft-gate login form */
.gate-form {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  max-width: 22rem;
  margin: 1.5rem 0;
  padding: 1.25rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.gate-form label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink-muted);
}
.gate-form input {
  font: inherit;
  font-weight: 400;
  color: var(--ink);
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
}
.gate-form input:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 1px;
}
.gate-error {
  margin: 0;
  color: #8b2e2e;
  font-size: 0.9rem;
}
.day-card {
  margin: 1.25rem 0;
}
.day-card h2 { margin-top: 0; }
.disclaimer-box {
  margin: 1.25rem 0;
}
.disclaimer-box p { color: var(--ink-muted); font-size: 0.95rem; }
.tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin-bottom: 0.75rem;
}
