/* ============================================================
   DNA Digital Marketing — Glossary Landing Page Template
   Concept: bold agency energy (matches dnadigitalmarketing.com)
   Display: Clash Display  |  Body: Satoshi
   ============================================================ */

:root {
  /* Type scale */
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.2rem + 2.5vw, 3.25rem);
  --text-3xl: clamp(2.5rem, 1rem + 4vw, 4.5rem);

  /* Spacing (4px base) */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  --radius-sm: 0.375rem;
  --radius-md: 0.625rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --radius-full: 9999px;

  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);

  --content-narrow: 640px;
  --content-default: 900px;
  --content-wide: 1180px;

  --font-display: 'Clash Display', 'General Sans', sans-serif;
  --font-body: 'Satoshi', 'Inter', sans-serif;
}

/* ---------- LIGHT MODE (default) ---------- */
:root,
[data-theme='light'] {
  --color-bg: #f6f8f9;
  --color-surface: #ffffff;
  --color-surface-2: #fbfcfd;
  --color-surface-offset: #eef2f4;
  --color-surface-offset-2: #e3e9ec;
  --color-divider: #e1e7ea;
  --color-border: #d2dade;

  --color-text: #16212c;
  --color-text-muted: #55636f;
  --color-text-faint: #97a3ac;
  --color-text-inverse: #f6f8f9;

  /* Primary accent — teal, matches the accent stripe on dnadigitalmarketing.com */
  --color-primary: #0f8f88;
  --color-primary-hover: #0b6e69;
  --color-primary-active: #095752;
  --color-primary-highlight: #d3ece9;

  /* Navy — sampled directly from the DNA Digital Marketing logo artwork */
  --color-navy: #0f2050;
  --color-navy-deep: #050f2e;
  --color-navy-glow: #1f5fd6;
  --color-navy-text: #eef3f7;

  /* DNA red — brand mark accent, used sparingly */
  --color-red: #c53a2f;
  --color-red-highlight: #f3ddd9;

  --shadow-sm: 0 1px 2px oklch(0.2 0.02 240 / 0.06);
  --shadow-md: 0 6px 16px oklch(0.2 0.02 240 / 0.08);
  --shadow-lg: 0 16px 40px oklch(0.2 0.02 240 / 0.14);
}

/* ---------- DARK MODE ---------- */
[data-theme='dark'] {
  --color-bg: #101820;
  --color-surface: #151e28;
  --color-surface-2: #1a2430;
  --color-surface-offset: #1e2935;
  --color-surface-offset-2: #26323f;
  --color-divider: #263140;
  --color-border: #33404f;

  --color-text: #e6ecf0;
  --color-text-muted: #9aa8b3;
  --color-text-faint: #647380;
  --color-text-inverse: #101820;

  --color-primary: #3fc9bf;
  --color-primary-hover: #63d5cc;
  --color-primary-active: #85ded6;
  --color-primary-highlight: #1d3936;

  --color-navy: #17306a;
  --color-navy-deep: #081638;
  --color-navy-glow: #3f7fe6;
  --color-navy-text: #eef3f7;

  --color-red: #e2695e;
  --color-red-highlight: #3a2622;

  --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.3);
  --shadow-md: 0 6px 16px oklch(0 0 0 / 0.35);
  --shadow-lg: 0 16px 40px oklch(0 0 0 / 0.5);
}

/* ============================================================
   LAYOUT PRIMITIVES
   ============================================================ */

.wrap {
  max-width: var(--content-wide);
  margin-inline: auto;
  padding-inline: var(--space-6);
}

section {
  padding-block: clamp(var(--space-10), 5vw, var(--space-16));
}

.related-section,
.cta-section {
  padding-top: 0;
}

/* ============================================================
   HEADER
   ============================================================ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in oklab, var(--color-navy) 96%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid color-mix(in oklab, white 12%, transparent);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  min-height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--color-navy-text);
  text-decoration: none;
}

.brand svg {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
}

.brand-logo-img {
  height: 42px;
  width: auto;
  display: block;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
}

.footer-logo-img {
  height: 30px;
  width: auto;
  display: block;
}

.footer-logo-dark {
  display: none;
}

[data-theme='dark'] .footer-logo-light {
  display: none;
}

[data-theme='dark'] .footer-logo-dark {
  display: block;
}

.brand-word {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-base);
  letter-spacing: 0.01em;
  line-height: 1.1;
}

.brand-word span {
  display: block;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: var(--text-xs);
  color: color-mix(in oklab, var(--color-navy-text) 70%, transparent);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: var(--space-8);
}

.main-nav a {
  color: color-mix(in oklab, var(--color-navy-text) 85%, transparent);
  text-decoration: none;
  font-size: var(--text-sm);
  font-weight: 500;
}

.main-nav a:hover {
  color: var(--color-navy-text);
}

.main-nav a.is-active {
  color: #ffffff;
  position: relative;
}

.main-nav a.is-active::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -20px;
  height: 2px;
  background: var(--color-primary);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  color: var(--color-navy-text);
  background: color-mix(in oklab, white 8%, transparent);
}

.theme-toggle:hover {
  background: color-mix(in oklab, white 16%, transparent);
}

.btn-nav-cta {
  display: none;
}

@media (min-width: 860px) {
  .btn-nav-cta {
    display: inline-flex;
  }
}

/* ============================================================
   BUTTONS
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 600;
  padding: 0.7rem 1.3rem;
  border-radius: var(--radius-full);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--color-primary);
  color: #ffffff;
}
.btn-primary:hover {
  background: var(--color-primary-hover);
}

.btn-ghost-light {
  background: color-mix(in oklab, white 10%, transparent);
  color: var(--color-navy-text);
  border: 1px solid color-mix(in oklab, white 18%, transparent);
}
.btn-ghost-light:hover {
  background: color-mix(in oklab, white 18%, transparent);
}

.btn-outline {
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-border);
}
.btn-outline:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

/* ============================================================
   BREADCRUMB
   ============================================================ */

.breadcrumb {
  padding-top: var(--space-8);
  padding-bottom: 0;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.breadcrumb a {
  color: var(--color-text-muted);
  text-decoration: none;
}
.breadcrumb a:hover {
  color: var(--color-primary);
}

.breadcrumb .sep {
  margin: 0 var(--space-2);
  color: var(--color-text-faint);
}

.breadcrumb .current {
  color: var(--color-text);
  font-weight: 500;
}

/* ============================================================
   HERO — two column (term + proposal preview card)
   ============================================================ */

.hero {
  padding-top: var(--space-8);
  padding-bottom: clamp(var(--space-10), 6vw, var(--space-16));
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-12);
  align-items: start;
}

@media (min-width: 900px) {
  .hero-grid {
    grid-template-columns: 1.15fr 0.85fr;
  }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-primary);
  background: var(--color-primary-highlight);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  margin-bottom: var(--space-5);
}

.hero h1 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--color-text);
  margin-bottom: var(--space-4);
}

.hero .term-alias {
  color: var(--color-text-faint);
  font-weight: 400;
}

.hero-subtitle {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  max-width: 46ch;
  margin-bottom: var(--space-8);
}

.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
}

/* Proposal preview card */
.proposal-card {
  background: var(--color-navy);
  color: var(--color-navy-text);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.proposal-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    140deg,
    color-mix(in oklab, var(--color-navy-glow) 45%, transparent),
    transparent 55%
  );
  pointer-events: none;
}

.proposal-card-label {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: color-mix(in oklab, var(--color-navy-text) 65%, transparent);
  margin-bottom: var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.proposal-card-label svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.proposal-doc {
  background: color-mix(in oklab, white 6%, transparent);
  border: 1px solid color-mix(in oklab, white 12%, transparent);
  border-radius: var(--radius-md);
  padding: var(--space-5);
  font-size: var(--text-sm);
  line-height: 1.75;
  color: color-mix(in oklab, var(--color-navy-text) 92%, transparent);
  position: relative;
}

.proposal-doc .doc-heading {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: color-mix(in oklab, var(--color-navy-text) 55%, transparent);
  margin-bottom: var(--space-3);
}

.proposal-doc .term-link {
  color: #6be0d6;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: color-mix(in oklab, #6be0d6 50%, transparent);
  text-underline-offset: 3px;
  cursor: default;
}

/* ---------- Scroll cue ---------- */
.scroll-cue {
  display: flex;
  width: fit-content;
  align-items: center;
  gap: var(--space-2);
  margin: var(--space-10) auto 0;
  padding: 0;
  background: none;
  border: none;
  font-family: inherit;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-faint);
  cursor: pointer;
  transition: opacity 0.25s ease, color 0.2s ease;
}

.scroll-cue:hover {
  color: var(--color-primary);
}

.scroll-cue svg {
  width: 14px;
  height: 14px;
  animation: scrollCueBounce 1.8s ease-in-out infinite;
}

.scroll-cue.is-hidden {
  opacity: 0;
  pointer-events: none;
}

@keyframes scrollCueBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}

@media (prefers-reduced-motion: reduce) {
  .scroll-cue svg { animation: none; }
}

/* ============================================================
   DEFINITION SECTION
   ============================================================ */

.definition-section {
  padding-top: 0;
}

.section-heading {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 600;
  margin-bottom: var(--space-5);
  color: var(--color-text);
}

.definition-body {
  font-size: var(--text-lg);
  color: var(--color-text);
  max-width: 68ch;
}

.definition-body p + p {
  margin-top: var(--space-4);
}

.definition-body strong {
  color: var(--color-text);
}

/* Why it matters chips */
.why-matters {
  margin-top: var(--space-10);
  display: grid;
  gap: var(--space-4);
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.why-card {
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
}

.why-card .why-icon {
  width: 30px;
  height: 30px;
  color: var(--color-primary);
  margin-bottom: var(--space-3);
}

.why-card h3 {
  font-size: var(--text-base);
  font-weight: 600;
  margin-bottom: var(--space-2);
}

.why-card p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

/* ============================================================
   DNA'S TAKE — callout
   ============================================================ */

.take-section {
  padding-top: 0;
}

.take-card {
  background: var(--color-navy);
  color: var(--color-navy-text);
  border-radius: var(--radius-xl);
  padding: clamp(var(--space-8), 5vw, var(--space-12));
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-6);
  align-items: start;
}

@media (max-width: 640px) {
  .take-card {
    grid-template-columns: 1fr;
  }
}

.take-mark {
  width: 44px;
  height: 44px;
  color: var(--color-primary);
  flex-shrink: 0;
}

.take-card .eyebrow-light {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: color-mix(in oklab, var(--color-navy-text) 55%, transparent);
  margin-bottom: var(--space-3);
}

.take-card p {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--text-lg);
  line-height: 1.5;
  max-width: 58ch;
  color: var(--color-navy-text);
  margin-bottom: var(--space-6);
}

/* ============================================================
   GLOSSARY INDEX PAGE
   ============================================================ */

.index-hero {
  padding-bottom: var(--space-6);
}

.index-groups-section {
  padding-block: clamp(var(--space-6), 4vw, var(--space-10));
  display: flex;
  flex-direction: column;
  gap: var(--space-10);
}

.index-group-heading {
  margin-bottom: var(--space-4);
}

.index-card .related-tag {
  color: var(--color-primary);
}

/* ============================================================
   RELATED TERMS
   ============================================================ */

.related-grid {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.related-card {
  display: block;
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  text-decoration: none;
  color: var(--color-text);
}

.related-card:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.related-tag {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: var(--space-2);
  display: block;
}

.related-card h3 {
  font-size: var(--text-base);
  font-weight: 600;
  margin-bottom: var(--space-2);
}

.related-card p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.related-arrow {
  margin-top: var(--space-4);
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-primary);
}

/* ============================================================
   CTA BANNER
   ============================================================ */

.cta-banner {
  background: linear-gradient(120deg, var(--color-navy-deep), var(--color-navy));
  color: var(--color-navy-text);
  border-radius: var(--radius-xl);
  padding: clamp(var(--space-10), 6vw, var(--space-16));
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-6);
}

.cta-banner h2 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 600;
  max-width: 32ch;
}

.cta-banner p {
  color: color-mix(in oklab, var(--color-navy-text) 75%, transparent);
  max-width: 48ch;
}

/* ============================================================
   FOOTER
   ============================================================ */

.site-footer {
  border-top: 1px solid var(--color-divider);
  padding-block: var(--space-10);
}

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-6);
}

.footer-grid .brand {
  color: var(--color-text);
}

.footer-grid .brand-word span {
  color: var(--color-text-faint);
}

.footer-links {
  display: flex;
  gap: var(--space-6);
  flex-wrap: wrap;
}

.footer-links a {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-decoration: none;
}
.footer-links a:hover {
  color: var(--color-primary);
}

.footer-meta {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  margin-top: var(--space-6);
  text-align: center;
}

/* ============================================================
   MOTION
   ============================================================ */

.fade-up {
  opacity: 0;
  transform: translateY(14px);
  animation: fadeUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .fade-up {
    animation: none;
    opacity: 1;
    transform: none;
  }
}
