/* =========================================================
   Contexto — base.css
   Loaded by every page from layout.html: reset, fonts, design
   tokens, base elements, and the furniture that surrounds every
   template (header, page wrap, footer, utilities).
   Page-specific styles live in their own file and are pulled in
   through layout.html's {% block page_css %} — see README-css.md.
   ========================================================= */

/* ---------- CSS RESET (modern, minimal) ---------- */
*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

/* ---------- FONTS ---------- */
@font-face {
  font-family: "Dosis";
  src: url("/static/fonts/Dosis-VariableFont_wght.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

/* ---------- ROOT VARIABLES ---------- */
:root {
  /* Brand colors */
  --color-bg: #fcfcfc;
  --color-text: #000000;
  --color-muted: #2a2c41;
  --color-border: rgba(0, 0, 0, 0.08);

  --color-primary: #d32f2f;   /* Contexto red */
  --color-secondary: #8e0707;
  --color-accent: #D3792F;    /* Accent orange */

  /* Typography */
  --font-sans: "Dosis", -apple-system, BlinkMacSystemFont,
               "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --font-size-base: 16px;
  --line-height-base: 1.6;

  /* Layout */
  --max-width: 1100px;
}

/* ---------- BASE ELEMENTS ---------- */
html {
  font-size: var(--font-size-base);
}

body {
  font-family: var(--font-sans);
  line-height: var(--line-height-base);
  color: var(--color-text);
  background-color: var(--color-bg);

  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---------- TYPOGRAPHY ---------- */
h1, h2, h3, h4, h5, h6 {
  margin: 0 0 0.6em;
  line-height: 1.25;
  font-weight: 600;
}

p {
  margin: 0 0 1em;
  color: var(--color-text);
}

a {
  color: var(--color-primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ---------- IMAGES ---------- */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ---------- LAYOUT HELPERS ---------- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.center {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------- BUTTONS (basic) ---------- */
button {
  font-family: inherit;
  font-size: 1rem;
  border: none;
  background: none;
  cursor: pointer;
}

.button-primary {
  font-family: var(--font-sans);
  background-color: var(--color-primary);
  color: #fff;
  padding: 0.6rem 1.1rem;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
}

.button-primary:hover {
  opacity: 0.9;
}
input.button-primary {
  -webkit-appearance: none;
  appearance: none;
  border: none;
}

/* ---------- SITE HEADER ----------
   Named .about-* for historical reasons — it is on every page via
   layout.html, not just the about page. */
.about-header {
  background: var(--color-primary);
  color: var(--color-bg);
  padding: 1.25rem 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

.about-logo {
  width: 120px;
  height: auto;
}

/* ---------- PAGE WRAP ----------
   The shared prose column: about.html, privacy.html and the lower
   half of landing.html all sit in it. (Also .about-* by history.)
   The --landing modifier lives in landing.css. */
.about-wrap {
  max-width: 820px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

/* Centred page title + standfirst. Shared by about.html and privacy.html;
   the landing page has its own hero and does not use this. */
.about-hero {
  text-align: center;
  margin-bottom: 3rem;
}

.about-hero h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.about-subtitle {
  font-size: 1.1rem;
  color: var(--color-muted);
}

/* Section spacer shared by the about and privacy pages. */
.about-section {
  margin-bottom: 3rem;
}

.about-section h2 {
  margin-bottom: 1rem;
}

.about-section h3 {
  margin-bottom: 0.5rem;
}

/* ---------- FOOTER ---------- */
.site-footer {
  margin-top: 4rem;
  padding: 2rem 1rem;
  border-top: 1px solid var(--color-border);
  text-align: center;
  background: var(--color-muted);
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.footer-links a {
  font-size: 0.9rem;
  color: var(--color-bg);
}

.footer-links a:hover {
  color: var(--color-text);
}

.footer-attribution {
  margin-top: 1rem;
  font-size: 0.75rem;
  color: var(--color-bg);
  max-width: 40rem;
  margin-left: auto;
  margin-right: auto;
}

.footer-attribution a {
  color: inherit;
  text-decoration: underline;
}

/* ---------- UTILITIES ---------- */
.muted {
  color: var(--color-muted);
}

.hidden {
  display: none !important;
}
