@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:ital,wght@0,300;0,400;0,600;0,700;1,400&family=IBM+Plex+Mono:wght@400;500&display=swap');

/* ── Reset & Base ─────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy:    #0B1F3A;
  --blue:    #2F6FED;
  --blue-dk: #1A4FB5;
  --slate:   #5B6472;
  --paper:   #FAFBFC;
  --rule:    #E2E6EF;
  --white:   #FFFFFF;
  --mono:    'IBM Plex Mono', monospace;
  --sans:    'IBM Plex Sans', sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--navy);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

img { display: block; max-width: 100%; }

/* ── Typography ───────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: var(--sans);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.18;
  color: var(--navy);
}

h1 { font-size: clamp(2rem, 5vw, 3.25rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.2rem; font-weight: 600; }
h4 { font-size: 1rem; font-weight: 600; }

p { max-width: 68ch; color: var(--slate); line-height: 1.7; }
p.wide { max-width: 80ch; }

code, .mono {
  font-family: var(--mono);
  font-size: 0.875em;
  color: var(--blue);
  background: #EBF1FF;
  padding: 1px 5px;
  border-radius: 3px;
}

/* ── Layout ───────────────────────────────────────── */
.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.container--narrow { max-width: 780px; }

section { padding: 80px 0; }
section + section { border-top: 1px solid var(--rule); }

/* ── Navigation ───────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--rule);
  padding: 0;
}

.nav__inner {
  display: flex;
  align-items: center;
  gap: 0;
  height: 68px;
}

.nav__logo {
  display: flex;
  align-items: stretch;
  margin-right: auto;
  height: 68px;
  overflow: hidden;
}
.nav__logo img {
  height: 68px;
  width: auto;
  display: block;
  object-fit: cover;
  object-position: left center;
}

.nav__links {
  display: flex;
  list-style: none;
  gap: 2px;
}

.nav__links a {
  display: block;
  padding: 8px 14px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--navy);
  border-radius: 6px;
  transition: background 0.15s;
}
.nav__links a:hover { background: var(--paper); text-decoration: none; }
.nav__links a.active { color: var(--blue); }

.nav__cta {
  margin-left: 16px;
  padding: 8px 18px;
  background: var(--blue);
  color: var(--white) !important;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  transition: background 0.15s;
}
.nav__cta:hover { background: var(--blue-dk) !important; text-decoration: none !important; }

.nav__hamburger { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.nav__hamburger span { display: block; width: 20px; height: 2px; background: var(--navy); margin: 4px 0; transition: 0.2s; }

/* ── Buttons ──────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 11px 22px;
  border-radius: 6px;
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background 0.15s, transform 0.1s;
  text-decoration: none;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn--primary { background: var(--blue); color: var(--white); }
.btn--primary:hover { background: var(--blue-dk); color: var(--white); }

.btn--outline { background: transparent; color: var(--navy); border: 1.5px solid var(--rule); }
.btn--outline:hover { border-color: var(--navy); color: var(--navy); background: transparent; }

.btn--ghost { background: rgba(255,255,255,0.12); color: var(--white); border: 1.5px solid rgba(255,255,255,0.3); }
.btn--ghost:hover { background: rgba(255,255,255,0.2); color: var(--white); }

.btn-group { display: flex; gap: 12px; flex-wrap: wrap; }

/* ── Hero ─────────────────────────────────────────── */
.hero {
  background: var(--navy);
  padding: 96px 0 80px;
  border-top: none;
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--blue);
  margin-bottom: 24px;
  letter-spacing: 0.04em;
}
.hero__eyebrow::before {
  content: '';
  display: block;
  width: 24px;
  height: 1.5px;
  background: var(--blue);
}

.hero h1 { color: var(--white); max-width: 18ch; }
.hero h1 em { font-style: normal; color: var(--blue); }

.hero__sub {
  margin-top: 20px;
  font-size: 1.1rem;
  color: rgba(255,255,255,0.65);
  max-width: 52ch;
  line-height: 1.6;
}

.hero__btns { margin-top: 36px; }

.hero__stats {
  display: flex;
  gap: 0;
  margin-top: 56px;
  padding-top: 40px;
  border-top: 1px solid rgba(255,255,255,0.1);
  flex-wrap: wrap;
}

.hero__stat {
  flex: 1;
  min-width: 140px;
  padding-right: 32px;
}

.hero__stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--white);
  font-family: var(--mono);
  line-height: 1;
}

.hero__stat-label {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.5);
  margin-top: 5px;
  line-height: 1.4;
}

/* ── Section headings ─────────────────────────────── */
.section-head { margin-bottom: 48px; }
.section-head h2 { margin-bottom: 12px; }
.section-head p { font-size: 1.05rem; }

/* ── Two-column grid ──────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }

/* ── Cards ────────────────────────────────────────── */
.card {
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 28px;
}
.card h3 { margin-bottom: 10px; }
.card p { font-size: 0.95rem; }

/* ── Feature block ────────────────────────────────── */
.feature-block { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
.feature-block--flip { }
.feature-block__label {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--blue);
  letter-spacing: 0.06em;
  margin-bottom: 14px;
}
.feature-block h2 { margin-bottom: 16px; }
.feature-block p { margin-bottom: 16px; }

.feature-list { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.95rem;
  color: var(--slate);
  line-height: 1.5;
}
.feature-list li::before {
  content: '';
  display: block;
  width: 16px;
  height: 16px;
  min-width: 16px;
  border-radius: 50%;
  background: var(--blue);
  margin-top: 3px;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='8' viewBox='0 0 10 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 4l2.5 2.5L9 1' stroke='white' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
}

/* ── Diagram box ──────────────────────────────────── */
.diagram-box {
  background: var(--navy);
  border-radius: 12px;
  padding: 32px;
  font-family: var(--mono);
  font-size: 0.82rem;
  color: rgba(255,255,255,0.75);
}
.diagram-box__title {
  color: var(--blue);
  font-weight: 500;
  margin-bottom: 20px;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
}
.diagram-step {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 16px;
}
.diagram-step:last-child { margin-bottom: 0; }
.diagram-step__num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1.5px solid var(--blue);
  color: var(--blue);
  font-size: 0.72rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.diagram-step__text { padding-top: 3px; line-height: 1.5; }
.diagram-step__text strong { color: var(--white); }
.diagram-arrow {
  margin-left: 12px;
  margin-bottom: 4px;
  color: rgba(255,255,255,0.2);
  font-size: 1rem;
}

/* ── Table ────────────────────────────────────────── */
.data-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.data-table th {
  text-align: left;
  padding: 10px 14px;
  background: var(--navy);
  color: var(--white);
  font-weight: 600;
  font-size: 0.82rem;
}
.data-table th:first-child { border-radius: 6px 0 0 0; }
.data-table th:last-child { border-radius: 0 6px 0 0; }
.data-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--rule);
  color: var(--slate);
  vertical-align: top;
}
.data-table tr:nth-child(even) td { background: var(--paper); }
.data-table tr:last-child td { border-bottom: none; }
.data-table td:first-child { color: var(--navy); font-weight: 500; }

.table-wrap { overflow-x: auto; border-radius: 8px; border: 1px solid var(--rule); }

/* ── Accordion (FAQ) ──────────────────────────────── */
.accordion { border: 1px solid var(--rule); border-radius: 8px; overflow: hidden; }
.accordion + .accordion { margin-top: 12px; }

.accordion__trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  background: var(--white);
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: var(--sans);
  font-size: 0.975rem;
  font-weight: 600;
  color: var(--navy);
  gap: 16px;
}
.accordion__trigger:hover { background: var(--paper); }

.accordion__icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1.5px solid var(--rule);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, border-color 0.2s;
}
.accordion__icon svg { width: 10px; height: 10px; }
.accordion[open] .accordion__icon { transform: rotate(45deg); border-color: var(--blue); }

.accordion__body {
  padding: 0 20px 20px;
  font-size: 0.95rem;
  color: var(--slate);
  line-height: 1.7;
  border-top: 1px solid var(--rule);
  background: var(--white);
}
.accordion__body p { max-width: 100%; margin-bottom: 8px; }
.accordion__body p:last-child { margin-bottom: 0; }

/* ── Form ─────────────────────────────────────────── */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group.full { grid-column: 1 / -1; }

label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--navy);
}
label .req { color: var(--blue); }

input, textarea, select {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--rule);
  border-radius: 6px;
  font-family: var(--sans);
  font-size: 0.95rem;
  color: var(--navy);
  background: var(--white);
  transition: border-color 0.15s;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--blue);
}
input.mono-input { font-family: var(--mono); letter-spacing: 0.05em; }

textarea { resize: vertical; min-height: 100px; }

.form-hint {
  font-size: 0.8rem;
  color: var(--slate);
  margin-top: 2px;
}

/* ── Licence tier cards ───────────────────────────── */
.tier-card {
  background: var(--white);
  border: 1.5px solid var(--rule);
  border-radius: 12px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.tier-card--featured { border-color: var(--blue); }
.tier-card__badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  font-family: var(--mono);
  letter-spacing: 0.06em;
  color: var(--white);
  background: var(--blue);
  padding: 3px 10px;
  border-radius: 4px;
  margin-bottom: 16px;
}
.tier-card h3 { font-size: 1.3rem; margin-bottom: 8px; }
.tier-card__desc { font-size: 0.9rem; color: var(--slate); margin-bottom: 24px; }
.tier-card__features { list-style: none; display: flex; flex-direction: column; gap: 10px; margin-bottom: 28px; }
.tier-card__features li {
  font-size: 0.9rem;
  color: var(--slate);
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.tier-check { color: var(--blue); font-weight: 700; flex-shrink: 0; }
.tier-cross { color: var(--rule); font-weight: 700; flex-shrink: 0; }

/* ── Dark section ─────────────────────────────────── */
.section--dark {
  background: var(--navy);
  border-top: none;
  border-bottom: none;
}
.section--dark h2,
.section--dark h3 { color: var(--white); }
.section--dark p { color: rgba(255,255,255,0.6); }
.section--dark .section-head p { color: rgba(255,255,255,0.6); }

/* ── PDK strip ────────────────────────────────────── */
.pdk-strip {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.pdk-tag {
  background: rgba(47,111,237,0.1);
  border: 1px solid rgba(47,111,237,0.25);
  color: var(--blue);
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: 5px;
}

/* ── Footer ───────────────────────────────────────── */
footer {
  background: var(--navy);
  padding: 48px 0 32px;
  border-top: none;
}
.footer__inner {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer__brand img { height: 28px; margin-bottom: 14px; }
.footer__brand p {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.45);
  max-width: 28ch;
  line-height: 1.6;
}
.footer__col h4 { color: rgba(255,255,255,0.5); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em; margin-bottom: 14px; text-transform: uppercase; }
.footer__col ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.footer__col ul a { font-size: 0.875rem; color: rgba(255,255,255,0.65); }
.footer__col ul a:hover { color: var(--white); text-decoration: none; }
.footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.35);
}

/* ── Docs layout ──────────────────────────────────── */
.docs-layout { display: grid; grid-template-columns: 220px 1fr; gap: 48px; align-items: start; }
.docs-sidebar {
  position: sticky;
  top: 76px;
  max-height: calc(100vh - 96px);
  overflow-y: auto;
}
.docs-sidebar__group { margin-bottom: 24px; }
.docs-sidebar__group-title {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--slate);
  margin-bottom: 8px;
  padding-left: 10px;
}
.docs-sidebar__nav { list-style: none; display: flex; flex-direction: column; gap: 2px; }
.docs-sidebar__nav a {
  display: block;
  padding: 5px 10px;
  font-size: 0.875rem;
  color: var(--slate);
  border-radius: 5px;
}
.docs-sidebar__nav a:hover { background: var(--rule); color: var(--navy); text-decoration: none; }
.docs-sidebar__nav a.active { color: var(--blue); background: #EBF1FF; font-weight: 500; }

.docs-content h2 { margin-top: 48px; margin-bottom: 16px; padding-top: 40px; border-top: 1px solid var(--rule); }
.docs-content h2:first-child { margin-top: 0; padding-top: 0; border-top: none; }
.docs-content h3 { margin-top: 28px; margin-bottom: 10px; font-size: 1.05rem; }
.docs-content p { margin-bottom: 14px; max-width: 72ch; }
.docs-content ul, .docs-content ol { padding-left: 20px; margin-bottom: 14px; }
.docs-content li { color: var(--slate); font-size: 0.95rem; margin-bottom: 6px; line-height: 1.6; }
.docs-content .data-table { margin: 20px 0; }

.callout {
  background: #EBF1FF;
  border-left: 3px solid var(--blue);
  padding: 14px 18px;
  border-radius: 0 6px 6px 0;
  margin: 20px 0;
  font-size: 0.9rem;
  color: var(--navy);
  line-height: 1.6;
}
.callout--warn { background: #FFF8E6; border-color: #D4A017; color: #7A5C00; }
.callout strong { color: var(--blue); }
.callout--warn strong { color: #7A5C00; }

pre {
  background: var(--navy);
  color: #7EB3FF;
  font-family: var(--mono);
  font-size: 0.82rem;
  padding: 16px 20px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 16px 0;
  line-height: 1.6;
}

/* ── Search bar ───────────────────────────────────── */
.search-wrap {
  position: relative;
  margin-bottom: 32px;
}
.search-wrap input {
  padding-left: 40px;
  background: var(--white);
}
.search-wrap svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  stroke: var(--slate);
}

/* ── About page ───────────────────────────────────── */
.mission-stat {
  padding: 28px 0;
  border-bottom: 1px solid var(--rule);
}
.mission-stat:last-child { border-bottom: none; }
.mission-stat h3 { margin-bottom: 6px; }
.mission-stat p { font-size: 0.95rem; }

.partner-logos {
  display: flex;
  align-items: center;
  gap: 40px;
  flex-wrap: wrap;
  margin-top: 32px;
}
.partner-logo {
  opacity: 0.6;
  font-family: var(--mono);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--navy);
  padding: 8px 16px;
  border: 1.5px solid var(--rule);
  border-radius: 6px;
}

/* ── Responsive ───────────────────────────────────── */
@media (max-width: 900px) {
  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .feature-block { grid-template-columns: 1fr; gap: 32px; }
  .footer__inner { grid-template-columns: 1fr 1fr; }
  .docs-layout { grid-template-columns: 1fr; }
  .docs-sidebar { position: static; max-height: none; }
}

@media (max-width: 640px) {
  section { padding: 56px 0; }
  .hero { padding: 64px 0 56px; }
  .grid-3 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .nav__links { display: none; }
  .nav__links.open { display: flex; flex-direction: column; position: absolute; top: 60px; left: 0; right: 0; background: var(--white); border-bottom: 1px solid var(--rule); padding: 8px; }
  .nav__hamburger { display: block; }
  .footer__inner { grid-template-columns: 1fr; }
  .hero__stats { gap: 24px; }
  .hero__stat { min-width: 100%; padding-right: 0; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
