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

:root {
  --accent: #a64f30;
  --accent-dark: #8d4026;
  --text: #1b1c18;
  --muted: #6f7069;
  --border: #dcd8cf;
  --border-strong: #c8c3b8;
  --bg: #fbfaf7;
  --bg-alt: #f2f0eb;
  --max-w: 1120px;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

/* ── Header ─────────────────────────────────────────── */
header {
  border-bottom: 1px solid var(--border);
  padding: 0 1.5rem;
}
.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  gap: 1rem;
}
.logo {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.logo span { color: inherit; }
.logo::after {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-left: 3px;
  content: "";
  background: var(--accent);
  border-radius: 50%;
  vertical-align: 0.08em;
}
nav a {
  font-size: 0.9rem;
  color: var(--muted);
  text-decoration: none;
  margin-left: 1.25rem;
}
nav a:hover { color: var(--text); }

.lang-btn {
  margin-left: 1.5rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text);
  background: none;
  border: 1px solid var(--border-strong);
  border-radius: 5px;
  padding: 0.2rem 0.55rem;
  cursor: pointer;
  line-height: 1.4;
  transition: background 0.12s, color 0.12s;
}
.lang-btn:hover { background: var(--text); color: var(--bg); }

[lang-hide] { display: none !important; }

/* ── Main content ───────────────────────────────────── */
main {
  max-width: 760px;
  margin: 0 auto;
  padding: 3rem 1.5rem 5rem;
}

/* ── Hero ───────────────────────────────────────────── */
.hero { text-align: center; padding: 3rem 0 2.5rem; }
.hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}
.hero p {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 520px;
  margin: 0 auto 2rem;
}
.tg-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--accent);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.65rem 1.5rem;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.15s;
}
.tg-btn:hover { background: var(--accent-dark); }

/* ── Feature grid ───────────────────────────────────── */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-top: 3rem;
}
.feature {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.25rem 1.25rem 1.5rem;
}
.feature-icon { font-size: 1.5rem; margin-bottom: 0.6rem; }
.feature h3 { font-size: 0.95rem; font-weight: 700; margin-bottom: 0.35rem; }
.feature p  { font-size: 0.875rem; color: var(--muted); }

/* ── Legal pages ────────────────────────────────────── */
.page-title {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.4rem;
}
.page-date { font-size: 0.85rem; color: var(--muted); margin-bottom: 2.5rem; }

.prose h2 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 2rem 0 0.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}
.prose h2:first-child { border-top: none; padding-top: 0; margin-top: 0; }
.prose p  { font-size: 0.925rem; color: #374151; margin-bottom: 0.75rem; }
.prose ul { padding-left: 1.25rem; margin-bottom: 0.75rem; }
.prose li { font-size: 0.925rem; color: #374151; margin-bottom: 0.35rem; }
.prose a  { color: var(--accent); }

/* ── Footer ─────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  padding: 1.25rem 1.5rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
}
footer a { color: var(--muted); text-decoration: none; margin: 0 0.5rem; }
footer a:hover { color: var(--text); }

/* ── Product landing ───────────────────────────────── */
.landing {
  background: var(--bg-alt);
  color: var(--text);
}
.landing header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--bg-alt);
  border-bottom-color: var(--border);
  box-shadow: none;
  backdrop-filter: none;
}
.landing .header-inner { height: 68px; }
.landing nav { display: flex; align-items: center; }
.landing nav a { margin-left: 1.5rem; }
.landing .nav-app-link {
  padding: 0.4rem 0.7rem;
  color: var(--bg);
  background: var(--text);
  border: 1px solid var(--text);
  border-radius: 10px;
}
.landing main {
  max-width: var(--max-w);
  padding: 2.5rem 1.5rem 5rem;
}
.landing .hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 0.9fr);
  align-items: center;
  gap: 5rem;
  min-height: 610px;
  padding: 4rem 0 5rem;
  text-align: left;
}
.hero-copy { max-width: 590px; }
.eyebrow {
  margin-bottom: 1rem;
  color: var(--accent-dark);
  font-size: 0.73rem;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.landing .hero h1 {
  max-width: 620px;
  margin-bottom: 1.35rem;
  font-size: clamp(2.55rem, 5vw, 4.35rem);
  font-weight: 720;
  line-height: 1.01;
  letter-spacing: -0.048em;
}
.landing .hero p {
  max-width: 570px;
  margin: 0 0 1.8rem;
  font-size: 1.08rem;
  line-height: 1.65;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.65rem; }
.primary-btn, .secondary-btn {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.15rem;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 650;
  text-decoration: none;
  transition: transform 100ms ease-out, background 180ms cubic-bezier(.2,.8,.2,1), box-shadow 180ms cubic-bezier(.2,.8,.2,1);
}
.primary-btn { color: var(--bg); background: var(--text); }
.primary-btn:hover { background: #080906; transform: translateY(-1px); }
.secondary-btn { color: var(--text); background: var(--bg); border: 1px solid var(--border-strong); }
.secondary-btn:hover { background: #fff; transform: translateY(-1px); }
.primary-btn:active, .secondary-btn:active, .lang-btn:active, .nav-app-link:active {
  transform: scale(.97);
  transition-duration: 80ms;
}
.hero-note { margin-top: 0.85rem; color: var(--muted); font-size: 0.75rem; }
.product-preview {
  display: grid;
  grid-template-columns: 70px 1fr;
  height: 455px;
  overflow: hidden;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: 20px;
  box-shadow: 0 18px 46px rgb(35 32 26 / 9%);
  transform: none;
  transition: transform 320ms cubic-bezier(.2,.8,.2,1), box-shadow 320ms cubic-bezier(.2,.8,.2,1);
}
.product-preview:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 54px rgb(35 32 26 / 12%);
}
.preview-sidebar {
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 0.7rem;
  padding: 1rem;
  background: #e7e3da;
  border-right: 1px solid var(--border);
}
.preview-logo {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  margin-bottom: 1.3rem;
  color: var(--bg);
  background: var(--text);
  border-radius: 10px;
  font-size: 0.75rem;
  font-weight: 800;
}
.preview-sidebar i { width: 29px; height: 29px; background: var(--bg); border-radius: 9px; }
.preview-chat { position: relative; display: flex; flex-direction: column; padding: 1rem 1.1rem; }
.preview-toolbar { display: flex; align-items: center; justify-content: flex-end; margin-bottom: 3.5rem; }
.preview-toolbar span {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.65rem;
  color: var(--text);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 11px;
  font-size: 0.66rem;
}
.preview-toolbar b { display: grid; width: 22px; height: 22px; place-items: center; color: var(--accent); background: #f1e2db; border-radius: 7px; }
.preview-toolbar small { margin-left: 0.4rem; color: var(--muted); }
.preview-message { max-width: 82%; margin-bottom: 1rem; padding: 0.75rem; border-radius: 14px; font-size: 0.72rem; }
.preview-message-user { align-self: flex-end; color: var(--text); background: #e7e3da; border: 1px solid var(--border); border-bottom-right-radius: 4px; }
.preview-message-ai { background: transparent; border-bottom-left-radius: 4px; }
.preview-message-ai > span { display: block; width: 90%; height: 7px; margin-bottom: 0.45rem; background: #d2cec5; border-radius: 5px; }
.preview-message-ai > span:nth-child(2) { width: 72%; }
.preview-message-ai > span:nth-child(3) { width: 82%; }
.preview-code { margin-top: 0.8rem; padding: 0.65rem; background: #1d1e1a; border-radius: 10px; }
.preview-code i { display: block; width: 80%; height: 5px; margin: 0.35rem 0; background: #6e7068; border-radius: 3px; }
.preview-code i:nth-child(2) { width: 58%; background: #d27a59; }
.preview-input {
  position: absolute;
  right: 1.1rem;
  bottom: 1rem;
  left: 1.1rem;
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.55rem 0.5rem 0.8rem;
  color: var(--muted);
  border: 1px solid var(--border-strong);
  border-radius: 15px;
  font-size: 0.7rem;
}
.preview-input b { display: grid; width: 32px; height: 32px; place-items: center; color: var(--bg); background: var(--text); border-radius: 10px; }
.aggregator {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 4rem;
  padding: 5rem 0;
  border-top: 1px solid var(--border);
}
.section-intro h2, .final-cta h2 {
  margin: 0 0 1rem;
  font-size: clamp(1.9rem, 3.5vw, 3rem);
  line-height: 1.08;
  letter-spacing: -0.045em;
}
.section-intro p, .final-cta p { color: var(--muted); font-size: 0.95rem; }
.model-board {
  border-top: 1px solid var(--border-strong);
}
.model-board article {
  display: grid;
  min-height: 92px;
  grid-template-columns: 52px 1fr;
  align-items: center;
  gap: 1rem;
  padding: 1rem 0;
  background: transparent;
  border-bottom: 1px solid var(--border);
  transition: padding 180ms cubic-bezier(.2,.8,.2,1);
}
.model-board article:hover { padding-right: 0.5rem; padding-left: 0.5rem; }
.model-board article > div { display: flex; flex-direction: column; gap: 0.25rem; }
.model-board b { font-size: 0.95rem; line-height: 1.35; }
.model-board small { color: var(--muted); font-size: 0.76rem; line-height: 1.45; }
.model-index { color: var(--accent-dark); font-size: 0.7rem; font-weight: 750; letter-spacing: 0.08em; }
.landing .features {
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin: 1rem 0 5rem;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.landing .feature {
  min-height: 225px;
  padding: 1.5rem;
  background: transparent;
  border: 0;
  border-right: 1px solid var(--border);
  border-radius: 0;
}
.landing .feature:last-child { border-right: 0; }
.feature-number { display: block; margin-bottom: 3rem; color: var(--accent-dark); font-size: 0.72rem; }
.landing .feature h3 { margin-bottom: 0.6rem; font-size: 1rem; }
.landing .feature p { font-size: 0.84rem; line-height: 1.55; }
.final-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 3rem;
  color: #f3f0e8;
  background: #1d1e1a;
  border-radius: 24px;
}
.final-cta h2 { margin-bottom: 0.5rem; font-size: clamp(1.6rem, 3vw, 2.5rem); }
.final-cta p { margin: 0; color: #b8b4aa; }
.final-cta .primary-btn { color: #1d1e1a; background: #f3f0e8; white-space: nowrap; }
.landing footer { background: var(--bg); }

@media (max-width: 880px) {
  .landing nav a:not(.nav-app-link) { display: none; }
  .landing .hero { grid-template-columns: 1fr; gap: 3rem; min-height: 0; padding-top: 3rem; }
  .product-preview { width: min(100%, 560px); height: 400px; transform: none; }
  .aggregator { grid-template-columns: 1fr; gap: 2rem; }
  .landing .features { grid-template-columns: repeat(2, 1fr); }
  .landing .feature:nth-child(2n) { border-right: 0; }
  .landing .feature:nth-child(-n + 2) { border-bottom: 1px solid var(--border); }
}

@media (max-width: 600px) {
  .landing .header-inner { height: 60px; }
  .landing nav a { margin-left: 0.5rem; }
  .landing .lang-btn { margin-left: 0.5rem; }
  .landing main { padding: 1rem 1rem 3rem; }
  .landing .hero { padding: 3rem 0 4rem; }
  .landing .hero h1 { font-size: 2.65rem; }
  .hero-actions { flex-direction: column; }
  .primary-btn, .secondary-btn { width: 100%; }
  .product-preview { grid-template-columns: 48px 1fr; height: 350px; border-radius: 20px; }
  .preview-sidebar { padding: 0.7rem 0.4rem; }
  .preview-sidebar i { width: 27px; height: 27px; }
  .preview-chat { padding: 0.75rem; }
  .preview-toolbar { margin-bottom: 2.5rem; }
  .preview-input { right: 0.75rem; bottom: 0.75rem; left: 0.75rem; }
  .aggregator { padding: 4rem 0; }
  .model-board article { min-height: 100px; }
  .landing .features { grid-template-columns: 1fr; }
  .landing .feature { min-height: 0; border-right: 0; border-bottom: 1px solid var(--border); }
  .landing .feature:last-child { border-bottom: 0; }
  .feature-number { margin-bottom: 1.5rem; }
  .final-cta { align-items: flex-start; flex-direction: column; padding: 1.5rem; border-radius: 20px; }
}

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

@media (prefers-reduced-transparency: reduce) {
  .landing header { background: var(--bg-alt); backdrop-filter: none; }
}

@media (prefers-contrast: more) {
  .landing header, .product-preview, .model-board article, .secondary-btn { border-color: #8a919e; }
}
