:root {
  color-scheme: light dark;
  --bg: #f5f7fb;
  --card: rgba(255, 255, 255, 0.92);
  --text: #182033;
  --muted: #5d667a;
  --border: rgba(30, 42, 70, 0.12);
  --accent: #4256d0;
  --accent-strong: #2f42bd;
  --accent-soft: #e9edff;
  --shadow: 0 18px 60px rgba(38, 50, 94, 0.14);
  --max: 940px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1320;
    --card: rgba(25, 31, 48, 0.94);
    --text: #f4f6ff;
    --muted: #b2b8c8;
    --border: rgba(255, 255, 255, 0.12);
    --accent: #9eabff;
    --accent-strong: #bdc5ff;
    --accent-soft: #222a4c;
    --shadow: 0 20px 65px rgba(0, 0, 0, 0.32);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 10% 0%, rgba(94, 112, 255, 0.16), transparent 32rem),
    radial-gradient(circle at 95% 12%, rgba(78, 185, 170, 0.12), transparent 28rem),
    var(--bg);
  color: var(--text);
  line-height: 1.62;
}

a { color: var(--accent-strong); }

header {
  width: min(var(--max), calc(100% - 32px));
  margin: 24px auto 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand img {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  box-shadow: 0 7px 20px rgba(37, 48, 94, 0.2);
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

nav a {
  text-decoration: none;
  color: var(--muted);
  font-weight: 650;
  padding: 8px 10px;
  border-radius: 10px;
}

nav a:hover,
nav a[aria-current="page"] {
  color: var(--text);
  background: var(--accent-soft);
}

main {
  width: min(var(--max), calc(100% - 32px));
  margin: 38px auto 70px;
}

.hero {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 36px;
  padding: 46px;
  border: 1px solid var(--border);
  border-radius: 30px;
  background: var(--card);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero img {
  width: min(100%, 300px);
  justify-self: center;
  border-radius: 26%;
  box-shadow: 0 24px 55px rgba(31, 42, 92, 0.28);
}

.eyebrow {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 750;
  font-size: 0.9rem;
}

h1, h2, h3 {
  line-height: 1.16;
  letter-spacing: -0.035em;
}

h1 {
  font-size: clamp(2.5rem, 8vw, 5rem);
  margin: 14px 0 12px;
}

h2 {
  font-size: clamp(1.65rem, 4vw, 2.35rem);
  margin-top: 1.9em;
  scroll-margin-top: 20px;
}

h3 { margin-top: 1.55em; }

.lead {
  font-size: 1.17rem;
  color: var(--muted);
  max-width: 42rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 13px;
  text-decoration: none;
  font-weight: 750;
  border: 1px solid var(--border);
}

.button.primary {
  color: white;
  background: var(--accent);
  border-color: transparent;
}

.button.secondary {
  color: var(--text);
  background: transparent;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 26px;
}

.card,
.document {
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 22px;
  box-shadow: 0 12px 38px rgba(38, 50, 94, 0.08);
}

.card { padding: 24px; }

.card h2,
.card h3 { margin-top: 0; }

.document {
  padding: clamp(24px, 5vw, 54px);
  max-width: 850px;
  margin: 0 auto;
}

.document > h1 {
  font-size: clamp(2.25rem, 6vw, 3.8rem);
}

.document ul { padding-left: 1.2rem; }

.meta,
.muted { color: var(--muted); }

.notice {
  padding: 16px 18px;
  border-left: 4px solid var(--accent);
  border-radius: 12px;
  background: var(--accent-soft);
}

.contact-box {
  margin-top: 24px;
  padding: 22px;
  border-radius: 18px;
  background: var(--accent-soft);
}

code {
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--accent-soft);
  overflow-wrap: anywhere;
}

footer {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto 34px;
  color: var(--muted);
  text-align: center;
  font-size: 0.92rem;
}

@media (max-width: 760px) {
  header {
    align-items: flex-start;
    flex-direction: column;
  }

  nav { justify-content: flex-start; }

  .hero {
    grid-template-columns: 1fr;
    padding: 28px 22px;
  }

  .hero img {
    grid-row: 1;
    width: min(64vw, 240px);
  }

  .grid { grid-template-columns: 1fr; }
}
