/*
Theme Name:  TumGard
Theme URI:   https://tumgard.com
Author:      hugg.
Author URI:  https://tumgard.com
Description: Custom theme for TumGard.com — built on the TumGard Design System v2.
Version:     1.0.0
License:     Private
Text Domain: tumgard
*/

/* ============================================================
   DESIGN TOKENS — single source of truth
   All values match Website_Design_Tokens_v2.md exactly.
   Never hardcode these values anywhere else.
   ============================================================ */

:root {

  /* — COLORS — */
  --electra:        rgb(85, 185, 131);    /* Primary green */
  --electra-dark:   rgb(26, 102, 64);     /* Dark green — eyebrows, links, hover */
  --electra-lite:   rgb(220, 243, 232);   /* Light green — card backgrounds, stat boxes */
  --doctor:         rgb(251, 249, 244);   /* Warm cream — page background */
  --pancake:        rgb(251, 210, 140);   /* Yellow — badges only */
  --pancake-dark:   rgb(180, 130, 40);    /* Dark yellow — text on pancake badges */
  --white:          rgb(255, 255, 255);   /* White — card backgrounds, nav */
  --iron-fist:      rgb(204, 204, 204);   /* Light grey — internal dividers */
  --black:          rgb(0, 0, 0);         /* Black — borders, nav, heavy type */
  --charcoal:       rgb(26, 26, 26);      /* Near-black — body text, headings */
  --grey:           rgb(102, 102, 102);   /* Mid grey — secondary text, captions */

  /* — SEMANTIC COLOURS — */
  --error-red:      rgb(204, 68, 68);     /* ✗ marks, negative test results */
  --row-bg:         rgb(250, 250, 248);   /* Table row label background */

  /* — TYPOGRAPHY — */
  --font-body:      'Outfit', sans-serif;
  --font-display:   'Lora', Georgia, serif;

  /* — BORDERS — */
  --border-heavy:   2px solid rgb(0, 0, 0);
  --border-medium:  1px solid rgb(204, 204, 204);
  --border-light:   1px solid rgb(232, 228, 220);
  --border-green:   2px solid rgb(85, 185, 131);
  --border-dashed:  2px dashed rgb(204, 204, 204);

  /* — BORDER RADIUS — */
  --r1: 10px;    /* All cards, buttons, containers */
  --r2: 50%;     /* Circles — avatars, number badges */
  --r3: 100px;   /* Pills — trait badges, ticker pills */

  /* — SHADOWS — */
  --shadow:     5px 5px 0px rgb(0, 0, 0);
  --shadow-sm:  3px 3px 0px rgb(0, 0, 0);

  /* — MAX WIDTHS — */
  --narrow:  640px;
  --mid:     780px;
  --wide:    900px;
  --full:    1200px;
}

/* ============================================================
   RESET & BASE
   ============================================================ */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.65;
  color: var(--charcoal);
  background: var(--doctor);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  text-decoration: none;
  color: inherit;
}

img, video {
  display: block;
  max-width: 100%;
}

ul, ol {
  list-style: none;
}

button {
  font-family: var(--font-body);
  cursor: pointer;
}

/* ============================================================
   ARTICLE PAGE LAYOUT
   Shared layout system for all article page templates.
   Components (stat-block, callout, etc.) live in template-parts.
   ============================================================ */

/* Breadcrumb */
.art-breadcrumb {
  background: var(--white);
  border-bottom: var(--border-medium);
  padding: 10px 24px;
}
.art-breadcrumb-inner {
  max-width: var(--full);
  margin: 0 auto;
  font-size: 12px;
  color: var(--grey);
  font-family: var(--font-body);
}
.art-breadcrumb-inner a { color: var(--grey); }
.art-breadcrumb-inner a:hover { color: var(--electra-dark); }
.art-breadcrumb-inner span { margin: 0 6px; }

/* Two-column layout: prose + sidebar */
.art-layout {
  max-width: 1080px;
  margin: 0 auto;
  padding: 48px 24px 80px;
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 56px;
  align-items: start;
}
@media (max-width: 860px) {
  .art-layout {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 32px 16px 56px;
  }
}

/* Prose typography */
.art-prose h2 {
  font-family: var(--font-display);
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 600;
  color: var(--black);
  margin: 48px 0 14px;
  line-height: 1.2;
  padding-bottom: 10px;
  border-bottom: var(--border-heavy);
}
.art-prose h2:first-child { margin-top: 0; }
.art-prose p {
  font-size: 15.5px;
  color: var(--charcoal);
  line-height: 1.85;
  margin-bottom: 24px;
  font-family: var(--font-body);
}
.art-prose strong { color: var(--black); font-weight: 700; }
.art-prose ul,
.art-prose ol {
  padding-left: 20px;
  margin-bottom: 20px;
  list-style: revert;
}
.art-prose li {
  font-size: 15px;
  color: var(--charcoal);
  line-height: 1.7;
  margin-bottom: 7px;
  font-family: var(--font-body);
}
.art-prose sup a {
  font-size: 11px;
  color: var(--electra-dark);
  text-decoration: none;
  font-weight: 700;
}

/* ============================================================
   CLUSTER HUB PAGES
   Shared layout system for all cluster hub templates.
   Used by: page-h-pylori-hub, page-chronic-gastritis-hub,
   page-iron-tablets-hub, page-glp1-hub, page-antibiotics-hub,
   page-stress-hub
   ============================================================ */

.hub-hero { background: var(--black); border-bottom: 3px solid var(--electra); padding: 56px 24px 64px; position: relative; overflow: hidden; }
.hub-hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at 70% 30%, rgba(85,185,131,0.07) 0%, transparent 55%); pointer-events: none; }
.hub-hero-inner { max-width: var(--full); margin: 0 auto; position: relative; }
.hub-hero-eyebrow { font-size: 10px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--electra); display: block; margin-bottom: 12px; font-family: var(--font-body); }
.hub-hero h1 { font-family: var(--font-body); font-size: clamp(28px, 5vw, 52px); font-weight: 900; color: var(--white); line-height: 1.05; letter-spacing: -0.02em; margin-bottom: 4px; }
.hub-hero-lora { font-family: var(--font-display); font-size: clamp(18px, 3.5vw, 34px); font-style: italic; color: var(--electra); display: block; line-height: 1.25; margin-bottom: 20px; }
.hub-hero-sub { font-size: 16px; color: rgba(255,255,255,0.45); max-width: 640px; line-height: 1.75; margin-bottom: 24px; font-family: var(--font-body); }
.hub-hero-meta { display: flex; flex-wrap: wrap; gap: 8px; }
.hub-hero-meta span { font-size: 12px; color: rgba(255,255,255,0.35); font-family: var(--font-body); }

/* 3-box stat strip */
.hub-stat-strip { background: var(--doctor); border-bottom: var(--border-heavy); padding: 28px 24px; }
.hub-stat-strip-inner { max-width: var(--full); margin: 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 640px) { .hub-stat-strip-inner { grid-template-columns: 1fr; } }
.hub-stat-box { background: var(--white); border: var(--border-heavy); border-radius: var(--r1); padding: 20px; text-align: center; box-shadow: var(--shadow-sm); }
.hub-stat-box-num { font-family: var(--font-display); font-size: clamp(28px, 4vw, 40px); font-weight: 800; color: var(--electra-dark); line-height: 1; margin-bottom: 8px; display: block; }
.hub-stat-box-label { font-size: 13px; font-weight: 600; color: var(--charcoal); line-height: 1.4; font-family: var(--font-body); }

/* TL;DR */
.hub-tldr-wrap { background: var(--white); border-bottom: var(--border-heavy); padding: 32px 24px; }
.hub-tldr-inner { max-width: var(--full); margin: 0 auto; }
.hub-tldr-block { background: var(--electra-lite); border: var(--border-green); border-radius: var(--r1); padding: 22px 26px; box-shadow: var(--shadow-sm); }
.hub-tldr-label { font-size: 10px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--electra-dark); margin-bottom: 10px; display: block; font-family: var(--font-body); }
.hub-tldr-block p { font-size: 15px; color: var(--charcoal); line-height: 1.72; margin: 0; font-weight: 500; font-family: var(--font-body); }

/* Body */
.hub-body { background: var(--doctor); padding: 52px 24px 80px; }
.hub-body-inner { max-width: var(--full); margin: 0 auto; }

/* Start here */
.hub-start { background: var(--white); border: var(--border-heavy); border-radius: var(--r1); padding: 24px; box-shadow: var(--shadow-sm); margin-bottom: 48px; }
.hub-start-label { font-size: 10px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--grey); margin-bottom: 16px; display: block; font-family: var(--font-body); }
.hub-start-paths { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 640px) { .hub-start-paths { grid-template-columns: 1fr; } }
.hub-start-path { background: var(--doctor); border: var(--border-heavy); border-radius: var(--r1); padding: 16px 18px; text-decoration: none; color: inherit; transition: transform 0.1s, box-shadow 0.1s; display: block; }
.hub-start-path:hover { transform: translate(-2px,-2px); box-shadow: var(--shadow-sm); }
.hub-sp-scenario { font-size: 10px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--electra-dark); margin-bottom: 6px; font-family: var(--font-body); }
.hub-sp-title { font-size: 13.5px; font-weight: 700; color: var(--black); line-height: 1.35; margin-bottom: 10px; font-family: var(--font-body); }
.hub-sp-arrow { font-size: 12px; font-weight: 700; color: var(--electra-dark); font-family: var(--font-body); }

/* Section labels + headings */
.hub-section-label { font-size: 10px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--electra-dark); display: block; margin-bottom: 6px; margin-top: 48px; font-family: var(--font-body); }
.hub-section-label:first-of-type { margin-top: 0; }
.hub-section-heading { font-family: var(--font-display); font-size: clamp(18px, 2.8vw, 26px); font-weight: 600; color: var(--black); line-height: 1.2; padding-bottom: 10px; border-bottom: var(--border-heavy); margin-bottom: 16px; }
.hub-section-intro { font-size: 15px; color: var(--charcoal); line-height: 1.75; max-width: 720px; margin-bottom: 20px; font-family: var(--font-body); }

/* Article cards */
.hub-article-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 8px; }
@media (max-width: 580px) { .hub-article-grid { grid-template-columns: 1fr; } }
.hub-article-card { background: var(--white); border: var(--border-heavy); border-radius: var(--r1); padding: 18px 20px 20px; box-shadow: var(--shadow-sm); text-decoration: none; color: inherit; display: block; transition: transform 0.1s, box-shadow 0.1s; position: relative; overflow: hidden; }
.hub-article-card:hover { transform: translate(-2px,-2px); box-shadow: var(--shadow); }
.hub-article-card::after { content: "→"; position: absolute; right: 16px; top: 50%; transform: translateY(-50%); font-size: 18px; font-weight: 900; color: var(--electra); opacity: 0; transition: opacity 0.15s, right 0.15s; }
.hub-article-card:hover::after { opacity: 1; right: 12px; }
.hub-ac-num { font-size: 9px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--grey); margin-bottom: 6px; display: block; font-family: var(--font-body); }
.hub-ac-title { font-family: var(--font-display); font-size: 15px; font-weight: 700; color: var(--black); line-height: 1.3; margin-bottom: 6px; }
.hub-ac-desc { font-size: 12.5px; color: var(--grey); line-height: 1.5; font-family: var(--font-body); }

/* Data section */
.hub-data-section { background: var(--white); border: var(--border-heavy); border-radius: var(--r1); padding: 28px; box-shadow: var(--shadow-sm); margin: 44px 0; }
.hub-data-section-label { font-size: 10px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--electra-dark); margin-bottom: 8px; display: block; font-family: var(--font-body); }
.hub-data-section h3 { font-family: var(--font-body); font-size: 17px; font-weight: 800; color: var(--black); margin-bottom: 8px; }
.hub-data-section > p { font-size: 14px; color: var(--grey); line-height: 1.65; margin-bottom: 20px; font-family: var(--font-body); }
.hub-data-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 640px) { .hub-data-grid { grid-template-columns: repeat(2, 1fr); } }
.hub-data-card { background: var(--doctor); border: var(--border-medium); border-radius: var(--r1); padding: 16px; text-align: center; }
.hub-dc-num { font-family: var(--font-display); font-size: clamp(24px, 4vw, 32px); font-weight: 700; color: var(--electra-dark); line-height: 1; margin-bottom: 5px; }
.hub-dc-label { font-size: 12px; font-weight: 700; color: var(--black); line-height: 1.35; margin-bottom: 4px; font-family: var(--font-body); }
.hub-dc-sub { font-size: 11px; color: var(--grey); line-height: 1.4; font-family: var(--font-body); }

/* Cross-cluster link */
.hub-cross-cluster { background: var(--electra-lite); border: var(--border-green); border-radius: var(--r1); padding: 22px 24px; margin: 36px 0; display: flex; gap: 16px; align-items: flex-start; }
.hub-cc-icon { font-size: 20px; flex-shrink: 0; margin-top: 2px; }
.hub-cc-label { font-size: 10px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--electra-dark); margin-bottom: 5px; display: block; font-family: var(--font-body); }
.hub-cc-title { font-size: 15px; font-weight: 800; color: var(--black); margin-bottom: 6px; line-height: 1.3; font-family: var(--font-body); }
.hub-cc-desc { font-size: 13.5px; color: var(--charcoal); line-height: 1.65; margin-bottom: 10px; font-family: var(--font-body); }
.hub-cc-link { font-size: 13px; font-weight: 700; color: var(--electra-dark); text-decoration: underline; text-underline-offset: 3px; font-family: var(--font-body); }
.hub-cc-link:hover { color: var(--electra); }

/* Cite block */
.hub-cite-block { background: var(--black); border: var(--border-green); border-radius: var(--r1); padding: 24px 28px; margin: 36px 0; box-shadow: var(--shadow-sm); position: relative; }
.hub-cite-block::before { content: "\201C"; font-family: var(--font-display); font-size: 72px; color: var(--electra); position: absolute; top: 4px; left: 18px; line-height: 1; opacity: 0.3; }
.hub-cite-block p { font-size: 15px; color: rgba(255,255,255,0.9); line-height: 1.72; padding-left: 28px; font-style: italic; margin: 0; font-family: var(--font-body); }
.hub-cite-source { font-size: 11px; color: rgba(255,255,255,0.35); margin-top: 10px; padding-left: 28px; font-family: var(--font-body); }

/* Warning box (GLP-1, antibiotics) */
.hub-warning { background: rgba(251,210,140,0.2); border: 2px solid var(--pancake-dark); border-radius: var(--r1); padding: 18px 22px; margin-bottom: 32px; }
.hub-warning-label { font-size: 10px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--pancake-dark); margin-bottom: 8px; display: block; font-family: var(--font-body); }
.hub-warning p { font-size: 14px; color: var(--charcoal); line-height: 1.65; margin: 0; font-family: var(--font-body); }
