/* ==========================================================================
   App Intel Studios — site styles
   ========================================================================== */

:root {
  --bg:            #08090f;
  --bg-2:          #0c0e18;
  --surface:       rgba(255, 255, 255, 0.035);
  --surface-2:     rgba(255, 255, 255, 0.06);
  --line:          rgba(255, 255, 255, 0.09);
  --line-strong:   rgba(255, 255, 255, 0.16);

  --text:          #eef0f7;
  --text-muted:    #a2a8bd;
  --text-dim:      #6f7690;

  --accent:        #7c6cff;
  --accent-2:      #22d3ee;
  --accent-soft:   rgba(124, 108, 255, 0.14);

  --radius-sm: 10px;
  --radius:    16px;
  --radius-lg: 24px;

  --shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.75);

  --maxw: 1160px;
  --nav-h: 72px;

  --font: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI",
          Roboto, Helvetica, Arial, sans-serif;
}

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 20px); }

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

body.no-scroll { overflow: hidden; }

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

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

h1, h2, h3, h4 {
  margin: 0;
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 700;
}

p { margin: 0; }

::selection { background: var(--accent); color: #fff; }

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

/* ---------- Layout helpers ------------------------------------------------ */

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 24px;
}

.section { padding: 104px 0; position: relative; }
.section--tight { padding: 72px 0; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 18px;
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: currentColor;
  opacity: 0.6;
}

.section-head { max-width: 660px; margin-bottom: 56px; }
.section-head h2 { font-size: clamp(30px, 4vw, 44px); }
.section-head p {
  color: var(--text-muted);
  margin-top: 18px;
  font-size: 17px;
}

.grad-text {
  background: linear-gradient(100deg, var(--accent) 0%, var(--accent-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 13px 24px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease,
              background 0.18s ease, border-color 0.18s ease;
  white-space: nowrap;
}

.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--primary {
  background: linear-gradient(100deg, var(--accent), #5b8cff 60%, var(--accent-2));
  color: #fff;
  box-shadow: 0 12px 30px -12px rgba(124, 108, 255, 0.85);
}
.btn--primary:hover { box-shadow: 0 18px 40px -12px rgba(124, 108, 255, 0.95); }

.btn--ghost {
  background: var(--surface);
  border-color: var(--line-strong);
  color: var(--text);
}
.btn--ghost:hover { background: var(--surface-2); border-color: var(--accent); }

.btn--block { width: 100%; }

/* ---------- Navigation ---------------------------------------------------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 60;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: rgba(8, 9, 15, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease, background 0.25s ease;
}

.nav.is-stuck {
  border-bottom-color: var(--line);
  background: rgba(8, 9, 15, 0.9);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
}

.brand { display: inline-flex; align-items: center; gap: 11px; }

.brand__mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: linear-gradient(140deg, var(--accent), var(--accent-2));
  color: #fff;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: -0.03em;
  flex: none;
}

.brand__name {
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.02em;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 30px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav__links a {
  font-size: 14.5px;
  color: var(--text-muted);
  font-weight: 500;
  transition: color 0.18s ease;
  position: relative;
}

.nav__links a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 1.5px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.22s ease;
}

.nav__links a:hover { color: var(--text); }
.nav__links a:hover::after,
.nav__links a[aria-current="page"]::after { transform: scaleX(1); }
.nav__links a[aria-current="page"] { color: var(--text); }

.nav__cta { display: flex; align-items: center; gap: 14px; }

.nav__toggle {
  display: none;
  width: 42px; height: 42px;
  border-radius: 11px;
  background: var(--surface);
  border: 1px solid var(--line);
  cursor: pointer;
  padding: 0;
  place-items: center;
}

.nav__toggle span {
  display: block;
  width: 17px; height: 1.6px;
  background: var(--text);
  position: relative;
  transition: background 0.2s ease;
}
.nav__toggle span::before,
.nav__toggle span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 17px; height: 1.6px;
  background: var(--text);
  transition: transform 0.24s ease, top 0.24s ease;
}
.nav__toggle span::before { top: -5.5px; }
.nav__toggle span::after  { top:  5.5px; }

.nav__toggle[aria-expanded="true"] span { background: transparent; }
.nav__toggle[aria-expanded="true"] span::before { top: 0; transform: rotate(45deg); }
.nav__toggle[aria-expanded="true"] span::after  { top: 0; transform: rotate(-45deg); }

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

.hero {
  position: relative;
  padding: clamp(72px, 11vw, 132px) 0 clamp(72px, 9vw, 108px);
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.hero__bg::before {
  content: "";
  position: absolute;
  top: -280px; left: 50%;
  transform: translateX(-50%);
  width: 980px; height: 700px;
  background:
    radial-gradient(closest-side, rgba(124, 108, 255, 0.30), transparent 72%),
    radial-gradient(closest-side, rgba(34, 211, 238, 0.16), transparent 70%);
  filter: blur(20px);
}

.hero__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.028) 1px, transparent 1px);
  background-size: 62px 62px;
  mask-image: radial-gradient(ellipse 90% 60% at 50% 30%, #000 30%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 90% 60% at 50% 30%, #000 30%, transparent 78%);
}

.hero__inner { position: relative; z-index: 1; text-align: center; }

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 15px 7px 9px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 30px;
}

.hero__badge b { color: var(--text); font-weight: 600; }

.dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #2ee6a8;
  box-shadow: 0 0 0 3px rgba(46, 230, 168, 0.16);
  flex: none;
}

.hero h1 {
  font-size: clamp(42px, 7.4vw, 82px);
  line-height: 1.03;
  letter-spacing: -0.035em;
  max-width: 15ch;
  margin-inline: auto;
}

.hero__sub {
  margin: 26px auto 0;
  max-width: 60ch;
  font-size: clamp(16.5px, 1.7vw, 19px);
  color: var(--text-muted);
}

.hero__actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 38px;
}

.hero__meta {
  margin-top: 46px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px 34px;
  color: var(--text-dim);
  font-size: 13.5px;
}

.hero__meta span { display: inline-flex; align-items: center; gap: 8px; }
.hero__meta svg { width: 15px; height: 15px; flex: none; opacity: 0.75; }

/* ---------- Cards --------------------------------------------------------- */

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

.card {
  position: relative;
  padding: 30px 28px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--line-strong);
  background: var(--surface-2);
}

.card__icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  border: 1px solid rgba(124, 108, 255, 0.28);
  color: #b9b0ff;
  margin-bottom: 20px;
}
.card__icon svg { width: 21px; height: 21px; }

.card h3 { font-size: 18.5px; margin-bottom: 10px; }
.card p { color: var(--text-muted); font-size: 15px; }

.card__list {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.card__list li {
  font-size: 12.5px;
  color: var(--text-dim);
  padding: 4px 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.02);
}

/* ---------- Values band --------------------------------------------------- */

.values {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.values__cell {
  background: var(--bg-2);
  padding: 30px 28px;
}

.values__cell h4 {
  font-size: 15.5px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 9px;
}
.values__cell h4 svg { width: 17px; height: 17px; color: var(--accent-2); flex: none; }
.values__cell p { color: var(--text-muted); font-size: 14.5px; }

/* ---------- Work / apps --------------------------------------------------- */

.app-card {
  display: flex;
  flex-direction: column;
  padding: 0;
}

.app-card__top {
  padding: 30px 28px 26px;
  display: flex;
  gap: 18px;
  align-items: flex-start;
}

.app-card__logo {
  width: 56px; height: 56px;
  border-radius: 15px;
  flex: none;
  display: grid;
  place-items: center;
  font-size: 24px;
  border: 1px solid var(--line-strong);
  background: linear-gradient(150deg, rgba(124,108,255,0.22), rgba(34,211,238,0.12));
}

.app-card__title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.app-card__title h3 { font-size: 18px; }

.tag {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 999px;
  color: var(--accent-2);
  background: rgba(34, 211, 238, 0.1);
  border: 1px solid rgba(34, 211, 238, 0.25);
}

.tag--muted {
  color: var(--text-dim);
  background: rgba(255,255,255,0.03);
  border-color: var(--line);
}

.app-card__top p { color: var(--text-muted); font-size: 14.5px; margin-top: 9px; }

.app-card__foot {
  margin-top: auto;
  padding: 16px 28px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13.5px;
  color: var(--text-dim);
}

.app-card__foot a { color: var(--accent-2); font-weight: 600; }
.app-card__foot a:hover { text-decoration: underline; }

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

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  counter-reset: step;
}

.step {
  position: relative;
  padding: 28px 24px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--surface), transparent);
}

.step__num {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin-bottom: 14px;
}

.step h3 { font-size: 17px; margin-bottom: 9px; }
.step p { color: var(--text-muted); font-size: 14.5px; }

/* ---------- Split (about) ------------------------------------------------- */

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

.split__panel {
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background:
    radial-gradient(120% 100% at 0% 0%, rgba(124,108,255,0.12), transparent 60%),
    var(--bg-2);
  padding: 32px;
  box-shadow: var(--shadow);
}

.hours { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.hours th { text-align: left; font-weight: 600; padding: 0 0 14px; font-size: 13px;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-dim); }
.hours td { padding: 9px 0; border-top: 1px solid var(--line); color: var(--text-muted); }
.hours td:last-child { text-align: right; color: var(--text); }
.hours tr.is-closed td:last-child { color: var(--text-dim); }

.info-list { list-style: none; margin: 24px 0 0; padding: 24px 0 0; border-top: 1px solid var(--line); }
.info-list li { display: flex; gap: 12px; align-items: flex-start; font-size: 14.5px;
  color: var(--text-muted); margin-bottom: 12px; }
.info-list li:last-child { margin-bottom: 0; }
.info-list svg { width: 17px; height: 17px; color: var(--accent-2); flex: none; margin-top: 3px; }
.info-list a { color: var(--text); border-bottom: 1px solid var(--line-strong); }
.info-list a:hover { color: var(--accent-2); border-color: var(--accent-2); }

.checks { list-style: none; margin: 28px 0 0; padding: 0; }
.checks li {
  display: flex; gap: 12px; align-items: flex-start;
  color: var(--text-muted); font-size: 15.5px; margin-bottom: 14px;
}
.checks svg { width: 19px; height: 19px; color: var(--accent-2); flex: none; margin-top: 3px; }
.checks b { color: var(--text); font-weight: 600; }

/* ---------- CTA band ------------------------------------------------------ */

.cta {
  position: relative;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line-strong);
  padding: clamp(40px, 6vw, 68px);
  text-align: center;
  overflow: hidden;
  background:
    radial-gradient(90% 130% at 50% 0%, rgba(124, 108, 255, 0.26), transparent 62%),
    var(--bg-2);
}

.cta h2 { font-size: clamp(28px, 4vw, 42px); max-width: 18ch; margin-inline: auto; }
.cta p { color: var(--text-muted); max-width: 52ch; margin: 20px auto 0; }
.cta__actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 34px; }

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

.footer {
  border-top: 1px solid var(--line);
  padding: 64px 0 34px;
  background: var(--bg-2);
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 44px;
}

.footer__about p {
  color: var(--text-muted);
  font-size: 14.5px;
  margin-top: 16px;
  max-width: 34ch;
}

.footer h5 {
  font-size: 12.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin: 0 0 18px;
  font-weight: 600;
}

.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li { margin-bottom: 11px; }
.footer li a { font-size: 14.5px; color: var(--text-muted); transition: color 0.18s ease; }
.footer li a:hover { color: var(--accent-2); }

.footer__bottom {
  border-top: 1px solid var(--line);
  padding-top: 26px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13.5px;
  color: var(--text-dim);
}

/* ---------- Legal / doc pages --------------------------------------------- */

.page-head {
  padding: 64px 0 44px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(80% 140% at 50% -20%, rgba(124,108,255,0.16), transparent 62%);
}

.page-head h1 { font-size: clamp(30px, 4.6vw, 46px); max-width: 20ch; }
.page-head p { color: var(--text-muted); margin-top: 16px; }

.updated {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  font-size: 13px;
  color: var(--text-dim);
  padding: 5px 13px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.doc-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 56px;
  padding: 56px 0 96px;
  align-items: start;
}

.toc { position: sticky; top: calc(var(--nav-h) + 28px); }
.toc h5 {
  font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-dim); margin: 0 0 16px; font-weight: 600;
}
.toc ul { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.toc li a {
  display: block;
  padding: 7px 0 7px 16px;
  font-size: 14px;
  color: var(--text-muted);
  border-left: 1.5px solid transparent;
  margin-left: -1px;
  transition: color 0.18s ease, border-color 0.18s ease;
}
.toc li a:hover, .toc li a.is-active { color: var(--text); border-left-color: var(--accent); }

.doc { max-width: 76ch; font-size: 15.8px; }
.doc h2 {
  font-size: 25px;
  margin: 52px 0 16px;
  padding-top: 8px;
  scroll-margin-top: calc(var(--nav-h) + 24px);
}
.doc h2:first-child { margin-top: 0; }
.doc h3 { font-size: 18px; margin: 34px 0 12px; color: var(--text); }
.doc h4 { font-size: 15.5px; margin: 26px 0 10px; color: var(--text); }
.doc p { color: var(--text-muted); margin-bottom: 16px; }
.doc ul, .doc ol { color: var(--text-muted); padding-left: 22px; margin: 0 0 18px; }
.doc li { margin-bottom: 10px; }
.doc li::marker { color: var(--accent); }
.doc a { color: var(--accent-2); word-break: break-word; }
.doc a:hover { text-decoration: underline; }
.doc strong { color: var(--text); font-weight: 600; }

.doc hr { border: 0; border-top: 1px solid var(--line); margin: 44px 0; }

.callout {
  border: 1px solid var(--line);
  border-left: 2px solid var(--accent);
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 20px 22px;
  margin: 26px 0;
}
.callout p:last-child { margin-bottom: 0; }

.link-table {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0 24px;
  font-size: 14.5px;
  display: block;
  overflow-x: auto;
}
.link-table th {
  text-align: left;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 0 16px 12px 0;
  font-weight: 600;
  white-space: nowrap;
}
.link-table td {
  padding: 11px 16px 11px 0;
  border-top: 1px solid var(--line);
  color: var(--text-muted);
  vertical-align: top;
}
.link-table td:first-child { color: var(--text); white-space: nowrap; }

/* ---------- Forms --------------------------------------------------------- */

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field--full { grid-column: 1 / -1; }

.field label {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 6px;
}
.field label span { color: var(--accent-2); }

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 12px 15px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--line);
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.field textarea { resize: vertical; min-height: 132px; line-height: 1.6; }

.field input::placeholder,
.field textarea::placeholder { color: var(--text-dim); }

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.055);
  box-shadow: 0 0 0 3px rgba(124, 108, 255, 0.16);
}

.field select { appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a2a8bd' stroke-width='2'><path d='M6 9l6 6 6-6'/></svg>");
  background-repeat: no-repeat; background-position: right 13px center; background-size: 17px;
  padding-right: 40px; }
.field select option { background: var(--bg-2); color: var(--text); }

.field.has-error input,
.field.has-error textarea { border-color: #ff6b81; box-shadow: 0 0 0 3px rgba(255,107,129,0.14); }

.error-msg { font-size: 12.5px; color: #ff8798; min-height: 0; }

.form-note { font-size: 13px; color: var(--text-dim); margin-top: 6px; }
.form-note a { color: var(--text-muted); text-decoration: underline; }

.form-panel {
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--bg-2);
  padding: clamp(26px, 4vw, 40px);
  box-shadow: var(--shadow);
}

/* success state */
.form-success {
  display: none;
  text-align: center;
  padding: 20px 4px 8px;
}
.form-success.is-visible { display: block; animation: rise 0.4s ease both; }

.form-success__icon {
  width: 62px; height: 62px;
  border-radius: 50%;
  margin: 0 auto 22px;
  display: grid; place-items: center;
  background: rgba(46, 230, 168, 0.12);
  border: 1px solid rgba(46, 230, 168, 0.3);
  color: #2ee6a8;
}
.form-success__icon svg { width: 28px; height: 28px; }
.form-success h3 { font-size: 22px; margin-bottom: 12px; }
.form-success p { color: var(--text-muted); max-width: 42ch; margin: 0 auto 22px; }

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

/* ---------- Chat widget --------------------------------------------------- */

.chat-launcher {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 80;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 56px;
  padding: 0 22px 0 18px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(100deg, var(--accent), #5b8cff 65%, var(--accent-2));
  box-shadow: 0 16px 38px -12px rgba(124, 108, 255, 0.9);
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.chat-launcher:hover { transform: translateY(-3px); box-shadow: 0 22px 46px -12px rgba(124,108,255,1); }
.chat-launcher svg { width: 21px; height: 21px; flex: none; }
.chat-launcher.is-hidden { opacity: 0; pointer-events: none; transform: scale(0.9); }

.chat-launcher__ping {
  position: absolute;
  top: -3px; right: -3px;
  width: 13px; height: 13px;
  border-radius: 50%;
  background: #2ee6a8;
  border: 2.5px solid var(--bg);
}

.chat-panel {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 90;
  width: min(384px, calc(100vw - 32px));
  height: min(560px, calc(100vh - 48px));
  display: flex;
  flex-direction: column;
  border-radius: 20px;
  overflow: hidden;
  background: var(--bg-2);
  border: 1px solid var(--line-strong);
  box-shadow: 0 32px 70px -18px rgba(0, 0, 0, 0.85);
  opacity: 0;
  transform: translateY(14px) scale(0.97);
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.chat-panel.is-open { opacity: 1; transform: none; pointer-events: auto; }

.chat-panel__head {
  padding: 17px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(120% 180% at 0% 0%, rgba(124,108,255,0.24), transparent 62%),
    rgba(255,255,255,0.02);
}

.chat-panel__avatar {
  width: 38px; height: 38px;
  border-radius: 11px;
  flex: none;
  display: grid; place-items: center;
  background: linear-gradient(140deg, var(--accent), var(--accent-2));
  color: #fff; font-weight: 800; font-size: 14px;
}

.chat-panel__meta { flex: 1; min-width: 0; }
.chat-panel__meta strong { display: block; font-size: 14.5px; }
.chat-panel__meta span {
  display: inline-flex; align-items: flex-start; gap: 7px;
  font-size: 12.5px; color: var(--text-muted); line-height: 1.45;
}
.chat-panel__meta span .dot { margin-top: 6px; }

.chat-panel__close {
  width: 32px; height: 32px;
  border-radius: 9px;
  display: grid; place-items: center;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  cursor: pointer;
  flex: none;
  transition: background 0.18s ease, color 0.18s ease;
}
.chat-panel__close:hover { background: var(--surface-2); color: var(--text); }
.chat-panel__close svg { width: 17px; height: 17px; }

.chat-log {
  flex: 1;
  overflow-y: auto;
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}
.chat-log::-webkit-scrollbar { width: 7px; }
.chat-log::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 99px; }

.bubble {
  max-width: 84%;
  padding: 12px 15px;
  border-radius: 15px;
  font-size: 14.5px;
  line-height: 1.55;
  animation: rise 0.28s ease both;
}

.bubble--bot {
  align-self: flex-start;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-bottom-left-radius: 5px;
  color: var(--text);
}

.bubble--user {
  align-self: flex-end;
  background: linear-gradient(100deg, var(--accent), #5b8cff);
  border-bottom-right-radius: 5px;
  color: #fff;
  white-space: pre-wrap;
  word-break: break-word;
}

.bubble--bot a { color: var(--accent-2); text-decoration: underline; }

.chat-time {
  align-self: center;
  font-size: 11.5px;
  color: var(--text-dim);
  letter-spacing: 0.04em;
}

.chips { display: flex; flex-wrap: wrap; gap: 8px; animation: rise 0.3s ease both; }
.chip {
  font-family: inherit;
  font-size: 13px;
  padding: 7px 13px;
  border-radius: 999px;
  background: transparent;
  border: 1px solid var(--line-strong);
  color: var(--text-muted);
  cursor: pointer;
  transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease;
}
.chip:hover { border-color: var(--accent); color: var(--text); background: var(--accent-soft); }

.typing { display: inline-flex; gap: 4px; align-items: center; padding: 3px 0; }
.typing i {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--text-dim);
  animation: blink 1.3s infinite ease-in-out;
}
.typing i:nth-child(2) { animation-delay: 0.18s; }
.typing i:nth-child(3) { animation-delay: 0.36s; }

@keyframes blink {
  0%, 60%, 100% { opacity: 0.28; transform: translateY(0); }
  30%           { opacity: 1;    transform: translateY(-3px); }
}

.chat-form {
  border-top: 1px solid var(--line);
  padding: 12px;
  display: flex;
  gap: 10px;
  align-items: flex-end;
  background: rgba(255,255,255,0.015);
}

.chat-form textarea {
  flex: 1;
  resize: none;
  max-height: 108px;
  min-height: 42px;
  padding: 11px 14px;
  border-radius: 13px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line);
  color: var(--text);
  font-family: inherit;
  font-size: 14.5px;
  line-height: 1.5;
  transition: border-color 0.18s ease;
}
.chat-form textarea::placeholder { color: var(--text-dim); }
.chat-form textarea:focus { outline: none; border-color: var(--accent); }

.chat-send {
  width: 42px; height: 42px;
  flex: none;
  border: 0;
  border-radius: 12px;
  display: grid; place-items: center;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(100deg, var(--accent), #5b8cff);
  transition: transform 0.16s ease, opacity 0.16s ease;
}
.chat-send:hover:not(:disabled) { transform: scale(1.06); }
.chat-send:disabled { opacity: 0.4; cursor: not-allowed; }
.chat-send svg { width: 18px; height: 18px; }

.chat-foot {
  padding: 0 12px 11px;
  font-size: 11.5px;
  color: var(--text-dim);
  text-align: center;
  background: rgba(255,255,255,0.015);
}

/* ---------- Cookie banner ------------------------------------------------- */

.cookie {
  position: fixed;
  left: 24px;
  bottom: 24px;
  z-index: 70;
  width: min(400px, calc(100vw - 48px));
  padding: 22px;
  border-radius: var(--radius);
  background: rgba(12, 14, 24, 0.96);
  backdrop-filter: blur(14px);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow);
  transform: translateY(18px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.cookie.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.cookie h4 { font-size: 15.5px; margin-bottom: 9px; }
.cookie p { font-size: 13.5px; color: var(--text-muted); }
.cookie p a { color: var(--accent-2); text-decoration: underline; }
.cookie__actions { display: flex; gap: 10px; margin-top: 18px; }
.cookie .btn { padding: 9px 18px; font-size: 13.5px; }

/* ---------- Reveal on scroll ---------------------------------------------- */

.reveal { opacity: 0; transform: translateY(18px); }
.reveal.is-in {
  opacity: 1;
  transform: none;
  transition: opacity 0.6s cubic-bezier(.2,.7,.3,1), transform 0.6s cubic-bezier(.2,.7,.3,1);
}

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

@media (max-width: 1000px) {
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .steps   { grid-template-columns: repeat(2, 1fr); }
  .values  { grid-template-columns: 1fr; }
  .split   { grid-template-columns: 1fr; gap: 40px; }
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 34px; }
  .doc-layout { grid-template-columns: 1fr; gap: 0; }
  .toc { display: none; }
}

@media (max-width: 780px) {
  .section { padding: 76px 0; }

  .nav__toggle { display: grid; }

  .nav__links {
    position: fixed;
    inset: var(--nav-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 14px 24px 26px;
    background: rgba(8, 9, 15, 0.985);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--line);
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease, transform 0.22s ease;
  }
  .nav__links.is-open { opacity: 1; transform: none; pointer-events: auto; }
  .nav__links a { padding: 14px 0; font-size: 16px; border-bottom: 1px solid var(--line); }
  .nav__links a::after { display: none; }
  .nav__links li:last-child a { border-bottom: 0; }

  .nav__cta .btn { display: none; }

  .grid--3, .grid--2, .steps { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }

  .hero__meta { gap: 10px 22px; }

  .footer__grid { grid-template-columns: 1fr; gap: 30px; padding-bottom: 34px; }
  .footer__bottom { flex-direction: column; align-items: flex-start; }

  .cookie { left: 16px; right: 16px; bottom: 16px; width: auto; }

  .chat-launcher { right: 16px; bottom: 16px; height: 52px; padding: 0 18px 0 15px; font-size: 14.5px; }
  .chat-panel {
    right: 0; bottom: 0; left: 0;
    width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
    border: 0;
  }
}

@media (max-width: 520px) {
  .hero { padding-top: 54px; }
  .hero h1 { font-size: 37px; letter-spacing: -0.028em; max-width: none; }
  .hero__sub { font-size: 16px; margin-top: 20px; }
  .hero__badge { margin-bottom: 24px; font-size: 12.5px; }
  .hero__actions { margin-top: 30px; }
  .hero__actions .btn { width: 100%; }
  .hero__meta { margin-top: 34px; }
  .section-head { margin-bottom: 40px; }
  .card, .step { padding: 26px 22px; }
  .cta__actions .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}
