:root {
  --bg: #060914;          /* deep ink navy */
  --bg-legal: #1a1d39;    /* legal document overlay */
  --cyan: #22e4ff;        /* main neon accent */
  --violet: #7a5cff;      /* secondary */
  --magenta: #ff4fd8;     /* separators / hot accent */
  --lime: #b8ff5c;        /* rare "online" accent */
  --text: #e8f1ff;
  --chat-width: min(780px, 54vw);
  --mono: ui-monospace, "JetBrains Mono", "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

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

html, body { height: 100%; overflow: hidden; }

body {
  color: var(--text);
  font-family: var(--mono);
  /* shown until the shader is drawn, or where WebGL is not there */
  background:
    radial-gradient(60% 50% at 20% 25%, rgb(122 92 255 / 0.35), transparent 70%),
    radial-gradient(55% 50% at 80% 70%, rgb(34 228 255 / 0.25), transparent 70%),
    var(--bg);
  background-attachment: fixed;
}
body.legal-open { background: var(--bg-legal); }

.surface { position: fixed; inset: 0; width: 100%; height: 100%; display: block; z-index: 0; }

.stage { position: relative; z-index: 1; height: 100%; }

/* narrow waterfall strip at the right edge; the sides fade out */
.waterfall {
  position: fixed; top: 0; bottom: 0; right: 3vw; width: clamp(90px, 10vw, 170px); height: 100%;
  z-index: 1; pointer-events: none;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 25%, #000 75%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 25%, #000 75%, transparent);
}

.flow { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; }

/* ---------- hero: the big service word ---------- */
.stage {
  display: flex; flex-direction: column; justify-content: center;
  padding: 0 6vw; cursor: pointer; user-select: none;
}
.hero__top, .hero__sub { font-size: clamp(12px, 1.3vw, 16px); letter-spacing: 0.18em; text-transform: uppercase; }
.hero__top { color: var(--cyan); text-shadow: 0 0 12px rgb(34 228 255 / 0.6); margin-bottom: 2.2vh; }
.hero__top i { font-style: normal; color: var(--magenta); }

.hero__word {
  --mx: 0; --my: 0;
  position: relative; display: block; width: fit-content; max-width: 100%;
  font-family: "Unbounded", "Space Grotesk", "Inter", system-ui, sans-serif;
  font-weight: 800; line-height: 1; letter-spacing: -0.02em; text-transform: uppercase;
  font-size: clamp(38px, 9.4vw, 160px);
  white-space: nowrap;
  color: transparent;
  background: linear-gradient(95deg, #fff 0%, var(--cyan) 38%, var(--violet) 78%, var(--magenta) 100%);
  -webkit-background-clip: text; background-clip: text;
  filter: drop-shadow(0 0 28px rgb(122 92 255 / 0.55));
  transform: translate(calc(var(--mx) * 6px), calc(var(--my) * 4px));
}
/* two offset copies: the RGB-split fringe, it widens with the cursor */
.hero__word::before, .hero__word::after {
  content: attr(data-text); position: absolute; inset: 0; z-index: -1;
  -webkit-text-fill-color: currentColor; mix-blend-mode: screen; opacity: 0.8;
  background: none;
}
.hero__word::before { color: var(--cyan);    transform: translate(calc(-1px + var(--mx) * -3px), calc(var(--my) * -1.5px)); }
.hero__word::after  { color: var(--magenta); transform: translate(calc(1px + var(--mx) * 3px), calc(var(--my) * 1.5px)); }
.hero__word.is-glitch { animation: tear 0.32s steps(2) 1; }
@keyframes tear {
  0% { clip-path: inset(10% 0 60% 0); transform: translate(-14px, 0); }
  35% { clip-path: inset(55% 0 12% 0); transform: translate(12px, 0); }
  70% { clip-path: inset(30% 0 35% 0); transform: translate(-6px, 0); }
  100% { clip-path: inset(0); }
}

.hero__bar { height: 3px; width: min(100%, 520px); margin: 3vh 0 2vh; background: rgb(255 255 255 / 0.12); border-radius: 2px; overflow: hidden; }
.hero__bar span { display: block; height: 100%; width: 100%; transform-origin: left; transform: scaleX(0);
  background: linear-gradient(90deg, var(--cyan), var(--violet), var(--magenta)); box-shadow: 0 0 12px var(--cyan); }

.hero__sub { color: var(--text); text-transform: none; letter-spacing: 0.04em; font-size: clamp(15px, 1.9vw, 24px); min-height: 1.6em; }
.hero__sub::after { content: "▍"; margin-left: 4px; color: var(--cyan); animation: caret 0.9s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.hero__name { color: var(--violet); filter: brightness(1.7); margin-right: 10px; }

/* ---------- brand (top left) ---------- */
.brand { position: fixed; top: 3.2vh; left: 6vw; z-index: 3; pointer-events: none; }
.brand h1 { font-size: clamp(26px, 3.2vw, 44px); font-weight: 800; letter-spacing: 0.04em; line-height: 1;
  color: var(--text); text-shadow: 0 0 18px rgb(34 228 255 / 0.55), 0 0 2px rgb(255 255 255 / 0.6); }
.brand h1 b { color: var(--cyan); }
.brand p { margin-top: 8px; font-size: clamp(11px, 1.1vw, 14px); letter-spacing: 0.16em; text-transform: uppercase; color: rgb(232 241 255 / 0.72); }

/* ---------- assistant: the look of a modern AI chat ---------- */
:root { --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; --glass: rgb(14 18 40 / 0.62); --line: rgb(255 255 255 / 0.12); }
.hero__word { cursor: pointer; }
.stage { transition: opacity 0.35s, transform 0.35s; }
body.chat-open .stage { opacity: 0.45; padding-left: calc(6vw + var(--chat-width) + 32px); padding-right: 6vw; transform: none; pointer-events: none; }
body.chat-open .hero__word { font-size: clamp(28px, 5vw, 88px); }
body.chat-open .hero__top { font-size: clamp(11px, 1vw, 14px); }
body.chat-open .hero__sub { font-size: clamp(14px, 1.4vw, 19px); }
/* Keep the start-screen navigation available while the dialog is open. */
body.chat-open .ask { left: 6vw; width: var(--chat-width); opacity: 1; pointer-events: auto; }
body.chat-open .ask__nudge, body.chat-open .ask__form { display: none; }
body.chat-open .ask__hot-slot { display: none; }
body.chat-open .ask__chips { width: min(720px, 100%); justify-content: center; margin: 0 auto; }

/* persistent navigation below the chat */
.ask { position: fixed; z-index: 3; left: 6vw; bottom: 6vh; width: min(720px, 88vw); font-family: var(--sans); transition: opacity 0.3s; }
.ask__nudge { display: inline-block; max-width: 100%; margin-bottom: 10px; font-size: 14px; line-height: 1.4; color: var(--text); letter-spacing: 0;
  background: var(--glass); border: 1px solid var(--line); border-radius: 16px 16px 16px 4px; padding: 9px 14px; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.ask__nudge:empty { display: none; }
.ask__form { display: flex; align-items: center; gap: 10px; height: 56px; padding: 0 8px 0 18px; border-radius: 28px;
  background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 8px 32px rgb(0 0 0 / 0.25); transition: border-color 0.2s, box-shadow 0.2s; }
.ask__form:focus-within { border-color: rgb(34 228 255 / 0.7); box-shadow: 0 8px 32px rgb(0 0 0 / 0.25), 0 0 0 3px rgb(34 228 255 / 0.15); }
.ask__dot { width: 9px; height: 9px; flex: none; border-radius: 50%; background: var(--lime); box-shadow: 0 0 8px var(--lime); }
.ask.is-nudging .ask__dot { animation: pulse 1.1s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.6); box-shadow: 0 0 14px var(--lime); } }
.ask__field { position: relative; flex: 1; min-width: 0; height: 100%; }
.ask__field input { width: 100%; height: 100%; background: none; border: 0; outline: 0; color: var(--text); font: inherit; font-size: 16px; }
.ask__ph { position: absolute; inset: 0; display: flex; align-items: center; font-size: 16px; color: rgb(232 241 255 / 0.5); pointer-events: none; white-space: nowrap; overflow: hidden; }
.ask__ph[hidden] { display: none; }
.ask__go, .chat__send { flex: none; width: 40px; height: 40px; border: 0; border-radius: 50%; font-size: 19px; line-height: 1; cursor: pointer; color: #060914;
  background: linear-gradient(135deg, var(--cyan), var(--violet)); transition: transform 0.15s, filter 0.15s; }
.ask__go:hover, .chat__send:hover { transform: scale(1.08); filter: brightness(1.15); }
.ask__chips { display: flex; flex-wrap: nowrap; gap: 8px; margin-top: 12px; overflow-x: auto; scrollbar-width: none; }
.ask__chips .chip { flex: none; white-space: nowrap; }
.ask__hot-slot { flex: 0 0 214px; display: flex; justify-content: flex-end; }
.ask__hot-slot .chip--hot { white-space: nowrap; }

.chip { font-family: var(--sans); font-size: 14px; padding: 8px 14px; cursor: pointer; color: var(--text); background: var(--glass);
  border: 1px solid var(--line); border-radius: 999px; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); transition: background 0.15s, border-color 0.15s; }
.chip:hover { border-color: color-mix(in srgb, var(--cyan) 70%, transparent); background: color-mix(in srgb, var(--cyan) 16%, transparent); }
.chip[aria-pressed="true"] { background: color-mix(in srgb, var(--cyan) 26%, transparent); border-color: var(--cyan); }
.chips .chip--visited { color: rgb(232 241 255 / 0.52); border-color: rgb(255 255 255 / 0.09); }
.chip--hot { border-color: rgb(255 79 216 / 0.6); }
.chip--hot:hover { background: rgb(255 79 216 / 0.18); border-color: var(--magenta); }
/* the chat window */
.chat { --cyan: #22e4ff; position: fixed; z-index: 5; left: 6vw; bottom: calc(6vh + 52px); width: var(--chat-width); height: min(82vh, 800px); font-family: var(--sans);
  display: flex; flex-direction: column; overflow: hidden; border-radius: 24px; background: rgb(11 14 32 / 0.8); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--line); box-shadow: 0 24px 80px rgb(0 0 0 / 0.5), 0 0 60px rgb(122 92 255 / 0.25);
  opacity: 0; transform: translateY(8px) scale(0.98); transition: opacity 0.25s, transform 0.25s; }
.chat[hidden] { display: none; }
.chat.is-open { opacity: 1; transform: none; }
.chat__head { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.chat__who { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.chat__title { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat__status { display: flex; align-items: center; gap: 6px; font-size: 12px; color: rgb(232 241 255 / 0.6); }
.chat__status i { width: 7px; height: 7px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 6px var(--lime); }
.chat__close { width: 34px; height: 34px; border: 0; border-radius: 50%; background: none; color: var(--text); font-size: 15px; cursor: pointer; }
.chat__close:hover { background: rgb(255 255 255 / 0.1); }
.chat__persona { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 18px; font-size: 13px;
  background: color-mix(in srgb, var(--cyan) 14%, transparent); border-bottom: 1px solid var(--line); }
.chat__persona[hidden] { display: none; }
.chat__persona b { color: var(--cyan); font-weight: 600; }
.chat__link { font: inherit; background: none; border: 0; color: var(--text); text-decoration: underline; cursor: pointer; }
.chat__log { flex: 1; overflow-y: auto; padding: 22px 18px; display: flex; flex-direction: column; gap: 20px; overflow-anchor: none; scrollbar-width: thin; scrollbar-color: rgb(255 255 255 / 0.2) transparent; }
.chat__form { display: flex; align-items: center; gap: 10px; margin: 8px 16px 16px; padding: 6px 6px 6px 18px; border-radius: 28px;
  background: rgb(255 255 255 / 0.06); border: 1px solid var(--line); transition: border-color 0.2s, box-shadow 0.2s; }
.chat__form:focus-within { border-color: color-mix(in srgb, var(--cyan) 70%, transparent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--cyan) 15%, transparent); }
.chat__form input { flex: 1; min-width: 0; height: 40px; background: none; border: 0; outline: 0; color: var(--text); font: inherit; font-size: 16px; }

.avatar { flex: none; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; font-size: 12px; font-weight: 700; letter-spacing: 0.02em; color: #060914;
  background: linear-gradient(135deg, var(--cyan), var(--violet) 70%, var(--magenta)); }
.msg { display: flex; gap: 12px; max-width: 100%; font-size: 15.5px; line-height: 1.6; animation: rise 0.25s ease-out; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }
.msg--bot { align-self: flex-start; align-items: flex-start; width: 100%; }
.msg__main { flex: 1; min-width: 0; padding-top: 4px; }
.msg--user { align-self: flex-end; max-width: 82%; padding: 10px 16px; border-radius: 20px 20px 4px 20px; overflow-wrap: anywhere;
  background: linear-gradient(135deg, rgb(34 228 255 / 0.22), rgb(122 92 255 / 0.32)); border: 1px solid rgb(255 255 255 / 0.1); }
.msg__dots { display: flex; gap: 5px; padding: 14px 4px; }
.msg__dots i { width: 7px; height: 7px; border-radius: 50%; background: rgb(232 241 255 / 0.7); animation: blink 1s infinite; }
.msg__dots i:nth-child(2) { animation-delay: 0.15s; } .msg__dots i:nth-child(3) { animation-delay: 0.3s; }
@keyframes blink { 0%, 60%, 100% { opacity: 0.25; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }
.msg__block { margin-top: 12px; animation: rise 0.3s ease-out; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.chips .chip { background: rgb(255 255 255 / 0.05); }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.cards--wide { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.card { display: flex; flex-direction: column; gap: 6px; text-align: left; font: inherit; font-size: 15px; line-height: 1.45; color: var(--text); padding: 14px; border-radius: 16px;
  background: rgb(255 255 255 / 0.05); border: 1px solid var(--line); cursor: pointer; transition: border-color 0.15s, transform 0.15s, background 0.15s; }
.card b { font-size: 16px; font-weight: 600; }
.card span { color: rgb(232 241 255 / 0.72); }
.card:hover:not(.card--static) { border-color: color-mix(in srgb, var(--cyan) 70%, transparent); background: rgb(255 255 255 / 0.08); transform: translateY(-2px); }
.card--static { cursor: default; }
.card small { color: var(--cyan); font-size: 13px; font-weight: 600; }
.card em { font-style: normal; color: rgb(232 241 255); }
.card__result { color: var(--lime); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.tags i { font-style: normal; font-size: 12px; padding: 3px 10px; border-radius: 999px; background: rgb(122 92 255 / 0.25); color: rgb(232 241 255 / 0.9); }

.counters { display: flex; gap: 12px; flex-wrap: wrap; }
.counter { flex: 1 1 110px; padding: 14px; border-radius: 16px; background: rgb(255 255 255 / 0.05); border: 1px solid var(--line); }
.counter b { display: block; font-size: 28px; font-weight: 700; color: var(--cyan); }
.counter span { font-size: 13px; color: rgb(232 241 255 / 0.7); }
.timeline { list-style: none; margin-top: 14px; border-left: 2px solid rgb(122 92 255 / 0.5); }
.timeline li { padding: 0 0 12px 16px; font-size: 14.5px; animation: rise 0.4s ease-out both; }
.timeline b { color: var(--magenta); margin-right: 10px; font-weight: 600; }

.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.btn { display: inline-block; font: inherit; font-size: 14px; font-weight: 500; text-decoration: none; color: var(--text); padding: 10px 18px; border-radius: 999px;
  background: rgb(255 255 255 / 0.06); border: 1px solid var(--line); cursor: pointer; transition: background 0.15s, border-color 0.15s, filter 0.15s; }
.btn:hover { border-color: color-mix(in srgb, var(--cyan) 70%, transparent); background: color-mix(in srgb, var(--cyan) 16%, transparent); }
.btn--fill { color: #060914; font-weight: 600; border: 0; background: linear-gradient(135deg, var(--cyan), var(--violet)); }
.btn--fill:hover { background: linear-gradient(135deg, var(--cyan), var(--violet)); filter: brightness(1.15); }
.btn:disabled { opacity: 0.5; cursor: default; }

.bullets { margin: 0 0 8px 20px; font-size: 15px; }
.bullets li { margin-bottom: 4px; }
.bullets__price { color: var(--lime); font-size: 14px; font-weight: 500; }

.rows { border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: rgb(255 255 255 / 0.05); }
.row { display: flex; justify-content: space-between; gap: 16px; padding: 10px 14px; font-size: 14.5px; }
.row + .row { border-top: 1px solid rgb(255 255 255 / 0.08); }
.row span { color: rgb(232 241 255 / 0.7); } .row b { font-weight: 600; text-align: right; }

.calc { display: flex; flex-direction: column; gap: 14px; padding: 16px; border-radius: 18px; border: 1px solid var(--line); background: rgb(255 255 255 / 0.05); }
.calc__tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.calc__tabs .chip { font-size: 13px; padding: 6px 12px; }
.calc__row { display: grid; grid-template-columns: 150px 1fr 24px; align-items: center; gap: 12px; font-size: 14px; }
.calc__row--check { grid-template-columns: auto 1fr; cursor: pointer; }
.calc input[type="range"] { accent-color: var(--cyan); width: 100%; }
.calc input[type="checkbox"], .form input[type="checkbox"] { accent-color: var(--cyan); width: 16px; height: 16px; }
.calc__sum { font-size: clamp(22px, 3.4vw, 30px); font-weight: 700; color: var(--text); }
.calc__meta { font-size: 14px; color: var(--lime); margin-top: -8px; }
.calc__note { color: rgb(232 241 255 / 0.55); font-size: 12.5px; }

.form { display: flex; flex-direction: column; gap: 10px; max-width: 560px; }
.form input[type="text"], .form textarea { font: inherit; font-size: 15px; color: var(--text); padding: 12px 14px; border-radius: 14px; background: rgb(255 255 255 / 0.06);
  border: 1px solid var(--line); outline: 0; resize: vertical; }
.form input:focus, .form textarea:focus { border-color: color-mix(in srgb, var(--cyan) 70%, transparent); }
.form .trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form__agree { display: flex; gap: 8px; align-items: flex-start; font-size: 12px; color: rgb(232 241 255 / 0.6); cursor: pointer; }
.form__err { color: #ff8fb0; min-height: 1em; font-size: 13px; }
.form__err a { color: inherit; text-decoration: underline; }
.form__ok { color: var(--lime); font-weight: 500; }
.owner { display: flex; flex-direction: column; gap: 8px; padding: 14px; font-size: 14px; border-radius: 16px; background: rgb(184 255 92 / 0.06); border: 1px solid rgb(184 255 92 / 0.35); }
.owner b { color: var(--lime); margin-right: 6px; font-weight: 600; }

@media (max-width: 600px) {
  .brand { left: 16px; }
  .brand h1 { font-size: 27.5px; }
  .brand p { font-size: 11.25px; letter-spacing: 0.12em; }
  .hero__top { font-size: 12.5px; }
  .hero__word { font-size: clamp(30px, 9.25vw, 70px); }
  .hero__sub { font-size: 16.25px; }
  .ask { left: 16px; width: calc(100vw - 32px); bottom: 3vh; }
  body.chat-open .ask { left: 16px; width: calc(100vw - 32px); }
  body.chat-open .ask__chips { width: 100%; justify-content: center; margin: 0; }
  .ask__chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .ask__chips .chip { flex: none; }
  body.chat-open .stage { opacity: 0.45; padding: 0 16px; transform: scale(0.94); }
  body.chat-open .hero__word { font-size: clamp(30px, 9.25vw, 70px); }
  body.chat-open .hero__top { font-size: 12.5px; }
  body.chat-open .hero__sub { font-size: 16.25px; }
  .chat { top: 0; left: 0; bottom: auto; width: 100%; height: 100dvh; border: 0; border-radius: 0; transform: none; }
  .chat.is-open { transform: none; }
  .chat .ask__chips { align-self: center; width: 100%; flex-wrap: wrap; justify-content: center; align-content: center; gap: 4px 14px; margin: 0 auto; padding: 0 16px 12px; overflow: visible; text-align: center; }
  .chat .ask__chips .chip { padding: 15px 0; color: rgb(232 241 255 / 0.72); background: none; border: 0; border-radius: 0; font-size: 13px; font-weight: 600; text-align: center; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .chat .ask__chips .chip:hover { color: var(--text); background: none; border-color: transparent; }
  .calc__row { grid-template-columns: 110px 1fr 20px; }
  .msg { font-size: 15px; }
}

@media (min-width: 601px) and (max-width: 1024px) {
  :root { --chat-width: 94vw; }
  body.chat-open .stage { opacity: 0.45; padding: 0 6vw; transform: scale(0.94); }
  body.chat-open .hero__word { font-size: clamp(30px, 8vw, 70px); }
  .chat { left: 3vw; }
  body.chat-open .ask { left: 3vw; }
}

@media (max-width: 759px) {
  body:not(.chat-open) .ask__chips { flex-wrap: wrap; overflow: visible; }
  body:not(.chat-open) .ask__hot-slot { flex-basis: 100%; justify-content: flex-start; }
}
@media (prefers-reduced-motion: reduce) { .chat, .stage, .msg, .msg__block { transition: none; animation: none; } }

.form__agree a { color: var(--cyan); text-decoration: underline; }
.legal-link { position: fixed; z-index: 2; left: 16px; bottom: 8px; font-size: 11px; color: rgb(232 241 255 / 0.45); text-decoration: none; }
.legal-link:hover { color: var(--cyan); }

/* Full-screen legal document viewer. The underlying chat remains mounted, so
   closing it restores the exact state of a conversation or form. */
.legal-modal { position: fixed; z-index: 20; inset: 0; background: var(--bg-legal); }
.legal-modal__frame { width: 100%; height: 100%; border: 0; display: block; }
.legal-modal__close { position: fixed; z-index: 1; top: 14px; right: 16px; width: 36px; height: 36px; border: 1px solid rgb(232 241 255 / 0.22); border-radius: 50%; color: var(--text); background: rgb(17 24 43 / 0.9); font: 22px/1 var(--sans); cursor: pointer; }
.legal-modal__close:hover { border-color: var(--cyan); color: var(--cyan); }
