/* CoreRoute — landing styles. No external fonts or CDNs. */

:root {
  --bg: #0a0f1c;
  --bg-2: #0d1426;
  --surface: #111a2f;
  --surface-2: #16213b;
  --line: #1f2c4a;
  --text: #e7edf7;
  --muted: #9fb0c9;
  --accent: #22d3ee;
  --accent-2: #34d399;
  --accent-ink: #04222a;
  --radius: 14px;
  --radius-sm: 10px;
  --container: 1160px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  color-scheme: dark;
}

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

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background:
    radial-gradient(1100px 600px at 85% -10%, rgba(34, 211, 238, 0.10), transparent 60%),
    radial-gradient(900px 500px at -10% 20%, rgba(52, 211, 153, 0.07), transparent 60%),
    var(--bg);
  text-rendering: optimizeLegibility;
}

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

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

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

h1, h2, h3 { line-height: 1.2; margin: 0 0 0.6em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); font-weight: 750; }
h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 650; }
p { margin: 0 0 1em; }

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

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: var(--radius-sm);
  font-weight: 600;
}
.skip-link:focus { top: 12px; }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 15, 28, 0.82);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}

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

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 750;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}
.logo:hover { text-decoration: none; }
.logo svg { width: 30px; height: 30px; }
.logo span b { color: var(--accent); font-weight: 750; }

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

.nav a {
  color: var(--muted);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.95rem;
}
.nav a:hover { color: var(--text); background: var(--surface); text-decoration: none; }

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

.lang-switch {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  font-size: 0.85rem;
  font-weight: 600;
}
.lang-switch a,
.lang-switch span {
  padding: 5px 11px;
  color: var(--muted);
}
.lang-switch a:hover { color: var(--text); text-decoration: none; background: var(--surface); }
.lang-switch [aria-current="true"] { background: var(--surface-2); color: var(--text); }

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}
.nav-toggle svg { width: 22px; height: 22px; margin: 0 auto; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 650;
  font-size: 0.98rem;
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--accent-ink);
}
.btn-ghost {
  border-color: var(--line);
  color: var(--text);
  background: rgba(17, 26, 47, 0.6);
}
.btn-ghost:hover { border-color: var(--accent); }
.btn-sm { padding: 8px 14px; font-size: 0.9rem; }

/* ---------- Hero ---------- */

.hero { padding: 84px 0 72px; }

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(17, 26, 47, 0.7);
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
}
.eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.18);
}

.hero h1 .grad {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lead {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 36em;
}

.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 32px; }

.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 0.93rem;
}
.hero-points li { display: inline-flex; align-items: center; gap: 8px; }
.hero-points li::before {
  content: "";
  width: 14px;
  height: 14px;
  flex: none;
  background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%2334d399' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M3 8.5l3 3 7-7'/%3E%3C/svg%3E");
}

.hero-visual {
  position: relative;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(22, 33, 59, 0.75), rgba(13, 20, 38, 0.75));
  box-shadow: 0 30px 80px -40px rgba(34, 211, 238, 0.35);
}

.route-map { width: 100%; height: auto; }
.route-map .box { fill: #0f1830; stroke: #2a3a60; stroke-width: 1.5; }
.route-map .box-cloud { fill: #0f1d2c; stroke: #1f5866; }
.route-map .hub { fill: #0e2530; stroke: var(--accent); stroke-width: 2; }
.route-map .label { fill: var(--text); font: 600 15px var(--font); text-anchor: middle; }
.route-map .sub { fill: var(--muted); font: 12px var(--mono); text-anchor: middle; }
.route-map .wire { fill: none; stroke: #263659; stroke-width: 2.5; }
.route-map .flow {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-dasharray: 6 14;
  animation: flow 1.6s linear infinite;
}
.route-map .flow-2 { stroke: var(--accent-2); animation-duration: 2.1s; }
.route-map .ring { fill: none; stroke: var(--accent); stroke-opacity: 0.35; stroke-width: 1.5; }

@keyframes flow { to { stroke-dashoffset: -40; } }

.visual-caption {
  margin: 10px 4px 0;
  color: var(--muted);
  font-size: 0.85rem;
  font-family: var(--mono);
}

/* ---------- Sections ---------- */

.section { padding: 88px 0; }
.section-alt {
  background: linear-gradient(180deg, rgba(13, 20, 38, 0.9), rgba(13, 20, 38, 0.4));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-head { max-width: 720px; margin-bottom: 44px; }
.section-head p { color: var(--muted); font-size: 1.07rem; }

.kicker {
  display: block;
  margin-bottom: 10px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

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

.card {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface), rgba(17, 26, 47, 0.55));
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.card:hover { border-color: #2c4a72; transform: translateY(-2px); }
.card p { color: var(--muted); margin-bottom: 0.8em; }

.card-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 18px;
  border-radius: 12px;
  background: rgba(34, 211, 238, 0.10);
  border: 1px solid rgba(34, 211, 238, 0.25);
  color: var(--accent);
}
.card-icon svg { width: 24px; height: 24px; }

.ticks { margin: 0; padding: 0; list-style: none; font-size: 0.94rem; }
.ticks li {
  position: relative;
  padding-left: 22px;
  margin-top: 6px;
  color: var(--text);
}
.ticks li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.62em;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--accent-2);
  transform: rotate(45deg);
}

/* ---------- Process ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.steps li {
  position: relative;
  padding: 24px 20px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  counter-increment: step;
}
.steps li::before {
  content: "0" counter(step);
  display: block;
  margin-bottom: 12px;
  color: var(--accent);
  font-family: var(--mono);
  font-weight: 700;
}
.steps li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 34px;
  right: -17px;
  width: 18px;
  border-top: 2px dashed #2a3a60;
}
.steps h3 { font-size: 1.05rem; }
.steps p { margin: 0; color: var(--muted); font-size: 0.93rem; }

/* ---------- Network-first split ---------- */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.checklist { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.checklist li {
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  background: var(--surface);
}
.checklist strong { display: block; margin-bottom: 4px; }
.checklist span { color: var(--muted); font-size: 0.95rem; }

.terminal {
  margin: 0;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #070b16;
  color: #cfe3f5;
  font: 0.88rem/1.7 var(--mono);
  overflow-x: auto;
  white-space: pre;
}
.terminal .c { color: #5f7396; }
.terminal .k { color: var(--accent); }
.terminal .v { color: var(--accent-2); }

/* ---------- Stack ---------- */

.stack-groups { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.stack-groups h3 { font-size: 0.95rem; color: var(--muted); font-weight: 600; margin-bottom: 12px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.chips li {
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: 0.88rem;
}

/* ---------- Engagement ---------- */

.plan { display: flex; flex-direction: column; }
.plan .plan-tag {
  align-self: flex-start;
  margin-bottom: 14px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(52, 211, 153, 0.12);
  color: var(--accent-2);
  font-size: 0.8rem;
  font-weight: 650;
}
.plan .ticks { margin-top: auto; padding-top: 8px; }
.plan-featured { border-color: rgba(34, 211, 238, 0.45); box-shadow: 0 20px 60px -35px rgba(34, 211, 238, 0.5); }

.ownership {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 28px;
}
.ownership div {
  padding: 18px;
  border: 1px dashed #2a3a60;
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 0.94rem;
}
.ownership strong { display: block; color: var(--text); margin-bottom: 4px; }

/* ---------- FAQ ---------- */

.faq { max-width: 860px; }
.faq details {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  margin-bottom: 12px;
}
.faq summary {
  position: relative;
  padding: 18px 52px 18px 20px;
  cursor: pointer;
  font-weight: 650;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--accent);
  font: 600 1.4rem var(--mono);
}
.faq details[open] summary::after { content: "\2212"; }
.faq details p { padding: 0 20px 18px; margin: 0; color: var(--muted); }

/* ---------- Contact ---------- */

.contact-card {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  padding: 44px;
  border: 1px solid rgba(34, 211, 238, 0.35);
  border-radius: 22px;
  background:
    radial-gradient(600px 300px at 100% 0%, rgba(34, 211, 238, 0.12), transparent 70%),
    var(--surface);
}
.contact-card p { color: var(--muted); }

.email-link {
  display: inline-block;
  margin: 8px 0 18px;
  font: 700 clamp(1.3rem, 3vw, 1.9rem) var(--font);
  color: var(--text);
  word-break: break-all;
}
.email-link:hover { color: var(--accent); text-decoration: none; }

.contact-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.copy-status { color: var(--accent-2); font-size: 0.9rem; min-height: 1.4em; }

.brief h3 { font-size: 1rem; }
.brief ol { margin: 0; padding-left: 20px; color: var(--muted); }
.brief li { margin-bottom: 8px; }

/* ---------- Footer ---------- */

.site-footer {
  padding: 36px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
}
.footer-inner nav { display: flex; flex-wrap: wrap; gap: 18px; }
.footer-inner a { color: var(--muted); }
.footer-inner a:hover { color: var(--text); }

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

.notfound {
  min-height: 70vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 80px 0;
}
.notfound .code { font: 700 4.5rem var(--mono); color: var(--accent); margin-bottom: 8px; }
.notfound .actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 24px; }

/* ---------- Responsive ---------- */

@media (max-width: 1080px) {
  .steps { grid-template-columns: repeat(3, 1fr); }
  .steps li::after { display: none; }
  .stack-groups { grid-template-columns: repeat(2, 1fr); }
  .ownership { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .nav {
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 12px 16px 18px;
    background: var(--bg-2);
    border-bottom: 1px solid var(--line);
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 12px; }
  .header-actions { margin-left: auto; }
  .header-actions .btn { display: none; }

  .hero { padding-top: 56px; }
  .hero-grid,
  .split,
  .contact-card { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .contact-card { padding: 30px; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .section { padding: 64px 0; }
  .grid-3,
  .grid-2,
  .steps,
  .stack-groups,
  .ownership { grid-template-columns: 1fr; }
  .contact-card { padding: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .route-map .flow { animation: none; }
  .btn, .card { transition: none; }
}
