:root {
  --red: #e74c3c;
  --red-dark: #dc2d1b;
  --navy: #22374c;
  --navy-deep: #1a2c3e;
  --ink: #1d2530;
  --muted: #5b6675;
  --line: #e6e9ee;
  --bg: #ffffff;
  --bg-soft: #f6f8fa;
  --radius: 14px;
  --maxw: 1120px;
  --shadow: 0 1px 2px rgba(16,24,40,.04), 0 8px 24px rgba(16,24,40,.06);
  --shadow-hover: 0 2px 6px rgba(16,24,40,.08), 0 16px 40px rgba(16,24,40,.12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
main { display: block; }
img, video { max-width: 100%; display: block; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 2rem;
  padding: .9rem clamp(1rem, 4vw, 2.5rem);
  background: rgba(255,255,255,.86);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header__brand { display: flex; align-items: center; gap: .6rem; }
.site-header__release {
  font-size: .72rem; font-weight: 700; letter-spacing: .04em;
  color: #fff; background: var(--red); padding: .15rem .5rem; border-radius: 999px;
}
.site-header__nav { display: flex; gap: 1.25rem; flex-wrap: wrap; margin-left: auto; }
.site-header__nav a { font-size: .86rem; font-weight: 500; color: var(--muted); }
.site-header__nav a:hover { color: var(--red); }

/* Hero */
.hero {
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-deep) 100%);
  color: #fff;
  padding: clamp(3rem, 9vw, 6.5rem) clamp(1rem, 4vw, 2.5rem);
}
.hero__inner { max-width: var(--maxw); margin: 0 auto; }
.hero__eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: clamp(1rem, 2vw, 1.35rem); font-weight: 700; color: var(--red); margin: 0 0 1rem; }
.hero__title { font-size: clamp(2.4rem, 6vw, 4rem); line-height: 1.05; margin: 0 0 1rem; font-weight: 800; letter-spacing: -.02em; }
.hero__lead { font-size: clamp(1.05rem, 2.2vw, 1.35rem); max-width: 60ch; color: #cdd6e0; margin: 0; }
.hero__intro { margin-top: 1.5rem; max-width: 70ch; color: #aeb9c6; }

/* Theme blocks */
.theme-block { max-width: var(--maxw); margin: 0 auto; padding: clamp(2.5rem, 6vw, 4.5rem) clamp(1rem, 4vw, 2.5rem) 0; }
.theme-block:last-of-type { padding-bottom: 4rem; }
.theme-block__head { margin-bottom: 1.8rem; }
.theme-block__title { font-size: clamp(1.6rem, 3.4vw, 2.1rem); margin: 0 0 .35rem; letter-spacing: -.01em; }
.theme-block__title::before { content: ""; display: inline-block; width: 34px; height: 4px; border-radius: 4px; background: var(--red); margin-right: .7rem; vertical-align: middle; }
.theme-block__tagline { color: var(--muted); margin: 0; max-width: 70ch; }

/* Card grid */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 1.1rem; }
.card {
  display: flex; flex-direction: column; justify-content: space-between;
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.4rem 1.4rem 1.1rem; box-shadow: var(--shadow);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); border-color: #d7dce3; }
.card__title { font-size: 1.12rem; margin: 0 0 .5rem; letter-spacing: -.01em; }
.card__valueprop { color: var(--muted); font-size: .92rem; margin: 0 0 1.1rem; }
.card__meta { display: flex; flex-wrap: wrap; gap: .4rem; }

.tag {
  font-size: .7rem; font-weight: 600; letter-spacing: .02em;
  color: var(--navy); background: var(--bg-soft); border: 1px solid var(--line);
  padding: .2rem .55rem; border-radius: 999px;
}
.tag--agentic-case-platform {
  color: #fff;
  background: #5f29cc;
  border-color: #5f29cc;
}
.tag--agentic-case-platform.tag--addon {
  color: #5f29cc;
  background: rgba(95, 41, 204, .08);
  border-color: rgba(95, 41, 204, .35);
}

/* Theme hero (taxonomy page) */
.theme-hero { background: var(--bg-soft); border-bottom: 1px solid var(--line); padding: clamp(2.5rem, 6vw, 4rem) clamp(1rem, 4vw, 2.5rem); }
.theme-hero__back, .feature__back, .feature__theme { font-size: .85rem; font-weight: 600; color: var(--red); }
.theme-hero__title { font-size: clamp(1.8rem, 4vw, 2.6rem); margin: .6rem 0 .4rem; }
.theme-hero__tagline { color: var(--muted); max-width: 70ch; margin: 0; }
.page-theme .card-grid { max-width: var(--maxw); margin: 2.5rem auto; padding: 0 clamp(1rem, 4vw, 2.5rem); }

/* Feature page */
.feature { max-width: 760px; margin: 0 auto; padding: clamp(2rem, 5vw, 3.5rem) clamp(1rem, 4vw, 1.5rem) 4rem; }
.feature__header { border-bottom: 1px solid var(--line); padding-bottom: 1.6rem; margin-bottom: 2rem; }
.feature__theme { display: inline-block; margin-bottom: .8rem; }
.feature__title { font-size: clamp(2rem, 5vw, 2.8rem); line-height: 1.1; margin: 0 0 .8rem; letter-spacing: -.02em; }
.feature__valueprop { font-size: 1.2rem; color: var(--navy); margin: 0 0 1.2rem; }
.feature__tags { display: flex; gap: .4rem; flex-wrap: wrap; }
.feature__body { font-size: 1.02rem; }
.feature__body h2 { font-size: 1.4rem; margin: 2.4rem 0 .8rem; letter-spacing: -.01em; }
.feature__body h2::before { content: ""; display: inline-block; width: 22px; height: 3px; border-radius: 3px; background: var(--red); margin-right: .55rem; vertical-align: middle; }
.feature__body ul { padding-left: 1.2rem; }
.feature__body li { margin: .35rem 0; }
.feature__body code { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 5px; padding: .1rem .35rem; font-size: .88em; }
.feature__body a { color: var(--red); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
.feature__body a:hover { color: var(--red-dark); }
.feature__back { display: inline-block; margin-top: 3rem; }

/* Inline media */
.media { margin: 2rem 0; }
.media img, .media video { max-width: 100%; max-height: 78vh; height: auto; border-radius: 10px; border: 1px solid var(--line); box-shadow: var(--shadow); display: block; margin: 0 auto; }
.media--left, .media--right { max-width: 360px; }
.media--left { float: left; margin: .4rem 1.6rem 1rem 0; }
.media--right { float: right; margin: .4rem 0 1rem 1.6rem; }
.media figcaption { font-size: .82rem; color: var(--muted); margin-top: .55rem; text-align: center; }
.media__placeholder {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5rem;
  min-height: 220px; border: 2px dashed #cdd5de; border-radius: 10px; background: var(--bg-soft); color: var(--muted);
  padding: 1.5rem; text-align: center;
}
.media__placeholder-icon { font-size: 1.8rem; opacity: .55; }
.media__placeholder-label { font-weight: 600; }
.media__placeholder-src { font-size: .76rem; background: #fff; }

/* Lightbox */
.media img.is-zoomable, .media video.is-zoomable { cursor: zoom-in; }
.lightbox {
  display: none;
  position: fixed; inset: 0; z-index: 100;
  background: rgba(16, 24, 40, .82);
  backdrop-filter: blur(4px);
  align-items: center; justify-content: center;
  padding: clamp(1rem, 4vw, 3rem);
}
.lightbox.is-open { display: flex; }
.lightbox__img, .lightbox__video {
  max-width: 100%; max-height: 100%;
  border-radius: 10px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .45);
  cursor: default;
}
.lightbox__video { display: none; }
.lightbox__close {
  position: absolute; top: 1rem; right: 1.2rem;
  width: 44px; height: 44px;
  border: none; border-radius: 50%;
  background: rgba(255, 255, 255, .12); color: #fff;
  font-size: 1.8rem; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s ease;
}
.lightbox__close:hover { background: rgba(255, 255, 255, .25); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 2.5rem clamp(1rem, 4vw, 2.5rem); color: var(--muted); font-size: .85rem; }
.site-footer p { margin: .2rem 0; max-width: var(--maxw); margin-inline: auto; }
.site-footer__note { font-size: .78rem; opacity: .8; }

@media (max-width: 640px) {
  .site-header__nav { display: none; }
  .media--left, .media--right { float: none; max-width: 100%; margin: 1.5rem 0; }
}

@media print {
  html, body { background: #fff; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .site-header { display: none; }
  .feature__back, .theme-hero__back { display: none; }
  .media img, .media video { max-height: none; break-inside: avoid; }
  .card { break-inside: avoid; }
}
