/* ============================================================
   GOFLOW Enterprise AI OS Portal v1.0 — Design System
   Theme: Dark Enterprise AI · Thai (th)
   ============================================================ */

:root {
  /* Tokens */
  --bg: #05080f;
  --bg-2: #0a101e;
  --bg-3: #0e1628;
  --card: #0d1524;
  --card-2: #111a2e;
  --line: rgba(148, 163, 184, 0.14);
  --line-strong: rgba(148, 163, 184, 0.28);
  --text: #e8eef8;
  --text-2: #c2cfe0;
  --muted: #8ba0ba;
  --brand: #22d3ee;
  --brand-2: #6366f1;
  --brand-3: #a78bfa;
  --grad: linear-gradient(120deg, #22d3ee 0%, #6366f1 55%, #a78bfa 100%);
  --ok: #34d399;
  --warn: #fbbf24;
  --danger: #f87171;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  --shadow-sm: 0 8px 24px rgba(0, 0, 0, 0.35);
  --font: "Segoe UI", "Noto Sans Thai", "IBM Plex Sans Thai", Tahoma, "Helvetica Neue", Arial, sans-serif;
  --mono: "Cascadia Code", "JetBrains Mono", Consolas, "Courier New", monospace;
  --header-h: 68px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Ambient background glow */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(900px 480px at 12% -8%, rgba(99, 102, 241, 0.22), transparent 60%),
    radial-gradient(800px 420px at 88% -6%, rgba(34, 211, 238, 0.16), transparent 60%),
    radial-gradient(700px 500px at 50% 110%, rgba(167, 139, 250, 0.10), transparent 60%),
    var(--bg);
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.045) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 30%, transparent 75%);
}

a { color: var(--brand); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--brand-3); }

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

.container { width: min(1180px, 92%); margin-inline: auto; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--brand); color: #04121a; font-weight: 700;
  padding: 10px 18px; border-radius: 0 0 10px 0; z-index: 200;
}
.skip-link:focus { left: 0; }

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

/* ============ Header / Nav ============ */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(5, 8, 15, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.3s;
}
.site-header.scrolled { box-shadow: 0 10px 34px rgba(0, 0, 0, 0.5); }

.nav-wrap { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); gap: 16px; }

.brand { display: flex; align-items: center; gap: 10px; color: var(--text); }
.brand:hover { color: var(--text); }
.brand-mark {
  width: 34px; height: 34px; border-radius: 9px;
  background: var(--grad);
  display: grid; place-items: center;
  font-weight: 900; color: #04121a; font-size: 15px;
  box-shadow: 0 0 22px rgba(34, 211, 238, 0.45);
}
.brand-name { font-weight: 800; font-size: 19px; letter-spacing: 0.02em; }
.brand-name em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; font-weight: 800; }

.nav-menu { display: flex; }
.nav-list { display: flex; align-items: center; gap: 2px; list-style: none; }

.nav-list > li { position: relative; }
.nav-list > li > a,
.sub-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 12px; border: 0; background: none; cursor: pointer;
  color: var(--text-2); font: inherit; font-size: 14.5px; font-weight: 600;
  border-radius: 8px; transition: color 0.2s, background 0.2s;
}
.nav-list > li > a:hover, .nav-list > li > a.active,
.sub-toggle:hover, .sub-toggle[aria-expanded="true"] { color: var(--brand); background: rgba(34, 211, 238, 0.08); }
.sub-toggle svg { width: 12px; height: 12px; transition: transform 0.2s; }
.sub-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }

.sub-menu {
  position: absolute; top: calc(100% + 8px); left: 0;
  min-width: 230px; padding: 8px;
  background: var(--card-2); border: 1px solid var(--line);
  border-radius: 12px; box-shadow: var(--shadow);
  list-style: none;
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity 0.18s, transform 0.18s, visibility 0.18s;
}
.has-sub:hover .sub-menu, .has-sub:focus-within .sub-menu,
.sub-menu.open { opacity: 1; visibility: visible; transform: translateY(0); }
.sub-menu a {
  display: block; padding: 9px 12px; border-radius: 8px;
  color: var(--text-2); font-size: 14px; font-weight: 600;
}
.sub-menu a:hover { background: rgba(34, 211, 238, 0.1); color: var(--brand); }

.nav-cta { margin-left: 10px; }

.nav-toggle {
  display: none; flex-direction: column; gap: 5px;
  width: 44px; height: 44px; padding: 11px;
  background: var(--card-2); border: 1px solid var(--line);
  border-radius: 10px; cursor: pointer;
}
.nav-toggle span { height: 2px; background: var(--text); border-radius: 2px; transition: 0.25s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============ Buttons ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 10px;
  font: inherit; font-weight: 700; font-size: 15px;
  border: 1px solid transparent; cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s, background 0.2s, color 0.2s, border-color 0.2s;
  text-decoration: none;
}
.btn:active { transform: translateY(1px) scale(0.99); }
.btn-primary { background: var(--grad); color: #04121a; box-shadow: 0 8px 26px rgba(34, 211, 238, 0.28); }
.btn-primary:hover { color: #04121a; box-shadow: 0 10px 34px rgba(99, 102, 241, 0.42); transform: translateY(-2px); }
.btn-ghost { background: rgba(148, 163, 184, 0.06); color: var(--text); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); transform: translateY(-2px); }
.btn-sm { padding: 9px 16px; font-size: 13.5px; border-radius: 8px; }
.btn-lg { padding: 15px 30px; font-size: 16px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }

/* ============ Hero ============ */
.hero {
  position: relative;
  padding: clamp(72px, 10vw, 130px) 0 clamp(56px, 7vw, 96px);
  text-align: center;
  overflow: hidden;
}
.hero-photo::before {
  content: ""; position: absolute; inset: 0;
  background: url("assets/hero/hero-headquarters.webp") center/cover no-repeat;
  opacity: .34; filter: saturate(.92);
}
.hero-photo::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at center, rgba(5,8,15,.05) 0%, var(--bg) 82%),
    linear-gradient(180deg, rgba(5,8,15,.78) 0%, rgba(5,8,15,.5) 48%, var(--bg) 98%);
}
.hero-photo .container { position: relative; z-index: 1; }
.page-photo { padding: 0 0 8px; }
.page-photo .container { max-width: 1280px; }
.page-photo img { width: 100%; max-height: 430px; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--line); box-shadow: 0 18px 44px rgba(0,0,0,.35); }
.sign-strip { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-top: 18px; }
.sign-strip img { width: 100%; border-radius: 10px; border: 1px solid var(--line); display: block; }
@media (max-width: 720px) { .sign-strip { grid-template-columns: repeat(2, 1fr); } }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 16px; border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(34, 211, 238, 0.07);
  color: var(--brand); font-size: 13px; font-weight: 700;
  letter-spacing: 0.04em; margin-bottom: 22px;
}
.hero-badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 10px var(--ok); animation: pulse 2s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }

.hero h1 {
  font-size: clamp(2rem, 5.2vw, 3.6rem);
  line-height: 1.18; font-weight: 900;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}
.hero h1 .grad {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero .lead {
  max-width: 760px; margin: 0 auto 34px;
  color: var(--text-2); font-size: clamp(1rem, 1.6vw, 1.18rem);
}
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero-note { margin-top: 18px; color: var(--muted); font-size: 13.5px; }

.hero-stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 14px; margin-top: clamp(44px, 6vw, 72px);
}
.stat-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px 18px;
  text-align: center; transition: transform 0.2s, border-color 0.2s;
}
.stat-card:hover { transform: translateY(-4px); border-color: rgba(34, 211, 238, 0.4); }
.stat-card .num { font-size: clamp(1.6rem, 3vw, 2.3rem); font-weight: 900; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat-card .lbl { color: var(--muted); font-size: 13.5px; font-weight: 600; margin-top: 4px; }

/* ============ Sections ============ */
.section { padding: clamp(52px, 7vw, 92px) 0; }
.section.alt { background: rgba(10, 16, 30, 0.55); border-block: 1px solid var(--line); }
.section-head { max-width: 720px; margin-bottom: 40px; }
.section-head.center { margin-inline: auto; text-align: center; }
.eyebrow {
  display: inline-block; font-size: 12.5px; font-weight: 800;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--brand); margin-bottom: 12px;
}
.section-head h2 { font-size: clamp(1.6rem, 3.4vw, 2.4rem); font-weight: 900; letter-spacing: -0.01em; line-height: 1.25; }
.section-head p { color: var(--text-2); margin-top: 12px; font-size: 16.5px; }

/* ============ Cards & Grids ============ */
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
  position: relative;
}
.card:hover { transform: translateY(-4px); border-color: rgba(34, 211, 238, 0.38); box-shadow: var(--shadow-sm); }
.card .ico {
  width: 46px; height: 46px; border-radius: 12px;
  display: grid; place-items: center; font-size: 22px;
  background: rgba(34, 211, 238, 0.1); border: 1px solid rgba(34, 211, 238, 0.22);
  margin-bottom: 16px;
}
.card h3 { font-size: 17.5px; font-weight: 800; margin-bottom: 8px; }
.card p { color: var(--text-2); font-size: 14.5px; }
.card ul { list-style: none; margin-top: 12px; }
.card ul li { position: relative; padding-left: 20px; color: var(--text-2); font-size: 14px; margin-bottom: 7px; }
.card ul li::before { content: "▸"; position: absolute; left: 0; color: var(--brand); font-weight: 700; }

.card-flat { background: transparent; border-color: var(--line); }
.card-flat:hover { box-shadow: none; }

/* ============ Badges / Tags ============ */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 11px; border-radius: 999px;
  font-size: 12px; font-weight: 800;
  background: rgba(99, 102, 241, 0.14); color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.3);
}
.badge.cyan { background: rgba(34, 211, 238, 0.1); color: var(--brand); border-color: rgba(34, 211, 238, 0.28); }
.badge.green { background: rgba(52, 211, 153, 0.1); color: var(--ok); border-color: rgba(52, 211, 153, 0.3); }
.badge.amber { background: rgba(251, 191, 36, 0.1); color: var(--warn); border-color: rgba(251, 191, 36, 0.3); }
.badge.red { background: rgba(248, 113, 113, 0.1); color: var(--danger); border-color: rgba(248, 113, 113, 0.3); }
.badge.gray { background: rgba(148, 163, 184, 0.1); color: var(--muted); border-color: var(--line); }

.tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 14px; }
.tag {
  font-size: 12px; font-weight: 700; color: var(--text-2);
  background: rgba(148, 163, 184, 0.08);
  border: 1px solid var(--line); border-radius: 7px; padding: 3px 10px;
}

/* ============ Tables ============ */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; min-width: 640px; }
thead th {
  text-align: left; padding: 13px 16px;
  font-size: 12.5px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--brand); background: rgba(34, 211, 238, 0.05);
  border-bottom: 1px solid var(--line-strong);
  white-space: nowrap;
}
tbody td { padding: 13px 16px; border-bottom: 1px solid var(--line); color: var(--text-2); vertical-align: top; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: rgba(34, 211, 238, 0.04); }
td strong { color: var(--text); }

/* ============ Steps / Timeline ============ */
.steps { display: grid; gap: 0; counter-reset: step; }
.step {
  display: flex; gap: 18px; padding: 18px 0;
  border-bottom: 1px dashed var(--line-strong);
}
.step:last-child { border-bottom: 0; }
.step-num {
  flex: 0 0 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--grad); color: #04121a;
  font-weight: 900; font-size: 16px;
  box-shadow: 0 0 18px rgba(34, 211, 238, 0.3);
}
.step h4 { font-size: 16px; font-weight: 800; margin-bottom: 4px; }
.step p { color: var(--muted); font-size: 14.5px; }

.timeline { position: relative; padding-left: 26px; }
.timeline::before {
  content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px;
  width: 2px; background: linear-gradient(var(--brand), var(--brand-2));
  border-radius: 2px;
}
.tl-item { position: relative; margin-bottom: 26px; }
.tl-item::before {
  content: ""; position: absolute; left: -26px; top: 6px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--bg); border: 3px solid var(--brand);
  box-shadow: 0 0 12px rgba(34, 211, 238, 0.6);
}
.tl-year { font-weight: 900; font-size: 15px; color: var(--brand); letter-spacing: 0.05em; }
.tl-item h4 { font-size: 16.5px; font-weight: 800; margin: 2px 0 6px; }
.tl-item p { color: var(--muted); font-size: 14.5px; max-width: 640px; }
.tl-item .tags { margin-top: 8px; }

/* ============ Architecture layers ============ */
.layer {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px 24px;
  margin-bottom: 14px; position: relative;
  border-left: 4px solid var(--brand);
}
.layer:nth-child(2) { border-left-color: var(--brand-2); }
.layer:nth-child(3) { border-left-color: var(--brand-3); }
.layer:nth-child(4) { border-left-color: var(--ok); }
.layer:nth-child(5) { border-left-color: var(--warn); }
.layer h4 { font-size: 16px; font-weight: 800; margin-bottom: 6px; }
.layer p { color: var(--muted); font-size: 14.5px; }
.layer .tags { margin-top: 10px; }

/* ============ Accordion ============ */
.accordion { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); overflow: hidden; }
.acc-item { border-bottom: 1px solid var(--line); }
.acc-item:last-child { border-bottom: 0; }
.acc-head {
  width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 14px;
  padding: 17px 20px; background: none; border: 0; cursor: pointer;
  color: var(--text); font: inherit; font-size: 15.5px; font-weight: 700; text-align: left;
}
.acc-head:hover { color: var(--brand); }
.acc-head .chev { flex: 0 0 auto; width: 14px; height: 14px; transition: transform 0.25s; color: var(--brand); }
.acc-item.open .chev { transform: rotate(180deg); }
.acc-body { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
.acc-body-inner { padding: 0 20px 18px; color: var(--text-2); font-size: 14.5px; }
.acc-body-inner ul { list-style: none; margin-top: 8px; }
.acc-body-inner li { padding-left: 18px; position: relative; margin-bottom: 6px; }
.acc-body-inner li::before { content: "▸"; position: absolute; left: 0; color: var(--brand); }

/* ============ Forms ============ */
.form { display: grid; gap: 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-field { display: grid; gap: 7px; }
.form-field label { font-size: 13.5px; font-weight: 700; color: var(--text-2); }
.form-field label .req { color: var(--danger); }
.form-field input, .form-field select, .form-field textarea {
  width: 100%; padding: 12px 14px;
  background: var(--bg-3); border: 1px solid var(--line-strong);
  border-radius: 10px; color: var(--text); font: inherit; font-size: 14.5px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-field input::placeholder, .form-field textarea::placeholder { color: #5f7189; }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.16);
}
.form-field select { appearance: none; background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238ba0ba' stroke-width='3'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; }
.form-field textarea { min-height: 120px; resize: vertical; }
.form-field .hint { font-size: 12.5px; color: var(--muted); }
.form-field .err { display: none; font-size: 12.5px; color: var(--danger); font-weight: 600; }
.form-field.invalid input, .form-field.invalid select, .form-field.invalid textarea { border-color: var(--danger); }
.form-field.invalid .err { display: block; }
.form-note { font-size: 13px; color: var(--muted); }

.alert { display: none; padding: 16px 18px; border-radius: 10px; font-size: 14.5px; font-weight: 600; border: 1px solid; }
.alert.show { display: flex; align-items: flex-start; gap: 10px; }
.alert-success { background: rgba(52, 211, 153, 0.09); color: var(--ok); border-color: rgba(52, 211, 153, 0.35); }
.alert-error { background: rgba(248, 113, 113, 0.09); color: var(--danger); border-color: rgba(248, 113, 113, 0.35); }

/* ============ Filter buttons ============ */
.filter-bar { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 24px; }
.filter-btn {
  padding: 8px 16px; border-radius: 999px; cursor: pointer;
  background: rgba(148, 163, 184, 0.07); color: var(--text-2);
  border: 1px solid var(--line-strong); font: inherit; font-size: 13.5px; font-weight: 700;
  transition: 0.2s;
}
.filter-btn:hover { border-color: var(--brand); color: var(--brand); }
.filter-btn.active { background: var(--grad); color: #04121a; border-color: transparent; }
[hidden] { display: none !important; }

/* ============ CTA band ============ */
.cta-band {
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.12), rgba(99, 102, 241, 0.16));
  border: 1px solid rgba(34, 211, 238, 0.25);
  border-radius: 20px; padding: clamp(30px, 5vw, 56px);
  text-align: center; position: relative; overflow: hidden;
}
.cta-band h2 { font-size: clamp(1.4rem, 3vw, 2.1rem); font-weight: 900; margin-bottom: 12px; }
.cta-band p { color: var(--text-2); max-width: 640px; margin: 0 auto 26px; font-size: 15.5px; }
.cta-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ============ Page hero (inner pages) ============ */
.page-hero {
  padding: clamp(48px, 7vw, 88px) 0 clamp(36px, 5vw, 60px);
  border-bottom: 1px solid var(--line);
  background: radial-gradient(700px 300px at 20% 0%, rgba(99, 102, 241, 0.14), transparent 60%);
}
.page-hero .crumb { font-size: 13px; color: var(--muted); font-weight: 600; margin-bottom: 14px; }
.page-hero .crumb a { color: var(--muted); }
.page-hero .crumb a:hover { color: var(--brand); }
.page-hero h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 900; letter-spacing: -0.015em; line-height: 1.2; margin-bottom: 14px; }
.page-hero .lead { color: var(--text-2); max-width: 760px; font-size: 16.5px; }

/* ============ Misc ============ */
.notice {
  padding: 14px 18px; border-radius: 10px; font-size: 14px;
  border: 1px solid rgba(251, 191, 36, 0.35);
  background: rgba(251, 191, 36, 0.07); color: #fcd34d; font-weight: 600;
}
.notice.info { border-color: rgba(34, 211, 238, 0.35); background: rgba(34, 211, 238, 0.07); color: var(--brand); }
.notice.green { border-color: rgba(52, 211, 153, 0.35); background: rgba(52, 211, 153, 0.07); color: var(--ok); }

.code-block {
  background: #070b14; border: 1px solid var(--line);
  border-radius: 12px; padding: 18px 20px; overflow-x: auto;
  font-family: var(--mono); font-size: 13.5px; line-height: 1.7; color: #9fd8e8;
}
.code-block .c { color: #5f7189; }
.code-block .k { color: #c4b5fd; }
.code-block .s { color: #86efac; }

.split { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 34px; align-items: start; }
.split .sticky-col { position: sticky; top: calc(var(--header-h) + 24px); }

.back-top {
  position: fixed; right: 22px; bottom: 22px; z-index: 90;
  width: 46px; height: 46px; border-radius: 12px;
  background: var(--card-2); border: 1px solid var(--line-strong);
  color: var(--brand); font-size: 18px; cursor: pointer;
  display: grid; place-items: center;
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: 0.25s;
}
.back-top.show { opacity: 1; visibility: visible; transform: none; }
.back-top:hover { border-color: var(--brand); }

/* ============ Footer ============ */
.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(5, 8, 15, 0.9);
  padding: 56px 0 0; margin-top: 40px;
}
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 34px;
  padding-bottom: 40px;
}
.footer-brand p { color: var(--muted); font-size: 14px; margin-top: 14px; max-width: 320px; }
.footer-col h4 { font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--brand); margin-bottom: 16px; font-weight: 800; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { color: var(--text-2); font-size: 14.5px; font-weight: 600; }
.footer-col a:hover { color: var(--brand); }
.footer-bottom {
  border-top: 1px solid var(--line);
  padding: 18px 0; color: var(--muted); font-size: 13.5px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
}

/* ============ Reveal animation ============ */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.55s ease, transform 0.55s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { animation-duration: 0.001s !important; }
}

/* ============ Responsive ============ */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .split { grid-template-columns: 1fr; }
  .sticky-col { position: static !important; }
}

@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .nav-menu {
    position: fixed; inset: var(--header-h) 0 auto 0;
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
    background: rgba(5, 8, 15, 0.98);
    border-bottom: 1px solid var(--line);
    padding: 14px 4%;
    transform: translateY(-8px); opacity: 0; visibility: hidden;
    transition: 0.22s;
  }
  .nav-menu.open { transform: none; opacity: 1; visibility: visible; }
  .nav-list { flex-direction: column; align-items: stretch; gap: 2px; }
  .nav-list > li > a, .sub-toggle { width: 100%; justify-content: space-between; padding: 13px 10px; font-size: 15.5px; }
  .sub-menu {
    position: static; opacity: 1; visibility: visible; transform: none;
    box-shadow: none; border: 0; border-left: 2px solid var(--brand);
    border-radius: 0; margin: 0 0 6px 14px; padding: 0 0 0 8px;
    min-width: 0; display: none;
  }
  .sub-menu.open { display: block; }
  .nav-cta { margin: 10px 0 4px; }
  .nav-cta .btn { width: 100%; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .grid-4 { grid-template-columns: 1fr; }
  .hero-stats { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 26px; }
  .hero-actions .btn { width: 100%; }
  body { font-size: 15px; }
}
