:root {
  --bg: #f6f9fb;
  --surface: #ffffff;
  --ink: #0f1e2e;
  --ink-soft: #4a5b6e;
  --ink-mute: #7a8a9c;
  --accent: #2f7fb7;
  --accent-deep: #1e5a85;
  --accent-soft: #e6f1f9;
  --border: #dbe5ee;
  --good: #2c9a6a;
  --warn: #c97a2b;
  --shadow: 0 1px 2px rgba(15, 30, 46, 0.05), 0 8px 24px rgba(15, 30, 46, 0.06);
  --radius: 14px;
  --radius-sm: 8px;
  --maxw: 1080px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI",
    "PingFang SC", "Hiragino Sans", "Noto Sans", "Helvetica Neue", Arial,
    sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

h1, h2, h3, h4 {
  color: var(--ink);
  line-height: 1.25;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}
h1 { font-size: 2.4rem; }
h2 { font-size: 1.6rem; margin-top: 1.6em; }
h3 { font-size: 1.15rem; margin-top: 1.4em; }
p  { margin: 0 0 1em; }

ul, ol { margin: 0 0 1em; padding-left: 1.4em; }
li { margin: 0.25em 0; }

code {
  background: var(--accent-soft);
  padding: 0.1em 0.4em;
  border-radius: 4px;
  font-size: 0.9em;
}

hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 2.5em 0;
}

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- header ---------- */

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: saturate(180%) blur(8px);
}
.site-header .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: var(--ink);
  font-size: 1.05rem;
}
.brand img { width: 28px; height: 28px; }
.nav {
  display: flex;
  gap: 22px;
  font-size: 0.95rem;
}
.nav a { color: var(--ink-soft); }
.nav a:hover { color: var(--accent-deep); text-decoration: none; }

/* ---------- hero ---------- */

.hero {
  padding: 60px 0 40px;
}
.hero .grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 48px;
  align-items: center;
}
.hero h1 {
  font-size: 2.6rem;
  margin-bottom: 0.4em;
}
.hero .lede {
  font-size: 1.15rem;
  color: var(--ink-soft);
  margin-bottom: 1.8em;
  max-width: 30em;
}
.cta-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.98rem;
  border: 1px solid transparent;
  text-decoration: none;
  transition: transform 0.05s ease;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--accent-deep);
  color: #fff;
}
.btn-primary:hover { background: var(--accent); }
.btn-secondary {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--border);
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent-deep); }

/* ---------- section ---------- */

section { padding: 56px 0; }
section.alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-title { text-align: center; margin-bottom: 12px; }
.section-sub {
  text-align: center;
  color: var(--ink-soft);
  max-width: 40em;
  margin: 0 auto 40px;
}

/* ---------- feature cards ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}
.card h3 { margin-top: 0; }
.card p:last-child { margin-bottom: 0; }
.card .ico {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  margin-bottom: 12px;
}

/* ---------- how-it-works ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  counter-reset: step;
}
.step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  position: relative;
}
.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  top: -14px;
  left: 24px;
  width: 28px;
  height: 28px;
  border-radius: 14px;
  background: var(--accent-deep);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.step h3 { margin-top: 6px; }
.step p:last-child { margin-bottom: 0; }

/* ---------- faq ---------- */

.faq details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin: 10px 0;
}
.faq summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+';
  float: right;
  color: var(--ink-mute);
  font-weight: 400;
}
.faq details[open] summary::after { content: '–'; }
.faq details > *:not(summary) { margin-top: 10px; }

/* ---------- legal page ---------- */

.legal {
  background: var(--surface);
}
.legal .container {
  max-width: 760px;
}
.legal h1 { font-size: 2rem; }
.legal .meta {
  color: var(--ink-mute);
  font-size: 0.95rem;
  margin-bottom: 2em;
}
.legal h2 { font-size: 1.3rem; }
.legal h3 { font-size: 1.05rem; }
.legal .source-note {
  font-style: italic;
  color: var(--ink-mute);
  font-size: 0.9rem;
  border-left: 3px solid var(--border);
  padding-left: 12px;
  margin: 1.5em 0;
}

/* ---------- footer ---------- */

.site-footer {
  background: #0f1e2e;
  color: #cdd6e0;
  padding: 40px 0 28px;
  margin-top: 60px;
  font-size: 0.93rem;
}
.site-footer .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}
.site-footer h4 {
  color: #fff;
  font-size: 1rem;
  margin: 0 0 12px;
}
.site-footer a { color: #a8d0ec; }
.site-footer a:hover { color: #fff; }

.lang-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px 16px;
  font-size: 0.9rem;
}
.lang-grid a.current {
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  pointer-events: none;
}
.foot-links {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.foot-bottom {
  border-top: 1px solid #24364a;
  margin-top: 28px;
  padding-top: 18px;
  color: #7e95ad;
  font-size: 0.85rem;
  text-align: center;
}

/* ---------- responsive ---------- */

@media (max-width: 820px) {
  h1 { font-size: 1.9rem; }
  .hero { padding: 40px 0 24px; }
  .hero .grid { grid-template-columns: 1fr; gap: 24px; }
  .hero .lede { font-size: 1.05rem; }
  .cards, .steps { grid-template-columns: 1fr; }
  .site-footer .container { grid-template-columns: 1fr; }
  .nav { gap: 14px; font-size: 0.9rem; }
  .nav a:not(.show-mobile) { display: none; }
  .nav a.show-mobile { display: inline; }
}
