:root {
  color-scheme: dark;
  --canvas: #06100b;
  --surface: #0c1911;
  --elevated: #11241a;
  --border: #214532;
  --text: #f8f7f4;
  --muted: #91a69a;
  --green: #58ef8b;
  --cyan: #55dcc5;
  --shadow: rgba(0, 0, 0, .3);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 85% 0%, rgba(27, 67, 50, .42), transparent 34rem),
    radial-gradient(circle at 5% 55%, rgba(85, 220, 197, .08), transparent 30rem),
    var(--canvas);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

a:focus-visible { outline: 2px solid var(--cyan); outline-offset: 4px; }

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 20;
  transform: translateY(-150%);
  border-radius: 8px;
  padding: 10px 14px;
  background: var(--green);
  color: #031108;
}

.skip-link:focus { transform: translateY(0); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid rgba(33, 69, 50, .72);
  background: rgba(6, 16, 11, .86);
  backdrop-filter: blur(16px);
}

.header-inner,
.footer-inner,
.legal-id {
  width: min(1180px, calc(100% - 40px));
  margin: auto;
}

.header-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--text);
  font-weight: 760;
  letter-spacing: -.02em;
  text-decoration: none;
}

.brand img { border-radius: 11px; box-shadow: 0 0 28px rgba(88, 239, 139, .12); }

.header-inner nav,
.site-footer nav {
  display: flex;
  align-items: center;
  gap: 22px;
  color: var(--muted);
  font-size: .84rem;
}

.header-inner nav a,
.site-footer nav a { text-decoration: none; }

.header-inner nav a:hover,
.site-footer nav a:hover { color: var(--text); }

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 11px;
  color: var(--text);
  background: rgba(17, 36, 26, .65);
  font: 700 .68rem ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.status-pill span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 12px rgba(88, 239, 139, .7);
}

.hero {
  width: min(1180px, calc(100% - 40px));
  min-height: calc(100vh - 72px);
  margin: auto;
  padding: 92px 0 80px;
  display: grid;
  grid-template-columns: .92fr 1.08fr;
  align-items: center;
  gap: clamp(42px, 7vw, 92px);
}

.eyebrow {
  margin: 0;
  color: var(--green);
  font: 700 .72rem ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .14em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p { text-wrap: pretty; }

.hero h1 {
  max-width: 650px;
  margin: 18px 0 22px;
  font-size: clamp(3rem, 6vw, 5.8rem);
  line-height: .94;
  letter-spacing: -.065em;
}

.hero h1 span { color: var(--green); }

.lead {
  max-width: 600px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.4vw, 1.14rem);
  line-height: 1.72;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 11px; margin-top: 30px; }

.button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--green);
  border-radius: 11px;
  padding: 0 18px;
  background: var(--green);
  color: #031108;
  font-weight: 780;
  text-decoration: none;
}

.button-secondary { border-color: var(--border); background: transparent; color: var(--text); }

.button-secondary:hover { border-color: var(--cyan); }

.button-disabled { cursor: not-allowed; opacity: .76; }

.availability { max-width: 540px; margin: 18px 0 0; color: var(--muted); font-size: .78rem; line-height: 1.55; }

.api-proof {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(17, 36, 26, .62);
  box-shadow: 0 32px 90px var(--shadow);
}

.proof-header {
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--border);
  padding: 0 18px;
  color: var(--muted);
  font: .7rem ui-monospace, SFMono-Regular, Menlo, monospace;
}

pre {
  min-height: 292px;
  margin: 0;
  padding: clamp(20px, 4vw, 34px);
  overflow-x: auto;
  background: #050c08;
  color: #c4d4cb;
  font: clamp(.7rem, 1.1vw, .84rem)/1.9 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.green { color: var(--green); }
.cyan { color: var(--cyan); }

.flow {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  padding: 28px 20px 22px;
}

.flow-line {
  position: absolute;
  top: 45px;
  left: 13%;
  right: 13%;
  height: 1px;
  background: linear-gradient(90deg, var(--green), var(--cyan));
  opacity: .65;
}

.flow-line i {
  position: absolute;
  top: -3px;
  left: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 14px var(--cyan);
  animation: flow-packet 3.6s ease-in-out infinite;
}

.flow > div { position: relative; z-index: 1; text-align: center; color: var(--muted); font-size: .68rem; }

.flow b {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  margin: 0 auto 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #08130c;
  color: var(--green);
  font: .62rem ui-monospace, SFMono-Regular, Menlo, monospace;
}

.flow span { display: block; }

@keyframes flow-packet {
  0%, 10% { left: 0; }
  90%, 100% { left: calc(100% - 7px); }
}

.principles {
  width: min(1180px, calc(100% - 40px));
  margin: auto;
  padding: 110px 0 130px;
  border-top: 1px solid var(--border);
}

.principles h2 {
  max-width: 780px;
  margin: 16px 0 46px;
  font-size: clamp(2rem, 4.4vw, 4.4rem);
  line-height: 1.02;
  letter-spacing: -.05em;
}

.principle-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }

.principle-grid article {
  min-height: 230px;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 26px;
  background: rgba(17, 36, 26, .46);
}

.principle-grid article > span { color: var(--cyan); font: .72rem ui-monospace, monospace; }
.principle-grid h3 { margin: 58px 0 12px; font-size: 1.25rem; }
.principle-grid p { margin: 0; color: var(--muted); line-height: 1.65; }

.legal-page,
.not-found {
  width: min(840px, calc(100% - 40px));
  margin: auto;
  padding: 96px 0 120px;
}

.legal-page > header { padding-bottom: 42px; border-bottom: 1px solid var(--border); }
.legal-page h1,
.not-found h1 { margin: 16px 0 20px; font-size: clamp(2.8rem, 7vw, 5.6rem); line-height: .98; letter-spacing: -.06em; }
.legal-intro { max-width: 720px; margin: 0; color: var(--muted); font-size: 1.06rem; line-height: 1.7; }
.updated { margin: 20px 0 0; color: var(--muted); font-size: .78rem; }
.legal-content { padding-top: 26px; }
.legal-content section { padding: 28px 0; border-bottom: 1px solid rgba(33, 69, 50, .7); }
.legal-content h2 { margin: 0 0 12px; font-size: 1.2rem; }
.legal-content p { margin: 0; color: var(--muted); line-height: 1.75; }
.legal-content p + p { margin-top: 14px; }
.legal-content ul { margin: 14px 0 0; padding-left: 22px; color: var(--muted); }
.legal-content li { padding-left: 4px; line-height: 1.72; }
.legal-content li + li { margin-top: 8px; }
.legal-content a { color: var(--green); }

.not-found { min-height: 70vh; }

.site-footer { border-top: 1px solid var(--border); padding: 46px 0 26px; background: rgba(5, 12, 8, .55); }
.footer-inner { display: flex; justify-content: space-between; gap: 40px; }
.footer-inner p { margin: 12px 0 0; color: var(--muted); font-size: .8rem; }
.legal-id { margin-top: 38px; color: var(--muted); font-size: .7rem; }

@media (max-width: 900px) {
  .header-inner nav a { display: none; }
  .hero { min-height: auto; grid-template-columns: 1fr; padding-top: 70px; }
  .api-proof { width: 100%; }
  .principle-grid { grid-template-columns: 1fr; }
  .principle-grid article { min-height: 190px; }
  .footer-inner { flex-direction: column; }
}

@media (max-width: 560px) {
  .header-inner,
  .footer-inner,
  .legal-id,
  .hero,
  .principles,
  .legal-page,
  .not-found { width: min(100% - 28px, 1180px); }
  .status-pill { font-size: .58rem; }
  .hero { padding: 54px 0 66px; }
  .hero h1 { font-size: clamp(2.85rem, 15vw, 4.2rem); }
  .hero-actions { flex-direction: column; }
  .button { width: 100%; }
  .proof-header span:last-child { display: none; }
  pre { min-height: 260px; font-size: .66rem; }
  .flow { grid-template-columns: 1fr; padding: 22px; gap: 12px; }
  .flow-line { top: 28px; bottom: 28px; left: 41px; right: auto; width: 1px; height: auto; }
  .flow-line i { display: none; }
  .flow > div { display: flex; align-items: center; gap: 14px; text-align: left; }
  .flow b { margin: 0; flex: 0 0 40px; }
  .principles { padding: 84px 0; }
  .site-footer nav { align-items: flex-start; flex-direction: column; gap: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
