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

/* =========================
   BASE
========================= */
html {
  scroll-behavior: smooth;
}

:root {
  --scroll: 0%;
  color-scheme: light;
  --color-ink: #171717;
  --color-ink-soft: #3b3833;
  --color-paper: #f5f1e8;
  --color-surface: #fffdf8;
  --color-surface-raised: #ffffff;
  --color-muted: #6a6257;
  --color-brass: #a7894f;
  --color-brass-dark: #796334;
  --color-brass-light: #e6d7ae;
  --color-border: rgba(23, 23, 23, 0.12);
  --color-focus: #1769aa;
  --shadow-card: 0 18px 45px rgba(23, 23, 23, 0.12);
  --radius-card: 14px;
  --content-width: 1000px;
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-5: 3rem;
  --space-6: 4.5rem;
  --font-display: "Playfair Display", Georgia, serif;
  --font-body: "Inter", "Segoe UI", Arial, sans-serif;
  --font-editorial: "Libre Baskerville", Georgia, serif;
  --transition-theme: 220ms ease;
}

[data-theme="dark"] {
  color-scheme: dark;
  --color-ink: #f4efe5;
  --color-ink-soft: #d5cec2;
  --color-paper: #151515;
  --color-surface: #20201e;
  --color-surface-raised: #282724;
  --color-muted: #aaa194;
  --color-brass: #d0ad62;
  --color-brass-dark: #a98645;
  --color-brass-light: #4b3c20;
  --color-border: rgba(244, 239, 229, 0.14);
  --color-focus: #8dc7ff;
  --shadow-card: 0 18px 45px rgba(0, 0, 0, 0.35);
}

body {
  font-family: var(--font-body);
  color: var(--color-ink-soft);
  line-height: 1.75;
  transition: color var(--transition-theme), background-color var(--transition-theme);
  background:
    radial-gradient(circle at 20% 10%, rgba(255,255,255,0.55), transparent 40%),
    radial-gradient(circle at 80% 0%, rgba(255,255,255,0.35), transparent 45%),
    var(--color-paper);
}

body,
.page-shell,
.card,
.post-card-dynamic,
.timeline-content,
.posts-feedback,
.topnav,
footer,
input,
select,
textarea {
  transition:
    color var(--transition-theme),
    background-color var(--transition-theme),
    border-color var(--transition-theme),
    box-shadow var(--transition-theme);
}

h1,
h2,
h3,
h4,
h5,
h6,
.page-title,
.card__title,
.post-card-dynamic__title,
.timeline-content h4 {
  font-family: var(--font-display);
  color: var(--color-ink);
}

p,
li,
label,
input,
select,
textarea,
button {
  font-family: var(--font-body);
}

/* barra de progresso */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: var(--scroll);
  background: var(--color-brass);
  z-index: 2000;
  pointer-events: none;
}

::selection {
  background: rgba(143, 122, 73, 0.28);
  color: #1a1713;
}

.container {
  width: 100%;
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* =========================
   ACESSIBILIDADE / FOCO
========================= */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 3px;
  border-radius: 4px;
}

/* =========================
   SCROLLBAR
========================= */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #eee7da;
}

::-webkit-scrollbar-thumb {
  background: #a8925f;
  border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
  background: #8f7a49;
}

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: #a8925f #eee7da;
}

/* =========================
   HEADER
========================= */
header {
  position: relative;
  background:
    radial-gradient(circle at 30% 20%, rgba(255,255,255,0.06), transparent 35%),
    linear-gradient(180deg, #1b1b1b 0%, #0a0a0a 100%);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  padding: 60px 0 48px;
  text-align: center;
  color: #fff;
}

header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(212, 191, 132, 0.92),
    transparent
  );
}

header .container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

header h1 {
  font-family: "Playfair Display", serif;
  font-size: 56px;
  line-height: 1.1;
  letter-spacing: 1.2px;
  margin: 0;
  color: #fff;
}

.subtitle {
  max-width: 980px;
  margin: 16px auto 0;
  color: rgba(255,255,255,0.88);
  font-size: 15px;
  line-height: 1.6;
  font-style: italic;
  letter-spacing: 0.2px;
}

header .subtitle {
  color: rgba(255, 255, 255, 0.88);
}

/* =========================
   NAVBAR
========================= */
.topnav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(223, 210, 173, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255,255,255,0.18);
  border-bottom: 1px solid rgba(111, 92, 47, 0.55);
  box-shadow: 0 8px 22px rgba(0,0,0,0.08);
}

.topnav .container {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.navlink {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 12px 12px;
  text-align: center;
  text-decoration: none;
  color: #211c16;
  font-size: 11px;
  line-height: 1.25;
  letter-spacing: 0.15px;
  font-weight: 600;
  white-space: normal;
  word-break: normal;
  overflow-wrap: break-word;
  background: transparent;
  border-left: 1px solid rgba(80, 60, 20, 0.14);
  position: relative;
  transition:
    background-color 0.25s ease,
    color 0.25s ease,
    box-shadow 0.25s ease,
    transform 0.25s ease;
}

.navlink:last-child {
  border-right: 1px solid rgba(80, 60, 20, 0.14);
}

.navlink:hover {
  background: rgba(143, 122, 73, 0.16);
  color: #111;
}

.navlink::after {
  content: "";
  position: absolute;
  left: 18%;
  bottom: 10px;
  width: 64%;
  height: 2px;
  background: #8f7a49;
  opacity: 0;
  transform: scaleX(0.85);
  transition:
    opacity 0.25s ease,
    transform 0.25s ease;
}

.navlink:hover::after {
  opacity: 1;
  transform: scaleX(1);
}

.navlink.active {
  background: rgba(143, 122, 73, 0.92);
  color: #fff;
  font-weight: 600;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.05);
}

.navlink.active::after {
  opacity: 1;
  transform: scaleX(1);
  background: #f1e1b0;
}

/* =========================
   WRAPPER GERAL
========================= */
.content {
  width: 100%;
  margin-top: 0;
  padding-top: 40px;
}

/* =========================
   PAGE SHELL
========================= */
.page-shell {
  max-width: 880px;
  margin: 40px auto 0;
  background: #f6f3ec;
  padding: 54px;
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(0,0,0,0.10);
  border: 1px solid rgba(0,0,0,0.05);
  animation: fadeUp 0.45s ease;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.page-title {
  margin: 0 0 12px;
  font-family: "Playfair Display", serif;
  font-size: 2.2rem;
  line-height: 1.2;
  letter-spacing: 0.5px;
  color: #1f1a14;
}

.page-body {
  color: #2b2722;
  line-height: 1.95;
  font-size: 1.05rem;
  letter-spacing: 0.2px;
  text-align: justify;
  max-width: 720px;
  margin: 0 auto;
}

.page-body p {
  margin: 0 0 1.4em;
}

.page-body h3 {
  margin-top: 2em;
  margin-bottom: 0.7em;
  font-family: "Playfair Display", serif;
  color: #1f1a14;
}

.lead {
  font-size: 1.18rem;
  line-height: 1.8;
  color: #3b342d;
  margin-bottom: 1.6em;
}

/* =========================
   SEPARADOR
========================= */
.sep {
  border: none;
  border-top: 1px solid rgba(0,0,0,0.18);
  margin: 10px 0 22px;
}

/* =========================
   IMAGENS
========================= */
.post-figure {
  margin: 30px 0;
  text-align: center;
}

.post-img {
  display: block;
  margin: 34px auto;
  width: 76%;
  max-width: 780px;
  height: auto;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,0.12);
  box-shadow: 0 16px 35px rgba(0,0,0,0.16);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.post-img:hover {
  transform: scale(1.015);
  box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.post-caption {
  margin-top: 10px;
  font-size: 13px;
  letter-spacing: 0.2px;
  opacity: 0.8;
  text-align: center;
  font-style: italic;
}

/* =========================
   HOME CARDS
========================= */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 18px;
  margin-bottom: 50px; 
}


.card {
  display: block;
  position: relative;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  background: #fbf8f0;
  border: 1px solid rgba(0,0,0,0.10);
  border-radius: 12px;
  padding: 16px 16px 18px;
  box-shadow: 0 10px 22px rgba(0,0,0,0.10);
  transition: all 0.25s ease;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(255,255,255,0.18),
    rgba(255,255,255,0.00) 45%
  );
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px rgba(0,0,0,0.14);
}

.card:hover::before {
  opacity: 1;
}

.card__tag {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(143,122,73,0.15);
  border: 1px solid rgba(143,122,73,0.25);
  margin-bottom: 10px;
}

.card__title {
  font-family: "Playfair Display", serif;
  font-size: 18px;
  letter-spacing: 0.3px;
  margin-bottom: 8px;
}

.card__text {
  font-size: 14px;
  line-height: 1.6;
  opacity: 0.92;
}

/* =========================
   ARTICLE HELPERS
========================= */
.article {
  max-width: 860px;
  margin: 0 auto;
  padding-top: 10px;
}

.article p {
  margin: 0 0 1.05em;
  line-height: 1.85;
}

.article h1 {
  line-height: 1.15;
  margin: 0 0 0.6em;
}

.article h2 {
  margin: 1.6em 0 0.55em;
  line-height: 1.2;
}

.article h3 {
  margin: 1.2em 0 0.5em;
  line-height: 1.25;
}

.article img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 14px;
  margin: 0.9em 0 1.2em;
}

.article hr {
  margin: 1.6em 0;
  opacity: 0.22;
}

.article .lead {
  font-size: 1.08em;
  line-height: 1.9;
  margin: 10px 0 18px;
}

/* =========================
   FACTS / TOC / CALLOUT
========================= */
.fact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0 26px;
}

.fact-card {
  border: 1px solid rgba(0,0,0,0.10);
  border-radius: 14px;
  padding: 14px;
  background: #fff;
}

.fact-k {
  display: block;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.65;
  margin-bottom: 6px;
}

.fact-v {
  display: block;
  font-size: 16px;
  line-height: 1.3;
}

.toc {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(0,0,0,0.10);
  border-radius: 14px;
  background: #fff;
  margin: 10px 0 30px;
}

.toc a {
  text-decoration: none;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,0.10);
  color: inherit;
  font-size: 14px;
  opacity: 0.85;
}

.toc a:hover {
  opacity: 1;
}

.callout {
  border-left: 4px solid rgba(0,0,0,0.35);
  background: rgba(0,0,0,0.03);
  padding: 14px 16px;
  border-radius: 12px;
  margin: 22px 0;
}

/* =========================
   FOOTER
========================= */
footer {
  text-align: center;
  padding: 25px 0;
  background: #000;
  color: #fff;
  font-size: 14px;
}

/* =========================
   RESPONSIVO
========================= */
@media (min-width: 900px) {
  .fact-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .article {
    font-size: 19px;
    padding: 36px 18px;
  }
}

@media (max-width: 900px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  .topnav .container {
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    scrollbar-width: thin;
  }

  .navlink {
    flex: 0 0 auto;
    min-height: 48px;
    padding: 0 16px;
    white-space: nowrap;
    font-size: 12px;
    border-left: none;
    border-right: 1px solid rgba(80, 60, 20, 0.14);
  }

  .navlink:first-child {
    border-left: 1px solid rgba(80, 60, 20, 0.14);
  }
}

@media (max-width: 700px) {
  header {
    padding: 42px 0 34px;
  }

  header h1 {
    font-size: 36px;
  }

  .subtitle {
    font-size: 14px;
    margin-top: 12px;
  }

  .content {
    padding-top: 24px;
  }

  .page-shell {
    margin-top: 24px;
    padding: 28px 22px;
  }

  .page-title {
    font-size: 1.8rem;
  }

  .page-body {
    font-size: 1rem;
    line-height: 1.8;
  }

  .post-img {
    width: 100%;
    border-radius: 8px;
  }
}

@media (max-width: 480px) {
  .article {
    font-size: 16.5px;
    line-height: 1.7;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }
}

/* =========================
   BACK TO TOP
========================= */
.back-to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 46px;
  height: 46px;
  border: none;
  border-radius: 999px;
  background: rgba(143, 122, 73, 0.92);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(0,0,0,0.18);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition:
    opacity 0.25s ease,
    visibility 0.25s ease,
    transform 0.25s ease,
    background-color 0.25s ease;
  z-index: 1200;
}

.back-to-top:hover {
  background: #7e6a3f;
  transform: translateY(0) scale(1.05);
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* =========================
   TIMELINE
========================= */
.timeline-section {
  margin-top: 40px;
}

.timeline-section h3 {
  margin-bottom: 20px;
}

.timeline {
  position: relative;
  margin-top: 20px;
  padding-left: 28px;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 0;
  left: 8px;
  width: 2px;
  height: 100%;
  background: rgba(143, 122, 73, 0.35);
}

.timeline-item {
  position: relative;
  margin-bottom: 28px;
}

.timeline-dot {
  position: absolute;
  left: -28px;
  top: 6px;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: #8f7a49;
  border: 2px solid #f6f3ec;
  box-shadow: 0 0 0 3px rgba(143, 122, 73, 0.14);
}

.timeline-content {
  background: #fbf8f0;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 12px;
  padding: 16px 18px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.06);
}

.timeline-date {
  display: inline-block;
  margin-bottom: 8px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #7a6a49;
}

.timeline-content h4 {
  margin: 0 0 8px;
  font-family: "Playfair Display", serif;
  font-size: 1.1rem;
  color: #1f1a14;
}

.timeline-content p {
  margin: 0;
  color: #3a342d;
  line-height: 1.75;
}



/* =========================
   video
========================= */
.video-section {
  margin: 20px 0;
}

.video-section video {
  width: 100%;
  border-radius: 10px;
}

.youtube-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  background: #0000007b;
  color: white;
  padding: 10px 14px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: 0.2s;
}

.youtube-btn:hover {
  background: #cc0000;
  transform: translateY(-1px);
}

.youtube-btn i {
  font-size: 18px;
}

/* =========================
   COMPONENTES PARTILHADOS
========================= */
.dynamic-posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-3);
  margin-top: var(--space-3);
}

.post-card-dynamic {
  display: block;
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease, background-color 0.22s ease;
}

.post-card-dynamic:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card);
  background: #fbf8f0;
}

.post-card-dynamic__image-wrap {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #e8e1d4;
}

.post-card-dynamic__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-card-dynamic__placeholder {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  padding: var(--space-3);
  color: #6d6558;
  font-style: italic;
  text-align: center;
  background: linear-gradient(135deg, #e9e1d3, #f5efe5);
}

.post-card-dynamic__body {
  padding: var(--space-3);
}

.post-card-dynamic__meta {
  display: flex;
  justify-content: space-between;
  gap: var(--space-2);
  margin-bottom: 12px;
  color: #6a6257;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.post-card-dynamic__tag {
  display: inline-block;
  padding: 5px 9px;
  border: 1px solid #cfc5b5;
  border-radius: 999px;
  background: #f4eee3;
}

.post-card-dynamic__title {
  margin: 0 0 10px;
  color: var(--color-ink);
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.25rem;
  line-height: 1.25;
}

.post-card-dynamic__text {
  margin: 0 0 16px;
  color: #4e4a43;
  font-size: 0.98rem;
  line-height: 1.7;
}

.post-card-dynamic__link {
  color: #2a2520;
  font-size: 0.95rem;
  font-weight: 700;
}

.posts-feedback {
  padding: var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  color: #4e4a43;
  background: var(--color-surface);
}

.form-contacto {
  display: grid;
  gap: var(--space-3);
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-field label {
  color: #2a2520;
  font-size: 0.95rem;
  font-weight: 600;
}

.form-field input,
.form-field select,
.form-field textarea {
  padding: 10px 12px;
  border: 1px solid #cfc5b5;
  border-radius: 8px;
  color: #2a2520;
  background: #fff;
  font: inherit;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--color-brass);
  box-shadow: 0 0 0 3px rgba(167, 137, 79, 0.18);
}

.form-field textarea {
  min-height: 120px;
  resize: vertical;
}

.btn-enviar {
  justify-self: start;
  padding: 12px 28px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: var(--color-brass);
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.18s ease, transform 0.18s ease;
}

.btn-enviar:hover:not(:disabled) {
  background: var(--color-brass-dark);
  transform: translateY(-1px);
}

.btn-enviar:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.form-estado {
  min-height: 1.2em;
  margin: 0;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.95rem;
}

.form-estado:empty {
  min-height: 0;
  padding: 0;
}

.form-estado.sucesso {
  color: #2d5a2d;
  background: #e8f5e8;
  border: 1px solid #b5d8b5;
}

.form-estado.erro {
  color: #7a2a2a;
  background: #fbeaea;
  border: 1px solid #e0b4b4;
}

.form-nota {
  margin: 0;
  color: #6a6257;
  font-size: 0.9rem;
  font-style: italic;
}

.botcheck {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

[data-reveal] {
  opacity: 0;
  transform: translateY(1rem);
  transition: opacity 500ms ease, transform 500ms ease;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

@media (hover: hover) {
  .card:hover,
  .post-card-dynamic:hover {
    transform: translateY(-4px);
  }
}

@media (max-width: 700px) {
  .page-shell {
    padding: var(--space-4) var(--space-3);
  }

  .page-title {
    font-size: clamp(1.8rem, 8vw, 2.5rem);
  }

  .form-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .card-grid,
  .dynamic-posts-grid {
    grid-template-columns: 1fr;
  }
}

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

  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* =========================
   TEMA E EDITORIAL
========================= */
[data-theme="dark"] body {
  background:
    radial-gradient(circle at 20% 10%, rgba(208, 173, 98, 0.06), transparent 38%),
    var(--color-paper);
}

[data-theme="dark"] .topnav {
  background: rgba(32, 32, 30, 0.92);
  border-bottom-color: rgba(208, 173, 98, 0.42);
}

[data-theme="dark"] .navlink,
[data-theme="dark"] .navlink:hover {
  color: var(--color-ink);
}

[data-theme="dark"] .navlink.active {
  color: #151515;
  background: var(--color-brass);
}

[data-theme="dark"] .page-shell,
[data-theme="dark"] .card,
[data-theme="dark"] .post-card-dynamic,
[data-theme="dark"] .timeline-content,
[data-theme="dark"] .posts-feedback {
  background: var(--color-surface);
  border-color: var(--color-border);
}

[data-theme="dark"] .page-body,
[data-theme="dark"] .card__text,
[data-theme="dark"] .post-card-dynamic__text,
[data-theme="dark"] .timeline-content p {
  color: var(--color-ink-soft);
}

[data-theme="dark"] .page-title,
[data-theme="dark"] .page-body h3,
[data-theme="dark"] .card__title,
[data-theme="dark"] .post-card-dynamic__title,
[data-theme="dark"] .post-card-dynamic__link,
[data-theme="dark"] .timeline-content h4 {
  color: var(--color-ink);
}

[data-theme="dark"] .card__tag,
[data-theme="dark"] .post-card-dynamic__tag {
  color: var(--color-brass);
  background: rgba(208, 173, 98, 0.14);
  border-color: rgba(208, 173, 98, 0.32);
}

[data-theme="dark"] .form-field input,
[data-theme="dark"] .form-field select,
[data-theme="dark"] .form-field textarea {
  color: var(--color-ink);
  background: var(--color-surface-raised);
  border-color: var(--color-border);
}

[data-theme="dark"] .post-kicker,
[data-theme="dark"] .post-content blockquote,
[data-theme="dark"] .post-content pre,
[data-theme="dark"] .post-content table,
[data-theme="dark"] .fact-card,
[data-theme="dark"] .toc,
[data-theme="dark"] .toc a,
[data-theme="dark"] .callout {
  color: var(--color-ink-soft);
  background: var(--color-surface-raised);
  border-color: var(--color-border);
}

[data-theme="dark"] .post-meta,
[data-theme="dark"] .post-excerpt,
[data-theme="dark"] .post-content figcaption {
  color: var(--color-muted);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.65rem 0.9rem;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  color: var(--color-ink);
  background: var(--color-surface);
  font: inherit;
  cursor: pointer;
}

.theme-toggle:hover {
  border-color: var(--color-brass);
  color: var(--color-brass);
}

.theme-toggle__icon {
  font-size: 1rem;
}

.editorial-kicker {
  display: block;
  margin-bottom: var(--space-2);
  color: var(--color-brass-dark);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

[data-theme="dark"] .editorial-kicker {
  color: var(--color-brass);
}

.editorial-lead {
  max-width: 42rem;
  margin-bottom: var(--space-4);
  color: var(--color-ink);
  font-family: var(--font-editorial);
  font-size: clamp(1.2rem, 2vw, 1.55rem);
  line-height: 1.65;
}

.editorial-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(240px, 0.9fr);
  gap: var(--space-5);
  align-items: center;
  margin-bottom: var(--space-5);
}

.editorial-intro__media {
  overflow: hidden;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}

.editorial-intro__media img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.editorial-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--space-5) var(--space-4);
  align-items: center;
  margin: var(--space-6) 0;
}

.editorial-grid__media,
.editorial-grid__copy {
  min-width: 0;
}

.editorial-grid__media {
  grid-column: span 6;
  overflow: hidden;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}

.editorial-grid__media img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.editorial-grid__copy {
  grid-column: span 6;
}

.editorial-grid--reverse .editorial-grid__media {
  grid-column: 7 / span 6;
  grid-row: 1;
}

.editorial-grid--reverse .editorial-grid__copy {
  grid-column: 1 / span 6;
  grid-row: 1;
}

.pull-quote {
  margin: var(--space-5) 0;
  padding: var(--space-4) 0 var(--space-4) var(--space-4);
  border-left: 3px solid var(--color-brass);
  color: var(--color-ink);
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  line-height: 1.25;
}

.pull-quote cite {
  display: block;
  margin-top: var(--space-2);
  color: var(--color-muted);
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-style: normal;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.theme-toggle-shell {
  display: flex;
  justify-content: flex-end;
  margin: var(--space-2) 0;
}

@media (max-width: 700px) {
  .editorial-intro,
  .editorial-grid {
    grid-template-columns: 1fr;
    gap: var(--space-3);
  }

  .editorial-grid__media,
  .editorial-grid__copy,
  .editorial-grid--reverse .editorial-grid__media,
  .editorial-grid--reverse .editorial-grid__copy {
    grid-column: 1;
    grid-row: auto;
  }

  .pull-quote {
    padding-left: var(--space-3);
  }
}