/*
 * article.css — shared stylesheet for all Anshuk blog articles
 * Source of truth: new_design/ART_DIRECTION.md + new_design/TOKENS.md
 * Canvas: Light Mode (prelude / web / pre-app surfaces)
 */

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

/* ── Design tokens ── */
:root {
  /* Light Mode canvas */
  --l-bg0: #fbf3f0;
  --l-bg1: #f7eef2;
  --l-bg2: #eef3ef;
  --ink: #321a2b;
  --ink-soft: rgba(50, 26, 43, 0.62);
  --ink-faint: rgba(50, 26, 43, 0.38);
  --card: #fffdfb;
  --line: rgba(50, 26, 43, 0.10);
  --line-soft: rgba(50, 26, 43, 0.06);

  /* Primary CTA — deep evergreen */
  --primary: #2f6f5e;
  --primary-deep: #255848;
  --on-primary: #fffaf6;

  /* Cluster tokens — Foundation (default; overridable per article) */
  --cluster-bg: #f4ead9;
  --cluster-ink: #6b4a25;
  --cluster-accent: #b08344;

  /* Backward-compat aliases — so Phase 1 component CSS still resolves */
  --teal: #2f6f5e;
  --teal-dark: #255848;
  --orange: #b08344;
  --cream: #fbf3f0;
  --text-primary: #321a2b;
  --text-body: #321a2b;
  --text-muted: rgba(50, 26, 43, 0.38);
  --border: rgba(50, 26, 43, 0.10);
  --bg-soft: #f4ead9;
}

/* ── Base ── */
html { font-size: 17px; }

body {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  color: var(--ink);
  line-height: 1.75;
  background:
    radial-gradient(110% 75% at 50% -8%, #f7e1ea 0%, transparent 55%),
    radial-gradient(90% 70% at 100% 105%, #e4f0ea 0%, transparent 60%),
    linear-gradient(165deg, #fbf3f0, #f7eef2 55%, #eef3ef);
  background-attachment: fixed;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ── Navigation ── */
nav, .nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 2rem;
  max-width: 1080px;
  margin: 0 auto;
  border-bottom: 1px solid var(--line-soft);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.nav-logo svg { width: 28px; height: 28px; }
.nav-logo span {
  font-family: 'Fraunces', serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0;
}

.nav-links { display: flex; gap: 1.75rem; }
.nav-links a {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink-soft);
  text-decoration: none;
}
.nav-links a:hover { color: var(--primary); }

.nav-cta {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--on-primary);
  background: var(--primary);
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  text-decoration: none;
  transition: background 0.2s ease, transform 0.15s ease;
}
.nav-cta:hover { background: var(--primary-deep); transform: translateY(-1px); }

/* ── Hero / article header ── */
.hero {
  max-width: 720px;
  margin: 3rem auto 0;
  padding: 0 2rem;
  text-align: center;
}
.hero .breadcrumb {
  font-size: 0.8rem;
  color: var(--ink-faint);
  margin-bottom: 1.5rem;
}
.hero .breadcrumb a {
  color: var(--primary);
  text-decoration: none;
}
.hero .category {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--cluster-ink);
  background: var(--cluster-bg);
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  margin-bottom: 1.25rem;
}
.hero h1 {
  font-family: 'Fraunces', serif;
  font-size: 2.6rem;
  font-weight: 700;
  line-height: 1.15;
  color: var(--ink);
  margin-bottom: 1.1rem;
  letter-spacing: -0.01em;
}
.hero .subtitle {
  font-size: 1.05rem;
  color: var(--ink-soft);
  line-height: 1.7;
  max-width: 600px;
  margin: 0 auto 1.5rem;
}
.hero .meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--ink-faint);
}
.hero .meta .dot {
  width: 3px; height: 3px;
  border-radius: 50%;
  background: var(--ink-faint);
}

/* ── Article body ── */
article {
  max-width: 680px;
  margin: 3rem auto 0;
  padding: 0 2rem 5rem;
}

article p { margin-bottom: 1.4rem; }

article h2 {
  font-family: 'Fraunces', serif;
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--ink);
  margin: 3.5rem 0 1.1rem;
  line-height: 1.2;
}

article h3 {
  font-family: 'Fraunces', serif;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--ink);
  margin: 2.5rem 0 0.75rem;
}

article strong { color: var(--ink); }

article ul, article ol {
  padding-left: 1.5rem;
  margin-bottom: 1.4rem;
}
article li { margin-bottom: 0.5rem; }

article a {
  color: var(--primary);
  text-decoration: underline;
  text-decoration-color: rgba(47, 111, 94, 0.3);
  text-underline-offset: 3px;
}
article a:hover { text-decoration-color: var(--primary); }

/* ── Exercise block ── */
.exercise {
  background: var(--cluster-bg);
  border: 1px solid rgba(176, 131, 68, 0.25);
  border-radius: 16px;
  padding: 2rem 2.25rem;
  margin: 3rem 0;
}
.exercise .ex-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--cluster-ink);
  margin-bottom: 0.75rem;
}
.exercise h3 {
  font-family: 'Fraunces', serif;
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 0.75rem;
}
.exercise p { font-size: 0.95rem; margin-bottom: 1rem; }
.exercise ol { font-size: 0.95rem; line-height: 2; }
.exercise .time {
  font-size: 0.8rem;
  color: var(--ink-faint);
  margin-top: 1rem;
}

/* ── Stat block ── */
.stat-block {
  text-align: center;
  padding: 3rem 2rem;
  margin: 3rem -2rem;
  background: var(--card);
  border-radius: 16px;
  border: 1px solid var(--line);
}
.stat-block .number {
  font-family: 'Fraunces', serif;
  font-size: 4.5rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
}
.stat-block .label {
  font-size: 1rem;
  color: var(--ink-soft);
  margin-top: 0.75rem;
  max-width: 440px;
  margin-left: auto; margin-right: auto;
}
.stat-block .source {
  font-size: 0.8rem;
  color: var(--ink-faint);
  margin-top: 0.5rem;
}

/* ── Concept card ── */
.concept-card {
  background: var(--card);
  border-radius: 16px;
  padding: 2rem;
  margin: 2rem 0;
  border: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}
.concept-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 4px; height: 100%;
}
.concept-card.cc-teal::before { background: var(--primary); }
.concept-card.cc-orange::before { background: var(--cluster-accent); }
.concept-card.cc-gray::before { background: var(--ink-soft); }
.concept-card .cc-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.concept-card .cc-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--on-primary);
}
.cc-teal .cc-icon { background: var(--primary); }
.cc-orange .cc-icon { background: var(--cluster-accent); }
.cc-gray .cc-icon { background: var(--ink-soft); }
.concept-card h4 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ink);
}
.concept-card .cc-desc { margin-bottom: 1rem; font-size: 0.95rem; }
.concept-card .example-box {
  font-style: italic;
  color: var(--ink-soft);
  font-size: 0.9rem;
  padding: 0.75rem 1rem;
  background: var(--l-bg0);
  border-radius: 8px;
  margin-bottom: 1rem;
}
.concept-card .instead-box {
  background: rgba(47, 111, 94, 0.07);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
}
.concept-card .instead-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--primary-deep);
  margin-bottom: 0.5rem;
}
.concept-card .instead-box p { margin: 0; font-size: 0.9rem; line-height: 1.7; }

/* ── CTA ── */
.cta, .cta-section {
  text-align: center;
  padding: 3rem 2rem;
  margin: 3rem 0;
}
.cta h2, .cta-section h2 {
  font-family: 'Fraunces', serif;
  font-size: 1.75rem;
  color: var(--ink);
  margin-bottom: 0.75rem;
}
.cta p, .cta-section p { color: var(--ink-soft); margin-bottom: 1.5rem; }
.btn, .cta-btn {
  display: inline-block;
  background: var(--primary);
  color: var(--on-primary);
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  padding: 0.85rem 2rem;
  border-radius: 999px;
  text-decoration: none;
  transition: background 0.2s ease, transform 0.15s ease;
  border: none;
  cursor: pointer;
}
.btn:hover, .cta-btn:hover {
  background: var(--primary-deep);
  transform: translateY(-1px);
  text-decoration: none;
}

/* ── Related articles ── */
.related-section {
  max-width: 720px;
  margin: 3rem auto;
  padding: 0 2rem;
}
.related-section h2 {
  font-family: 'Fraunces', serif;
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 1.5rem;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}
.related-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.25rem;
  text-decoration: none;
  transition: border-color 0.2s ease, transform 0.15s ease;
}
.related-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  text-decoration: none;
}
.related-card .rc-cat {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--cluster-ink);
  margin-bottom: 0.5rem;
}
.related-card .rc-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.4;
}

/* ── Footer ── */
footer, .footer {
  text-align: center;
  padding: 2rem;
  font-size: 0.82rem;
  color: var(--ink-faint);
  border-top: 1px solid var(--line-soft);
  font-family: 'Inter', sans-serif;
}
footer a, .footer a { color: var(--ink-soft); text-decoration: none; }
footer a:hover, .footer a:hover { text-decoration: underline; }

/* ── Disclaimer ── */
.disclaimer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  font-size: 0.82rem;
  color: var(--ink-faint);
  font-family: 'Inter', sans-serif;
  text-align: center;
}

/* ── Highlighter (mark) ── */
mark {
  background: rgba(176, 131, 68, 0.22);
  color: inherit;
  font-style: italic;
  padding: 0.15em 0.4em;
  margin: 0 -0.15em;
  border-radius: 3px;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* ── Responsive ── */
@media (max-width: 600px) {
  html { font-size: 16px; }
  .hero h1 { font-size: 1.9rem; }
  article h2 { font-size: 1.45rem; }
  .hero, article { padding-left: 1.25rem; padding-right: 1.25rem; }
  .stat-block { margin-left: -1.25rem; margin-right: -1.25rem; }
  nav, .nav { padding: 1rem 1.25rem; }
  .nav-links { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .btn, .cta-btn, .nav-cta, .related-card { transition: none; }
}
