/* Proof Ladder — production */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Source+Serif+4:ital,wght@0,500;0,600;0,700;1,400&display=swap");

:root {
  --bg: #f7f6f3;
  --bg-white: #ffffff;
  --text: #1c1917;
  --text-muted: #57534e;
  --navy: #0f2744;
  --navy-soft: #1a3a5c;
  --accent: #1d4ed8;
  --accent-soft: #dbeafe;
  --band-bg: #f0f4ff;
  --border: #e7e5e4;
  --border-strong: #d6d3d1;
  --shadow-sm: 0 1px 2px rgba(15, 39, 68, 0.06);
  --shadow-md: 0 4px 16px rgba(15, 39, 68, 0.08);
  --max-width: 1040px;
  --font: "Inter", system-ui, -apple-system, sans-serif;
  --font-display: "Source Serif 4", Georgia, serif;
  --duration: 200ms;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

button {
  font: inherit;
  cursor: pointer;
}

.skip-link {
  position: absolute;
  left: -9999px;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
  z-index: 100;
  padding: 0.5rem 1rem;
  background: var(--bg-white);
  border: 1px solid var(--border);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 246, 243, 0.92);
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(10px);
  transition: border-color var(--duration), box-shadow var(--duration);
}

.site-header.is-scrolled {
  border-bottom-color: var(--border);
  box-shadow: var(--shadow-sm);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.875rem 1.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text);
  font-weight: 600;
  font-size: 0.95rem;
}

.brand:hover {
  text-decoration: none;
}

.brand__mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
  background: var(--navy);
  border-radius: 6px;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  background: var(--bg-white);
  color: var(--navy);
}

.nav-toggle span {
  display: block;
  width: 1rem;
  height: 2px;
  margin: 0 auto;
  background: currentColor;
  transition: transform var(--duration);
}

.nav-toggle[aria-expanded="true"] span:first-child {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:last-child {
  transform: translateY(-7px) rotate(-45deg);
}

.site-nav {
  display: flex;
  gap: 0.25rem;
  font-size: 0.875rem;
}

.site-nav a {
  padding: 0.5rem 0.875rem;
  color: var(--text-muted);
  border-radius: 6px;
}

.site-nav a:hover,
.site-nav a.is-active {
  color: var(--text);
  background: var(--bg-white);
  text-decoration: none;
}

.nav-cta {
  color: var(--navy) !important;
  font-weight: 600;
  border: 1px solid var(--border-strong);
  background: var(--bg-white);
}

.nav-cta:hover {
  border-color: var(--navy);
}

/* Layout */
.page {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 2.5rem 0;
}

.section--alt {
  background: var(--bg-white);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 2rem 0;
}

.section-header {
  margin-bottom: 1.25rem;
}

.section-label {
  margin: 0 0 0.5rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.section-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--navy);
}

.section-dek {
  margin: 0.5rem 0 0;
  max-width: 32rem;
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* Hero */
.hero {
  padding: 2rem 0 1.5rem;
}

.hero__inner {
  display: grid;
  grid-template-columns: 1fr minmax(260px, 320px);
  gap: 2rem;
  align-items: start;
}

.hero__content {
  min-width: 0;
}

.hero__eyebrow {
  margin: 0 0 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
}

.hero__title {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
  font-weight: 600;
  line-height: 1.25;
  color: var(--navy);
  max-width: 42rem;
}

.hero__sub {
  margin: 0 0 1.25rem;
  color: var(--text-muted);
  font-size: 0.875rem;
  max-width: 36rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.hero__assistant {
  min-width: 0;
}

/* Chat */
.chat {
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--bg-white);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.chat__top {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.chat__avatar {
  display: grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  font-size: 0.55rem;
  font-weight: 700;
}

.chat__name {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--navy);
}

.chat__status {
  margin: 0;
  color: #15803d;
  font-size: 0.6875rem;
  font-weight: 500;
}

.chat--compact .chat__messages {
  display: grid;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  min-height: 72px;
  max-height: 120px;
  overflow-y: auto;
}

.msg {
  max-width: 92%;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  font-size: 0.75rem;
  line-height: 1.45;
}

.msg p {
  margin: 0;
}

.msg--out {
  justify-self: end;
  background: var(--band-bg);
  border: 1px solid var(--border);
  color: var(--text);
}

.msg--in {
  justify-self: start;
  background: var(--bg-white);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.chat__prompts {
  display: grid;
  gap: 0.375rem;
  padding: 0 0.75rem 0.5rem;
}

.chat__prompt {
  width: 100%;
  padding: 0.4rem 0.625rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-white);
  color: var(--text-muted);
  font: inherit;
  font-size: 0.7rem;
  font-weight: 500;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
}

.chat__prompt:hover {
  border-color: var(--navy);
  color: var(--navy);
}

.chat__prompt:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.chat__input {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0.75rem 0.5rem;
  padding: 0.375rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-white);
}

.chat__input input {
  flex: 1;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.75rem;
  outline: none;
}

.chat__input input::placeholder {
  color: var(--text-muted);
}

.chat__input button {
  display: grid;
  place-items: center;
  width: 1.5rem;
  height: 1.5rem;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: var(--navy);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
}

.chat__input.is-loading {
  opacity: 0.7;
  pointer-events: none;
}

.chat__quota {
  margin: 0 0.75rem 0.625rem;
  font-size: 0.625rem;
  color: var(--text-muted);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.msg__body h3 {
  margin: 0 0 0.25rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--navy);
}

.msg__body p + p,
.msg__body ul + p,
.msg__body ol + p {
  margin-top: 0.5rem;
}

.msg__body ul,
.msg__body ol {
  margin: 0.25rem 0 0;
  padding-left: 1rem;
}

.msg__body code {
  padding: 0.1em 0.35em;
  border-radius: 4px;
  background: var(--band-bg);
  font-size: 0.7rem;
}

.msg__body a {
  color: var(--accent);
  text-decoration: underline;
}

.msg--error {
  background: #fef2f2;
  border-color: #fecaca;
  color: #b91c1c;
}

.msg--typing {
  opacity: 0.7;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.5rem 1rem;
  font-size: 0.8125rem;
  font-weight: 600;
  border-radius: 6px;
  border: 1px solid transparent;
  transition: background 0.15s, border-color 0.15s;
}

.btn--primary {
  background: var(--navy);
  color: #fff;
}

.btn--primary:hover {
  background: var(--navy-soft);
  text-decoration: none;
}

.btn--secondary {
  background: var(--bg-white);
  color: var(--navy);
  border-color: var(--border-strong);
}

.btn--secondary:hover {
  border-color: var(--navy);
  text-decoration: none;
}

/* Impact metrics band */
.impact-band {
  background: var(--navy);
  padding: 0;
}

.impact-band__inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.impact-metric {
  padding: 1.25rem 0.75rem;
  text-align: center;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.impact-metric:last-child {
  border-right: none;
}

.impact-metric__value {
  display: block;
  font-family: var(--font);
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.1;
}

.impact-metric__label {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.35;
}

/* Case studies */
.case-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.875rem;
}

.case-card {
  display: flex;
  flex-direction: column;
  padding: 1.125rem;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  border-top: 2px solid var(--navy);
}

.case-card__tag {
  margin: 0 0 0.35rem;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}

.case-card h3 {
  margin: 0 0 0.5rem;
  font-family: var(--font);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--navy);
  line-height: 1.3;
}

.case-card p {
  margin: 0;
  flex: 1;
  color: var(--text-muted);
  font-size: 0.8125rem;
  line-height: 1.5;
}

.case-card--wide {
  grid-column: 1 / -1;
}

/* Platform expertise */
.expertise-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.875rem;
}

.expertise-card {
  padding: 1rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.expertise-card p {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.45;
}

/* Experience */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.timeline__item {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 1.25rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
}

.timeline__item:last-child {
  border-bottom: none;
}

.timeline__meta {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.timeline__meta time {
  display: block;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 0.25rem;
}

.timeline__item h3 {
  margin: 0 0 0.35rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--navy);
}

.timeline__item p {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Contact */
.contact-block {
  padding: 2.5rem 0;
  background: var(--navy);
  color: #fff;
}

.contact-block .section-label {
  color: rgba(255, 255, 255, 0.6);
}

.contact-block .section-title {
  color: #fff;
}

.contact-block .section-dek {
  color: rgba(255, 255, 255, 0.75);
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.contact-block .btn--primary {
  background: #fff;
  color: var(--navy);
}

.contact-block .btn--primary:hover {
  background: var(--accent-soft);
}

.contact-block .btn--secondary {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.35);
}

.contact-block .btn--secondary:hover {
  border-color: #fff;
}

/* Responsive */
@media (max-width: 900px) {
  .hero__inner {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .case-list,
  .expertise-grid {
    grid-template-columns: 1fr;
  }

  .timeline__item {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }
}

@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .site-header__inner {
    position: relative;
  }

  .site-nav {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    left: 0;
    flex-direction: column;
    align-items: stretch;
    padding: 0.5rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-white);
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity var(--duration), transform var(--duration), visibility var(--duration);
  }

  .site-nav.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .site-nav a {
    text-align: center;
  }

  .impact-band__inner {
    grid-template-columns: repeat(2, 1fr);
  }

  .impact-metric {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.5rem 1rem;
  }

  .impact-metric:nth-child(2n) {
    border-right: none;
  }
}
