:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-2: #f9fbff;
  --text: #0f172a;
  --muted: #66758f;
  --border: #cfdbeb;
  --border-soft: #e5ecf6;
  --accent: #ff6a00;
  --accent-dark: #e65f00;
  --accent-ink: #b13f00;
  --on-accent: #0f172a;
  --accent-soft: rgba(255, 106, 0, 0.13);
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
  --shadow-small: 0 10px 30px rgba(15, 23, 42, 0.045);
  --radius: 22px;
  --radius-small: 14px;
  --radius-control: 10px;
  --max: 1380px;
  --font: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

[data-theme="dark"] {
  --bg: #101722;
  --surface: #151f2c;
  --surface-2: #111a25;
  --text: #eef4ff;
  --muted: #a8b6ca;
  --border: #2c3a50;
  --border-soft: #223046;
  --accent: #ff7a1a;
  --accent-dark: #ff8a33;
  --accent-ink: #ff9a4d;
  --on-accent: #0f172a;
  --accent-soft: rgba(255, 122, 26, 0.16);
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.35);
  --shadow-small: 0 10px 30px rgba(0, 0, 0, 0.2);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
}

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

button,
input,
textarea,
select {
  font: inherit;
}

button,
select {
  cursor: pointer;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

:focus-visible {
  outline: 3px solid var(--accent-ink);
  outline-offset: 3px;
}

/* SPA navigation moves focus to the page heading for screen readers. Keep
   that semantic focus without drawing an interactive-control outline on h1. */
h1[tabindex="-1"]:focus,
h1[tabindex="-1"]:focus-visible {
  outline: none;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: -9999px;
  z-index: 100;
  padding: 10px 14px;
  border: 1px solid var(--accent);
  border-radius: var(--radius-control);
  background: var(--surface);
  box-shadow: var(--shadow-small);
}

.skip-link:focus {
  left: 16px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--border-soft);
  background: rgba(245, 247, 251, 0.88);
  backdrop-filter: blur(20px);
}

[data-theme="dark"] .site-header {
  background: rgba(16, 23, 34, 0.88);
}

.header-inner {
  display: flex;
  align-items: center;
  width: min(100% - 48px, var(--max));
  height: 74px;
  margin: auto;
  gap: 18px;
}

.brand {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  margin-right: 4px;
}

.brand img {
  width: 148px;
  max-height: 40px;
  object-fit: contain;
}

.nav {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.nav a,
.login-link {
  display: inline-flex;
  align-items: center;
  height: 38px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 750;
  white-space: nowrap;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.nav a:hover,
.nav a.active,
.login-link:hover {
  border-color: var(--accent);
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.nav .mobile-only {
  display: none;
}

.header-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
}

.lang-select {
  width: auto;
  min-width: 58px;
  height: 36px;
  padding: 0 7px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

.theme-toggle {
  position: relative;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
}

.theme-toggle span {
  display: block;
  width: 25px;
  height: 25px;
  margin: auto;
  border-radius: 50%;
  background: linear-gradient(90deg, #ffffff 0 50%, #101722 50% 100%);
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.18);
}

.theme-toggle:hover span {
  box-shadow: 0 0 0 4px var(--accent-soft), inset 0 0 0 1px var(--accent);
}

.menu-btn {
  display: none;
  padding: 3px 6px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font-size: 24px;
}

.page {
  display: none;
}

.page.active {
  display: block;
}

.shell {
  width: min(100% - 48px, var(--max));
  margin: auto;
}

.section {
  padding: 56px 0;
}

.compact-top {
  padding-top: 16px;
}

.centered {
  text-align: center;
}

.narrow {
  max-width: 820px;
  margin-right: auto;
  margin-left: auto;
}

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

.lead {
  max-width: 980px;
  margin: 0;
  color: var(--muted);
  font-size: 19px;
  line-height: 1.55;
}

.hero-home,
.product-page {
  padding-top: 56px;
}

.hero-home {
  padding-bottom: 26px;
}

.hero-home h1,
.product-page h1,
.about-section h1,
.error-page h1 {
  max-width: none;
  margin: 0 0 18px;
  font-size: clamp(38px, 3.25vw, 54px);
  line-height: 1.08;
  letter-spacing: -0.045em;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  background: var(--surface);
  color: var(--text);
  font-weight: 800;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.btn:hover {
  border-color: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.btn-primary {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--on-accent);
}

.btn-primary:hover {
  border-color: var(--accent-dark);
  background: var(--accent-dark);
  color: var(--on-accent);
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.ecosystem-section {
  padding-top: 28px;
}

.ecosystem-layout {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: stretch;
  gap: 16px;
}

.service-tile {
  display: flex;
  min-height: 245px;
  flex-direction: column;
  justify-content: flex-start;
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.service-main {
  border-color: var(--border);
}

.service-tile:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft), var(--shadow);
  transform: translateY(-2px);
  text-decoration: none;
}

.service-tile:focus-visible {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 4px var(--accent-soft), var(--shadow);
}

.tile-mark {
  display: inline-flex;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-weight: 900;
}

.service-tile h2,
.service-tile h3 {
  margin: 0 0 10px;
  font-size: 25px;
  line-height: 1.18;
  letter-spacing: -0.03em;
}

.service-tile p {
  margin: 0;
  color: var(--muted);
}

.flow-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.flow-grid div,
.card,
.cap-card,
.tile-card,
.contact-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-small);
  background: var(--surface);
  box-shadow: var(--shadow-small);
}

.flow-grid div {
  padding: 22px;
}

.flow-grid div,
.card:not(.contact-card),
.cap-card,
.tile-card {
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

@media (hover: hover) {
  .flow-grid div:hover,
  .card:not(.contact-card):hover,
  .cap-card:hover,
  .tile-card:hover {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-soft), var(--shadow-small);
    transform: translateY(-2px);
  }
}

.flow-grid strong {
  display: block;
  margin-bottom: 6px;
  font-size: 18px;
}

.flow-grid span {
  color: var(--muted);
}

.section-head {
  margin-bottom: 22px;
}

.section-head h2,
.screenshot-caption h2 {
  margin: 0 0 12px;
  font-size: clamp(28px, 2.35vw, 38px);
  line-height: 1.12;
  letter-spacing: -0.038em;
}

.section-head p,
.screenshot-caption p {
  margin-top: 0;
}

.cards {
  display: grid;
  gap: 16px;
}

.cards.three {
  grid-template-columns: repeat(3, 1fr);
}

.cards.four {
  grid-template-columns: repeat(4, 1fr);
}

.card {
  padding: 22px;
}

.card h2,
.card h3,
.cap-card h3,
.tile-card h3 {
  margin: 0 0 10px;
  line-height: 1.18;
  letter-spacing: -0.03em;
}

.card p,
.cap-card p,
.tile-card p {
  margin: 0;
  color: var(--muted);
}

.ecosystem-benefits {
  padding-top: 26px;
}

.screenshot-block {
  max-width: 100%;
  margin: 34px 0 18px;
  overflow: auto;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  scrollbar-color: var(--border) transparent;
}

.screenshot-block img {
  width: 100%;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-small);
}

.screenshot-caption {
  max-width: 880px;
}

.product-page > .screenshot-caption {
  margin-top: 48px;
}

.capability-wall,
.tiles-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.cap-card,
.tile-card {
  padding: 22px;
}

.cap-card h3,
.tile-card h3 {
  font-size: 20px;
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(380px, 480px);
  align-items: stretch;
  gap: 28px;
}

.about-section > h1 {
  margin-bottom: 18px;
}

.about-column {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.about-cards {
  display: grid;
  flex: 1;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 32px;
}

.about-card {
  min-width: 0;
}

.contact-card {
  padding: 22px;
}

.contact-card h2 {
  margin-top: 0;
}

.contact-card label {
  display: block;
  margin-bottom: 14px;
}

.contact-card label > span {
  display: block;
  margin-bottom: 6px;
  font-weight: 750;
}

input,
textarea,
select {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  background: var(--surface-2);
  color: var(--text);
}

textarea {
  resize: vertical;
}

.form-privacy,
.form-status {
  color: var(--muted);
  font-size: 14px;
}

.form-status {
  min-height: 24px;
  margin-bottom: 0;
}

.bot-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.error-page {
  min-height: 58vh;
  padding-top: 86px;
}

.error-code {
  margin: 0 0 10px;
  color: var(--accent-ink);
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.15em;
}

.error-page .btn {
  margin-top: 24px;
}

.site-footer {
  margin-top: 58px;
  background: #111b28;
  color: #dbe5f2;
}

.footer-inner {
  display: flex;
  width: min(100% - 48px, var(--max));
  justify-content: space-between;
  margin: auto;
  padding: 34px 0;
  gap: 30px;
}

.footer-inner img {
  max-width: 132px;
  filter: brightness(0) invert(1);
}

.footer-inner p {
  max-width: 520px;
  color: #aebbd0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 18px;
}

.footer-links a {
  color: #dbe5f2;
}

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

@media (max-width: 1180px) {
  .cards.four,
  .capability-wall,
  .tiles-grid,
  .flow-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .service-tile {
    min-height: 0;
  }

  .nav {
    position: absolute;
    top: 74px;
    right: 24px;
    left: 24px;
    display: none;
    max-height: calc(100dvh - 90px);
    overflow-y: auto;
    flex-direction: column;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-small);
    background: var(--surface);
    box-shadow: var(--shadow);
  }

  .nav.open {
    display: flex;
  }

  .nav a {
    width: 100%;
    justify-content: center;
  }

  .nav .mobile-only {
    display: inline-flex;
  }

  .menu-btn {
    display: block;
  }

  .header-inner {
    width: min(100% - 28px, var(--max));
  }

  .brand img {
    width: 128px;
  }

  .login-link {
    display: none;
  }

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

@media (max-width: 720px) {
  .shell,
  .footer-inner {
    width: min(100% - 24px, var(--max));
  }

  .cards.three,
  .cards.four,
  .capability-wall,
  .tiles-grid,
  .flow-grid {
    grid-template-columns: 1fr;
  }

  .ecosystem-layout {
    grid-template-columns: 1fr;
  }

  .header-inner {
    gap: 8px;
  }

  .brand img {
    width: 124px;
  }

  .header-actions {
    margin-left: auto;
    gap: 5px;
  }

  .lang-select {
    min-width: 52px;
    font-size: 11px;
  }

  .hero-home,
  .product-page {
    padding-top: 44px;
  }

  .hero-home h1,
  .product-page h1,
  .about-section h1,
  .error-page h1 {
    font-size: 34px;
    line-height: 1.12;
  }

  .lead {
    font-size: 17px;
  }

  .about-cards {
    grid-template-columns: 1fr;
    grid-template-rows: none;
  }

  .section {
    padding: 42px 0;
  }

  .screenshot-block {
    padding: 10px;
    border-radius: 16px;
  }

  .screenshot-block img {
    width: auto;
    min-width: 760px;
    max-width: none;
  }

  .footer-inner {
    flex-direction: column;
  }
}

@media (max-width: 390px) {
  .brand img {
    width: 116px;
  }

  .theme-toggle {
    width: 30px;
    height: 30px;
  }

  .menu-btn {
    font-size: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto;
    transition: none;
  }
}
