/* ================================================================
   TLG Website — Shared Styles
   Extracted from index.html; shared across all pages.
   ================================================================ */

/* ---- Theme tokens ---- */
:root {
  --tlg-font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --tlg-font-display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --tlg-font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}
:root[data-theme="light"] {
  --bg: #F7FAFB;
  --surface: #FFFFFF;
  --text: #0F172A;
  --muted: #475569;
  --border: #D8E1E7;
  --primary: #5BC8BE;
  --primary-soft: #DDF6F3;
  --secondary: #8EA0FF;
  --secondary-soft: #EEF0FF;
  --accent: #FF9AA2;
  --success: #77D39A;
  --danger: #FF7D86;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  --radius: 18px;
}
:root[data-theme="dark"] {
  --bg: #0B1220;
  --surface: #0F1B2E;
  --text: #E6EDF7;
  --muted: #B4C0D3;
  --border: #1F2A3C;
  --primary: #6FE0D6;
  --primary-soft: #123A3A;
  --secondary: #A9B6FF;
  --secondary-soft: #1A2147;
  --accent: #FFB1B7;
  --success: #8BE6B0;
  --danger: #FF8F98;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

/* ---- Reset ---- */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--tlg-font-sans);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.55;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---- Topbar ---- */
.topbar {
  position: sticky; top: 0; z-index: 5;
  backdrop-filter: saturate(1.2) blur(10px);
  -webkit-backdrop-filter: saturate(1.2) blur(10px);
  padding: 18px 18px 10px;
}
.topbar-inner {
  max-width: 1040px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 18px; border: 1px solid var(--border);
  border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow);
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.brand:hover { text-decoration: none; }
.logo-slot {
  width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--border);
  display: grid; place-items: center; overflow: hidden; background: rgba(0, 0, 0, 0.02);
}
.logo-slot img { width: 100%; height: 100%; object-fit: contain; }
.brand-name {
  font-family: var(--tlg-font-display);
  font-weight: 600; font-size: 16px; line-height: 1.15; letter-spacing: -0.01em;
}
.brand-sub { font-size: 12px; color: var(--muted); }

.topbar-right { display: flex; align-items: center; gap: 10px; }
.nav-link {
  font-size: 14px; color: var(--muted); padding: 8px 12px;
  border-radius: 10px; transition: background 0.15s, color 0.15s;
}
.nav-link:hover { background: var(--primary-soft); color: var(--text); text-decoration: none; }

/* ---- Buttons ---- */
.btn-primary {
  appearance: none; border: 1px solid var(--primary);
  background: var(--primary); color: #06262B;
  padding: 10px 16px; border-radius: 10px;
  font-family: var(--tlg-font-sans); font-weight: 600; font-size: 14px;
  cursor: pointer; text-decoration: none; display: inline-block;
  transition: transform 0.1s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(91, 200, 190, 0.35);
  text-decoration: none;
}
.btn-primary.secondary-accent {
  background: var(--secondary); border-color: var(--secondary); color: #fff;
}
.btn-primary.secondary-accent:hover {
  box-shadow: 0 6px 16px rgba(142, 160, 255, 0.35);
}

.btn-ghost {
  appearance: none; border: 1px solid var(--border);
  background: transparent; color: var(--text);
  padding: 10px 16px; border-radius: 10px;
  font-family: var(--tlg-font-sans); font-weight: 500; font-size: 14px;
  cursor: pointer; text-decoration: none; display: inline-block;
  transition: border-color 0.15s, background 0.15s;
}
.btn-ghost:hover { border-color: var(--primary); background: var(--primary-soft); text-decoration: none; }
.btn-ghost.secondary-accent:hover { border-color: var(--secondary); background: var(--secondary-soft); }

.theme-toggle {
  appearance: none; background: transparent; border: 1px solid var(--border);
  color: var(--muted); width: 36px; height: 36px; border-radius: 10px;
  cursor: pointer; display: grid; place-items: center;
  transition: color 0.15s, border-color 0.15s;
}
.theme-toggle:hover { color: var(--text); border-color: var(--primary); }

/* ---- Hero ---- */
.hero {
  max-width: 1040px; margin: 40px auto 60px; padding: 0 24px;
}
.hero-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 64px 48px;
  background-image:
    radial-gradient(ellipse at top right, var(--primary-soft) 0%, transparent 60%),
    radial-gradient(ellipse at bottom left, var(--secondary-soft) 0%, transparent 55%);
}
.hero-card.teal-gradient {
  background-image: radial-gradient(ellipse at top right, var(--primary-soft) 0%, transparent 60%);
}
.hero-card.purple-gradient {
  background-image: radial-gradient(ellipse at top right, var(--secondary-soft) 0%, transparent 60%);
}
.hero h1 {
  font-family: var(--tlg-font-display);
  font-size: clamp(32px, 5vw, 52px); line-height: 1.08;
  margin: 0 0 16px; letter-spacing: -0.02em; font-weight: 600;
}
.hero .product-label {
  font-size: 13px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; margin-bottom: 10px;
}
.hero .product-label.teal { color: var(--primary); }
.hero .product-label.purple { color: var(--secondary); }
.hero .tagline {
  font-size: clamp(16px, 2vw, 19px); color: var(--muted);
  max-width: 720px; margin: 0 0 32px; line-height: 1.6;
}
.hero-cta-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---- Section ---- */
.section { max-width: 1040px; margin: 0 auto 64px; padding: 0 24px; }
.section h2 {
  font-family: var(--tlg-font-display);
  font-size: clamp(24px, 3vw, 32px);
  margin: 0 0 24px; letter-spacing: -0.01em; font-weight: 600;
}
.section .lede {
  font-size: 17px; color: var(--muted); max-width: 720px; margin: 0 0 28px;
}

/* ---- Generic card ---- */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow);
}

/* ---- Grid layouts ---- */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; }
@media (max-width: 768px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

/* ---- About ---- */
.about-grid {
  display: grid; grid-template-columns: 1fr; gap: 28px; max-width: 760px;
}
.about-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow);
}
.about-card h3 {
  font-family: var(--tlg-font-display);
  margin: 0 0 12px; font-size: 18px; font-weight: 600;
}
.about-card p { margin: 0 0 12px; color: var(--text); font-size: 15px; }
.about-card p:last-child { margin-bottom: 0; }

/* ---- Product cards ---- */
.product-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
}
@media (max-width: 768px) { .product-grid { grid-template-columns: 1fr; } }
.product-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 32px;
  box-shadow: var(--shadow);
}
.product-card.teal-top { border-top: 3px solid var(--primary); }
.product-card.purple-top { border-top: 3px solid var(--secondary); }
.product-body h3 {
  font-family: var(--tlg-font-display);
  margin: 0 0 6px; font-size: 22px; font-weight: 600;
}
.product-body .product-sub {
  color: var(--muted); font-size: 14px; margin: 0 0 14px;
}
.product-body p { margin: 0 0 14px; font-size: 15px; }
.product-cta-row {
  display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px;
}
.product-link {
  font-weight: 600; font-size: 14px; text-decoration: none;
}
.product-link:hover { text-decoration: underline; }
.product-link.teal { color: var(--primary); }
.product-link.purple { color: var(--secondary); }

/* ---- Feature lists (product detail pages) ---- */
.feature-group { margin: 20px 0 0; }
.feature-group-title {
  font-family: var(--tlg-font-display);
  font-weight: 600; font-size: 15px; margin: 0 0 10px;
  color: var(--text);
}
.feature-list { list-style: none; padding: 0; margin: 0 0 20px; display: grid; gap: 8px; }
.feature-list li {
  padding-left: 22px; position: relative; font-size: 14px; color: var(--text);
}
.feature-list li::before {
  content: ""; position: absolute; left: 0; top: 8px;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--primary);
}
.feature-list.secondary li::before { background: var(--secondary); }

/* ---- Approach cards ---- */
.approach-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow);
}
.approach-card h3 {
  font-family: var(--tlg-font-display);
  margin: 0 0 10px; font-size: 17px; font-weight: 600;
}
.approach-card p { margin: 0; font-size: 14px; color: var(--muted); line-height: 1.6; }

/* ---- Dimension / check cards (product pages) ---- */
.check-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow);
}
.check-card h4 {
  font-family: var(--tlg-font-display);
  font-weight: 700; font-size: 15px; margin: 0 0 8px;
}
.check-card h4.teal { color: var(--primary); }
.check-card h4.purple { color: var(--secondary); }
.check-card p { margin: 0; font-size: 14px; color: var(--muted); line-height: 1.5; }

/* ---- Step cards (how it works) ---- */
.step-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow);
}
.step-number {
  font-family: var(--tlg-font-display);
  font-size: 28px; font-weight: 700; margin-bottom: 8px;
}
.step-number.teal { color: var(--primary); }
.step-number.purple { color: var(--secondary); }
.step-card h4 {
  font-family: var(--tlg-font-display);
  font-weight: 700; font-size: 15px; margin: 0 0 6px;
}
.step-card p { margin: 0; font-size: 14px; color: var(--muted); line-height: 1.5; }

/* ---- Audience cards (who it's for) ---- */
.audience-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow);
}
.audience-card h4 {
  font-family: var(--tlg-font-display);
  font-weight: 700; font-size: 15px; margin: 0 0 6px;
}
.audience-card p { margin: 0; font-size: 14px; color: var(--muted); line-height: 1.5; }

/* ---- Edition / tier cards ---- */
.edition-grid {
  display: grid; grid-template-columns: 1fr 2fr 2fr; gap: 20px;
}
@media (max-width: 768px) { .edition-grid { grid-template-columns: 1fr; } }
.edition-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow);
}
.edition-card.highlight-teal {
  border: 2px solid var(--primary);
  background-image: linear-gradient(135deg, var(--primary-soft) 0%, transparent 50%);
}
.edition-card.highlight-purple {
  border: 1px solid var(--secondary);
  background-image: linear-gradient(135deg, var(--secondary-soft) 0%, transparent 50%);
}
.edition-card h3 {
  font-family: var(--tlg-font-display);
  font-weight: 700; font-size: 17px; margin: 0 0 4px;
}
.edition-card .edition-sub {
  font-size: 13px; color: var(--muted); margin: 0 0 14px;
}
.edition-list { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 5px; }
.edition-list li {
  font-size: 13px; color: var(--muted); padding-left: 18px; position: relative;
}
.edition-list li::before {
  content: "\2022"; position: absolute; left: 4px; top: 0;
  font-size: 14px; color: var(--muted);
}

/* Legacy tier grid (kept for any pages still using it) */
.tier-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
}
@media (max-width: 640px) {
  .tier-grid { grid-template-columns: 1fr; }
}
.tier-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow);
}
.tier-card.highlight {
  border-color: var(--primary);
  background-image: linear-gradient(135deg, var(--primary-soft) 0%, transparent 50%);
}
.tier-card h3 {
  font-family: var(--tlg-font-display);
  font-weight: 600; font-size: 18px; margin: 0 0 6px;
}
.tier-card .tier-price {
  font-size: 14px; color: var(--muted); margin: 0 0 16px;
}
.tier-list { list-style: none; padding: 0; margin: 0 0 20px; display: grid; gap: 6px; }
.tier-list li {
  font-size: 13px; color: var(--text); padding-left: 20px; position: relative;
}
.tier-list li::before {
  content: ""; position: absolute; left: 0; top: 6px;
  width: 8px; height: 8px; border-radius: 50%;
}
.tier-list.included li::before { background: var(--success); }
.tier-list.limited li::before { background: var(--muted); }
.tier-learn-more {
  display: block; text-align: center; margin-top: 10px;
  font-size: 12px; color: var(--muted); text-decoration: none;
}
.tier-learn-more:hover { color: var(--primary); text-decoration: underline; }

/* ---- Evidence sources ---- */
.sources-row {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 14px;
}
.source-badge {
  padding: 10px 18px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface);
  font-size: 13px; font-weight: 600; color: var(--muted);
  box-shadow: var(--shadow);
}

/* ---- Code blocks (EvidenceHub) ---- */
.code-block {
  background: #1E293B; border-radius: 10px; padding: 14px 16px;
  font-family: var(--tlg-font-mono); font-size: 13px;
  color: #94A3B8; line-height: 1.6; overflow-x: auto;
}
:root[data-theme="dark"] .code-block {
  background: #0D1525; border: 1px solid var(--border);
}
.code-block .method { color: var(--secondary); font-weight: 600; }
.code-block .path { color: #E2E8F0; }

/* ---- Integration cards (EvidenceHub) ---- */
.integration-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow);
}
.integration-card h3 {
  font-family: var(--tlg-font-display);
  font-weight: 700; font-size: 18px; margin: 0 0 4px;
}
.integration-card .integration-sub {
  font-size: 13px; font-weight: 600; margin: 0 0 12px;
}
.integration-card .integration-sub.teal { color: var(--primary); }
.integration-card .integration-sub.purple { color: var(--secondary); }
.integration-card p { margin: 0 0 14px; font-size: 14px; color: var(--muted); line-height: 1.6; }

/* ---- CTA banner ---- */
.cta-banner {
  max-width: 1040px; margin: 0 auto 64px; padding: 0 24px;
}
.cta-banner-inner {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 48px 32px; box-shadow: var(--shadow);
  text-align: center;
}
.cta-banner-inner h2 {
  font-family: var(--tlg-font-display);
  font-size: clamp(20px, 3vw, 28px); margin: 0 0 10px; font-weight: 600;
}
.cta-banner-inner p {
  font-size: 15px; color: var(--muted); max-width: 480px; margin: 0 auto 24px;
}
.cta-banner-inner .hero-cta-row { justify-content: center; }

/* ---- Contact form ---- */
.contact-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 40px; box-shadow: var(--shadow);
  max-width: 600px; margin: 0 auto;
}
.contact-card h2 { margin-top: 0; }
.contact-card .contact-lede {
  color: var(--muted); font-size: 15px; margin: 0 0 24px;
}
.field { margin-bottom: 16px; }
.field label {
  display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px;
}
.field input, .field textarea {
  width: 100%; padding: 10px 14px;
  border: 1px solid var(--border); border-radius: 12px;
  background: var(--bg); color: var(--text);
  font-size: 14px; font-family: inherit; outline: none;
  transition: border-color 0.15s;
}
.field input:focus, .field textarea:focus { border-color: var(--primary); }
.field textarea { resize: vertical; min-height: 90px; line-height: 1.5; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 500px) { .row { grid-template-columns: 1fr; } }
.submit-btn {
  width: 100%; padding: 12px; border: none; border-radius: 12px;
  background: var(--primary); color: #06262B;
  font-family: var(--tlg-font-sans); font-weight: 700; font-size: 14px;
  cursor: pointer; transition: opacity 0.15s, transform 0.1s;
}
.submit-btn:hover { transform: translateY(-1px); opacity: 0.95; }
.submit-btn:disabled { background: var(--border); color: var(--muted); cursor: not-allowed; transform: none; }
.form-msg {
  margin-top: 14px; padding: 12px 16px; border-radius: 12px;
  font-size: 13px; line-height: 1.5; display: none;
}
.form-msg.ok {
  display: block; background: rgba(119,211,154,0.15); color: var(--success);
  border: 1px solid rgba(119,211,154,0.3);
}
.form-msg.err {
  display: block; background: rgba(255,125,134,0.1); color: var(--danger);
  border: 1px solid rgba(255,125,134,0.25);
}
.char-count { text-align: right; font-size: 12px; color: var(--muted); margin-top: 4px; }
.contact-fallback {
  text-align: center; margin-top: 16px; font-size: 13px; color: var(--muted);
}

/* ---- Services card ---- */
.services-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow);
  max-width: 760px;
}
.services-card p { margin: 0 0 14px; font-size: 15px; }
.services-card p:last-of-type { margin-bottom: 20px; }

/* ---- Mobile hamburger ---- */
.hamburger {
  display: none; appearance: none; background: transparent;
  border: 1px solid var(--border); color: var(--muted);
  width: 36px; height: 36px; border-radius: 10px;
  cursor: pointer; place-items: center;
  transition: color 0.15s, border-color 0.15s;
}
.hamburger:hover { color: var(--text); border-color: var(--primary); }
.nav-links { display: flex; align-items: center; gap: 4px; }

@media (max-width: 768px) {
  .hamburger { display: grid; }
  .topbar-inner { position: relative; }
  .nav-links {
    display: none; position: absolute;
    top: calc(100% + 6px); left: 0; right: 0;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 0 0 14px 14px; box-shadow: var(--shadow);
    padding: 8px 12px; flex-direction: column; gap: 0;
  }
  .nav-links.open { display: flex; }
  .nav-links .nav-link { display: block; width: 100%; padding: 12px; }
  .btn-login { font-size: 13px; padding: 8px 12px; }
}

/* ---- Footer ---- */
.site-footer {
  max-width: 1040px; margin: 40px auto 40px; padding: 24px;
  text-align: center; color: var(--muted); font-size: 13px;
  border-top: 1px solid var(--border);
}
.footer-links {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 8px 20px; margin-bottom: 12px;
}
.footer-links a { color: var(--muted); font-size: 13px; }
.footer-links a:hover { color: var(--primary); }
