/* deepmind B2B portal — standalone static styles */

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

:root {
  --bg: #09090b;
  --panel: #111113;
  --panel-elevated: #18181b;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --line-soft: rgba(255, 255, 255, 0.05);
  --rim-light: inset 0 1px 0 0 rgba(255, 255, 255, 0.09);
  --text: #fafafa;
  --muted: #a1a1aa;
  --accent: #38d0ff;
  --accent-strong: #7bddff;
  --green: #34d399;
  --amber: #fbbf24;
  --red: #f87171;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --container: 1160px;
  --mono: ui-monospace, "SFMono-Regular", "Menlo", "Consolas", "Liberation Mono", monospace;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
}

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

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(900px 520px at 78% -10%, rgba(56, 208, 255, 0.14), transparent 62%),
    radial-gradient(700px 520px at -10% 18%, rgba(56, 111, 255, 0.1), transparent 60%),
    linear-gradient(rgba(27, 42, 68, 0.28) 1px, transparent 1px),
    linear-gradient(90deg, rgba(27, 42, 68, 0.28) 1px, transparent 1px);
  background-size: auto, auto, 72px 72px, 72px 72px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.25) 42%, transparent 72%);
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.25) 42%, transparent 72%);
}

::selection {
  background: rgba(56, 208, 255, 0.3);
  color: #fff;
}

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

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

h1,
h2,
h3,
h4,
p,
ul {
  margin: 0;
}

ul {
  padding: 0;
  list-style: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

code,
pre {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

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

[hidden] {
  display: none !important;
}

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

.skip-link {
  position: absolute;
  top: -48px;
  left: 16px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #04101f;
  font-weight: 600;
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: 12px;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.container-narrow {
  max-width: 860px;
}

.muted {
  color: var(--muted);
}

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(5, 11, 24, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  flex: none;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.brand-mark {
  width: auto;
  height: 19px;
  flex: none;
  display: block;
}

.brand-name {
  font-size: 17px;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.65;
  }
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-right: auto;
}

.site-nav a {
  padding: 8px 11px;
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
  transition: color 0.15s ease, background 0.15s ease;
}

.site-nav a:hover {
  color: var(--text);
  background: rgba(147, 164, 191, 0.08);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.lang-wrap {
  display: inline-flex;
}

.lang-select {
  appearance: none;
  -webkit-appearance: none;
  height: 34px;
  padding: 0 26px 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background-color: transparent;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5' fill='none' stroke='%2393a4bf' stroke-width='1.4' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 12px;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
}

.lang-select:hover {
  border-color: #2b3f60;
  color: var(--text);
}

.lang-select option {
  background: var(--panel);
  color: var(--text);
}

.menu-toggle {
  display: none;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  align-items: center;
  justify-content: center;
}

.menu-bars,
.menu-bars::before,
.menu-bars::after {
  display: block;
  width: 16px;
  height: 1.5px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.menu-bars::before,
.menu-bars::after {
  content: "";
  position: relative;
}

.menu-bars::before {
  top: -5px;
}

.menu-bars::after {
  top: 3.5px;
}

.menu-toggle[aria-expanded="true"] .menu-bars {
  background: transparent;
}

.menu-toggle[aria-expanded="true"] .menu-bars::before {
  transform: translateY(5px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-bars::after {
  transform: translateY(-3.5px) rotate(-45deg);
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  padding: 0 18px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease,
    border-color 0.2s ease, color 0.2s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: linear-gradient(180deg, #63ddff, var(--accent));
  color: #04101f;
  box-shadow: 0 4px 18px rgba(56, 208, 255, 0.22);
}

.btn-primary:hover {
  background: linear-gradient(180deg, #7ce4ff, #45d5ff);
  box-shadow: 0 10px 34px rgba(56, 208, 255, 0.32);
  transform: translateY(-1px);
}

.btn-outline {
  border-color: var(--line);
  background: rgba(13, 26, 46, 0.5);
  color: var(--text);
}

.btn-outline:hover {
  border-color: #33507a;
  background: rgba(13, 26, 46, 0.9);
}

.btn-ghost {
  color: var(--muted);
}

.btn-ghost:hover {
  color: var(--text);
  background: rgba(147, 164, 191, 0.08);
}

.btn-sm {
  height: 34px;
  padding: 0 13px;
  font-size: 13px;
  border-radius: 8px;
}

.btn-block {
  width: 100%;
}

.text-link {
  color: var(--accent);
  font-size: 14px;
  font-weight: 500;
}

.text-link:hover {
  color: var(--accent-strong);
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  padding: 92px 0 72px;
  overflow: hidden;
}

.glow {
  position: absolute;
  top: -260px;
  right: -220px;
  width: 560px;
  height: 560px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(56, 208, 255, 0.07), transparent 68%);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(0, 0.94fr);
  gap: 56px;
  align-items: center;
}

.hero-copy {
  max-width: 620px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(10, 20, 36, 0.7);
  color: var(--muted);
  font-size: 12.5px;
  letter-spacing: 0.01em;
}

.pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px rgba(52, 211, 153, 0.7);
}

.hero h1 {
  margin-top: 22px;
  font-size: clamp(2.35rem, 4vw, 3.55rem);
  line-height: 1.16;
  letter-spacing: -0.025em;
  font-weight: 700;
  background: linear-gradient(180deg, #f4f9ff 30%, #a9c4e4);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede {
  margin-top: 20px;
  max-width: 560px;
  color: var(--muted);
  font-size: 16.5px;
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 30px;
}

.announce {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 30px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-left: 2px solid var(--accent);
  border-radius: var(--radius-sm);
  background: rgba(13, 26, 46, 0.55);
  font-size: 13.5px;
  color: var(--muted);
  max-width: 560px;
}

.announce-label {
  flex: none;
  margin-top: 1px;
  padding: 1px 7px;
  border-radius: 4px;
  background: rgba(56, 208, 255, 0.12);
  color: var(--accent);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.announce-text {
  white-space: pre-line;
  word-break: break-word;
}

/* ---------- code card ---------- */

.code-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(15, 29, 51, 0.95), rgba(7, 15, 28, 0.98));
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  overflow: hidden;
}

.code-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line-soft);
}

.code-dots {
  display: flex;
  gap: 6px;
  flex: none;
}

.code-dots i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #24344f;
}

.code-dots i:first-child {
  background: #f87171;
}

.code-dots i:nth-child(2) {
  background: #fbbf24;
}

.code-dots i:nth-child(3) {
  background: #34d399;
}

.code-tabs {
  display: flex;
  gap: 2px;
  margin-right: auto;
}

.tab {
  padding: 5px 10px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 12.5px;
  font-family: var(--mono);
}

.tab:hover {
  color: var(--text);
}

.tab.is-active {
  background: rgba(56, 208, 255, 0.12);
  color: var(--accent);
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.copy-btn:hover {
  color: var(--text);
  border-color: #33507a;
  background: rgba(147, 164, 191, 0.06);
}

.copy-btn.is-copied {
  color: var(--green);
  border-color: rgba(52, 211, 153, 0.4);
}

.code-body {
  min-height: 322px;
  margin: 0;
  padding: 20px 18px;
  overflow: auto;
  color: #c9dcf3;
  font-size: 12.8px;
  line-height: 1.72;
  tab-size: 2;
}

.code-body code {
  white-space: pre;
}

.code-foot {
  padding: 11px 16px;
  border-top: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: 12px;
}

/* ---------- sections ---------- */

.section {
  padding: 78px 0;
}

.section-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.eyebrow {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
}

.section h2 {
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  letter-spacing: -0.02em;
  font-weight: 650;
}

.section-sub {
  flex-basis: 100%;
  color: var(--muted);
  font-size: 14.5px;
  margin-top: -14px;
}

/* ---------- bento ---------- */

.bento {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 18px;
}

.card {
  grid-column: span 6;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(13, 26, 46, 0.72), rgba(8, 17, 32, 0.82));
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.card:hover {
  border-color: #2b4468;
  transform: translateY(-2px);
}

.card-wide {
  grid-column: span 7;
}

.bento > .card:nth-child(2) {
  grid-column: span 5;
}

.card h3 {
  font-size: 16.5px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.card p {
  margin-top: 9px;
  color: var(--muted);
  font-size: 13.8px;
  line-height: 1.7;
}

.flow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 26px;
}

.flow-node {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(10, 20, 36, 0.9);
  font-size: 12.3px;
  color: var(--muted);
  line-height: 1.35;
}

.flow-node.is-accent {
  border-color: rgba(56, 208, 255, 0.42);
  background: rgba(56, 208, 255, 0.07);
  color: var(--text);
  box-shadow: 0 0 24px rgba(56, 208, 255, 0.1);
}

.flow-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  flex: none;
  border-radius: 7px;
  background: rgba(147, 164, 191, 0.1);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
}

.flow-node.is-accent .flow-icon {
  background: rgba(56, 208, 255, 0.16);
  color: var(--accent);
}

.flow-line {
  position: relative;
  flex: 1;
  min-width: 18px;
  height: 1px;
  background: linear-gradient(90deg, var(--line), rgba(56, 208, 255, 0.5), var(--line));
}

.flow-line i {
  position: absolute;
  top: -2px;
  left: 0;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  animation: travel 3.4s linear infinite;
}

@keyframes travel {
  0% {
    left: 0;
    opacity: 0;
  }
  12% {
    opacity: 1;
  }
  88% {
    opacity: 1;
  }
  100% {
    left: calc(100% - 5px);
    opacity: 0;
  }
}

.spec-list {
  margin-top: 20px;
}

.spec-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-top: 1px dashed var(--line);
  font-size: 13.5px;
  color: var(--muted);
}

.spec-list strong {
  color: var(--text);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
}

.spec-list strong.is-on {
  color: var(--green);
}

.spec-list strong.is-off {
  color: var(--amber);
}

.check-list {
  margin-top: 16px;
  display: grid;
  gap: 10px;
}

.check-list li {
  position: relative;
  padding-left: 24px;
  color: var(--muted);
  font-size: 13.8px;
  line-height: 1.6;
}

.check-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--accent);
  font-weight: 700;
}

/* ---------- ecosystem ---------- */

.eco-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 22px;
}

.chip {
  padding: 8px 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(10, 20, 36, 0.6);
  color: var(--muted);
  font-size: 13px;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.chip:hover {
  color: var(--text);
  border-color: #2b4468;
}

.chip.is-active {
  border-color: rgba(56, 208, 255, 0.5);
  background: rgba(56, 208, 255, 0.1);
  color: var(--accent);
}

.eco-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 22px;
  align-items: center;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(13, 26, 46, 0.72), rgba(8, 17, 32, 0.82));
}

.eco-panel h3 {
  font-size: 15.5px;
  font-weight: 650;
}

.eco-panel p {
  margin-top: 7px;
  color: var(--muted);
  font-size: 13.8px;
  line-height: 1.7;
  max-width: 640px;
}

.endpoint-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px 9px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(5, 11, 24, 0.6);
}

.endpoint-label {
  color: var(--muted);
  font-size: 11.5px;
  white-space: nowrap;
}

.endpoint-row code {
  color: var(--accent-strong);
  font-size: 12.5px;
  white-space: nowrap;
}

.eco-hint {
  margin-top: 14px;
  color: var(--muted);
  font-size: 12.8px;
}

/* ---------- steps ---------- */

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

.step {
  position: relative;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(13, 26, 46, 0.66), rgba(8, 17, 32, 0.8));
}

.step-no {
  display: inline-block;
  margin-bottom: 16px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
}

.step h3 {
  font-size: 15.5px;
  font-weight: 650;
}

.step p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13.6px;
  line-height: 1.68;
}

/* ---------- faq ---------- */

.faq-list {
  display: grid;
  gap: 10px;
}

.faq-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(10, 20, 36, 0.55);
  overflow: hidden;
}

.faq-item summary {
  position: relative;
  padding: 16px 48px 16px 20px;
  color: var(--text);
  font-size: 14.5px;
  font-weight: 550;
  cursor: pointer;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  position: absolute;
  top: 50%;
  right: 20px;
  transform: translateY(-50%);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 18px;
  transition: transform 0.18s ease;
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-item[open] summary {
  color: var(--accent-strong);
}

.faq-answer {
  padding: 0 20px 18px;
  color: var(--muted);
  font-size: 13.8px;
  line-height: 1.75;
  white-space: pre-line;
  word-break: break-word;
}

/* ---------- footer ---------- */

.site-footer {
  margin-top: 40px;
  border-top: 1px solid var(--line-soft);
  background: rgba(4, 9, 19, 0.7);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
  padding-top: 52px;
  padding-bottom: 44px;
}

.footer-brand p {
  margin-top: 12px;
  color: var(--muted);
  font-size: 13.5px;
}

.mini-badge {
  display: inline-block;
  margin-top: 14px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 11.5px;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 9px;
  align-items: flex-start;
}

.footer-col h4 {
  margin-bottom: 5px;
  color: var(--text);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.footer-col a,
.footer-col span {
  color: var(--muted);
  font-size: 13px;
}

.footer-col a:hover {
  color: var(--accent);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  padding-top: 20px;
  padding-bottom: 30px;
  border-top: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: 12.5px;
}

.footer-entity {
  font-size: 12px;
}

/* ---------- dialog ---------- */

.apply-dialog {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
}

.apply-dialog::backdrop {
  background: rgba(2, 6, 14, 0.72);
  backdrop-filter: blur(4px);
}

.dialog-card {
  position: relative;
  width: min(520px, calc(100vw - 32px));
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, #0e1b30, #081221);
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.6);
}

.dialog-card h3 {
  font-size: 19px;
  letter-spacing: -0.01em;
}

.dialog-card > p {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13.8px;
  line-height: 1.7;
}

.dialog-card .check-list {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(5, 11, 24, 0.55);
}

.dialog-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  color: var(--muted);
}

.dialog-close:hover {
  background: rgba(147, 164, 191, 0.1);
  color: var(--text);
}

.dialog-contact {
  margin: 18px 0 22px;
  font-size: 13.5px;
}

.dialog-contact a {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 13px;
}

.dialog-contact p {
  margin-top: 6px;
  color: var(--muted);
}

/* ---------- responsive ---------- */

@media (max-width: 1280px) {
  .header-inner {
    gap: 16px;
  }

  .site-nav {
    gap: 0;
  }

  .site-nav a {
    padding: 8px 9px;
    font-size: 13.5px;
  }
}

@media (max-width: 1180px) {
  .hide-sm {
    display: none;
  }
}

@media (max-width: 1080px) {
  .hide-sm {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
    margin-left: auto;
  }

  .site-nav {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 12px 24px 18px;
    border-bottom: 1px solid var(--line);
    background: var(--bg);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a {
    padding: 10px 12px;
    font-size: 14px;
  }

  .header-actions {
    margin-left: 0;
  }
}

@media (max-width: 960px) {
  .hero {
    padding: 64px 0 48px;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }

  .hero-copy {
    max-width: none;
  }

  .code-body {
    min-height: 0;
  }

  .card,
  .card-wide,
  .bento > .card:nth-child(2) {
    grid-column: span 12;
  }

  .eco-panel {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }

  .endpoint-row {
    width: 100%;
  }

  .endpoint-row code {
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .steps {
    grid-template-columns: minmax(0, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 560px) {
  .container {
    padding: 0 18px;
  }

  .header-inner {
    gap: 12px;
  }

  .header-actions {
    gap: 8px;
  }

  .header-actions .btn-primary {
    display: none;
  }

  .header-actions .lang-select {
    max-width: 92px;
    padding-right: 22px;
  }

  .hero h1 {
    font-size: 2.05rem;
  }

  .lede {
    font-size: 15.5px;
  }

  .flow {
    flex-direction: column;
    align-items: stretch;
  }

  .flow-line {
    flex: none;
    width: 1px;
    min-width: 0;
    height: 18px;
    margin-left: 22px;
    background: linear-gradient(180deg, var(--line), rgba(56, 208, 255, 0.5), var(--line));
  }

  .flow-line i {
    display: none;
  }

  .footer-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 26px;
    padding-top: 40px;
  }

  .dialog-card {
    padding: 24px 20px;
  }
}

/* ---------- inner pages ---------- */

.site-nav a[aria-current="page"] {
  color: var(--text);
}

.page-hero {
  position: relative;
  padding: 74px 0 46px;
  overflow: hidden;
}

.page-hero::before {
  content: "";
  position: absolute;
  inset: -30% 20% auto;
  height: 420px;
  background: radial-gradient(closest-side, rgba(56, 208, 255, 0.12), transparent);
  pointer-events: none;
}

.crumbs {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 12.5px;
}

.crumbs a {
  color: var(--muted);
}

.crumbs a:hover {
  color: var(--accent);
}

.crumbs span[aria-hidden] {
  opacity: 0.5;
}

.page-hero h1 {
  max-width: 820px;
  margin: 18px 0 0;
  font-size: clamp(30px, 4.2vw, 50px);
  line-height: 1.16;
  letter-spacing: -0.02em;
}

.page-hero .lede {
  max-width: 780px;
  margin-top: 18px;
}

.page-hero .hero-actions {
  margin-top: 28px;
}

.page-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 42px;
}

.page-stat {
  padding: 16px 18px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(13, 26, 46, 0.75), rgba(7, 16, 30, 0.55));
}

.page-stat dt {
  display: block;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.page-stat dd {
  display: block;
  margin: 7px 0 0;
  font-size: 14px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.page-body {
  padding-bottom: 40px;
}

.page-section {
  padding: 38px 0;
  border-top: 1px solid var(--line-soft);
}

.page-section:first-child {
  border-top: 0;
}

.page-section h2 {
  margin: 0;
  font-size: clamp(22px, 2.6vw, 30px);
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.page-section .section-sub {
  max-width: 720px;
  margin-top: 10px;
}

.page-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 26px;
}

.page-cards.cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.page-cards.cols-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.page-card {
  padding: 22px;
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(13, 26, 46, 0.66), rgba(6, 14, 27, 0.6));
}

.page-card h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.45;
}

.page-card p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.75;
}

.page-card ul {
  margin: 12px 0 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.8;
}

.page-card li::marker {
  color: var(--accent);
}

.page-split {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.9fr);
  gap: 30px;
  align-items: start;
  margin-top: 24px;
}

.page-split p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.9;
}

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

.page-panel {
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(9, 19, 35, 0.72);
}

.page-panel h3 {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.page-panel-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 13px;
}

.page-panel-row:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.page-panel-row span {
  flex: none;
  color: var(--muted);
}

.page-panel-row strong {
  min-width: 0;
  font-weight: 500;
  text-align: right;
  overflow-wrap: anywhere;
}

.panel-rows {
  margin: 0;
}

.panel-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 13px;
}

.panel-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.panel-row dt {
  color: var(--muted);
  flex: none;
}

.panel-row dd {
  margin: 0;
  text-align: right;
  overflow-wrap: anywhere;
}

.page-body .steps.steps-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.page-table-wrap,
.table-wrap {
  margin-top: 24px;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow-x: auto;
  max-width: 100%;
}

.page-table {
  width: 100%;
  min-width: 600px;
  border-collapse: collapse;
}

.page-table th,
.page-table td {
  padding: 13px 18px;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
  font-size: 13.5px;
  vertical-align: top;
}

.page-table th {
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(9, 19, 35, 0.7);
}

.page-table tr:last-child td {
  border-bottom: 0;
}

.page-table td:first-child {
  color: var(--text);
  white-space: nowrap;
}

.page-code {
  margin-top: 24px;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background: #030814;
}

.page-code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: 12px;
}

.page-code pre {
  margin: 0;
  padding: 18px 18px 22px;
  overflow-x: auto;
  color: #cfe3ff;
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);
  font-size: 12.5px;
  line-height: 1.75;
}

.page-note {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  padding: 14px 18px;
  border-left: 2px solid var(--accent);
  background: rgba(56, 208, 255, 0.06);
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.75;
}

.page-note::before {
  content: "i";
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  color: var(--accent);
  font-size: 11px;
  font-style: normal;
  line-height: 16px;
  text-align: center;
}

.page-prose p {
  max-width: 820px;
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.9;
}

.page-prose ul {
  margin: 16px 0 0;
  padding-left: 20px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.9;
}

.page-prose li::marker {
  color: var(--accent);
}

.page-cta,
.page-contact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  margin-top: 30px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    radial-gradient(600px 180px at 15% 0%, rgba(56, 208, 255, 0.1), transparent),
    rgba(9, 19, 35, 0.7);
}

.page-cta h2,
.page-contact h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.4;
}

.page-cta p,
.page-contact p {
  max-width: 620px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.75;
}

.page-cta .hero-actions,
.page-contact .hero-actions {
  flex: none;
  margin: 0;
}

.footer-policy {
  margin-top: 14px !important;
  font-size: 12px !important;
  line-height: 1.9;
  opacity: 0.85;
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  min-width: 0;
}

.footer-legal a {
  color: var(--muted);
}

@media (max-width: 960px) {
  .page-hero {
    padding: 54px 0 34px;
  }

  .page-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .page-cards,
  .page-cards.cols-4,
  .page-body .steps.steps-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .page-split {
    grid-template-columns: minmax(0, 1fr);
  }

  .page-cta,
  .page-contact {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 560px) {
  .page-cards,
  .page-cards.cols-2,
  .page-cards.cols-4,
  .page-body .steps.steps-4 {
    grid-template-columns: minmax(0, 1fr);
  }

  .page-cta,
  .page-contact {
    padding: 22px;
  }

  .page-cta .hero-actions,
  .page-contact .hero-actions {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* ---------- 3D hero core ---------- */

.hero-visual {
  position: relative;
  min-height: 460px;
  display: grid;
  place-items: center;
  isolation: isolate;
}

.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
  touch-action: pan-y;
}

.hero-canvas:active {
  cursor: grabbing;
}

.hero-hud {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(7, 15, 28, 0.74);
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10.5px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  backdrop-filter: blur(6px);
  white-space: nowrap;
}

.hero-hud::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

.hud-clients {
  top: 13%;
  left: 0;
}

.hud-gateway {
  top: 45%;
  right: 0;
}

.hud-upstreams {
  bottom: 11%;
  left: 9%;
}

.hero-scan {
  position: absolute;
  inset: 9% 5%;
  z-index: 1;
  border-radius: 50%;
  border: 1px solid rgba(56, 208, 255, 0.14);
  box-shadow: inset 0 0 60px rgba(56, 208, 255, 0.04);
  pointer-events: none;
}

.hero-scan::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0 82%, rgba(56, 208, 255, 0.35) 94%, transparent 100%);
  -webkit-mask: radial-gradient(circle, transparent 62%, #000 63%);
  mask: radial-gradient(circle, transparent 62%, #000 63%);
  animation: heroScan 14s linear infinite;
}

@keyframes heroScan {
  to {
    transform: rotate(360deg);
  }
}

.hero-sdk {
  margin-top: 34px;
}

.hero-sdk .hero-code {
  max-width: 760px;
  margin: 0 auto;
}

/* ---------- cursor spotlight / tilt ---------- */

.card,
.page-card,
.page-stat,
.stack-layer {
  --spot-x: 50%;
  --spot-y: 0%;
}

.card,
.page-card,
.page-stat {
  will-change: auto;
}

.card::after,
.page-card::after,
.page-stat::after,
.stack-layer::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
  background: radial-gradient(260px circle at var(--spot-x) var(--spot-y), rgba(56, 208, 255, 0.1), transparent 62%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.card:hover::after,
.page-card:hover::after,
.page-stat:hover::after,
.stack-layer:hover::after {
  opacity: 1;
}

.card.is-tilting,
.page-card.is-tilting,
.page-stat.is-tilting {
  will-change: transform;
}

/* ---------- isometric stack ---------- */

.stack-section {
  border-top: 0;
}

.stack-stage {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  gap: 54px;
  align-items: center;
  padding: 26px 0 14px;
}

.stack-scene {
  display: grid;
  place-items: center;
  min-height: 380px;
  perspective: 1400px;
}

.stack-board {
  position: relative;
  width: 300px;
  height: 220px;
  transform-style: preserve-3d;
  transform: rotateX(50deg) rotateZ(-35deg);
}

.stack-layer {
  position: absolute;
  inset: 0;
  z-index: calc(var(--i) + 1);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid rgba(56, 208, 255, 0.34);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(56, 208, 255, 0.16), rgba(52, 211, 153, 0.05));
  box-shadow: 0 20px 38px rgba(0, 0, 0, 0.34), inset 0 0 24px rgba(56, 208, 255, 0.05);
  transform: translateZ(calc(var(--i) * 27px));
  transition: transform 0.35s ease, border-color 0.35s ease, opacity 0.35s ease;
}

.stack-board:hover .stack-layer {
  opacity: 0.62;
}

.stack-layer:hover {
  z-index: 9;
  opacity: 1;
  border-color: var(--accent);
  transform: translateZ(calc(var(--i) * 27px + 18px));
}

.stack-no {
  flex: none;
  color: var(--accent);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  opacity: 0.82;
}

.stack-layer h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  text-align: right;
}

.stack-legend {
  display: grid;
  gap: 10px;
}

.stack-copy {
  position: relative;
  display: flex;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(13, 26, 46, 0.5);
}

.stack-copy h3 {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 600;
}

.stack-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.62;
}

.stack-copy .stack-no {
  padding-top: 2px;
}

/* ---------- horizon pages ---------- */

.page-hero {
  overflow: hidden;
}

body.is-horizon .page-hero::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -170px;
  z-index: 0;
  width: min(1100px, 96vw);
  height: 430px;
  transform: translateX(-50%) perspective(620px) rotateX(62deg);
  background-image:
    linear-gradient(rgba(56, 208, 255, 0.2) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56, 208, 255, 0.2) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent 86%);
  mask-image: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent 86%);
  opacity: 0.42;
  pointer-events: none;
}

body.is-horizon .page-hero .container {
  position: relative;
  z-index: 1;
}

/* ---------- branded 404 ---------- */

.not-found-hero {
  padding: 92px 0 108px;
}

.not-found-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  max-width: 640px;
  text-align: center;
}

.not-found-mark {
  width: 148px;
  color: var(--accent);
  opacity: 0.78;
}

.not-found-mark svg {
  display: block;
  width: 100%;
  height: auto;
}

.not-found-inner .lede {
  margin-top: 0;
}

/* ---------- 3D responsive ---------- */

@media (max-width: 1080px) {
  .hero-visual {
    min-height: 400px;
  }

  .stack-stage {
    gap: 36px;
  }
}

@media (max-width: 960px) {
  .hero-visual {
    min-height: 370px;
  }

  .stack-stage {
    grid-template-columns: minmax(0, 1fr);
    gap: 30px;
  }

  .stack-scene {
    display: block;
    min-height: 0;
    perspective: none;
  }

  .stack-board {
    display: grid;
    gap: 10px;
    width: auto;
    height: auto;
    transform: none;
  }

  .stack-layer {
    position: relative;
    inset: auto;
    z-index: auto;
    min-height: 74px;
    align-items: center;
    transform: none;
  }

  .stack-layer:hover {
    transform: none;
    border-color: var(--accent);
  }

  .stack-board:hover .stack-layer {
    opacity: 1;
  }

  .stack-layer h3 {
    text-align: left;
  }
}

@media (max-width: 560px) {
  .hero-visual {
    min-height: 300px;
  }

  .hero-hud {
    padding: 4px 6px;
    font-size: 9.5px;
    letter-spacing: 0.05em;
  }

  .hud-clients {
    top: 6%;
  }

  .hud-gateway {
    top: 47%;
  }

  .hud-upstreams {
    bottom: 5%;
    left: 4%;
  }

  .hero-sdk {
    margin-top: 24px;
  }

  .stack-layer {
    min-height: 0;
    padding: 12px 14px;
  }

  .not-found-hero {
    padding: 64px 0 78px;
  }

  .not-found-mark {
    width: 112px;
  }
}

@media (max-width: 560px) {
  .brand-mark {
    width: auto;
    height: 16px;
  }
}
