:root {
  --brand: #4f46e5;
  --brand-dark: #3730a3;
  --brand-soft: #eef2ff;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --bg: #ffffff;
  --bg-alt: #f8fafc;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  --max: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 22px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 70px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.brand:hover { text-decoration: none; }
.brand img { height: 34px; width: auto; }
.brand .brand-mark { height: 34px; width: 34px; border-radius: 8px; }

.brand-old {
  display: flex;
  align-items: center;
  gap: 9px;
  padding-left: 14px;
  border-left: 1px solid var(--line);
  height: 34px;
}
.brand-old-label {
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  line-height: 1;
}
.brand-old img { height: 15px; width: auto; opacity: 0.6; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  display: block;
  padding: 9px 14px;
  border-radius: 10px;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.95rem;
}
.nav-links a:hover { background: var(--brand-soft); color: var(--brand-dark); text-decoration: none; }
.nav-links a.active { color: var(--brand-dark); background: var(--brand-soft); }

.nav-cta {
  background: var(--brand);
  color: #fff !important;
  padding: 10px 18px !important;
  border-radius: 10px;
  font-weight: 700;
}
.nav-cta:hover { background: var(--brand-dark); text-decoration: none; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 1rem;
  cursor: pointer;
}

/* ---------- Hero ---------- */
.hero {
  padding: 84px 0 70px;
  background:
    radial-gradient(1000px 400px at 15% -10%, var(--brand-soft), transparent 60%),
    radial-gradient(800px 380px at 90% 0%, #f0fdfa, transparent 55%);
  text-align: center;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--muted);
  padding: 7px 16px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: var(--shadow);
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin: 22px auto 16px;
  max-width: 820px;
}

.hero p.lead {
  font-size: 1.13rem;
  color: var(--muted);
  max-width: 660px;
  margin: 0 auto 30px;
}

.btn-row {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 13px 26px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 1rem;
  border: 1px solid transparent;
  transition: 0.18s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 8px 20px rgba(79, 70, 229, 0.28); }
.btn-primary:hover { background: var(--brand-dark); }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }

.logo-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 26px;
  margin-top: 46px;
  flex-wrap: wrap;
}

.logo-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 26px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 14px;
}
.logo-card img { height: 40px; width: auto; }
.logo-card .wide { height: 34px; }
.logo-card span { font-size: 0.9rem; color: var(--muted); font-weight: 600; }

.arrow { color: var(--brand); font-size: 1.5rem; font-weight: 700; }

/* ---------- Sections ---------- */
section { padding: 66px 0; }
.section-alt { background: var(--bg-alt); }

.section-head { text-align: center; max-width: 680px; margin: 0 auto 42px; }
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); letter-spacing: -0.02em; margin: 0 0 10px; }
.section-head p { color: var(--muted); margin: 0; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 22px;
}

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  transition: 0.18s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: #c7d2fe; }
.card .icon {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  background: var(--brand-soft);
  color: var(--brand-dark);
  border-radius: 12px;
  font-size: 1.3rem;
  margin-bottom: 14px;
}
.card h3 { margin: 0 0 8px; font-size: 1.1rem; letter-spacing: -0.01em; }
.card p { margin: 0; color: var(--muted); font-size: 0.95rem; }

.steps { counter-reset: step; }
.step { position: relative; padding-left: 60px; }
.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0; top: 0;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  display: grid; place-items: center;
  font-weight: 800;
}

/* ---------- Legal pages ---------- */
.page-hero {
  padding: 56px 0 40px;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--line);
  text-align: center;
}
.page-hero h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); letter-spacing: -0.03em; margin: 0 0 10px; }
.page-hero p { color: var(--muted); margin: 0; }
.page-hero .updated { font-size: 0.88rem; color: var(--muted); margin-top: 12px; display: inline-block; }

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

.toc {
  position: sticky;
  top: 92px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}
.toc h4 { margin: 0 0 12px; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.toc ol { margin: 0; padding-left: 18px; }
.toc li { margin: 7px 0; font-size: 0.92rem; }
.toc a { color: var(--muted); }
.toc a:hover { color: var(--brand); }

.legal-content { min-width: 0; }
.legal-content h2 {
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  margin: 38px 0 12px;
  padding-top: 6px;
  scroll-margin-top: 92px;
}
.legal-content h2:first-child { margin-top: 0; }
.legal-content h3 { font-size: 1.05rem; margin: 24px 0 8px; }
.legal-content p, .legal-content li { color: #334155; font-size: 0.99rem; }
.legal-content ul { padding-left: 22px; }
.legal-content li { margin: 7px 0; }
.legal-content strong { color: var(--ink); }

.callout {
  background: var(--brand-soft);
  border: 1px solid #c7d2fe;
  border-radius: var(--radius);
  padding: 18px 20px;
  margin: 22px 0;
}
.callout p { margin: 0; color: var(--brand-dark) !important; }

.legal-table { width: 100%; border-collapse: collapse; margin: 18px 0; font-size: 0.93rem; }
.legal-table th, .legal-table td { border: 1px solid var(--line); padding: 11px 13px; text-align: left; vertical-align: top; }
.legal-table th { background: var(--bg-alt); font-weight: 700; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 34px; align-items: start; }
.form-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow); }
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 6px; }
.field input, .field textarea, .field select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
  font-size: 0.96rem;
  background: var(--bg-alt);
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--brand);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}
.field textarea { min-height: 130px; resize: vertical; }
.form-note { font-size: 0.85rem; color: var(--muted); margin-top: 12px; }

.info-list { list-style: none; padding: 0; margin: 0; }
.info-list li { padding: 16px 0; border-bottom: 1px solid var(--line); }
.info-list li:last-child { border-bottom: none; }
.info-list strong { display: block; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-bottom: 4px; }

/* ---------- Footer ---------- */
.site-footer {
  background: #0b1120;
  color: #cbd5e1;
  padding: 56px 0 26px;
  margin-top: 20px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: 32px;
}
.footer-brand img { height: 36px; width: auto; margin-bottom: 14px; }
.footer-brand p { color: #94a3b8; font-size: 0.93rem; max-width: 320px; }
.site-footer h5 { color: #fff; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; margin: 0 0 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 9px 0; }
.site-footer a { color: #cbd5e1; font-size: 0.94rem; }
.site-footer a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid #1e293b;
  margin-top: 38px;
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 0.87rem;
  color: #94a3b8;
}

.migration-note {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: #fff;
  border-radius: var(--radius);
  padding: 26px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  flex-wrap: wrap;
  box-shadow: var(--shadow);
}
.migration-note h3 { margin: 0 0 6px; font-size: 1.2rem; }
.migration-note p { margin: 0; opacity: 0.9; font-size: 0.96rem; }
.migration-note .btn-ghost { background: #fff; border: none; color: var(--brand-dark); }

/* ---------- 404 ---------- */
.error-wrap { text-align: center; padding: 100px 0; }
.error-wrap h1 { font-size: 4.5rem; margin: 0; letter-spacing: -0.04em; color: var(--brand); }
.error-wrap p { color: var(--muted); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .legal-layout { grid-template-columns: 1fr; gap: 26px; }
  .toc { position: static; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: 70px; left: 0; right: 0;
    background: #fff;
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: stretch;
    padding: 12px 22px 18px;
    gap: 4px;
    box-shadow: var(--shadow);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 14px; }
  .nav-cta { text-align: center; }
  .footer-grid { grid-template-columns: 1fr; }
  section { padding: 48px 0; }
  .hero { padding: 60px 0 50px; }
}
