/* ---------- tokens ---------- */
:root {
  --accent: #1a56db;
  --accent-dark: #1442a8;
  --accent-soft: #e8effc;
  --text: #1f2933;
  --muted: #52606d;
  --line: #e1e5ea;
  --bg: #ffffff;
  --bg-alt: #f5f7fa;
  --ok: #0f7a3d;
  --error: #b42318;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .1);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --header-h: 64px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 8px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

img, svg, video { display: block; max-width: 100%; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; color: #111827; }
h1 { font-size: clamp(1.9rem, 4.2vw, 3rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); letter-spacing: -.01em; }
h3 { font-size: 1.15rem; }
h4 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
a { color: var(--accent); }
a:hover { color: var(--accent-dark); }
ul, ol { margin: 0; padding: 0; list-style: none; }

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

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 16px; top: -100px;
  z-index: 100;
  padding: .6rem 1rem;
  background: var(--accent);
  color: #fff;
  border-radius: 6px;
  font-weight: 600;
}
.skip-link:focus { top: 12px; color: #fff; }

.container { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 16px; }
.container-narrow { max-width: 820px; }
.muted { color: var(--muted); font-size: .95rem; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 62ch; }

.icon {
  width: 1.25em; height: 1.25em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon-lg { width: 32px; height: 32px; color: var(--accent); margin-bottom: .75rem; }

main:focus { outline: none; }

.noscript {
  margin: 0;
  padding: 1rem 16px;
  background: var(--accent-soft);
  text-align: center;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-height: 48px;
  padding: .7rem 1.4rem;
  border: 2px solid transparent;
  border-radius: 8px;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); color: #fff; }
.btn-secondary { background: #fff; color: var(--accent); border-color: var(--accent); }
.btn-secondary:hover { background: var(--accent-soft); color: var(--accent-dark); }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--text);
  cursor: pointer;
}
.icon-btn:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: var(--header-h);
  flex-wrap: wrap;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin: 0 auto 0 0;
  font-weight: 700;
  font-size: 1.15rem;
  color: #111827;
  text-decoration: none;
}
.brand-logo { width: 30px; height: 30px; color: var(--accent); }

.nav-toggle {
  order: 2;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  min-height: 44px;
  padding: 0 .8rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: .95rem;
  cursor: pointer;
}

.site-nav { display: none; width: 100%; order: 3; }
.site-nav.open { display: block; }
.site-nav ul { padding: .25rem 0 1rem; }
.site-nav a {
  display: block;
  padding: .7rem .25rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid var(--line);
}
.site-nav a:hover { color: var(--accent); }

.lang-switch {
  order: 1;
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.lang-switch button {
  min-width: 44px;
  min-height: 44px;
  border: 0;
  background: #fff;
  color: var(--muted);
  font: inherit;
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
}
.lang-switch button + button { border-left: 1px solid var(--line); }
.lang-switch button[aria-pressed="true"] { background: var(--accent); color: #fff; }
.lang-switch button:focus-visible { outline-offset: -3px; }

@media (min-width: 900px) {
  .nav-toggle { display: none; }
  .site-nav { display: block; width: auto; order: 0; }
  .site-nav ul { display: flex; gap: .25rem; padding: 0; }
  .site-nav a { border: 0; padding: .5rem .75rem; border-radius: 6px; }
  .site-nav a:hover { background: var(--bg-alt); }
}

/* ---------- sections ---------- */
.section { padding: 72px 0; }
.section-alt { background: var(--bg-alt); }
.section-head { margin-bottom: 40px; }
.eyebrow {
  margin-bottom: .5rem;
  color: var(--accent);
  font-size: .85rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

@media (min-width: 900px) {
  .section { padding: 104px 0; }
}

/* ---------- hero ---------- */
.hero { padding: 56px 0 72px; }
.hero-grid { display: grid; gap: 40px; align-items: center; }
.hero h1 { max-width: 22ch; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 32px; }
.fact-strip { display: grid; gap: .5rem; color: var(--muted); font-size: .95rem; }
.fact-strip li { display: flex; align-items: center; gap: .5rem; }
.fact-strip .icon { color: var(--ok); }

@media (min-width: 600px) {
  .fact-strip { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1000px) {
  .hero { padding: 88px 0 104px; }
  .hero-grid { grid-template-columns: 1.05fr 1fr; gap: 56px; }
}

/* ---------- screenshot placeholders ---------- */
.shot {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: #fff;
  border: 1px solid var(--line);
}
.shot img { width: 100%; height: 100%; object-fit: cover; }
.shot-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  border: 2px dashed #c3cad3;
  background:
    repeating-linear-gradient(45deg, transparent 0 14px, rgba(26, 86, 219, .035) 14px 28px),
    var(--bg-alt);
  color: var(--muted);
  font-size: .9rem;
  font-weight: 500;
  text-align: center;
}
.section-alt .shot-placeholder { background-color: #fff; }

/* ---------- carousel ---------- */
.carousel { max-width: 900px; margin: 0 auto; }
.carousel-viewport { overflow: hidden; border-radius: var(--radius); }
.carousel-track {
  display: flex;
  transition: transform .45s ease;
}
.slide { flex: 0 0 100%; min-width: 0; }
.slide-caption {
  margin: 1rem 0 0;
  text-align: center;
  font-weight: 600;
  min-height: 3.2em;
}
.carousel-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: .5rem;
}
.carousel-dots { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px; }
.dot {
  width: 28px; height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  position: relative;
}
.dot::after {
  content: "";
  position: absolute;
  inset: 9px;
  border-radius: 50%;
  background: #8a94a3;
  transition: background-color .2s, transform .2s;
}
.dot[aria-current="true"]::after { background: var(--accent); transform: scale(1.3); }
.dot:hover::after { background: var(--accent-dark); }

.compare {
  --pos: 50%;
  position: relative;
  aspect-ratio: 8 / 5;
  overflow: hidden;
  border-radius: var(--radius);
  background: #2a2e33;
  box-shadow: var(--shadow);
  user-select: none;
}
.compare-img, .compare-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.compare-after { clip-path: inset(0 0 0 var(--pos)); }
.compare-handle {
  position: absolute;
  top: 0; bottom: 0;
  left: var(--pos);
  width: 3px;
  margin-left: -1.5px;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .25);
  pointer-events: none;
}
.compare-handle::after {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  width: 40px; height: 40px;
  margin: -20px 0 0 -20px;
  border-radius: 50%;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231a56db' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 7l-5 5 5 5M15 7l5 5-5 5'/%3E%3C/svg%3E") center / 24px no-repeat,
    #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .35);
  animation: knob-hint 2.4s ease-in-out 1s 2;
}
.compare-range {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
  touch-action: pan-y;
}
.compare:focus-within .compare-handle::after { outline: 3px solid var(--accent); outline-offset: 3px; }
.compare-tag {
  position: absolute;
  bottom: 12px;
  padding: .2rem .55rem;
  border-radius: 4px;
  background: rgba(17, 24, 39, .8);
  color: #fff;
  font-size: .8rem;
  font-weight: 600;
  pointer-events: none;
}
.compare-tag-l { left: 12px; }
.compare-tag-r { right: 12px; }
.example-badge {
  position: absolute;
  top: 8px; left: 8px;
  max-width: 45%;
  padding: .2rem .5rem;
  border-radius: 4px;
  background: rgba(255, 255, 255, .92);
  color: #374151;
  font-size: .7rem;
  line-height: 1.3;
  font-weight: 600;
  pointer-events: none;
}

@keyframes knob-hint {
  0%, 100% { transform: translateX(0); }
  30% { transform: translateX(-8px); }
  60% { transform: translateX(8px); }
}

/* ---------- how it works ---------- */
.how-grid { display: grid; gap: 56px; }
.how-module {
  display: inline-block;
  margin-bottom: 1.5rem;
  padding: .35rem .8rem;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 1rem;
}
.steps { counter-reset: step; display: grid; gap: 28px; }
.step { counter-increment: step; display: grid; gap: 14px; }
.step-text { position: relative; padding-left: 48px; }
.step-text::before {
  content: counter(step);
  position: absolute;
  left: 0; top: -2px;
  width: 34px; height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: .95rem;
}
.step-text p { margin: 0; color: var(--muted); }
.step .shot { aspect-ratio: 16 / 7; margin-left: 48px; }

@media (min-width: 1000px) {
  .how-grid { grid-template-columns: 1fr 1fr; gap: 64px; }
}

/* ---------- module blocks ---------- */
.module-grid { display: grid; gap: 40px; align-items: center; }
.features { display: grid; gap: 1rem; margin-top: 1.5rem; }
.features li { display: flex; gap: .85rem; align-items: flex-start; }
.features .icon { margin-top: .2rem; color: var(--accent); width: 22px; height: 22px; }
.features p { margin: 0; color: var(--muted); }
.features strong { color: var(--text); }

@media (min-width: 1000px) {
  .module-grid { grid-template-columns: 1fr 1fr; gap: 64px; }
  .module-grid-reverse > figure { order: -1; }
}

/* ---------- cards ---------- */
.card-grid { display: grid; gap: 16px; }
.card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}
.card h3 { margin-bottom: .35rem; }
.card p { margin: 0; color: var(--muted); }

@media (min-width: 600px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1000px) {
  .card-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; }
}

/* ---------- privacy / deployment ---------- */
.privacy-grid { display: grid; gap: 40px; align-items: start; }
.privacy-grid .features { margin-top: 0; }
.deploy {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}
.deploy-list { margin: 1rem 0 0; }
.deploy-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .9rem 0;
  border-top: 1px solid var(--line);
}
.deploy-row dt { font-weight: 600; }
.deploy-row dd { margin: 0; }
.badge {
  display: inline-block;
  padding: .2rem .65rem;
  border-radius: 999px;
  background: #eef0f3;
  color: #3e4c59;
  font-size: .85rem;
  font-weight: 600;
  white-space: nowrap;
}
.badge-now { background: #e3f4ea; color: var(--ok); }

@media (min-width: 1000px) {
  .privacy-grid { grid-template-columns: 1.4fr 1fr; gap: 64px; }
}

/* ---------- FAQ ---------- */
.faq details {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}
.faq details + details { margin-top: 12px; }
.faq summary {
  position: relative;
  padding: 1.1rem 3rem 1.1rem 1.25rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  position: absolute;
  right: 1.25rem; top: 50%;
  width: 10px; height: 10px;
  margin-top: -7px;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(45deg);
  transition: transform .2s;
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq summary:focus-visible { outline-offset: -3px; }
.faq details p { margin: 0; padding: 0 1.25rem 1.25rem; color: var(--muted); }

/* ---------- contact form ---------- */
.contact-form { display: grid; gap: 20px; }
.field { display: grid; gap: .4rem; margin: 0; padding: 0; border: 0; min-width: 0; }
.field label, .field legend { font-weight: 600; font-size: .95rem; padding: 0; }
.req { color: var(--error); }
input[type="text"], input[type="email"], input[type="tel"], textarea {
  width: 100%;
  min-height: 48px;
  padding: .7rem .85rem;
  border: 1px solid #9aa5b1;
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font: inherit;
}
textarea { resize: vertical; }
input:focus-visible, textarea:focus-visible { outline-offset: 0; border-color: var(--accent); }
[aria-invalid="true"] { border-color: var(--error) !important; box-shadow: 0 0 0 1px var(--error); }
.radio-row { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; margin-top: .4rem; }
.radio-row label { display: inline-flex; align-items: center; gap: .45rem; min-height: 44px; font-weight: 400; cursor: pointer; }
.radio-row input { width: 18px; height: 18px; accent-color: var(--accent); }
.form-footer .btn { margin-bottom: 1rem; }
.form-status { min-height: 1.5em; font-weight: 600; }
.form-status.is-error { color: var(--error); }
.form-footer .muted { margin-bottom: .5rem; }

@media (min-width: 700px) {
  .contact-form { grid-template-columns: 1fr 1fr; }
  .field-full { grid-column: 1 / -1; }
}

/* ---------- footer ---------- */
.site-footer {
  padding: 48px 0;
  border-top: 1px solid var(--line);
  background: var(--bg-alt);
}
.footer-inner { display: grid; gap: 24px; }
.brand-footer { margin-bottom: .75rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; }
.footer-links a { display: inline-block; padding: .4rem 0; }
.site-footer .muted { margin-bottom: .4rem; }

@media (min-width: 800px) {
  .footer-inner { grid-template-columns: 1fr auto; align-items: start; }
}

/* ---------- legal stub pages ---------- */
.legal { padding: 64px 0; min-height: 60vh; }
.todo {
  padding: 1rem 1.25rem;
  border: 2px dashed #c3cad3;
  border-radius: var(--radius);
  background: var(--bg-alt);
  color: var(--muted);
  font-weight: 600;
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
