:root {
  --bg: #f3f6f9;
  --bg-elevated: #ffffff;
  --ink: #0f172a;
  --ink-soft: #334155;
  --muted: #64748b;
  --line: #d7e0ea;
  --accent: #0f766e;
  --accent-2: #115e59;
  --accent-soft: #ccfbf1;
  --steel: #1e293b;
  --warn: #b45309;
  --danger: #b91c1c;
  --ok: #047857;
  --shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
  --radius: 18px;
  --font-display: "Space Grotesk", sans-serif;
  --font-body: "IBM Plex Sans", sans-serif;
  --container: 1120px;
  --header-h: 76px;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(20, 184, 166, 0.12), transparent 55%),
    radial-gradient(900px 420px at 90% 0%, rgba(30, 41, 59, 0.08), transparent 50%),
    linear-gradient(180deg, #eef3f7 0%, var(--bg) 28%, #e9eef4 100%);
  min-height: 100vh;
  line-height: 1.6;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }

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

.skip-link {
  position: absolute; left: 12px; top: -40px; background: var(--ink); color: #fff;
  padding: 8px 12px; z-index: 100; border-radius: 8px;
}
.skip-link:focus { top: 12px; }

.container {
  width: min(var(--container), calc(100% - 2.5rem));
  margin-inline: auto;
}

.site-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(243, 246, 249, 0.86);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease, background .25s ease, box-shadow .25s ease;
}
.site-header.is-scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 8px 30px rgba(15, 23, 42, 0.05);
  background: rgba(255,255,255,.92);
}
.header-inner {
  min-height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  line-height: 0;
  background: transparent;
  border: 0;
  padding: 0;
  box-shadow: none;
}
.brand-logo {
  height: 42px;
  width: auto;
  max-height: 42px;
}
.footer-brand .brand {
  background: transparent;
  border: 0;
}
.brand-logo--footer { height: 36px; max-height: 36px; }

.site-nav { display: flex; align-items: center; gap: 1.35rem; }
.site-nav a {
  font-size: .95rem; font-weight: 500; color: var(--ink-soft);
  transition: color .2s ease;
}
.site-nav a:hover, .site-nav a.is-active { color: var(--accent); }
.site-nav .btn-primary,
.site-nav .btn-primary:hover,
.site-nav .btn-primary.is-active {
  color: #fff !important;
}
.nav-toggle {
  display: none; width: 44px; height: 44px; border: 1px solid var(--line);
  border-radius: 12px; background: #fff; cursor: pointer; position: relative;
}
.nav-toggle span {
  display: block; width: 18px; height: 2px; background: var(--ink);
  margin: 4px auto; transition: .2s ease;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  border: 1px solid transparent; border-radius: 999px; padding: .85rem 1.35rem;
  font-weight: 600; font-family: inherit; cursor: pointer; transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 10px 24px rgba(15, 118, 110, .25); }
.btn-primary:hover { background: var(--accent-2); }
.btn-ghost { background: transparent; border-color: rgba(15,23,42,.18); color: var(--ink); }
.btn-ghost:hover { background: #fff; }
.btn-sm { padding: .65rem 1.05rem; font-size: .9rem; }
.btn-dark { background: var(--steel); color: #fff; }

.hero {
  position: relative;
  min-height: calc(100vh - var(--header-h));
  display: grid; align-items: center;
  overflow: hidden;
  isolation: isolate;
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(120deg, rgba(243,246,249,.92) 0%, rgba(243,246,249,.72) 42%, rgba(243,246,249,.35) 100%),
    url("../img/hero-pattern.svg") center/cover no-repeat,
    linear-gradient(135deg, #0f172a 0%, #134e4a 48%, #0f766e 100%);
  z-index: -2;
}
.hero::after {
  content: "";
  position: absolute; inset: auto -10% -20% 40%;
  height: 70%;
  background: radial-gradient(circle at center, rgba(20,184,166,.35), transparent 65%);
  z-index: -1;
  animation: pulseGlow 8s ease-in-out infinite;
}
.hero-grid {
  display: grid; grid-template-columns: 1.1fr .9fr; gap: 3rem; align-items: center;
  padding: 4.5rem 0 5rem;
}
.hero-copy { max-width: 620px; }
.hero-brand {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 7vw, 5rem);
  line-height: .95; letter-spacing: -0.04em; margin: 0 0 1rem;
  color: var(--ink);
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 3.2vw, 2.35rem);
  line-height: 1.15; letter-spacing: -0.02em;
  margin: 0 0 1rem; color: var(--ink-soft); font-weight: 600;
  max-width: 18ch;
}
.hero p.lead {
  font-size: 1.08rem; color: var(--muted); margin: 0 0 1.75rem; max-width: 42ch;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: .85rem; }
.hero-visual {
  position: relative;
  min-height: 420px;
  border-radius: 28px;
  background:
    linear-gradient(160deg, rgba(15,23,42,.92), rgba(15,118,110,.75)),
    repeating-linear-gradient(90deg, rgba(255,255,255,.04) 0 1px, transparent 1px 48px),
    repeating-linear-gradient(0deg, rgba(255,255,255,.04) 0 1px, transparent 1px 48px);
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: var(--shadow);
  overflow: hidden;
  animation: floatIn .9s ease both;
}
.hero-visual .orbit {
  position: absolute; inset: 18%;
  border: 1px dashed rgba(255,255,255,.22); border-radius: 50%;
  animation: spin 28s linear infinite;
}
.hero-visual .node {
  position: absolute; width: 14px; height: 14px; border-radius: 4px;
  background: #fff; box-shadow: 0 0 0 8px rgba(255,255,255,.12);
}
.hero-visual .node:nth-child(2) { top: 22%; left: 24%; }
.hero-visual .node:nth-child(3) { top: 28%; right: 20%; }
.hero-visual .node:nth-child(4) { bottom: 24%; left: 30%; }
.hero-visual .node:nth-child(5) { bottom: 20%; right: 26%; }
.hero-visual .panel {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(78%, 280px); background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.16); border-radius: 18px; padding: 1.25rem;
  color: #ecfeff; backdrop-filter: blur(8px);
}
.hero-visual .panel strong { display: block; font-family: var(--font-display); font-size: 1.5rem; margin-bottom: .35rem; }
.hero-visual .panel span { color: rgba(236,254,255,.75); font-size: .92rem; }
.hero-visual .metric {
  display: flex; justify-content: space-between; margin-top: .85rem; padding-top: .85rem;
  border-top: 1px solid rgba(255,255,255,.12); font-size: .85rem;
}

.section { padding: 5rem 0; }
.section-head { max-width: 640px; margin-bottom: 2.5rem; }
.section-head .eyebrow {
  display: inline-block; color: var(--accent); font-weight: 600; font-size: .85rem;
  letter-spacing: .04em; text-transform: uppercase; margin-bottom: .65rem;
}
.section-head h2 {
  font-family: var(--font-display); font-size: clamp(1.8rem, 3vw, 2.5rem);
  letter-spacing: -0.03em; line-height: 1.15; margin: 0 0 .75rem;
}
.section-head p { margin: 0; color: var(--muted); font-size: 1.05rem; }

.feature-strip {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem;
}
.feature-strip article {
  padding: 1.5rem 1.35rem; border-radius: var(--radius);
  background: rgba(255,255,255,.72); border: 1px solid var(--line);
}
.feature-strip h3 {
  font-family: var(--font-display); font-size: 1.15rem; margin: 0 0 .5rem;
}
.feature-strip p { margin: 0; color: var(--muted); font-size: .95rem; }

.module-grid, .post-grid, .integration-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem;
}
.module-item, .post-card, .integration-item {
  background: var(--bg-elevated); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.4rem; transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.module-item:hover, .post-card:hover {
  transform: translateY(-4px); box-shadow: var(--shadow); border-color: #b6cdc8;
}
.module-icon {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); margin-bottom: 1rem;
}
.module-item h3, .post-card h3, .integration-item h3 {
  font-family: var(--font-display); font-size: 1.15rem; margin: 0 0 .55rem;
}
.module-item p, .post-card p, .integration-item p { margin: 0; color: var(--muted); font-size: .95rem; }
.module-item .link, .post-card .link {
  display: inline-block; margin-top: 1rem; color: var(--accent); font-weight: 600; font-size: .92rem;
}

.band {
  background: linear-gradient(135deg, #0f172a 0%, #134e4a 100%);
  color: #e2e8f0; border-radius: 28px; padding: 3rem; display: grid;
  grid-template-columns: 1.4fr .8fr; gap: 2rem; align-items: center;
}
.band h2 { font-family: var(--font-display); font-size: clamp(1.6rem, 3vw, 2.2rem); margin: 0 0 .75rem; color: #fff; }
.band p { margin: 0; color: #94a3b8; }
.band .btn-primary { background: #2dd4bf; color: #042f2e; }

.page-hero {
  padding: 3.5rem 0 2rem;
}
.page-hero h1 {
  font-family: var(--font-display); font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.03em; margin: 0 0 .75rem;
}
.page-hero p { margin: 0; color: var(--muted); max-width: 58ch; font-size: 1.08rem; }

.content-block {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.75rem; line-height: 1.75; color: var(--ink-soft);
}
.content-block h2, .content-block h3 { font-family: var(--font-display); color: var(--ink); }

.form-card {
  background: #fff; border: 1px solid var(--line); border-radius: 22px;
  padding: 1.75rem; box-shadow: var(--shadow);
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-grid .full { grid-column: 1 / -1; }
label { display: block; font-size: .88rem; font-weight: 600; margin-bottom: .4rem; color: var(--ink-soft); }
input, textarea, select {
  width: 100%; border: 1px solid var(--line); border-radius: 12px;
  padding: .85rem 1rem; font: inherit; background: #f8fafc; color: var(--ink);
  transition: border-color .2s ease, box-shadow .2s ease;
}
input:focus, textarea:focus, select:focus {
  outline: none; border-color: #5eead4; box-shadow: 0 0 0 4px rgba(20,184,166,.15); background: #fff;
}
textarea { min-height: 140px; resize: vertical; }
.hp { position: absolute; left: -9999px; opacity: 0; height: 0; width: 0; }
.alert {
  padding: .95rem 1.1rem; border-radius: 12px; margin-bottom: 1rem; font-weight: 500;
}
.alert-success { background: #ecfdf5; color: var(--ok); border: 1px solid #a7f3d0; }
.alert-error { background: #fef2f2; color: var(--danger); border: 1px solid #fecaca; }

.contact-layout, .demo-layout {
  display: grid; grid-template-columns: 1fr 1.1fr; gap: 2rem; align-items: start;
}
.info-list li { margin-bottom: .85rem; color: var(--ink-soft); }
.info-list strong { display: block; color: var(--ink); font-size: .85rem; margin-bottom: .15rem; }

.post-meta { color: var(--muted); font-size: .85rem; margin-bottom: .65rem; }
.post-cover {
  aspect-ratio: 16/9; border-radius: 14px; overflow: hidden; margin-bottom: 1rem;
  background: linear-gradient(135deg, #0f172a, #0f766e);
}
.post-cover img { width: 100%; height: 100%; object-fit: cover; }
.article-body { max-width: 760px; }
.article-body .content-block { padding: 2rem; }
.pagination { display: flex; gap: .5rem; margin-top: 2rem; }
.pagination a, .pagination span {
  min-width: 40px; height: 40px; display: grid; place-items: center;
  border-radius: 10px; border: 1px solid var(--line); background: #fff;
}
.pagination .is-current { background: var(--accent); color: #fff; border-color: var(--accent); }

.site-footer {
  margin-top: 4rem; background: #0b1220; color: #cbd5e1; padding: 3.5rem 0 1.5rem;
}
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 2rem; margin-bottom: 2.5rem;
}
.footer-brand p { color: #94a3b8; margin: 1rem 0 0; max-width: 32ch; }
.site-footer h3 {
  font-family: var(--font-display); color: #fff; font-size: 1rem; margin: 0 0 1rem;
}
.site-footer a { color: #94a3b8; transition: color .2s ease; }
.site-footer a:hover { color: #5eead4; }
.site-footer li + li { margin-top: .45rem; }
.social-links { display: flex; gap: .85rem; margin-top: 1rem; }
.footer-bottom {
  border-top: 1px solid rgba(148,163,184,.15); padding-top: 1.25rem;
  color: #64748b; font-size: .9rem;
}

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulseGlow {
  0%, 100% { opacity: .55; transform: scale(1); }
  50% { opacity: .9; transform: scale(1.05); }
}
@keyframes floatIn {
  from { opacity: 0; transform: translateY(24px) scale(.98); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 960px) {
  .hero-grid, .band, .contact-layout, .demo-layout, .footer-grid,
  .module-grid, .post-grid, .integration-grid, .feature-strip {
    grid-template-columns: 1fr;
  }
  .hero { min-height: auto; }
  .hero-visual { min-height: 320px; }
  .nav-toggle { display: inline-block; }
  .site-nav {
    position: fixed; inset: var(--header-h) 1rem auto; display: none; flex-direction: column;
    align-items: stretch; background: #fff; border: 1px solid var(--line); border-radius: 16px;
    padding: 1rem; box-shadow: var(--shadow);
  }
  .site-nav.is-open { display: flex; }
  .form-grid { grid-template-columns: 1fr; }
}
