/* Leadfins Ads Mastery Hub — shared styles (matches Leadfins brand exactly) */
:root {
  --primary: #114742;
  --primary-dark: #0c332f;
  --primary-soft: #edffe3;
  --bg: #fafafa;
  --card: #ffffff;
  --text: #141414;
  --text-muted: #636363;
  --border: #e8e8e8;
  --accent: #c9a85b;
  --warn: #b3541e;
  --danger: #9a2727;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); }
a:hover { color: var(--primary-dark); }

/* Header */
.header {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 18px 36px;
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(8px);
  background: rgba(255,255,255,0.92);
}
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.logo {
  width: 40px; height: 40px;
  background: var(--primary); border-radius: 10px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.logo svg { width: 22px; height: 22px; fill: white; }
.brand-text h1 {
  font-family: 'Hedvig Letters Serif', serif;
  font-size: 19px; font-weight: 500; letter-spacing: -0.01em;
  color: var(--text);
}
.brand-text p {
  font-size: 11px; color: var(--text-muted); font-weight: 500;
  letter-spacing: 0.04em; text-transform: uppercase;
}
.header-meta { font-size: 12px; color: var(--text-muted); display: flex; gap: 18px; align-items: center; }
.header-meta a { font-weight: 600; text-decoration: none; }

/* Hero */
.hero {
  padding: 80px 36px 60px;
  background: linear-gradient(180deg, #edffe3 0%, #fafafa 100%);
  border-bottom: 1px solid var(--border);
}
.hero-inner { max-width: 980px; margin: 0 auto; }
.hero-eyebrow {
  display: inline-block; background: var(--primary); color: var(--primary-soft);
  padding: 6px 14px; border-radius: 99px; font-size: 11px;
  font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  margin-bottom: 22px;
}
.hero h2 {
  font-family: 'Hedvig Letters Serif', serif;
  font-size: 52px; line-height: 1.08; letter-spacing: -0.02em;
  font-weight: 500; margin-bottom: 18px;
}
.hero h2 em { font-style: italic; color: var(--primary); }
.hero-sub {
  font-size: 18px; line-height: 1.6; color: var(--text-muted);
  max-width: 760px; margin-bottom: 28px;
}
.hero-tags { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-tag {
  background: var(--card); border: 1px solid var(--border);
  padding: 8px 14px; border-radius: 99px; font-size: 12px; font-weight: 500;
  color: var(--primary);
}

/* Container */
.container { max-width: 980px; margin: 0 auto; padding: 64px 36px; }

/* Sections */
section + section { margin-top: 28px; }
.section-label {
  font-size: 11px; font-weight: 600; color: var(--text-muted);
  letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 12px;
}
h3.section-h {
  font-family: 'Hedvig Letters Serif', serif;
  font-size: 30px; font-weight: 500; letter-spacing: -0.01em;
  margin-bottom: 14px; line-height: 1.2;
}
h4.sub-h {
  font-family: 'Hedvig Letters Serif', serif;
  font-size: 22px; font-weight: 500; letter-spacing: -0.005em;
  margin-top: 30px; margin-bottom: 10px;
}
p.lead { font-size: 17px; line-height: 1.7; color: var(--text); margin-bottom: 14px; }
p { font-size: 15.5px; line-height: 1.7; color: var(--text); margin-bottom: 12px; }
p.muted { color: var(--text-muted); }
ul, ol { margin: 0 0 14px 22px; }
ul li, ol li { font-size: 15.5px; line-height: 1.75; color: var(--text); margin-bottom: 6px; }

/* Diagram block */
.diagram {
  background: var(--card); border: 1px solid var(--border); border-radius: 14px;
  padding: 28px; margin: 22px 0;
}
.diagram svg { display: block; width: 100%; height: auto; max-width: 100%; }
.diagram-caption {
  font-size: 13px; color: var(--text-muted); margin-top: 12px;
  text-align: center; font-style: italic;
}

/* Callout */
.callout {
  margin: 18px 0;
  background: var(--primary-soft);
  border-left: 3px solid var(--primary);
  padding: 14px 18px; border-radius: 0 10px 10px 0;
  font-size: 14px; line-height: 1.7;
}
.callout strong { color: var(--primary-dark); }
.callout.warn { background: #fff5e6; border-left-color: var(--warn); }
.callout.warn strong { color: var(--warn); }

/* Context cards */
.context-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 22px;
}
.context-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 14px; padding: 22px 22px 24px;
}
.context-card .num {
  font-family: 'Hedvig Letters Serif', serif;
  font-size: 30px; color: var(--primary); margin-bottom: 8px; font-weight: 500;
}
.context-card h4 { font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.context-card p { font-size: 13.5px; color: var(--text-muted); line-height: 1.6; margin: 0; }

/* dfn styling */
dfn {
  font-style: normal; font-weight: 600; color: var(--primary);
  border-bottom: 1px dotted var(--primary); cursor: help; position: relative;
}
dfn[title]:hover::after {
  content: attr(title);
  position: absolute; left: 0; bottom: calc(100% + 8px);
  width: 320px; background: var(--primary-dark); color: white;
  padding: 10px 14px; border-radius: 8px; font-size: 12.5px;
  font-weight: 400; line-height: 1.5;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
  z-index: 100;
}
dfn[title]:hover::before {
  content: ''; position: absolute; left: 20px; bottom: calc(100% + 2px);
  border: 6px solid transparent; border-top-color: var(--primary-dark);
}

/* Glossary */
.glossary {
  background: var(--card); border: 1px solid var(--border); border-radius: 16px;
  padding: 30px 32px;
}
.glossary dl { display: grid; grid-template-columns: 220px 1fr; gap: 14px 24px; }
.glossary dt { font-weight: 600; color: var(--primary); font-size: 14px; }
.glossary dd { font-size: 14px; color: var(--text); line-height: 1.65; }

/* Next chapter card */
.next-card {
  background: var(--primary); color: white;
  border-radius: 18px; padding: 38px 36px;
}
.next-card h3 {
  font-family: 'Hedvig Letters Serif', serif;
  font-size: 28px; font-weight: 500; margin-bottom: 12px; color: white;
}
.next-card p { color: rgba(255,255,255,0.86); margin-bottom: 18px; font-size: 15px; }
.next-buttons { display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; background: var(--primary-soft); color: var(--primary);
  border-radius: 99px; font-size: 14px; font-weight: 600; text-decoration: none;
  transition: transform 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn.ghost { background: transparent; color: white; border: 1px solid rgba(255,255,255,0.4); }

/* Footer */
footer {
  background: var(--card); border-top: 1px solid var(--border);
  padding: 30px 36px; text-align: center; color: var(--text-muted); font-size: 12.5px;
}
footer a { color: var(--primary); font-weight: 600; text-decoration: none; }

/* Hub chapter cards */
.chapters-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 14px;
}
.chapter-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 16px;
  padding: 28px 28px 26px; display: flex; flex-direction: column;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  text-decoration: none; color: var(--text);
  min-height: 220px;
}
.chapter-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  box-shadow: 0 12px 28px -16px rgba(17,71,66,0.28);
}
.chapter-card.soon {
  pointer-events: none; opacity: 0.55;
  background: repeating-linear-gradient(135deg, #fafafa 0 10px, #f3f3f3 10px 20px);
}
.chapter-card .chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--primary-soft); color: var(--primary);
  padding: 4px 10px; border-radius: 99px; font-size: 11px; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase;
  width: fit-content; margin-bottom: 12px;
}
.chapter-card.soon .chip { background: #ececec; color: var(--text-muted); }
.chapter-card h4 {
  font-family: 'Hedvig Letters Serif', serif;
  font-size: 22px; font-weight: 500; letter-spacing: -0.01em; line-height: 1.25;
  margin-bottom: 8px;
}
.chapter-card p { font-size: 14px; color: var(--text-muted); line-height: 1.6; margin-bottom: 16px; flex-grow: 1; }
.chapter-card .arrow { font-size: 13px; font-weight: 600; color: var(--primary); }
.chapter-card.soon .arrow { color: var(--text-muted); }

.tier-label {
  font-family: 'Hedvig Letters Serif', serif;
  font-size: 13px; font-weight: 500; color: var(--primary);
  margin-top: 36px; margin-bottom: 6px;
  letter-spacing: 0.02em;
  display: flex; align-items: center; gap: 10px;
}
.tier-label::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* Ad mock card (for static teardowns) */
.ad-mock {
  background: var(--card); border: 1px solid var(--border); border-radius: 14px;
  overflow: hidden; margin: 20px 0;
}
.ad-mock-head {
  padding: 14px 18px; background: #f5f7f6; border-bottom: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
}
.ad-mock-head h5 {
  font-family: 'Hedvig Letters Serif', serif; font-size: 17px; font-weight: 500;
}
.ad-mock-head .score {
  font-size: 11px; color: var(--primary); background: var(--primary-soft);
  padding: 4px 10px; border-radius: 99px; font-weight: 600;
}
.ad-mock-body { padding: 24px; display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.ad-mock-body .mock-visual {
  background: #f0f0ec; border-radius: 10px; padding: 20px; min-height: 260px;
  display: flex; flex-direction: column; justify-content: center;
}
.ad-mock-body .mock-meta { font-size: 13.5px; line-height: 1.7; color: var(--text); }
.ad-mock-body .mock-meta strong { color: var(--primary-dark); }
.score-row {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px;
  padding: 14px 18px; border-top: 1px solid var(--border); background: #fcfcfb;
}
.score-row .score-cell {
  font-size: 11px; color: var(--text-muted); text-align: center;
}
.score-row .score-cell strong {
  display: block; font-size: 18px; color: var(--primary);
  font-family: 'Hedvig Letters Serif', serif; font-weight: 500;
}

/* Swipe card (copy framework examples) */
.swipe-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 18px 0; }
.swipe-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  padding: 20px 22px;
}
.swipe-card .swipe-tag {
  display: inline-block; font-size: 10.5px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--primary); background: var(--primary-soft);
  padding: 3px 9px; border-radius: 99px; margin-bottom: 10px; font-weight: 600;
}
.swipe-card .swipe-copy {
  font-size: 14px; line-height: 1.65; color: var(--text); margin-bottom: 10px;
  white-space: pre-line;
}
.swipe-card .swipe-score {
  font-size: 11.5px; color: var(--text-muted); border-top: 1px dashed var(--border);
  padding-top: 8px; margin-top: 8px;
}
.swipe-card .swipe-score strong { color: var(--primary); }

/* Comparison table */
.table-wrap { overflow-x: auto; margin: 18px 0; }
table.cmp {
  width: 100%; border-collapse: collapse; background: var(--card);
  border: 1px solid var(--border); border-radius: 12px; overflow: hidden;
}
table.cmp th, table.cmp td {
  padding: 12px 14px; font-size: 13.5px; text-align: left; border-bottom: 1px solid var(--border);
}
table.cmp th { background: #f5f7f6; color: var(--primary-dark); font-weight: 600; font-size: 12.5px; letter-spacing: 0.04em; text-transform: uppercase; }
table.cmp tr:last-child td { border-bottom: none; }
table.cmp td strong { color: var(--primary-dark); }

@media (max-width: 760px) {
  .hero h2 { font-size: 36px; }
  .context-grid { grid-template-columns: 1fr; }
  .glossary dl { grid-template-columns: 1fr; gap: 6px 0; }
  .glossary dt { margin-top: 12px; }
  .container { padding: 40px 20px; }
  .hero { padding: 50px 20px 36px; }
  .chapters-grid { grid-template-columns: 1fr; }
  .ad-mock-body { grid-template-columns: 1fr; }
  .swipe-grid { grid-template-columns: 1fr; }
  .score-row { grid-template-columns: repeat(5, 1fr); }
}
