:root {
  --blue: #4d6bfe;
  --blue-dark: #3a56e8;
  --blue-soft: #eef1ff;
  --bg: #ffffff;
  --bg-alt: #f7f8fc;
  --card: #ffffff;
  --text: #1a1d29;
  --muted: #5f6577;
  --border: #e6e8f0;
  --shadow: 0 10px 30px rgba(31, 45, 110, .08);
  --radius: 18px;
  color-scheme: light;
}
[data-theme="dark"] {
  --blue: #6b84ff;
  --blue-dark: #5a74f5;
  --blue-soft: #1e2440;
  --bg: #12131a;
  --bg-alt: #181a23;
  --card: #1c1e28;
  --text: #eceef5;
  --muted: #9aa0b4;
  --border: #2a2d3a;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; font-size: 20px; letter-spacing: -.01em; }
.brand:hover { text-decoration: none; }
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.nav { display: flex; gap: 22px; margin-inline-start: auto; align-items: center; }
.nav a { color: var(--muted); font-size: 15px; font-weight: 500; }
.nav a:hover { color: var(--text); text-decoration: none; }
.nav a.btn, .nav a.btn:hover { color: #fff; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--card); color: var(--text); display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.icon-btn svg { width: 18px; height: 18px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 20px; border-radius: 999px; border: 0; cursor: pointer;
  background: var(--blue); color: #fff; font-weight: 600; font-size: 15px; white-space: nowrap;
  transition: background .15s, transform .15s;
}
.btn:hover { background: var(--blue-dark); text-decoration: none; transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--bg-alt); }

/* hero */
.hero { padding: 72px 0 56px; text-align: center; background: radial-gradient(1000px 420px at 50% -80px, var(--blue-soft), transparent 70%); }
.hero-logo { width: 72px; height: 72px; margin: 0 auto 18px; display: block; border-radius: 20px; box-shadow: 0 8px 24px rgba(77, 107, 254, .22); }
.hero h1 { font-size: clamp(32px, 5.2vw, 54px); line-height: 1.12; margin: 0 0 16px; letter-spacing: -.02em; }
.hero h1 span { color: var(--blue); }
.hero p.lead { font-size: clamp(17px, 2vw, 20px); color: var(--muted); max-width: 720px; margin: 0 auto 32px; }

.prompt {
  max-width: 760px; margin: 0 auto; text-align: start;
  background: var(--card); border: 1px solid var(--border); border-radius: 24px; box-shadow: var(--shadow);
  padding: 14px 14px 10px 20px;
}
.prompt:focus-within { border-color: var(--blue); }
.prompt textarea {
  width: 100%; border: 0; outline: 0; resize: none; background: transparent; color: var(--text);
  font: inherit; font-size: 17px; line-height: 1.5; min-height: 52px; max-height: 200px;
}
.prompt-bar { display: flex; align-items: center; gap: 8px; }
.prompt-note { color: var(--muted); font-size: 13px; }
.send-round {
  margin-inline-start: auto; width: 40px; height: 40px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--blue); color: #fff; display: inline-flex; align-items: center; justify-content: center;
}
.send-round:disabled { background: #c3cbe8; cursor: default; }
[data-theme="dark"] .send-round:disabled { background: #3a3f57; }
.send-round svg { width: 20px; height: 20px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 22px auto 0; max-width: 820px; }
.chip {
  border: 1px solid var(--border); background: var(--card); color: var(--text); border-radius: 999px;
  padding: 8px 16px; font: inherit; font-size: 14px; cursor: pointer; transition: border-color .15s, background .15s;
}
.chip:hover { border-color: var(--blue); background: var(--blue-soft); }

/* sections */
section { padding: 72px 0; }
section.alt { background: var(--bg-alt); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 44px; }
.section-head h2 { font-size: clamp(26px, 3.6vw, 38px); line-height: 1.2; margin: 0 0 12px; letter-spacing: -.015em; }
.section-head p { color: var(--muted); margin: 0; font-size: 17px; }

.grid { display: grid; gap: 20px; grid-template-columns: repeat(3, 1fr); }
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; }
.card h3 { margin: 14px 0 8px; font-size: 19px; }
.card p { margin: 0; color: var(--muted); font-size: 15.5px; }
.card .ico {
  width: 44px; height: 44px; border-radius: 12px; background: var(--blue-soft); color: var(--blue);
  display: flex; align-items: center; justify-content: center;
}
.card .ico svg { width: 22px; height: 22px; }

.modes { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.mode h3 { margin-top: 0; display: flex; align-items: center; gap: 10px; }
.mode ul { margin: 12px 0 0; padding-inline-start: 20px; color: var(--muted); }
.mode li { margin: 6px 0; }
.tag { font-size: 12px; font-weight: 700; color: var(--blue); background: var(--blue-soft); border-radius: 999px; padding: 3px 10px; }

.steps { counter-reset: step; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.step { position: relative; padding-top: 64px; }
.step::before {
  counter-increment: step; content: counter(step);
  position: absolute; top: 22px; inset-inline-start: 26px; width: 32px; height: 32px; border-radius: 50%;
  background: var(--blue); color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center;
}

.text-block { max-width: 820px; margin: 0 auto; }
.text-block h2 { font-size: clamp(24px, 3vw, 32px); margin: 0 0 14px; }
.text-block p { color: var(--muted); }

.faq { max-width: 820px; margin: 0 auto; }
.faq details { background: var(--card); border: 1px solid var(--border); border-radius: 14px; margin-bottom: 12px; }
.faq summary { cursor: pointer; list-style: none; padding-block: 18px; padding-inline: 22px 52px; font-weight: 600; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; inset-inline-end: 22px; top: 50%; width: 9px; height: 9px; margin-top: -7px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .2s;
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq details p { margin: 0; padding: 0 22px 18px; color: var(--muted); }

.cta { text-align: center; }
.cta .card { padding: 48px 24px; background: linear-gradient(135deg, var(--blue) 0%, #7b5cff 100%); border: 0; color: #fff; }
.cta h2 { margin: 0 0 10px; font-size: clamp(24px, 3.4vw, 34px); }
.cta p { margin: 0 0 24px; opacity: .9; }
.cta .btn { background: #fff; color: var(--blue); }

/* footer */
.site-footer { border-top: 1px solid var(--border); padding: 36px 0; color: var(--muted); font-size: 14px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: center; }
.site-footer nav { display: flex; gap: 20px; margin-inline-start: auto; }
.site-footer nav a { color: var(--muted); }
.site-footer .disclaimer { flex-basis: 100%; font-size: 13px; margin: 0; }

/* legal pages */
.legal { padding: 56px 0 72px; }
.legal .text-block h1 { font-size: clamp(28px, 4vw, 40px); margin: 0 0 6px; }
.legal .text-block h2 { font-size: 21px; margin: 32px 0 10px; }
.legal .text-block p, .legal .text-block li { color: var(--text); opacity: .88; }
.legal .updated { color: var(--muted); margin: 0 0 28px; }

.contact-form { display: flex; flex-direction: column; gap: 16px; margin-top: 8px; }
.contact-form .fb-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.contact-form label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 14px; }
.contact-form small { font-weight: 400; color: var(--muted); }
.contact-form input[type="email"], .contact-form input[type="text"], .contact-form textarea {
  font: inherit; font-weight: 400; color: var(--text); background: var(--card); border: 1px solid var(--border);
  border-radius: 12px; padding: 10px 14px; outline: 0;
}
.contact-form input:focus, .contact-form textarea:focus { border-color: var(--blue); }
.contact-form textarea { min-height: 160px; resize: vertical; }
.contact-form input[type="file"] { font-weight: 400; color: var(--muted); }
.contact-form .btn { align-self: flex-start; }
.contact-form [data-feedback-status] { margin: 0; color: var(--muted); }
@media (max-width: 680px) { .contact-form .fb-row { grid-template-columns: 1fr; } }

.notfound { text-align: center; padding: 120px 0; }
.notfound h1 { font-size: 64px; margin: 0; color: var(--blue); }

@media (max-width: 900px) {
  .grid, .steps { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  .nav a:not(.btn) { display: none; }
  .grid, .steps, .modes { grid-template-columns: 1fr; }
  .hero { padding: 48px 0 40px; }
  section { padding: 56px 0; }
  .site-footer nav { margin-inline-start: 0; }
}

/* language switcher */
.lang-select {
  font: inherit; font-size: 14px; color: var(--muted); background: var(--card); border: 1px solid var(--border);
  border-radius: 10px; padding: 6px 10px; cursor: pointer;
}
.lang-select:hover { color: var(--text); }