:root {
  --bg:            #faf4ed;  /* page background */
  --bg-deep:       #ede7e1;  /* alternating section band, footer */
  --surface:       #fffaf3;  /* cards */
  --text:          #575279;  /* headings, body, filled buttons */
  --subtle:        #5e587d;  /* secondary text, captions, lede paragraphs */
  --muted:         #676284;  /* labels, fine print, footer */
  --border:        #cecacd;  /* dividers, card edges */
  --border-subtle: #e1dbd5;  /* softer dividers */
  --accent:        #56949f;  /* links, buttons, focus */
  --accent-ink:    #ffffff;  /* text on accent-filled buttons */
}

@font-face {
  font-family: 'Geist';
  src: url('../fonts/Geist-SemiBold.woff2') format('woff2');
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: 'JetBrains Mono';
  src: url('../fonts/JetBrainsMono-Regular.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: 'JetBrains Mono';
  src: url('../fonts/JetBrainsMono-SemiBold.woff2') format('woff2');
  font-weight: 600;
  font-display: swap;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--subtle);
  font-family: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
  font-size: 15px;
  line-height: 1.625;
  font-weight: 400;
}

h1, h2, h3 {
  font-family: 'Geist', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--text);
  text-wrap: balance;
}

h3 { font-weight: 500; }

h1 {
  font-size: 34px;
  line-height: 1.25;
}

h2 {
  font-size: 24px;
  line-height: 1.3;
}

h3 {
  font-size: 17px;
}

a {
  color: var(--accent);
  text-decoration-color: var(--border);
  text-underline-offset: 3px;
}

small, .subtle-text, .caption {
  font-size: 13px;
  color: var(--muted);
}

.legal-body p {
  font-size: 15px;
  line-height: 1.625;
}

/* Layout */
.container {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 24px;
}

section {
  padding-top: 72px;
  padding-bottom: 72px;
}

/* Full-bleed alternating section bands (landing pages only) */
.band {
  background: var(--bg-deep);
}

/* Components */
.card {
  background: var(--surface);
  padding: 24px;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, .06),
    0 1px 3px rgba(0, 0, 0, .05),
    0 4px 10px -4px rgba(0, 0, 0, .05);
}

.card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.card-wide {
  grid-column: 1 / -1;
}

.btn {
  display: inline-flex;
  align-items: center;
  background: var(--accent);
  color: var(--accent-ink);
  height: 36px;
  padding: 0 18px;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  border: none;
  transition: filter .15s ease-out, transform .15s ease-out;
}

.btn:hover { filter: brightness(1.08); }
.btn:active { transform: scale(.96); }

.btn[aria-disabled="true"] {
  cursor: not-allowed;
}

.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 48px 0;
}

footer {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: var(--muted);
}

/* Legal pages (privacidad, terminos, 404): plain footer nested in main.container */
footer:not(.band) {
  padding-top: 32px;
  padding-bottom: 64px;
  border-top: 1px solid var(--border);
}

/* Landing pages: full-bleed footer band with its own inner .container */
footer.band .container {
  padding-top: 48px;
  padding-bottom: 40px;
}

footer .label {
  font-family: 'Geist', system-ui, sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
  display: block;
}

footer a {
  color: var(--subtle);
  text-decoration: underline;
}

footer a:hover {
  color: var(--accent);
}

/* Legal pages (privacidad, terminos, 404) keep the older single-column footer markup */
.footer-date {
  margin-top: 12px;
  font-variant-numeric: tabular-nums;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
}

.footer-grid ul {
  list-style: none;
}

.footer-grid li {
  margin-bottom: 8px;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 24px;
}

.footer-bottom time {
  font-variant-numeric: tabular-nums;
}

/* Spacing Helpers */
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mt-40 { margin-top: 40px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.mb-40 { margin-bottom: 40px; }

/* Responsive adjustments */
@media (max-width: 640px) {
  .card-grid { grid-template-columns: 1fr; }
  h1 { font-size: 27px; }
}

@media (max-width: 480px) {
  .container {
    padding: 0 20px;
  }
  section {
    padding-top: 48px;
    padding-bottom: 48px;
  }
}

@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
}

.wordmark {
  font-family: 'Geist', system-ui, sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .1em;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 20px;
  display: block;
}
