/* Clave — forro.digital | longform-journal, warm âmbar + índigo */
:root {
  --amber: #c9892e;
  --amber-light: #e8b85c;
  --amber-soft: #faf3e6;
  --indigo: #2e3a6e;
  --indigo-deep: #1e2848;
  --indigo-muted: #4a5688;
  --cream: #f5f0e6;
  --text: #2a2418;
  --text-muted: #6b6358;
  --border: #ddd4c4;
  --line-accent: #d4a04a;
  --serif: "Libre Baskerville", "Georgia", "Times New Roman", serif;
  --sans: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
  --read: 38rem;
  --wide: 72rem;
}

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

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

body {
  font-family: var(--sans);
  background: var(--cream);
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img, svg { max-width: 100%; height: auto; display: block; }

a { color: var(--indigo); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--amber); }

/* Stacked header */
.stacked-header {
  background: var(--indigo-deep);
  color: var(--cream);
}

.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 1.25rem;
  font-size: 0.8rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.header-top a { color: var(--amber-light); text-decoration: none; }

.header-main {
  text-align: center;
  padding: 1.5rem 1.25rem 1rem;
  border-bottom: 3px solid var(--amber);
}

.site-logo {
  font-family: var(--serif);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  color: var(--cream);
  text-decoration: none;
  letter-spacing: 0.04em;
}

.site-logo span { color: var(--amber-light); font-style: italic; font-weight: 400; }

.site-motto {
  font-size: 0.9rem;
  color: rgba(245,240,230,0.75);
  margin-top: 0.35rem;
  font-style: italic;
}

.header-nav-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0.75rem 1.25rem;
  background: var(--indigo);
  position: relative;
}

.menu-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--amber-light);
  color: var(--cream);
  padding: 0.4rem 0.9rem;
  font-family: var(--sans);
  font-size: 0.85rem;
  cursor: pointer;
  border-radius: 2px;
}

.main-nav ul {
  list-style: none;
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  justify-content: center;
}

.main-nav a {
  color: var(--cream);
  text-decoration: none;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}

.main-nav a:hover,
.main-nav a[aria-current="page"] { color: var(--amber-light); }

.container { width: min(100% - 2rem, var(--wide)); margin: 0 auto; }

main { flex: 1; padding: 2rem 0 3rem; }

/* Featured story homepage */
.featured-story {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 2rem;
  margin-bottom: 3rem;
  align-items: start;
}

.featured-story img {
  width: 100%;
  border-bottom: 4px solid var(--amber);
}

.featured-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--amber);
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.featured-story h1 {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  line-height: 1.25;
  margin-bottom: 1rem;
}

.featured-story h1 a { color: var(--text); text-decoration: none; }
.featured-story h1 a:hover { color: var(--indigo); }

.featured-lead {
  font-family: var(--serif);
  font-size: 1.15rem;
  line-height: 1.7;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.featured-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  padding-top: 0.75rem;
}

/* Editorial-lines cards */
.section-heading {
  font-family: var(--serif);
  font-size: 1.4rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--indigo);
  margin-bottom: 1.5rem;
}

.editorial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.editorial-card {
  background: #fff;
  border-left: 4px solid var(--line-accent);
  padding: 1.25rem 1.25rem 1.25rem 1rem;
  box-shadow: 0 1px 0 var(--border);
  transition: border-color 0.2s;
}

.editorial-card:hover { border-left-color: var(--indigo); }

.editorial-card img {
  margin-bottom: 1rem;
  border-bottom: 2px solid var(--border);
}

.card-category {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--indigo-muted);
  font-weight: 700;
}

.editorial-card h3 {
  font-family: var(--serif);
  font-size: 1.15rem;
  line-height: 1.35;
  margin: 0.5rem 0;
}

.editorial-card h3 a { color: var(--text); text-decoration: none; }
.editorial-card h3 a:hover { color: var(--indigo); }

.card-excerpt {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.card-meta { font-size: 0.8rem; color: var(--text-muted); }

/* Homepage prose block */
.home-prose {
  margin-top: 3rem;
  padding: 2rem;
  background: var(--amber-soft);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.home-prose h2 {
  font-family: var(--serif);
  font-size: 1.3rem;
  margin-bottom: 1rem;
}

.home-prose p { margin-bottom: 1rem; font-size: 0.95rem; }

/* Narrow reading articles */
.article-narrow {
  width: min(100% - 2rem, var(--read));
  margin: 0 auto;
}

.article-header {
  text-align: center;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.article-category {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--amber);
  font-weight: 700;
}

.article-header h1 {
  font-family: var(--serif);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  line-height: 1.2;
  margin: 0.75rem 0;
}

.article-deck {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-style: italic;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 34rem;
  margin: 0 auto 1.5rem;
}

.article-byline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.author-avatar { border-radius: 50%; border: 2px solid var(--amber); }

.reading-time::before { content: "· "; }

.article-hero-img {
  margin: 0 auto 2rem;
  border-bottom: 3px solid var(--amber);
}

.article-body {
  font-family: var(--serif);
  font-size: 1.05rem;
  line-height: 1.8;
}

.article-body p { margin-bottom: 1.25rem; }

.article-body h2 {
  font-size: 1.35rem;
  margin: 2rem 0 1rem;
  color: var(--indigo);
}

.article-body blockquote {
  margin: 2rem 0;
  padding: 1.25rem 1.5rem;
  border-left: 4px solid var(--amber);
  background: var(--amber-soft);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--indigo-deep);
}

.article-body blockquote cite {
  display: block;
  margin-top: 0.75rem;
  font-size: 0.85rem;
  font-style: normal;
  color: var(--text-muted);
}

/* Institutional pages */
.page-header {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--indigo);
}

.page-header h1 {
  font-family: var(--serif);
  font-size: 2rem;
}

.prose {
  max-width: var(--read);
  margin: 0 auto;
  font-size: 1rem;
  line-height: 1.75;
}

.prose h2 {
  font-family: var(--serif);
  font-size: 1.25rem;
  margin: 2rem 0 0.75rem;
  color: var(--indigo);
}

.prose p, .prose ul, .prose ol { margin-bottom: 1rem; }
.prose ul, .prose ol { padding-left: 1.5rem; }

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  max-width: var(--wide);
  margin: 0 auto;
}

.contact-form label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.contact-form input,
.contact-form textarea,
.contact-form select {
  width: 100%;
  padding: 0.6rem;
  border: 1px solid var(--border);
  font-family: var(--sans);
  font-size: 0.95rem;
  margin-bottom: 1rem;
  background: #fff;
}

.contact-form button {
  background: var(--indigo);
  color: var(--cream);
  border: none;
  padding: 0.7rem 1.5rem;
  font-family: var(--sans);
  font-size: 0.9rem;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.contact-form button:hover { background: var(--indigo-deep); }

.form-status { margin-top: 1rem; font-size: 0.9rem; color: var(--indigo); }

/* Footer */
.site-footer {
  background: var(--indigo-deep);
  color: rgba(245,240,230,0.8);
  padding: 2.5rem 0 1.5rem;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-brand {
  font-family: var(--serif);
  font-size: 1.3rem;
  color: var(--cream);
  margin-bottom: 0.5rem;
}

.footer-grid a { color: var(--amber-light); text-decoration: none; font-size: 0.9rem; }
.footer-grid a:hover { text-decoration: underline; }

.footer-links ul { list-style: none; }
.footer-links li { margin-bottom: 0.4rem; }

.footer-links h3 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--amber-light);
  margin-bottom: 0.75rem;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1rem;
  font-size: 0.8rem;
  text-align: center;
}

/* Cookie notice */
.cookie-notice {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--indigo-deep);
  color: var(--cream);
  padding: 1rem 1.25rem;
  display: none;
  z-index: 100;
  border-top: 3px solid var(--amber);
}

.cookie-notice.is-visible { display: block; }

.cookie-inner {
  max-width: var(--wide);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.cookie-inner p { font-size: 0.85rem; max-width: 42rem; }
.cookie-inner a { color: var(--amber-light); }

.cookie-actions { display: flex; gap: 0.5rem; }

.cookie-actions button {
  padding: 0.5rem 1rem;
  font-family: var(--sans);
  font-size: 0.85rem;
  cursor: pointer;
  border: none;
}

#cookie-accept { background: var(--amber); color: var(--indigo-deep); font-weight: 600; }
#cookie-decline { background: transparent; color: var(--cream); border: 1px solid rgba(255,255,255,0.3); }

@media (max-width: 768px) {
  .menu-toggle { display: block; position: absolute; right: 1rem; }

  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--indigo-deep);
    padding: 1rem;
    z-index: 50;
  }

  .main-nav.is-open { display: block; }
  .main-nav ul { flex-direction: column; gap: 0.75rem; text-align: center; }

  .featured-story { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
}
