/* =========================================================
   Glen Trudeau — showcase site
   Tokens → base → layout → components → responsive → print
   ========================================================= */

:root {
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --wrap: 1140px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);

  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 20px;

  --ease: cubic-bezier(.22, .61, .36, 1);
  --dur: 240ms;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .18);
  --shadow-md: 0 12px 32px -12px rgba(0, 0, 0, .45);
  --shadow-lg: 0 32px 64px -24px rgba(0, 0, 0, .55);
}

/* ---------- dark (default) ---------- */
[data-theme="dark"] {
  --bg: #0a0e14;
  --bg-alt: #0d131b;
  --surface: #121a24;
  --surface-2: #16202c;
  --line: rgba(255, 255, 255, .09);
  --line-strong: rgba(255, 255, 255, .16);

  --text: #e8eef6;
  --text-2: #b6c3d3;
  --muted: #8494a8;

  --accent: #3fd9c0;
  --accent-ink: #04211d;
  --accent-soft: rgba(63, 217, 192, .12);
  --accent-2: #7ea6ff;
  --accent-3: #f2b544;

  --grid-line: rgba(255, 255, 255, .045);
  --glow: radial-gradient(1100px 520px at 12% -8%, rgba(63, 217, 192, .16), transparent 62%),
          radial-gradient(900px 460px at 88% 0%, rgba(126, 166, 255, .13), transparent 60%);
}

/* ---------- light ---------- */
[data-theme="light"] {
  --bg: #f6f8fb;
  --bg-alt: #eef2f7;
  --surface: #ffffff;
  --surface-2: #f9fbfd;
  --line: rgba(15, 30, 50, .11);
  --line-strong: rgba(15, 30, 50, .2);

  --text: #0e1620;
  --text-2: #33445a;
  --muted: #61728a;

  --accent: #0d9c8a;
  --accent-ink: #ffffff;
  --accent-soft: rgba(13, 156, 138, .1);
  --accent-2: #3762c8;
  --accent-3: #b5741a;

  --grid-line: rgba(15, 30, 50, .05);
  --glow: radial-gradient(1100px 520px at 12% -8%, rgba(13, 156, 138, .1), transparent 62%),
          radial-gradient(900px 460px at 88% 0%, rgba(55, 98, 200, .08), transparent 60%);

  --shadow-md: 0 12px 32px -16px rgba(15, 30, 50, .22);
  --shadow-lg: 0 30px 60px -30px rgba(15, 30, 50, .28);
}

/* ========================= BASE ========================= */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16.5px;
  line-height: 1.62;
  font-feature-settings: "cv02", "cv03", "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  margin: 0;
  line-height: 1.14;
  letter-spacing: -.022em;
  font-weight: 700;
  text-wrap: balance;
}

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

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

code {
  font-family: var(--font-mono);
  font-size: .86em;
  background: var(--accent-soft);
  color: var(--accent);
  padding: .12em .38em;
  border-radius: 5px;
}

em { font-style: normal; color: var(--accent); }

ul, ol { margin: 0; padding: 0; list-style: none; }

::selection { background: var(--accent); color: var(--accent-ink); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--accent);
  color: var(--accent-ink);
  padding: .7rem 1.1rem;
  border-radius: 0 0 var(--r-sm) 0;
  font-weight: 600;
}
.skip-link:focus { left: 0; }

.icon {
  width: 1.05em;
  height: 1.05em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

/* ========================= NAV ========================= */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.nav.is-stuck { border-bottom-color: var(--line); }

.nav__inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  height: 66px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  font-weight: 700;
  letter-spacing: -.01em;
  margin-right: auto;
}
.brand__mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: linear-gradient(140deg, var(--accent), var(--accent-2));
  color: var(--accent-ink);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .02em;
}
[data-theme="light"] .brand__mark { color: #fff; }

.nav__links {
  display: flex;
  gap: .35rem;
}
.nav__links a {
  position: relative;
  padding: .45rem .8rem;
  border-radius: 999px;
  font-size: .9rem;
  font-weight: 500;
  color: var(--muted);
  transition: color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.nav__links a:hover { color: var(--text); background: var(--surface); }
.nav__links a.is-active { color: var(--accent); background: var(--accent-soft); }

.nav__actions { display: flex; align-items: center; gap: .6rem; }

.theme-toggle {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text-2);
  cursor: pointer;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.theme-toggle:hover { color: var(--accent); border-color: var(--line-strong); transform: translateY(-1px); }
.theme-toggle .icon { width: 17px; height: 17px; }
[data-theme="dark"] .icon--sun { display: none; }
[data-theme="light"] .icon--moon { display: none; }

.nav__progress {
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 90ms linear;
}

/* ---------- mobile menu ---------- */

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 36px;
  height: 36px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  cursor: pointer;
}
.menu-toggle span {
  display: block;
  height: 1.8px;
  width: 100%;
  border-radius: 2px;
  background: var(--text);
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
}
.menu-toggle.is-open span:nth-child(1) { transform: translateY(5.8px) rotate(45deg); }
.menu-toggle.is-open span:nth-child(2) { opacity: 0; }
.menu-toggle.is-open span:nth-child(3) { transform: translateY(-5.8px) rotate(-45deg); }

.mobile-menu {
  display: grid;
  border-top: 1px solid var(--line);
  background: var(--bg-alt);
  padding: .5rem var(--gutter) 1rem;
}
.mobile-menu[hidden] { display: none; }
.mobile-menu a {
  padding: .8rem .2rem;
  border-bottom: 1px solid var(--line);
  font-size: .98rem;
  font-weight: 500;
  color: var(--text-2);
}
.mobile-menu a:last-child { border-bottom: 0; color: var(--accent); font-weight: 600; }

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  padding: .78rem 1.4rem;
  border: 1px solid transparent;
  border-radius: 11px;
  font-size: .95rem;
  font-weight: 600;
  letter-spacing: -.005em;
  cursor: pointer;
  white-space: nowrap;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
              background-color var(--dur) var(--ease), border-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 8px 24px -10px color-mix(in srgb, var(--accent) 70%, transparent);
}
.btn--primary:hover { box-shadow: 0 14px 34px -10px color-mix(in srgb, var(--accent) 75%, transparent); }

.btn--ghost {
  background: var(--surface);
  border-color: var(--line);
  color: var(--text);
}
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }

.btn--sm { padding: .5rem 1rem; font-size: .875rem; border-radius: 9px; }
.btn--lg { padding: .95rem 1.7rem; font-size: 1rem; }

/* ========================= HERO ========================= */

.hero {
  position: relative;
  padding: clamp(4.5rem, 12vw, 8.5rem) 0 clamp(3rem, 7vw, 5rem);
  overflow: hidden;
  isolation: isolate;
}
.hero::before {
  content: "";
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 130%;
  background: var(--glow);
  z-index: -2;
  pointer-events: none;
}
.hero__grid {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 62px 62px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 20%, #000 30%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 20%, #000 30%, transparent 78%);
  pointer-events: none;
}

.eyebrow {
  display: inline-block;
  margin: 0 0 1.35rem;
  padding: .38rem .85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-family: var(--font-mono);
  font-size: .74rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--accent);
}

.hero__title {
  max-width: 17ch;
  font-size: clamp(2.5rem, 6.6vw, 4.6rem);
  font-weight: 800;
  letter-spacing: -.035em;
  line-height: 1.03;
}
.hero__title em {
  background: linear-gradient(100deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__lede {
  max-width: 60ch;
  margin: 1.6rem 0 0;
  font-size: clamp(1.03rem, 1.7vw, 1.2rem);
  color: var(--text-2);
  line-height: 1.68;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: .8rem;
  margin-top: 2.3rem;
}

.hero__links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.4rem;
  margin-top: 2rem;
  font-size: .9rem;
  font-family: var(--font-mono);
  color: var(--muted);
}
.hero__links a {
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 2px;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.hero__links a:hover { color: var(--accent); border-color: var(--accent); }

/* ========================= STATS ========================= */

.stats {
  border-block: 1px solid var(--line);
  background: var(--bg-alt);
}
.stats__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}
.stat {
  padding: clamp(1.6rem, 3vw, 2.4rem) clamp(1rem, 2vw, 1.8rem);
  border-left: 1px solid var(--line);
}
.stat:first-child { border-left: 0; padding-left: 0; }

.stat__num {
  display: block;
  font-size: clamp(1.9rem, 3.6vw, 2.7rem);
  font-weight: 800;
  letter-spacing: -.04em;
  line-height: 1;
  background: linear-gradient(160deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-variant-numeric: tabular-nums;
}
.stat__unit {
  display: block;
  margin-top: .3rem;
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}
.stat__label {
  margin: .8rem 0 0;
  font-size: .88rem;
  line-height: 1.5;
  color: var(--text-2);
}
.stat__label strong { color: var(--text); font-weight: 600; }

/* ========================= SECTIONS ========================= */

.section { padding: clamp(4rem, 9vw, 7rem) 0; }
.section--alt { background: var(--bg-alt); border-block: 1px solid var(--line); }

.section__head { max-width: 66ch; margin-bottom: clamp(2.5rem, 5vw, 3.6rem); }

.section__kicker {
  margin: 0 0 .85rem;
  font-family: var(--font-mono);
  font-size: .74rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
}
.section__kicker::before {
  content: "";
  display: inline-block;
  width: 22px;
  height: 1px;
  margin-right: .65rem;
  vertical-align: middle;
  background: var(--accent);
}

.section__title {
  font-size: clamp(1.75rem, 3.7vw, 2.65rem);
  letter-spacing: -.03em;
}
.section__title--sm { font-size: clamp(1.4rem, 2.6vw, 1.85rem); }

.section__lede {
  margin-top: 1.1rem;
  font-size: 1.05rem;
  color: var(--text-2);
  line-height: 1.68;
}

/* ========================= PILLARS ========================= */

.pillars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  gap: 1.1rem;
}

.pillar {
  position: relative;
  padding: 1.7rem 1.6rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  transition: transform var(--dur) var(--ease), border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.pillar:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  box-shadow: var(--shadow-md);
}
.pillar__icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 1.05rem;
  border-radius: 11px;
  background: var(--accent-soft);
  color: var(--accent);
}
.pillar__icon svg {
  width: 20px; height: 20px;
  fill: none; stroke: currentColor;
  stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}
.pillar h3 {
  font-size: 1.08rem;
  margin-bottom: .6rem;
  letter-spacing: -.015em;
}
.pillar p {
  font-size: .93rem;
  line-height: 1.62;
  color: var(--text-2);
}

/* ========================= CASE STUDIES ========================= */

.cases { display: grid; gap: 1.1rem; }

.case {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(1.4rem, 3vw, 2rem);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.case:hover { border-color: var(--line-strong); box-shadow: var(--shadow-md); }
.case:has(details[open]) { border-color: color-mix(in srgb, var(--accent) 42%, var(--line)); }

.case__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 1.5rem;
  justify-content: space-between;
}
.case__ident { flex: 1 1 420px; min-width: 0; }

.case__tag {
  display: inline-block;
  margin-bottom: .7rem;
  padding: .26rem .7rem;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
}
.case__tag--ai {
  background: color-mix(in srgb, var(--accent-2) 12%, transparent);
  color: var(--accent-2);
  border-color: color-mix(in srgb, var(--accent-2) 28%, transparent);
}
.case__tag--build {
  background: color-mix(in srgb, var(--accent-3) 14%, transparent);
  color: var(--accent-3);
  border-color: color-mix(in srgb, var(--accent-3) 30%, transparent);
}

.case__client {
  font-size: clamp(1.14rem, 2.1vw, 1.42rem);
  letter-spacing: -.022em;
}
.case__role {
  margin: .45rem 0 0;
  font-size: .855rem;
  color: var(--muted);
  font-family: var(--font-mono);
}

.case__result {
  flex: 0 0 auto;
  width: 210px;
  max-width: 210px;
  padding: .9rem 1.1rem;
  border-radius: var(--r-md);
  background: linear-gradient(150deg, var(--accent-soft), transparent 85%);
  border: 1px solid color-mix(in srgb, var(--accent) 24%, transparent);
  text-align: right;
}
.case__result strong {
  display: block;
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: -.01em;
  line-height: 1.2;
  color: var(--accent);
}
.case__result span {
  display: block;
  margin-top: .35rem;
  font-size: .78rem;
  line-height: 1.4;
  color: var(--text-2);
}

.case__hook {
  margin: 1.25rem 0 0;
  max-width: 82ch;
  font-size: 1rem;
  line-height: 1.68;
  color: var(--text-2);
}

.case__more { margin-top: 1.15rem; }
.case__more summary {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .45rem .95rem .45rem 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  font-size: .85rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  list-style: none;
  transition: border-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.case__more summary::-webkit-details-marker { display: none; }
.case__more summary:hover { border-color: var(--accent); color: var(--accent); }
.chev {
  width: 7px; height: 7px;
  border-right: 1.8px solid currentColor;
  border-bottom: 1.8px solid currentColor;
  transform: rotate(45deg) translate(-1px, -1px);
  transition: transform var(--dur) var(--ease);
}
details[open] .chev { transform: rotate(-135deg) translate(-2px, -2px); }

.case__body {
  padding-top: 1.4rem;
  animation: fade-up 320ms var(--ease);
}

.bullets { display: grid; gap: .8rem; }
.bullets li {
  position: relative;
  padding-left: 1.5rem;
  font-size: .945rem;
  line-height: 1.65;
  color: var(--text-2);
}
.bullets li::before {
  content: "";
  position: absolute;
  left: .1rem;
  top: .62em;
  width: 6px;
  height: 6px;
  border-radius: 2px;
  background: var(--accent);
  transform: rotate(45deg);
}
.bullets li strong { color: var(--text); font-weight: 650; }

.mini-head {
  margin: 1.5rem 0 .85rem;
  font-family: var(--font-mono);
  font-size: .78rem;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 500;
}
.mini-head:first-child { margin-top: 0; }

.case__out {
  margin-top: 1.4rem;
  padding: 1.05rem 1.2rem;
  border-left: 2px solid var(--accent);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  background: var(--surface-2);
  font-size: .93rem;
  line-height: 1.62;
  color: var(--text-2);
}
.case__out strong { color: var(--text); }

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-top: 1.35rem;
}
.chips span {
  padding: .28rem .65rem;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--bg-alt);
  font-family: var(--font-mono);
  font-size: .73rem;
  color: var(--muted);
}

/* ---------- also delivered ---------- */

.also {
  margin-top: 2.6rem;
  padding-top: 2.3rem;
  border-top: 1px solid var(--line);
}
.also__title {
  margin-bottom: 1.4rem;
  font-family: var(--font-mono);
  font-size: .78rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}
.also__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(272px, 1fr));
  gap: 1.4rem 2rem;
}
.also__grid li {
  padding-left: .95rem;
  border-left: 2px solid var(--line-strong);
}
.also__grid strong {
  display: block;
  font-size: .95rem;
  margin-bottom: .28rem;
  letter-spacing: -.01em;
}
.also__grid span {
  display: block;
  font-size: .875rem;
  line-height: 1.55;
  color: var(--muted);
}

/* ========================= QUOTES ========================= */

.quotes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  gap: 1.1rem;
}
@media (max-width: 560px) {
  .quotes { grid-template-columns: 1fr; }
}
.quote {
  position: relative;
  margin: 0;
  padding: 1.9rem 1.6rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  transition: transform var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.quote:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.quote::before {
  content: "\201C";
  position: absolute;
  top: -.05em;
  left: .55rem;
  font-size: 4.2rem;
  line-height: 1;
  color: var(--accent);
  opacity: .22;
  font-family: Georgia, serif;
}
.quote blockquote {
  margin: 0;
  font-size: 1rem;
  line-height: 1.62;
  color: var(--text);
}
.quote figcaption {
  margin-top: 1.2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}
.quote figcaption strong { display: block; font-size: .9rem; }
.quote figcaption span {
  display: block;
  margin-top: .15rem;
  font-size: .82rem;
  color: var(--muted);
}

/* ========================= TECHNOLOGY CATALOG ========================= */

.catalog {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}
.cat {
  padding: 1.35rem 1.4rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.cat:hover {
  border-color: color-mix(in srgb, var(--accent) 42%, var(--line));
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}
.cat__title {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin: 0 0 1.05rem;
  padding-bottom: .8rem;
  border-bottom: 1px solid var(--line);
  font-size: .8rem;
  font-family: var(--font-mono);
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
}
.cat__hdr {
  width: 18px; height: 18px;
  flex: none;
  fill: none; stroke: currentColor;
  stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}
.cat__list { display: grid; gap: .85rem; }
.cat__list li {
  display: flex;
  align-items: flex-start;
  gap: .65rem;
}
.cat__ico {
  width: 16px; height: 16px;
  margin-top: .2rem;
  flex: none;
  fill: none; stroke: var(--muted);
  stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
  transition: stroke var(--dur) var(--ease);
}
.cat:hover .cat__ico { stroke: var(--accent); }
.cat__list span { display: block; min-width: 0; }
.cat__list b {
  display: block;
  font-size: .92rem;
  font-weight: 650;
  letter-spacing: -.01em;
  color: var(--text);
}
.cat__list span {
  font-size: .82rem;
  line-height: 1.45;
  color: var(--muted);
}

/* ========================= CREDENTIALS ========================= */

.credentials {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
  gap: clamp(2.5rem, 6vw, 4.5rem);
  align-items: start;
}

.certgroups {
  display: grid;
  gap: .8rem;
  margin-top: 1.8rem;
}
.certgroup {
  display: grid;
  grid-template-columns: 74px 1fr;
  align-items: center;
  gap: 1.1rem;
  padding: 1.1rem 1.2rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  transition: border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.certgroup:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.certgroup__brand {
  display: grid;
  place-items: center;
  padding-right: 1.1rem;
  border-right: 1px solid var(--line);
  color: var(--text);
}
.brandlogo { width: 48px; height: 30px; }
.certgroup:nth-child(2) .brandlogo { width: 34px; height: 34px; }
.certgroup:nth-child(3) .brandlogo { width: 30px; height: 30px; }
.certlist { display: grid; gap: .35rem; }
.certlist li {
  font-size: .9rem;
  color: var(--text);
  letter-spacing: -.005em;
}
.certlist li::before {
  content: "";
  display: inline-block;
  width: 5px; height: 5px;
  margin-right: .55rem;
  vertical-align: middle;
  border-radius: 1px;
  background: var(--accent);
  transform: rotate(45deg);
}
.certlist__muted { color: var(--muted); font-size: .84rem; }
.certlist__muted::before { background: var(--muted); }
.cred-note {
  margin-top: 1.1rem;
  font-size: .86rem;
  color: var(--muted);
  line-height: 1.6;
}
.cred-note strong { color: var(--text-2); }

.timeline {
  margin-top: 1.8rem;
  padding-left: 1.5rem;
  border-left: 1px solid var(--line-strong);
  display: grid;
  gap: 1.6rem;
}
.timeline li { position: relative; }
.timeline li::before {
  content: "";
  position: absolute;
  left: calc(-1.5rem - 5px);
  top: .5rem;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent);
}
.timeline li:first-child::before { background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.timeline__when {
  display: block;
  font-family: var(--font-mono);
  font-size: .74rem;
  letter-spacing: .06em;
  color: var(--accent);
  margin-bottom: .3rem;
}
.timeline strong { display: block; font-size: 1rem; letter-spacing: -.015em; }
.timeline__what {
  display: block;
  margin-top: .35rem;
  font-size: .88rem;
  line-height: 1.6;
  color: var(--muted);
}

/* ========================= CONTACT ========================= */

.contact { position: relative; overflow: hidden; }
.contact::before {
  content: "";
  position: absolute;
  inset: auto -10% -60% -10%;
  height: 120%;
  background: var(--glow);
  z-index: -1;
}
.contact__inner {
  max-width: 780px;
  text-align: center;
}
.contact__title {
  font-size: clamp(1.7rem, 4vw, 2.7rem);
  letter-spacing: -.032em;
}
.contact__lede {
  margin: 1.2rem auto 0;
  max-width: 58ch;
  font-size: 1.03rem;
  color: var(--text-2);
  line-height: 1.68;
}
.contact__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .8rem;
  margin-top: 2.2rem;
}

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

.footer {
  border-top: 1px solid var(--line);
  background: var(--bg-alt);
  padding: 2rem 0;
}
.footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem 2rem;
  justify-content: space-between;
  align-items: center;
  font-size: .82rem;
  color: var(--muted);
}
.footer p { margin: 0; }
.footer__note { max-width: 52ch; opacity: .8; }

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

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 620ms var(--ease), transform 620ms var(--ease);
  will-change: opacity, transform;
}
.reveal.is-in { opacity: 1; transform: none; }

@keyframes fade-up {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* ========================= RESPONSIVE ========================= */

@media (max-width: 1000px) {
  .stats__grid { grid-template-columns: repeat(2, 1fr); }
  .stat { border-left: 1px solid var(--line); border-top: 1px solid var(--line); }
  .stat:nth-child(1), .stat:nth-child(2) { border-top: 0; }
  .stat:nth-child(odd) { border-left: 0; padding-left: 0; }
}

@media (max-width: 900px) {
  .nav__links { display: none; }
  .nav__cta { display: none; }
  .menu-toggle { display: flex; }
  .nav__inner { height: 60px; }
  html { scroll-padding-top: 74px; }
}

@media (min-width: 901px) {
  .mobile-menu { display: none !important; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .stats__grid { grid-template-columns: 1fr; }
  .stat { border-left: 0 !important; padding-left: 0 !important; }
  .stat:nth-child(2) { border-top: 1px solid var(--line); }
  /* flex-basis becomes a height once the header stacks, so reset it */
  .case__head { flex-direction: column; gap: 1.1rem; }
  .case__ident { flex: 0 1 auto; }
  .case__result { width: 100%; text-align: left; }
  .hero__links { gap: .9rem 1.2rem; font-size: .84rem; }
  .btn { width: 100%; }
  .nav__actions .btn { width: auto; }
  .hero__cta, .contact__actions { flex-direction: column; }
  .catalog { grid-template-columns: 1fr; }
  .certgroup { grid-template-columns: 60px 1fr; gap: .9rem; }
}

/* ========================= PRINT ========================= */

@media print {
  .nav, .theme-toggle, .hero__grid, .contact__actions, .hero__cta, .skip-link { display: none !important; }
  body { background: #fff; color: #000; font-size: 10.5pt; }
  .section, .hero { padding: 1.2rem 0; }
  .case, .pillar, .quote, .cat, .certgroup {
    border: 1px solid #ccc !important;
    box-shadow: none !important;
    break-inside: avoid;
  }
  .case__more[open] .case__body, .case__body { display: block !important; }
  details > summary { display: none !important; }
  details:not([open]) .case__body { display: block !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 8pt; color: #555; }
}
