/* Gateway marketing site. Self-contained: no build step touches this file,
   it ships to the browser exactly as written here. */

:root {
  color-scheme: light;

  --font-serif: ui-serif, Georgia, Cambria, 'Times New Roman', Times, serif;
  --font-sans:
    ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, 'SFMono-Regular', Menlo, Consolas, 'Liberation Mono', monospace;

  --color-bg: #ffffff;
  --color-bg-subtle: #f6f7f8;
  --color-bg-inset: #eef0f2;
  --color-border: #d8dade;
  --color-border-strong: #b9bcc2;
  --color-text: #1a1b1e;
  --color-text-muted: #5b5e66;
  --color-text-faint: #8a8d94;
  --color-text-on-accent: #ffffff;

  --color-accent: #2452c8;
  --color-accent-strong: #1c3fa0;
  --color-accent-muted: #e8edfb;

  --radius: 6px;
  --border-width: 1px;
  --max-width: 880px;
}

:root[data-theme='dark'] {
  color-scheme: dark;
  --color-bg: #101113;
  --color-bg-subtle: #17181b;
  --color-bg-inset: #1d1f23;
  --color-border: #2b2d32;
  --color-border-strong: #3c3f45;
  --color-text: #e8e9eb;
  --color-text-muted: #a6a9b0;
  --color-text-faint: #75787f;
  --color-text-on-accent: #0b1020;
  --color-accent: #7b9cf2;
  --color-accent-strong: #9db4f5;
  --color-accent-muted: #1c2740;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    color-scheme: dark;
    --color-bg: #101113;
    --color-bg-subtle: #17181b;
    --color-bg-inset: #1d1f23;
    --color-border: #2b2d32;
    --color-border-strong: #3c3f45;
    --color-text: #e8e9eb;
    --color-text-muted: #a6a9b0;
    --color-text-faint: #75787f;
    --color-text-on-accent: #0b1020;
    --color-accent: #7b9cf2;
    --color-accent-strong: #9db4f5;
    --color-accent-muted: #1c2740;
  }
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
}

h1,
h2,
h3 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.25;
  margin: 0 0 0.6em;
}

h1 {
  font-size: 2.25rem;
  letter-spacing: -0.01em;
}

h2 {
  font-size: 1.5rem;
}

h3 {
  font-size: 1.15rem;
}

p {
  margin: 0 0 1em;
}

a {
  color: var(--color-accent);
}

code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--color-bg-inset);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--color-accent);
  color: var(--color-text-on-accent);
  padding: 0.5em 1em;
  z-index: 10;
}

.skip-link:focus {
  left: 0.5em;
  top: 0.5em;
}

:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* Header */

.site-header {
  border-bottom: var(--border-width) solid var(--color-border);
}

.site-header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.25rem;
  color: var(--color-text);
  text-decoration: none;
}

.brand-mark {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.site-header-inner nav {
  display: flex;
  gap: 1.5rem;
  flex: 1;
}

.site-header-inner nav a {
  color: var(--color-text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
}

.site-header-inner nav a:hover,
.site-header-inner nav a[aria-current='page'] {
  color: var(--color-text);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.theme-toggle {
  border: var(--border-width) solid var(--color-border-strong);
  background: var(--color-bg);
  color: var(--color-text);
  border-radius: var(--radius);
  width: 32px;
  height: 32px;
  cursor: pointer;
}

/* Buttons */

.button-primary,
.button-secondary {
  display: inline-block;
  padding: 0.6em 1.1em;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  border: var(--border-width) solid transparent;
}

.button-primary {
  background: var(--color-accent);
  color: var(--color-text-on-accent);
}

.button-primary:hover {
  background: var(--color-accent-strong);
}

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

.button-secondary:hover {
  background: var(--color-bg-subtle);
}

/* Layout */

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.section {
  padding: 3rem 0;
  border-top: var(--border-width) solid var(--color-border);
}

.section:first-child,
.hero {
  border-top: none;
}

.hero {
  padding: 4rem 0 3rem;
}

.lede {
  font-size: 1.15rem;
  color: var(--color-text-muted);
  max-width: 60ch;
}

.hero-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.cta-section {
  text-align: center;
}

.cta-section .lede {
  margin-left: auto;
  margin-right: auto;
}

/* Grids and cards */

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.card {
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.card h3 {
  margin-bottom: 0.4em;
}

.card p {
  color: var(--color-text-muted);
  margin: 0;
  font-size: 0.95rem;
}

@media (max-width: 640px) {
  .grid-3,
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

/* Pricing */

.pricing-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.pricing-card-highlight {
  border-color: var(--color-accent);
}

.price {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 600;
  margin: 0;
}

.price-period {
  font-size: 1rem;
  font-weight: 400;
  color: var(--color-text-muted);
}

.feature-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  color: var(--color-text-muted);
}

.feature-list li::before {
  content: '\00B7\0020';
  color: var(--color-text-faint);
}

/* Steps */

.steps {
  padding-left: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.steps li {
  padding-left: 0.25rem;
}

/* Code block with copy button */

.code-block {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.6rem;
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-bg-inset);
  padding: 0.6rem 0.75rem;
  overflow-x: auto;
}

.code-block pre {
  margin: 0;
  flex: 1;
  overflow-x: auto;
}

.code-block code {
  background: none;
  padding: 0;
  white-space: pre;
}

.copy-button {
  flex-shrink: 0;
  border: var(--border-width) solid var(--color-border-strong);
  background: var(--color-bg);
  color: var(--color-text);
  border-radius: var(--radius);
  padding: 0.3em 0.7em;
  font-size: 0.8rem;
  cursor: pointer;
}

.copy-button:hover {
  background: var(--color-bg-subtle);
}

/* Architecture diagram */

.diagram {
  margin: 1.5rem 0 0;
}

.diagram svg {
  width: 100%;
  height: auto;
  max-width: 720px;
}

.diagram-box {
  fill: var(--color-bg);
  stroke: var(--color-border-strong);
  stroke-width: 1;
}

.diagram-box-trust {
  stroke: var(--color-accent);
}

.diagram-box-future {
  fill: none;
  stroke: var(--color-text-faint);
  stroke-dasharray: 4 3;
}

.diagram-label {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  fill: var(--color-text);
}

.diagram-sublabel {
  font-family: var(--font-sans);
  font-size: 11px;
  fill: var(--color-text-muted);
}

.diagram-edge {
  stroke: var(--color-text-faint);
  stroke-width: 1.5;
}

.diagram-edge-future {
  stroke-dasharray: 4 3;
}

.diagram-arrowhead {
  fill: var(--color-text-faint);
}

.diagram figcaption {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

/* Footer */

.site-footer {
  border-top: var(--border-width) solid var(--color-border);
  margin-top: 3rem;
}

.site-footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.5rem 1.25rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  color: var(--color-text-muted);
  font-size: 0.85rem;
}

.site-footer-inner nav {
  display: flex;
  gap: 1rem;
}

.site-footer-inner a {
  color: var(--color-text-muted);
}
