/* ============================================================
   GTM Engineers — design system
   Direction: "signal room". Dark plum-charcoal foundation,
   IBM Plex Sans (brand-committed), silver-grey ink, punchy pink
   as a controlled accent, cool blue for system metadata.
   Motifs: hairline rules with a bright signal segment, corner
   brackets, bracketed spec-field labels on use-case pages.
   ============================================================ */

:root {
  /* Colour tokens (OKLCH) */
  --bg:        oklch(17% 0.02 325);    /* plum-charcoal foundation */
  --bg-raise:  oklch(20.5% 0.022 325); /* raised panels */
  --line:      oklch(32% 0.02 325);    /* hairlines */
  --line-soft: oklch(25% 0.02 325);
  --ink:       oklch(94% 0.005 325);   /* primary text */
  --ink-soft:  oklch(80% 0.012 310);   /* secondary text */
  --ink-mute:  oklch(69% 0.014 305);   /* metadata — still >=4.5:1 on bg */
  --pink:      oklch(66% 0.20 356);    /* punchy pink, controlled */
  --pink-hot:  oklch(73% 0.19 356);
  --blue:      oklch(76% 0.10 235);    /* cool blue support */
  --silver:    oklch(85% 0.008 300);

  --font: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  --max-width: 960px;
  --measure: 68ch;
  --radius: 3px;                        /* shape language: leaning sharp */

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1); /* ease-out-quint */
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  color-scheme: dark;
}

body {
  font-family: var(--font);
  color: var(--ink-soft);
  background: var(--bg);
  font-size: 1.0625rem;
  line-height: 1.7; /* light-on-dark needs extra leading */
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  color: var(--ink);
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

a {
  color: var(--blue);
  text-decoration: underline;
  text-decoration-color: color-mix(in oklch, var(--blue) 40%, transparent);
  text-underline-offset: 3px;
  transition: color 0.15s var(--ease-out), text-decoration-color 0.15s var(--ease-out);
}

a:hover {
  color: var(--pink-hot);
  text-decoration-color: var(--pink-hot);
}

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

::selection {
  background: var(--pink);
  color: var(--bg);
}

/* Skip link */

.skip-link {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 10;
  background: var(--pink);
  color: var(--bg);
  font-weight: 600;
  font-size: 0.875rem;
  padding: 10px 16px;
  border-radius: var(--radius);
  text-decoration: none;
  transition: top 0.15s var(--ease-out);
}

.skip-link:focus {
  top: 12px;
  color: var(--bg);
}

/* Layout */

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 32px);
}

/* Header — hairline with a bright signal segment at the left */

.site-header {
  border-bottom: 1px solid var(--line-soft);
  position: relative;
}

.site-header::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 72px;
  height: 1px;
  background: var(--pink);
}

.site-header nav {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding-top: 20px;
  padding-bottom: 20px;
}

.nav-brand {
  font-size: 1rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.01em;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.nav-brand b {
  font-weight: 700;
}

.nav-brand span {
  font-weight: 400;
  color: var(--silver);
}

/* Brand mark: structured square with one disruption — a notched corner */
.brand-mark {
  width: 11px;
  height: 11px;
  flex: none;
  border: 1.5px solid var(--pink);
  clip-path: polygon(0 0, 68% 0, 68% 32%, 100% 32%, 100% 100%, 0 100%);
  transform: translateY(1px);
}

.nav-brand:hover {
  color: var(--ink);
}

.nav-brand:hover .brand-mark {
  border-color: var(--pink-hot);
}

.nav-links {
  display: flex;
  gap: clamp(18px, 3vw, 32px);
  list-style: none;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink-mute);
  text-decoration: none;
}

.nav-links a:hover {
  color: var(--ink);
}

.nav-links a[aria-current="page"] {
  color: var(--ink);
  border-bottom: 2px solid var(--pink);
  padding-bottom: 2px;
}

/* Sections — hairline dividers with a short bright segment */

section {
  padding: clamp(48px, 8vw, 72px) 0;
}

section + section {
  border-top: 1px solid var(--line-soft);
  position: relative;
}

section + section::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 32px;
  height: 1px;
  background: var(--line);
}

section > h2,
.about-content > h2 {
  font-size: 1.375rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 24px;
}

/* Hero — corner brackets frame the statement */

.hero {
  padding: clamp(64px, 10vw, 112px) 0 clamp(56px, 9vw, 96px);
}

.hero-frame {
  position: relative;
  padding: clamp(24px, 4vw, 40px) clamp(24px, 4vw, 44px);
  max-width: 760px;
}

.hero-frame::before,
.hero-frame::after {
  content: "";
  position: absolute;
  width: 28px;
  height: 28px;
  pointer-events: none;
}

.hero-frame::before {
  top: 0;
  left: 0;
  border-top: 2px solid var(--pink);
  border-left: 2px solid var(--pink);
}

.hero-frame::after {
  bottom: 0;
  right: 0;
  border-bottom: 2px solid var(--line);
  border-right: 2px solid var(--line);
}

.hero h1 {
  font-size: clamp(2rem, 4.4vw + 0.6rem, 3.25rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.12;
  max-width: 640px;
  margin-bottom: 20px;
}

.hero p {
  font-size: clamp(1.0625rem, 1.6vw, 1.1875rem);
  color: var(--ink-mute);
  max-width: 56ch;
  margin-bottom: 32px;
  line-height: 1.6;
}

/* No stranded space inside the bracket frame when there's no trailing CTA */
.hero-frame > :last-child {
  margin-bottom: 0;
}

/* Hero entrance — auto-running animation, content visible without JS */

@media (prefers-reduced-motion: no-preference) {
  .hero h1,
  .hero p,
  .hero .btn {
    animation: rise 0.6s var(--ease-out) both;
  }

  .hero p    { animation-delay: 0.08s; }
  .hero .btn { animation-delay: 0.16s; }

  @keyframes rise {
    from {
      opacity: 0;
      transform: translateY(14px);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }
}

/* Buttons */

.btn {
  display: inline-block;
  background: var(--pink);
  color: var(--bg);
  padding: 12px 26px;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s var(--ease-out), transform 0.15s var(--ease-out);
}

.btn:hover {
  background: var(--pink-hot);
  color: var(--bg);
  transform: translateY(-1px);
}

.btn:active {
  transform: none;
}

.btn:focus-visible {
  outline-color: var(--ink);
}

/* Positioning prose */

.positioning p {
  color: var(--ink-soft);
  max-width: var(--measure);
  margin-bottom: 20px;
}

.positioning p:last-child {
  margin-bottom: 0;
}

/* Selected work / use-case ledger rows */

.work-list {
  list-style: none;
}

.work-list li {
  border-top: 1px solid var(--line-soft);
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 8px 20px;
  align-items: baseline;
  padding: 22px 0;
}

.work-list li:last-child {
  border-bottom: 1px solid var(--line-soft);
}

/* When the ledger opens a section (no heading above it), the section's own
   divider is the top rule — don't double it */
section > .work-list:first-child li:first-child {
  border-top: 0;
  padding-top: 0;
}

.work-list .uc-num {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--blue);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}

.work-list .uc-title {
  font-size: 1.0625rem;
  font-weight: 600;
  margin-bottom: 2px;
}

.work-list .uc-title a {
  color: var(--ink);
  text-decoration: none;
}

.work-list .uc-title a:hover {
  color: var(--pink-hot);
}

.work-list .uc-problem {
  font-size: 0.9375rem;
  color: var(--ink-mute);
  max-width: 62ch;
}

.work-more {
  margin-top: 28px;
  font-size: 0.95rem;
}

/* Tools strip */

.tools-strip {
  font-size: 1rem;
  color: var(--silver);
  max-width: var(--measure);
}

.tools-strip .sep {
  color: var(--pink);
  padding: 0 2px;
}

/* CTA block — bracketed panel */

.cta-block {
  position: relative;
  background: var(--bg-raise);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: clamp(36px, 6vw, 56px) clamp(24px, 5vw, 48px);
  text-align: center;
}

.cta-block::before {
  content: "";
  position: absolute;
  top: -1px;
  left: -1px;
  width: 24px;
  height: 24px;
  border-top: 2px solid var(--pink);
  border-left: 2px solid var(--pink);
}

.cta-block h2 {
  font-size: clamp(1.375rem, 3vw, 1.625rem);
  font-weight: 700;
  letter-spacing: -0.015em;
  margin-bottom: 12px;
}

.cta-block p {
  color: var(--ink-mute);
  margin: 0 auto 26px;
  max-width: 46ch;
}

/* Individual use-case page — spec-sheet grammar */

.uc-page h1 {
  font-size: clamp(1.75rem, 3.6vw, 2.375rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
  max-width: 640px;
}

.uc-head {
  padding-bottom: 0;
}

.uc-meta {
  font-size: 0.9375rem;
  color: var(--ink-mute);
}

.uc-meta .sep {
  color: var(--pink);
}

.uc-block {
  margin-bottom: 48px;
  max-width: var(--measure);
}

.uc-block:last-child {
  margin-bottom: 0;
}

/* Spec-field label: bracketed, tracked caps. This is the one deliberate
   kicker system on the site — the use-case page reads as a spec sheet. */
.uc-block h2 {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.uc-block h2::before {
  content: "";
  width: 7px;
  height: 14px;
  flex: none;
  border: 1.5px solid var(--pink);
  border-right: 0;
}

.uc-block p {
  color: var(--ink-soft);
  margin-bottom: 14px;
}

.uc-block p strong {
  color: var(--ink);
  font-weight: 600;
}

.uc-block ul {
  padding-left: 20px;
  color: var(--ink-soft);
}

.uc-block ul li {
  margin-bottom: 8px;
}

.uc-block ul li::marker {
  color: var(--pink);
}

.uc-tools-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  padding: 0;
}

.uc-tools-list li {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 5px 14px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--silver);
  margin: 0;
}

/* Diagram — draw.io exports are white; give them a light plate */

.uc-diagram {
  margin: 48px 0;
  padding: clamp(12px, 2.5vw, 24px);
  background: oklch(97% 0.003 325);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.uc-diagram img {
  width: 100%;
  height: auto;
  display: block;
}

/* About */

.about-content {
  max-width: var(--measure);
}

.about-content h2 {
  margin-top: 44px;
}

.about-content p {
  margin-bottom: 16px;
}

/* Contact */

.contact-content h1 {
  font-size: clamp(1.875rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.contact-content p {
  color: var(--ink-mute);
  max-width: 48ch;
  margin-bottom: 28px;
}

/* Footer */

footer {
  border-top: 1px solid var(--line-soft);
  padding: 36px 0;
  margin-top: clamp(56px, 8vw, 96px);
  position: relative;
}

footer::before {
  content: "";
  position: absolute;
  top: -1px;
  right: 0;
  width: 72px;
  height: 1px;
  background: var(--line);
}

footer p {
  font-size: 0.8125rem;
  color: var(--ink-mute);
}

footer a {
  color: var(--ink-mute);
}

footer a:hover {
  color: var(--pink-hot);
}

/* Breadcrumb */

.breadcrumb {
  font-size: 0.8125rem;
  color: var(--ink-mute);
  margin-bottom: 28px;
  font-variant-numeric: tabular-nums;
}

.breadcrumb a {
  color: var(--ink-mute);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--pink-hot);
}

.breadcrumb .sep {
  color: var(--pink);
  padding: 0 4px;
}

/* Responsive */

@media (max-width: 560px) {
  .hero-frame {
    padding: 20px 18px;
  }

  .work-list li {
    grid-template-columns: 40px 1fr;
    gap: 4px 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
