/* =========================================================
   IDeA Lab (Dunn Lab) — Shared Styles
   Clean, minimal, consistent design system (no frameworks)
   ========================================================= */

/* -----------------------------
   CSS Variables / Design Tokens
   ----------------------------- */
:root {
  /* Colors */
  --color-bg: #ffffff;
  --color-surface: #f6f7f9;
  --color-surface-strong: #eef1f5;
  --color-text: #111318;
  --color-text-muted: #5b6472;
  --color-border: #e2e6ec;

  --color-primary: #0b5cff;
  --color-primary-strong: #0947c9;
  --color-focus: #7aa2ff;

  --color-accent: #1f3a6b;

  /* Typography */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

  --fs-100: 0.875rem;
  --fs-200: 1rem;
  --fs-300: 1.125rem;
  --fs-400: 1.25rem;
  --fs-500: 1.5rem;
  --fs-600: 1.875rem;
  --fs-700: 2.25rem;
  --fs-800: 3rem;

  --lh-tight: 1.2;
  --lh-normal: 1.5;
  --lh-loose: 1.7;

  /* Layout */
  --container-max: 960px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;

  --shadow-sm: 0 2px 8px rgba(17, 19, 24, 0.04);
  --shadow-md: 0 8px 24px rgba(17, 19, 24, 0.08);

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-7: 2rem;
  --space-8: 3rem;
  --space-9: 4rem;
  --space-10: 6rem;
}

/* -----------------------------
   Base / Reset
   ----------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: var(--lh-normal);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

figure {
  margin: 0;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 2px;
}

/* -----------------------------
   Skip Link
   ----------------------------- */
.skip-link {
  position: absolute;
  top: -40px;
  left: var(--space-4);
  z-index: 2000;
  background: var(--color-text);
  color: #fff;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
}

.skip-link:focus {
  top: var(--space-4);
}

/* -----------------------------
   Layout Helpers
   ----------------------------- */
.container {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: 20px;
}

.section {
  padding-block: var(--space-8);
}

.section--compact {
  padding-block: var(--space-5);
}

.section--hero {
  padding-block: var(--space-10);
}

.section--muted {
  background: var(--color-surface);
}

.section-heading {
  margin-bottom: var(--space-6);
}

.section-heading--center {
  text-align: center;
}

.section-heading--with-action {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: var(--space-4);
}

.section-heading--sticky {
  position: sticky;
  top: 90px;
  align-self: start;
}

.section-intro {
  max-width: 60ch;
  margin-bottom: var(--space-6);
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

/* -----------------------------
   Typography
   ----------------------------- */
.eyebrow {
  margin-bottom: var(--space-2);
  font-size: var(--fs-100);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

h1,
h2,
h3 {
  margin: 0 0 var(--space-3);
  line-height: var(--lh-tight);
}

h1 {
  font-size: clamp(var(--fs-700), 4vw, var(--fs-800));
}

h2 {
  font-size: clamp(var(--fs-600), 3vw, var(--fs-700));
}

h3 {
  font-size: var(--fs-400);
}

p {
  margin: 0 0 var(--space-4);
  color: var(--color-text-muted);
}

strong {
  color: var(--color-text);
  font-weight: 600;
}

.prose p {
  max-width: 60ch;
}

.prose--large p {
  font-size: var(--fs-300);
}

.prose ul {
  padding-left: 1.1rem;
  margin-bottom: var(--space-5);
  list-style: disc;
  color: var(--color-text-muted);
}

.prose li {
  margin-bottom: var(--space-2);
}

.text-link {
  color: var(--color-primary);
  font-weight: 600;
}

.text-link:hover {
  text-decoration: underline;
}

/* -----------------------------
   Header / Navigation
   ----------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
}

.header-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
}

.site-logo__mark {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  background: var(--color-primary);
  border-radius: 12px;
}

.site-logo__text strong {
  display: block;
  color: var(--color-text);
}

.site-logo__text span {
  font-size: var(--fs-100);
  color: var(--color-text-muted);
}

.site-nav ul {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.site-nav a {
  font-size: 0.95rem;
  color: var(--color-text-muted);
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--color-text);
}

/* -----------------------------
   Hero
   ----------------------------- */
.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  justify-items: center;
  text-align: center;
  gap: var(--space-7);
}

.hero-content {
  max-width: 700px;
}

.hero-lede {
  max-width: 50ch;
  margin-inline: auto;
  font-size: var(--fs-300);
}

.hero-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-top: var(--space-5);
}

.hero-media {
  width: 100%;
  max-width: 700px;
}

.hero-media img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius-lg);
}

.hero-media figcaption {
  margin-top: var(--space-2);
  font-size: var(--fs-100);
  color: var(--color-text-muted);
}

.credibility-line {
  margin-top: var(--space-5);
  font-size: var(--fs-100);
  color: var(--color-text-muted);
}

/* -----------------------------
   Buttons
   ----------------------------- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.1rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 600;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button--primary {
  color: #fff;
  background: var(--color-primary);
}

.button--primary:hover {
  background: var(--color-primary-strong);
}

.button--secondary {
  color: var(--color-text);
  border-color: var(--color-border);
  background: #fff;
}

.button--secondary:hover {
  background: var(--color-surface-strong);
}

.button-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin: 1.5rem 0;
}

/* -----------------------------
   Cards
   ----------------------------- */
.card-grid {
  display: grid;
  gap: var(--space-5);
}

.card-grid--three {
  grid-template-columns: repeat(3, 1fr);
  align-items: stretch;
}

.card {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card--link:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}


.card__media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--color-surface-strong);
}

.card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

.card__media--portrait {
  aspect-ratio: 1 / 1;
}

.card__body {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  padding: var(--space-5);
}

.card__body p:last-child {
  margin-bottom: 0;
}

.card__kicker {
  margin-bottom: var(--space-2);
  font-size: var(--fs-100);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.card__cta {
  display: inline-block;
  margin-top: auto;
  font-size: var(--fs-100);
  font-weight: 600;
  color: var(--color-primary);
}

/* Optional: add this class to video cards only if desired */
.card--video .card__media::after {
  content: "▶";
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: #fff;
  font-size: 0.75rem;
  background: rgba(17, 19, 24, 0.72);
  border-radius: 999px;
}

/* -----------------------------
   Feature Cards / Themes
   ----------------------------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-6);
}

.feature-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: var(--space-5);
  background: #fff;
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--color-primary);
  border-radius: var(--radius-md);
}

.feature-card__number {
  margin-bottom: var(--space-3);
  font-family: var(--font-mono);
  font-size: var(--fs-100);
  color: var(--color-text-muted);
}

/* -----------------------------
   Split Layout
   ----------------------------- */
.split-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: var(--space-8);
}

.split-layout--reverse {
  grid-template-columns: 1.1fr 0.9fr;
}

/* -----------------------------
   Tools
   ----------------------------- */
.tool-list {
  display: grid;
  gap: var(--space-6);
}

.tool-card {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tool-card__image {
  height: 180px; /* controls size */
  overflow: hidden;
}

.tool-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tool-card__content {
  padding: var(--space-5);
}

.tool-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

/* -----------------------------
   CTA Panel
   ----------------------------- */
.cta-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  padding: var(--space-7);
  color: #fff;
  background: var(--color-accent);
  border-radius: var(--radius-lg);
}

.cta-panel h2,
.cta-panel p,
.cta-panel a {
  color: #fff;
}

.cta-panel .eyebrow {
  color: rgba(255, 255, 255, 0.72);
}

.cta-panel__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.cta-panel .button--secondary {
  color: #fff;
  background: transparent;
  border-color: rgba(255, 255, 255, 0.35);
}

.cta-panel .button--secondary:hover {
  background: rgba(255, 255, 255, 0.12);
}

/* -----------------------------
   Media Logos
   ----------------------------- */
.media-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-7);
  margin-top: var(--space-4);
}

.media-logos a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  transition: transform 0.2s ease;
}

.media-logos a:hover {
  transform: translateY(-2px);
}

.media-logos img {
  max-height: 48px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
  opacity: 0.72;
  filter: grayscale(100%);
  transition: opacity 0.2s ease, filter 0.2s ease;
}

.media-logos a:hover img {
  opacity: 1;
  filter: grayscale(0%);
}

/* -----------------------------
   Footer
   ----------------------------- */
.site-footer {
  padding-block: var(--space-8);
  border-top: 1px solid var(--color-border);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: var(--space-6);
}

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.footer-nav a,
.footer-contact a {
  color: var(--color-text-muted);
}

.footer-nav a:hover,
.footer-contact a:hover {
  color: var(--color-text);
}

.footer-contact a {
  display: block;
  margin-top: var(--space-2);
}

/* -----------------------------
   Responsive
   ----------------------------- */
@media (max-width: 1024px) {
  .card-grid--three {
    grid-template-columns: repeat(2, 1fr);
  }

  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-grid,
  .split-layout,
  .split-layout--reverse {
    grid-template-columns: 1fr;
  }

  .section-heading--sticky {
    position: static;
  }

  .tool-card {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .header-inner {
    align-items: flex-start;
    flex-direction: column;
    padding-block: var(--space-4);
  }

  .site-nav ul {
    gap: var(--space-3);
  }

  .section {
    padding-block: var(--space-7);
  }

  .section--hero {
    padding-block: var(--space-8);
  }

  .card-grid--three,
  .feature-grid {
    grid-template-columns: 1fr;
  }

  .section-heading--with-action,
  .cta-panel {
    align-items: flex-start;
    flex-direction: column;
  }

  .media-logos {
    gap: var(--space-5);
  }

  .media-logos img {
    max-height: 38px;
    max-width: 140px;
  }
}

.card__body ul {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--color-text-muted);
  list-style: disc;
}

.card__body li {
  margin-bottom: var(--space-2);
}

.prose h3 {
  margin-top: var(--space-6);
}

.tool-image--ai {
  object-position: bottom;
}

.hero-media a {
  display: block;
}