/* ============================================================
   Sin Ambages : revista de filosofía y periodismo de opinión
   A plain, sober stylesheet. Paper, ink, one quiet accent.
   ============================================================ */

:root {
  --paper: #fbfaf6;
  --paper-2: #f4f1ea;
  --ink: #1c1a17;
  --ink-soft: #4c4841;
  --muted: #756f66;
  --line: #dcd7cc;
  --line-dark: #c4beb2;
  --accent: #833a2c;
  --serif: "Source Serif 4", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --ui: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

  --container: 1080px;
  --reading: 680px;
  --pad: clamp(20px, 4vw, 36px);

  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 40px;
  --space-5: 64px;
  --space-6: 88px;
}

/* ---------- reset ---------- */

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
ul, ol { padding-left: 1.35em; }

::selection { background: var(--ink); color: var(--paper); }

/* ---------- utilities ---------- */

.container {
  width: min(var(--container), 100% - 2 * var(--pad));
  margin-inline: auto;
}

.kicker {
  font-family: var(--ui);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 10px;
}

.kicker.gold { color: var(--muted); }

.eyebrow {
  font-family: var(--ui);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- masthead ---------- */

.masthead {
  padding: 26px 0 0;
}

.masthead-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--ui);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  padding-bottom: 14px;
  flex-wrap: wrap;
  gap: 6px 16px;
}

.masthead-top .top-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.lang-toggle {
  font-family: var(--ui);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--line-dark);
  padding: 1px 2px 2px;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.lang-toggle:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.masthead-title {
  text-align: center;
  padding: 6px 0 16px;
  border-top: 3px double var(--ink);
  border-bottom: 1px solid var(--line);
}

.logotype {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 30px;
  line-height: 1.1;
  letter-spacing: 0.22em;
  text-indent: 0.22em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  display: inline-block;
}

.tagline {
  font-family: var(--ui);
  font-size: 11.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 8px auto 0;
  max-width: 46em;
}

.masthead-nav { margin-top: 0; }

.nav-list {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(14px, 3vw, 32px);
  margin: 0;
  padding: 12px 0 14px;
  list-style: none;
  flex-wrap: wrap;
}

.nav-list a {
  font-family: var(--ui);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-soft);
  padding: 4px 0;
  border-bottom: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.nav-list a:hover,
.nav-list a.active { color: var(--accent); border-bottom-color: var(--accent); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-family: var(--ui);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  padding: 8px 0;
  cursor: pointer;
}

/* ---------- hero (home) ---------- */

.hero {
  padding: var(--space-5) 0 var(--space-4);
  max-width: var(--reading);
  margin-inline: auto;
  text-align: left;
}

.hero-copy .hero-headline {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(30px, 4.4vw, 46px);
  line-height: 1.14;
  margin: 0 0 20px;
  letter-spacing: -0.01em;
}

.hero-copy .hero-headline a { text-decoration: none; }
.hero-copy .hero-headline a:hover { color: var(--accent); transition: color 0.15s ease; }

.hero-copy .dek {
  font-size: 18px;
  line-height: 1.55;
  color: var(--ink-soft);
  margin: 0 0 26px;
}

/* ---------- section headings ---------- */

.section-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0 0 var(--space-4);
}

.section-head h2 {
  font-family: var(--ui);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
  margin: 0;
  white-space: nowrap;
}

.section-head::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.section-head .more {
  font-family: var(--ui);
  font-size: 11.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--muted);
  white-space: nowrap;
}
.section-head .more:hover { color: var(--accent); }

/* ---------- article cards ---------- */

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(26px, 3vw, 40px) clamp(20px, 2.5vw, 30px);
}

.card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  border-top: 1px solid var(--line-dark);
  padding-top: 16px;
}

.card .card-title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 20px;
  line-height: 1.3;
  margin: 0 0 10px;
  color: var(--ink);
  transition: color 0.15s ease;
}

.card:hover .card-title { color: var(--accent); }

.card .card-excerpt {
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-soft);
  margin: 0 0 12px;
}

.card .card-meta {
  margin-top: auto;
  font-family: var(--ui);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* featured block */

.feature {
  max-width: var(--reading);
  margin-inline: auto;
  padding: var(--space-5) 0;
  border-block: 1px solid var(--line);
  margin-bottom: var(--space-5);
}

.feature .feature-title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1.2;
  margin: 0 0 14px;
  color: var(--ink);
  text-decoration: none;
  display: block;
}
.feature .feature-title:hover { color: var(--accent); transition: color 0.15s ease; }

.feature .feature-excerpt {
  font-size: 17px;
  color: var(--ink-soft);
  margin: 0 0 16px;
}

/* ---------- manifesto ---------- */

.manifesto {
  background: transparent;
  color: var(--ink);
  padding: var(--space-5) 0;
  margin: var(--space-4) 0 0;
  border-block: 1px solid var(--line);
}

.manifesto .inner {
  width: min(var(--reading), 100% - 2 * var(--pad));
  margin-inline: auto;
  text-align: center;
}

.manifesto .m-quote {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(20px, 2.8vw, 26px);
  line-height: 1.5;
  font-weight: 400;
  margin: 14px 0 0;
}

.manifesto .m-quote em { color: var(--accent); font-style: italic; }

/* ---------- newsletter ---------- */

.newsletter {
  border: 1px solid var(--line);
  background: transparent;
  padding: var(--space-4) clamp(20px, 4vw, 48px);
  margin: var(--space-5) 0;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: clamp(20px, 3vw, 40px);
  align-items: center;
}

.newsletter h3 {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 600;
  margin: 0 0 6px;
}

.newsletter p { margin: 0; color: var(--ink-soft); font-size: 15.5px; }

.newsletter-form {
  display: flex;
  gap: 10px;
}

.newsletter-form input {
  flex: 1;
  font-family: var(--ui);
  font-size: 14px;
  padding: 11px 14px;
  border: 1px solid var(--line-dark);
  background: var(--paper);
  color: var(--ink);
  border-radius: 0;
}

.newsletter-form input:focus { outline: none; border-color: var(--ink); }

.form-note {
  grid-column: 1 / -1;
  font-family: var(--ui);
  font-size: 12.5px;
  color: var(--muted);
  display: none;
  margin: 0;
}
.form-note.ok { display: block; color: var(--accent); }

/* ---------- buttons ---------- */

.btn {
  display: inline-block;
  font-family: var(--ui);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--paper);
  background: var(--ink);
  border: 1px solid var(--ink);
  padding: 12px 20px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.btn:hover { background: var(--accent); border-color: var(--accent); }

/* ---------- page header (interior) ---------- */

.page-head {
  padding: var(--space-4) 0 var(--space-3);
  border-bottom: 1px solid var(--line);
  margin-bottom: var(--space-4);
}

.page-head h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.15;
  margin: 6px 0 10px;
}

.page-head .lead {
  font-size: 17.5px;
  color: var(--ink-soft);
  max-width: 38em;
  margin: 0;
}

.breadcrumb {
  font-family: var(--ui);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 16px;
}
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent); }

/* ---------- archive filter ---------- */

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: var(--space-4);
}

.chip {
  font-family: var(--ui);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  background: transparent;
  border: 1px solid var(--line-dark);
  padding: 7px 13px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.chip:hover { border-color: var(--ink); }

.chip.active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.chip .count { opacity: 0.6; margin-left: 4px; font-weight: 400; }

.archive-list { margin-bottom: var(--space-5); }

.archive-row {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: clamp(14px, 3vw, 30px);
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}

.archive-row .a-date {
  font-family: var(--ui);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: 3px;
}

.archive-row .a-title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(17px, 1.9vw, 20px);
  line-height: 1.3;
  margin: 0 0 5px;
}
.archive-row .a-title a { text-decoration: none; }
.archive-row .a-title a:hover { color: var(--accent); transition: color 0.15s ease; }

.archive-row .a-meta {
  font-family: var(--ui);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.archive-empty { display: none; font-style: italic; color: var(--muted); padding: 20px 0; }
.archive-empty.show { display: block; }

/* ---------- article page ---------- */

.article-wrap { padding: var(--space-4) 0 var(--space-6); }

.article-head { width: min(var(--reading), 100%); margin-inline: auto; text-align: center; }

.article-head h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(27px, 4.2vw, 40px);
  line-height: 1.18;
  margin: 8px 0 18px;
  letter-spacing: -0.01em;
}

.article-head .dek {
  font-size: 17.5px;
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 34em;
  margin: 0 auto 24px;
}

.byline {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  font-family: var(--ui);
  font-size: 11.5px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
  flex-wrap: wrap;
}

.byline .by-author { color: var(--ink); font-weight: 600; font-style: normal; }

.article-rule {
  width: min(var(--reading), 100%);
  margin: 24px auto 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.prose {
  width: min(var(--reading), 100%);
  margin-inline: auto;
  padding-top: var(--space-4);
  font-size: 18.5px;
  line-height: 1.78;
}

.prose > p:first-of-type::first-letter {
  font-family: var(--serif);
  font-weight: 600;
  float: left;
  font-size: 52px;
  line-height: 0.82;
  padding: 6px 10px 0 0;
  color: var(--ink);
}

.prose p { margin: 0 0 1.35em; }

.prose h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 23px;
  line-height: 1.3;
  margin: 2em 0 0.75em;
}

.prose h3 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 19px;
  margin: 1.8em 0 0.6em;
}

.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.prose a:hover { color: var(--ink); }

.prose blockquote {
  margin: 2em 0;
  padding: 4px 0 4px 24px;
  border-left: 2px solid var(--line-dark);
  font-family: var(--serif);
  font-style: italic;
  font-size: 20px;
  line-height: 1.55;
  color: var(--ink-soft);
}

.prose blockquote .attr {
  display: block;
  font-family: var(--ui);
  font-style: normal;
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 12px;
}

.prose .pull {
  font-family: var(--serif);
  font-style: italic;
  font-size: 22px;
  line-height: 1.5;
  margin: 1.8em auto;
  padding: 0.7em 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  text-align: center;
}

.prose figure { margin: 2.2em 0; }
.prose figcaption {
  font-family: var(--ui);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-top: 10px;
}

.prose .endmark { color: var(--muted); }

.article-tags {
  width: min(var(--reading), 100%);
  margin: var(--space-4) auto 0;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tag {
  font-family: var(--ui);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  border: 1px solid var(--line-dark);
  padding: 5px 10px;
  text-decoration: none;
}
.tag:hover { border-color: var(--accent); color: var(--accent); }

.related { margin-top: var(--space-5); }

/* ---------- about / info pages ---------- */

.masthead-list { list-style: none; margin: 0 0 1.4em; padding: 0; }

.masthead-list li {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 16px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}

.masthead-list .role {
  font-family: var(--ui);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.masthead-list .person { font-weight: 600; }
.masthead-list .bio { color: var(--ink-soft); font-size: 15px; margin-top: 2px; }

.faq dt {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 19px;
  margin: 1.6em 0 0.4em;
}
.faq dd { margin: 0 0 0.4em; }

/* ---------- footer ---------- */

.site-footer {
  background: transparent;
  color: var(--ink-soft);
  margin-top: var(--space-6);
  border-top: 3px double var(--ink);
  font-size: 15px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: clamp(24px, 4vw, 48px);
  padding: var(--space-5) 0 var(--space-4);
}

.site-footer h4 {
  font-family: var(--ui);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 14px;
}

.footer-brand .logotype {
  font-size: 22px;
  letter-spacing: 0.2em;
  text-indent: 0.2em;
  color: var(--ink);
}

.footer-brand p { margin: 12px 0 0; color: var(--muted); line-height: 1.6; }

.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer ul li { margin-bottom: 8px; }
.site-footer a { color: var(--ink-soft); text-decoration: none; }
.site-footer a:hover { color: var(--accent); text-decoration: underline; }

.footer-bottom {
  border-top: 1px solid var(--line);
  padding: 18px 0;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-family: var(--ui);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.footer-bottom a { color: var(--muted); }
.footer-bottom a:hover { color: var(--accent); text-decoration: none; }

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  .hero { padding-top: var(--space-4); }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .newsletter { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .masthead-list li { grid-template-columns: 1fr; gap: 4px; }
}

@media (max-width: 620px) {
  body { font-size: 17px; }

  .masthead { position: relative; }

  .nav-toggle {
    display: inline-block;
    position: absolute;
    right: var(--pad);
    top: 20px;
  }

  .nav-list {
    display: none;
    flex-direction: column;
    gap: 2px;
    padding: 8px 0 14px;
    width: 100%;
  }
  .nav-list.open { display: flex; }
  .nav-list li { width: 100%; text-align: center; }

  .grid { grid-template-columns: 1fr; }
  .archive-row { grid-template-columns: 1fr; gap: 6px; }
  .newsletter-form { flex-direction: column; }
  .prose { font-size: 17.5px; }
  .footer-grid { grid-template-columns: 1fr; }
  .byline { gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* ---------- dark mode (low maintenance) ----------
   The whole site runs on CSS variables, so dark mode is a
   variable swap, nothing more. The system theme is followed
   automatically (pure CSS, no JS needed). The tiny toggle in
   the masthead adds .dark / .light to <html> to override.
   To change the palette, edit these two blocks and nothing else. */

@media (prefers-color-scheme: dark) {
  :root:not(.light):not(.dark) {
    color-scheme: dark;
    --paper: #171411;
    --paper-2: #201d19;
    --ink: #e5ded3;
    --ink-soft: #b3ac9f;
    --muted: #8b8478;
    --line: #322e28;
    --line-dark: #4b453c;
    --accent: #cf8f76;
  }
}

:root.dark {
  color-scheme: dark;
  --paper: #171411;
  --paper-2: #201d19;
  --ink: #e5ded3;
  --ink-soft: #b3ac9f;
  --muted: #8b8478;
  --line: #322e28;
  --line-dark: #4b453c;
  --accent: #cf8f76;
}

:root.light {
  color-scheme: light;
  --paper: #fbfaf6;
  --paper-2: #f4f1ea;
  --ink: #1c1a17;
  --ink-soft: #4c4841;
  --muted: #756f66;
  --line: #dcd7cc;
  --line-dark: #c4beb2;
  --accent: #833a2c;
}

/* theme toggle button (injected by main.js next to the language switch) */

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  padding: 2px;
  cursor: pointer;
  color: var(--ink-soft);
  width: 24px;
  height: 24px;
  transition: color 0.15s ease;
}

.theme-toggle:hover { color: var(--accent); }
.theme-toggle svg { display: block; }
.theme-toggle .icon-sun { display: none; }

@media (prefers-color-scheme: dark) {
  :root:not(.light):not(.dark) .theme-toggle .icon-sun { display: block; }
  :root:not(.light):not(.dark) .theme-toggle .icon-moon { display: none; }
}

:root.dark .theme-toggle .icon-sun { display: block; }
:root.dark .theme-toggle .icon-moon { display: none; }