/* =================================================================
   Metodologia — Methodology Page Styles
   Phase 1I.3 · css/metodologia.css
   Depends on: style.css (shared tokens, header, footer)
   Prefix: .met-  (avoids collision with homepage .rigor- classes)
   ================================================================= */

/* --- Hero ----------------------------------------------------------- */
.met-hero {
  padding: clamp(56px, 10vw, 112px) var(--gutter) clamp(40px, 6vw, 72px);
  text-align: center;
}
.met-hero-eyebrow {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 12px;
}
.met-hero-title {
  font-family: var(--serif);
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 500;
  color: var(--royal);
  line-height: 1.18;
  margin: 0 0 16px;
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
}
[data-theme="dark"] .met-hero-title { color: var(--text); }

.met-hero-subtitle {
  font-family: var(--serif);
  font-size: clamp(16px, 2vw, 19px);
  font-weight: 400;
  font-style: italic;
  color: var(--ink-soft);
  line-height: 1.5;
  margin: 0 0 24px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}
[data-theme="dark"] .met-hero-subtitle { color: var(--text-muted); }

.met-hero-stats {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-muted);
  margin-bottom: 20px;
}
.met-hero-stats span {
  white-space: nowrap;
}

.met-back-link {
  display: inline-block;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--azulejo);
  text-decoration: none;
  margin-top: 8px;
}
.met-back-link:hover { text-decoration: underline; }
[data-theme="dark"] .met-back-link { color: var(--gold); }

/* --- Shared section wrapper ----------------------------------------- */
.met-section {
  padding: clamp(48px, 7vw, 80px) var(--gutter);
}
.met-section-alt {
  background: var(--surface);
}
.met-section-inner {
  max-width: 820px;
  margin: 0 auto;
}
.met-section-title {
  font-family: var(--serif);
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 500;
  color: var(--royal);
  line-height: 1.25;
  margin: 0 0 12px;
}
[data-theme="dark"] .met-section-title { color: var(--text); }

.met-section-lede {
  font-family: var(--serif);
  font-size: clamp(15px, 1.8vw, 17px);
  font-style: italic;
  color: var(--ink-soft);
  line-height: 1.55;
  margin: 0 0 32px;
  max-width: 640px;
}
[data-theme="dark"] .met-section-lede { color: var(--text-muted); }

/* --- Core principle (blockquote) ------------------------------------ */
.met-principle {
  font-family: var(--serif);
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 400;
  font-style: italic;
  color: var(--royal);
  line-height: 1.4;
  text-align: center;
  max-width: 640px;
  margin: 0 auto 24px;
  padding: 0;
  border: none;
}
[data-theme="dark"] .met-principle { color: var(--gold); }

.met-principle-body {
  font-family: var(--serif);
  font-size: clamp(15px, 1.8vw, 17px);
  color: var(--ink-soft);
  line-height: 1.65;
  max-width: 640px;
  margin: 0 auto 16px;
  text-align: center;
}
[data-theme="dark"] .met-principle-body { color: var(--text-muted); }

/* --- Classification cards ------------------------------------------- */
.met-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
  margin-top: 8px;
}
.met-card {
  background: var(--bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}
[data-theme="dark"] .met-card {
  background: var(--surface-2);
  border-color: var(--border);
}
.met-card-tag {
  display: inline-block;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 100px;
  margin-bottom: 12px;
}
.met-card-title {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 8px;
  line-height: 1.3;
}
[data-theme="dark"] .met-card-title { color: var(--text); }

.met-card-desc {
  font-family: var(--sans);
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.55;
  margin: 0;
}
[data-theme="dark"] .met-card-desc { color: var(--text-muted); }

/* Tag colours (replicating homepage chip palette + new types) */
.met-tag--facto       { background: #d4edda; color: #155724; }
.met-tag--data-exacta { background: #d4edda; color: #155724; }
.met-tag--data-aprox  { background: #e0ecf4; color: #1a4a6e; }
.met-tag--tradicao    { background: #fff3cd; color: #856404; }
.met-tag--debate      { background: #f8d7da; color: #721c24; }
.met-tag--hipotese    { background: #d1ecf1; color: #0c5460; }
.met-tag--interpretacao { background: #e0d8f0; color: #3d2a5c; }
.met-tag--reconstrucao { background: #e8dff0; color: #4a2d6b; }

[data-theme="dark"] .met-tag--facto       { background: #1a3a2a; color: #8fd4a4; }
[data-theme="dark"] .met-tag--data-exacta { background: #1a3a2a; color: #8fd4a4; }
[data-theme="dark"] .met-tag--data-aprox  { background: #152a3a; color: #7ab8d4; }
[data-theme="dark"] .met-tag--tradicao    { background: #3a3018; color: #d4b95c; }
[data-theme="dark"] .met-tag--debate      { background: #3a1a1e; color: #d48a92; }
[data-theme="dark"] .met-tag--hipotese    { background: #0f2e3a; color: #7cc9d8; }
[data-theme="dark"] .met-tag--interpretacao { background: #251a3a; color: #b8a0d8; }
[data-theme="dark"] .met-tag--reconstrucao { background: #2a1e3a; color: #c4a8e0; }

/* --- Source type grid ------------------------------------------------ */
.met-sources {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 20px;
  margin-top: 8px;
}
.met-source {
  padding: 20px 24px;
  border-left: 3px solid var(--gold);
  background: var(--bg);
  border-radius: 0 var(--radius) var(--radius) 0;
}
[data-theme="dark"] .met-source {
  background: var(--surface-2);
}
.met-source-title {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 6px;
}
[data-theme="dark"] .met-source-title { color: var(--text); }

.met-source-desc {
  font-family: var(--sans);
  font-size: 13.5px;
  color: var(--ink-soft);
  line-height: 1.5;
  margin: 0;
}
[data-theme="dark"] .met-source-desc { color: var(--text-muted); }

/* --- Editorial prose blocks ----------------------------------------- */
.met-prose {
  font-family: var(--serif);
  font-size: clamp(15px, 1.8vw, 17px);
  color: var(--ink-soft);
  line-height: 1.65;
  max-width: 640px;
}
[data-theme="dark"] .met-prose { color: var(--text-muted); }

.met-prose p {
  margin: 0 0 16px;
}
.met-prose strong {
  color: var(--ink);
  font-weight: 600;
}
[data-theme="dark"] .met-prose strong { color: var(--text); }

/* --- Callout box (classification tiers) ----------------------------- */
.met-callout {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 28px 28px 20px;
  margin-top: 28px;
}
[data-theme="dark"] .met-callout {
  background: var(--surface-2);
  border-color: var(--border);
}
.met-callout-title {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 16px;
}
[data-theme="dark"] .met-callout-title { color: var(--text); }

.met-callout-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.met-callout-list li {
  font-family: var(--sans);
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.5;
  display: flex;
  align-items: baseline;
  gap: 10px;
}
[data-theme="dark"] .met-callout-list li { color: var(--text-muted); }

.met-tier-tag {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 100px;
  white-space: nowrap;
  flex-shrink: 0;
}
.met-tier--oral       { background: #fff3cd; color: #856404; }
.met-tier--ancora     { background: #d1ecf1; color: #0c5460; }
.met-tier--lenda      { background: #e0d8f0; color: #3d2a5c; }
.met-tier--arqueologica { background: #d4edda; color: #155724; }

[data-theme="dark"] .met-tier--oral       { background: #3a3018; color: #d4b95c; }
[data-theme="dark"] .met-tier--ancora     { background: #0f2e3a; color: #7cc9d8; }
[data-theme="dark"] .met-tier--lenda      { background: #251a3a; color: #b8a0d8; }
[data-theme="dark"] .met-tier--arqueologica { background: #1a3a2a; color: #8fd4a4; }

/* --- Avoidance list ------------------------------------------------- */
.met-avoid-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.met-avoid-list li {
  font-family: var(--sans);
  font-size: 15px;
  color: var(--ink-soft);
  line-height: 1.55;
  padding-left: 28px;
  position: relative;
}
[data-theme="dark"] .met-avoid-list li { color: var(--text-muted); }

.met-avoid-list li::before {
  content: "\2715";
  position: absolute;
  left: 0;
  color: #c0392b;
  font-weight: 700;
  font-size: 14px;
}
[data-theme="dark"] .met-avoid-list li::before {
  color: #e07070;
}

/* --- Next paths ----------------------------------------------------- */
.met-paths {
  text-align: center;
}
.met-paths-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 8px;
}
.met-path-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  color: var(--azulejo);
  text-decoration: none;
  padding: 10px 20px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  transition: border-color .15s, background .15s, color .15s;
  min-height: 44px;
}
.met-path-link:hover {
  border-color: var(--azulejo);
  background: var(--light-blue);
}
[data-theme="dark"] .met-path-link {
  color: var(--text);
  border-color: var(--border);
}
[data-theme="dark"] .met-path-link:hover {
  border-color: var(--gold);
  background: var(--surface-2);
  color: var(--gold);
}

/* --- Mouras link (CTA inside oral tradition section) ---------------- */
.met-mouras-link {
  display: inline-block;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  color: var(--azulejo);
  text-decoration: none;
  margin-top: 12px;
}
.met-mouras-link:hover { text-decoration: underline; }
[data-theme="dark"] .met-mouras-link { color: var(--gold); }

/* --- Mobile --------------------------------------------------------- */
@media (max-width: 600px) {
  .met-cards {
    grid-template-columns: 1fr;
  }
  .met-sources {
    grid-template-columns: 1fr;
  }
  .met-hero-stats {
    flex-direction: column;
    gap: 6px;
  }
  .met-paths-links {
    flex-direction: column;
    align-items: center;
  }
  .met-path-link {
    width: 100%;
    justify-content: center;
    max-width: 300px;
  }
  .met-callout {
    padding: 20px 18px 16px;
  }
  .met-callout-list li {
    flex-direction: column;
    gap: 4px;
  }
}
