:root {
  --ink: #102033;
  --muted: #4a6278;
  --bg: #e8eef4;
  --surface: #f6f9fb;
  --band: #dfe8f0;
  --line: #c5d3e0;
  --accent: #1a6f96;
  --header: #0e1c2d;
  --header-muted: #b7c7d6;
  --on-dark: #f4f8fb;
  --sans: "Segoe UI", system-ui, sans-serif;
  --header-h: 76px;
  --wrap: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
#work, #projects, #company, #contacts { scroll-margin-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
}
a { color: inherit; }
.skip {
  position: absolute;
  left: 12px;
  top: -48px;
  background: var(--on-dark);
  color: var(--header);
  padding: 8px 12px;
  z-index: 5;
}
.skip:focus { top: 12px; }

.wrap {
  width: min(var(--wrap), calc(100% - 48px));
  margin: 0 auto;
}

.top {
  position: sticky;
  top: 0;
  z-index: 3;
  width: 100%;
  background: #fff;
  color: var(--ink);
  height: var(--header-h);
  border-bottom: 1px solid var(--line);
}
.top-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  min-height: 44px;
}
.brand-logo { height: 48px; width: auto; display: block; }
.nav { display: flex; gap: 6px; }
.nav a {
  text-decoration: none;
  color: var(--muted);
  font-size: 15px;
  padding: 10px 12px;
  border-radius: 8px;
}
.nav a:hover { color: var(--ink); background: #eef3f7; }
.nav-enter {
  color: #16324a !important;
  border: 1px solid #16324a;
}
.nav a[aria-current="page"] { color: var(--ink); }
.nav-toggle {
  display: none;
  border: 1px solid #16324a;
  background: transparent;
  color: var(--ink);
  min-height: 44px;
  padding: 8px 14px;
  border-radius: 8px;
  font: inherit;
  cursor: pointer;
}

.hero { padding: 72px 0 64px; }
.eyebrow {
  margin: 0 0 14px;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  font-size: 13px;
  color: var(--accent);
  font-weight: 600;
}
h1, h2, h3 { font-weight: 600; letter-spacing: -0.02em; }
h1 {
  margin: 0;
  max-width: 18ch;
  font-size: clamp(36px, 5vw, 58px);
  line-height: 1.12;
}
.lead {
  max-width: 62ch;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 19px;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 28px 0 0; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  padding: 12px 18px;
  border-radius: 8px;
  font-weight: 600;
}
.button-quiet {
  background: transparent;
  color: var(--ink);
  border: 1px solid #8eabbf;
}
.button:hover { background: #155d7e; }
.button-quiet:hover { background: #d7e4ee; }

section { padding: 28px 0 72px; }
#work, #company { background: var(--band); }
.section-head {
  max-width: 40rem;
  margin-bottom: 28px;
}
.section-head h2, .contact h2 { margin: 0; font-size: 32px; line-height: 1.2; }
.section-head p, .contact p { margin: 8px 0 0; color: var(--muted); max-width: 52ch; }

.cards, .projects {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.cards li, .projects li {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 22px 22px 24px;
}
.projects span {
  color: var(--accent);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
}
.cards h3, .projects h3 { margin: 8px 0 8px; font-size: 22px; }
.cards p, .projects p { margin: 0; color: var(--muted); }

.facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}
.facts div {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 18px 18px;
}
.facts dt {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}
.facts dd { margin: 8px 0 0; font-size: 18px; line-height: 1.35; font-weight: 600; }

#contacts { padding-top: 8px; padding-bottom: 48px; }
.contact {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  align-items: center;
  background: var(--header);
  color: var(--on-dark);
  border-radius: 16px;
  padding: 32px 36px;
}
.contact p { color: var(--header-muted); }
.mail {
  display: inline-flex;
  align-items: center;
  min-height: 52px;
  padding: 12px 18px;
  border-radius: 10px;
  background: #17324c;
  color: #d7eef8;
  text-decoration: none;
  font-size: clamp(18px, 2vw, 22px);
  font-weight: 600;
  white-space: nowrap;
}
.mail:hover { background: #1e4264; }

footer { padding: 8px 0 28px; color: var(--muted); font-size: 14px; }
.footer-inner { display: flex; justify-content: space-between; gap: 12px; }

:focus-visible {
  outline: 3px solid #7ec8e8;
  outline-offset: 2px;
}

@media (max-width: 800px) {
  :root { --header-h: 68px; }
  .wrap { width: min(var(--wrap), calc(100% - 32px)); }
  .nav-toggle { display: inline-flex; align-items: center; }
  .top-inner { position: relative; }
  .nav {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 4px;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: 0 10px 24px rgba(16, 32, 51, 0.08);
    border-radius: 12px;
    padding: 8px;
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px 14px; }
  .section-head, .cards, .projects, .facts { grid-template-columns: 1fr; }
  .hero { padding-top: 40px; }
  h1 { max-width: none; }
  .contact, .footer-inner { flex-direction: column; align-items: flex-start; }
  .mail { white-space: normal; }
}

.product {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  min-height: 180px;
  text-decoration: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px 22px 20px;
}
.product-logo, .sheet-logo {
  width: 56px;
  height: 56px;
  flex: none;
  align-self: flex-start;
  object-fit: contain;
  border-radius: 12px;
}
.product-logo.gateway, .sheet-logo.gateway {
  width: 56px;
  height: 56px;
  aspect-ratio: 1;
  background: none;
  border-radius: 0;
}
.sheet-logo { width: 72px; height: 72px; }
.sheet-logo.gateway { width: 72px; height: 72px; }
.product-head, .sheet-head {
  display: flex;
  align-items: center;
  gap: 14px;
}
.product-head h2 { margin: 0; }
.sheet-head .eyebrow { margin-bottom: 4px; }
.sheet-head h1 { margin: 0; }
.product span {
  color: var(--accent);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
}
.product h2 { margin: 0; font-size: 28px; }
.product p { margin: 0; color: var(--muted); }
.product strong {
  margin-top: auto;
  padding-top: 16px;
  color: var(--accent);
  font-size: 15px;
}
.product:hover { border-color: #7ea8c4; background: #fff; }
.product-lead {
  background: var(--header);
  color: var(--on-dark);
  border-color: var(--header);
  min-height: 210px;
}
.product-lead span { color: #8ec4de; }
.product-lead p { color: var(--header-muted); max-width: 46ch; }
.product-lead strong { color: #d7eef8; }
.product-lead:hover { background: #13283d; }
.products {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.sheet { padding: 56px 0 72px; }
.narrow { max-width: 720px; }
.sheet.wide .narrow { max-width: 960px; }
.sheet h2 { margin: 44px 0 0; font-size: 22px; }
.sheet .text { margin: 14px 0 0; color: var(--muted); max-width: 62ch; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 0; }
.note { color: var(--muted); max-width: 62ch; }
.feats {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.feats li {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px 16px;
}
.feats strong { display: block; }
.feats span { display: block; margin-top: 2px; color: var(--muted); font-size: 15px; }
.plans {
  width: 100%;
  margin: 18px 0 0;
  border-collapse: collapse;
  font-size: 15px;
}
.plans th,
.plans td {
  text-align: left;
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
}
.plans th {
  color: var(--muted);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.plans td:first-child { font-weight: 600; }
.plans td:last-child { white-space: nowrap; }
@media (max-width: 560px) {
  .plans th:nth-child(3),
  .plans td:nth-child(3) { display: none; }
}
.login-layout { max-width: 440px; padding-top: 24px; }
.login-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px 24px 24px;
}
.login-card h1 { margin: 0; }
.login-card .lead { margin: 0 0 8px; font-size: 16px; }
.login-card label { font-size: 14px; font-weight: 600; margin-top: 8px; }
.login-card input {
  font: inherit;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid #9bb3c6;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}
.login-card .button {
  margin-top: 12px;
  border: 0;
  cursor: pointer;
  width: 100%;
}

.gw-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 22px 0 0;
}
.gw-pills span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 6px 12px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}
.gw-pills i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.flow {
  margin: 22px 0 0;
  background: linear-gradient(180deg, #0e1c2d 0%, #16324a 100%);
  color: var(--on-dark);
  border-radius: 20px;
  padding: 28px 24px 22px;
  overflow: hidden;
}
.flow-caption {
  margin: 0 0 18px;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #8ec4de;
  font-weight: 600;
}
.flow-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 10px;
  align-items: center;
}
.flow-node {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 16px;
  padding: 16px 14px 18px;
  text-align: center;
  min-height: 168px;
}
.flow-node svg { display: block; margin: 0 auto 10px; }
.flow-node strong { display: block; font-size: 16px; }
.flow-node span { display: block; margin-top: 6px; color: var(--header-muted); font-size: 13px; line-height: 1.4; }
.flow-node.hub {
  background: #1a6f96;
  border-color: #2e8bb3;
}
.flow-arrow {
  color: #8ec4de;
  font-size: 22px;
  font-weight: 700;
}
.flow-note {
  margin: 16px 0 0;
  color: #b7c7d6;
  font-size: 13px;
  text-align: center;
}

.direct {
  margin-top: 12px;
  padding-bottom: 24px;
}
.direct-paths {
  display: grid;
  gap: 28px;
}
.dpath {
  display: grid;
  grid-template-columns: 1fr auto minmax(0, 1.6fr) auto 1fr;
  gap: 8px;
  align-items: center;
}
.dpath .pc,
.dpath .hub {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 14px;
  padding: 14px 10px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
}
.dpath .hub { background: #1a6f96; border-color: #2e8bb3; }
.dpath .wire {
  position: relative;
  height: 4px;
  border-radius: 99px;
  background: #8ec4de;
  min-width: 24px;
}
.dpath .wire span {
  position: absolute;
  left: 50%;
  top: -22px;
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #8ec4de;
  font-weight: 700;
}
.dpath.via .wire {
  background: repeating-linear-gradient(90deg, #8ec4de 0 8px, transparent 8px 14px);
  height: 3px;
  opacity: 0.75;
}
.dpath.via .wire span { color: #b7c7d6; font-weight: 600; }

.infogrid {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.infogrid li {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 12px;
  align-items: start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px 16px 18px;
}
.infogrid .mark {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #e4eef5;
}
.infogrid .mark.navy { background: var(--header); }
.infogrid .mark.coral { background: #f15a48; }
.infogrid .mark.teal { background: #1a6f96; }
.infogrid strong { display: block; }
.infogrid span { display: block; margin-top: 4px; color: var(--muted); font-size: 15px; }

.plan-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0 0;
}
.plan-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.plan-card.featured {
  background: var(--header);
  color: var(--on-dark);
  border-color: var(--header);
}
.plan-card .name { font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.plan-card.featured .name { color: #8ec4de; }
.plan-card .price { font-size: 28px; font-weight: 700; letter-spacing: -0.03em; }
.plan-card .price small { font-size: 14px; font-weight: 600; color: var(--muted); }
.plan-card.featured .price small { color: #b7c7d6; }
.plan-card .limits { margin: 8px 0 0; color: var(--muted); font-size: 14px; }
.plan-card.featured .limits { color: #b7c7d6; }
.plan-meter {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  margin: 10px 0 4px;
}
.plan-meter b {
  height: 6px;
  border-radius: 99px;
  background: #d3deea;
}
.plan-meter b.on { background: var(--accent); }
.plan-card.featured .plan-meter b { background: #2a4664; }
.plan-card.featured .plan-meter b.on { background: #8ec4de; }

@media (max-width: 800px) {
  .products { grid-template-columns: 1fr; }
  .flow-row { grid-template-columns: 1fr; }
  .flow-arrow { transform: rotate(90deg); justify-self: center; }
  .infogrid, .plan-grid { grid-template-columns: 1fr; }
  .dpath { grid-template-columns: 1fr; gap: 10px; }
  .dpath .wire {
    min-height: 40px;
    width: 4px;
    min-width: 4px;
    justify-self: center;
    background: #8ec4de;
  }
  .dpath.via .wire {
    background: repeating-linear-gradient(#8ec4de 0 6px, transparent 6px 12px);
    width: 3px;
    min-width: 3px;
  }
  .dpath .wire span {
    top: 50%;
    left: 16px;
    transform: translateY(-50%);
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
