:root {
  --font-sans: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --color-bg: #faf8fc;
  --color-surface: #ffffff;
  --color-text: #1a1424;
  --color-muted: #4a4158;
  --color-accent: #6b3fa0;
  --color-accent-strong: #4f2d78;
  --color-warm: #e8a317;
  --color-border: #d8cfe6;
  --color-focus: #e8a317;
  --shadow: 0 8px 28px rgba(26, 20, 36, 0.08);
  --radius: 12px;
  --max-width: 72rem;
  --line-height: 1.65;
  --font-size: 106.25%;
}

html.text-lg {
  --font-size: 118.75%;
}

html.text-xl {
  --font-size: 131.25%;
}

html.high-contrast {
  --color-bg: #000000;
  --color-surface: #000000;
  --color-text: #ffffff;
  --color-muted: #f0f0f0;
  --color-accent: #ffd966;
  --color-accent-strong: #ffe699;
  --color-warm: #ffd966;
  --color-border: #ffffff;
  --color-focus: #ffffff;
  --shadow: none;
}

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

html {
  font-size: var(--font-size);
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-sans);
  line-height: var(--line-height);
  color: var(--color-text);
  background: var(--color-bg);
}

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

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

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

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--color-accent-strong);
  color: #fff;
  padding: 0.65rem 1rem;
  border-radius: var(--radius);
  z-index: 1000;
  text-decoration: none;
}

.skip-link:focus {
  top: 1rem;
}

.wrap {
  width: min(100% - 2rem, var(--max-width));
  margin-inline: auto;
}

.site-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
  font-weight: 700;
}

.brand img {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  object-fit: cover;
}

.brand-text span {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-muted);
}

.nav-toggle {
  display: none;
  border: 2px solid var(--color-border);
  background: var(--color-surface);
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius);
  font: inherit;
  cursor: pointer;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
}

.site-nav a {
  text-decoration: none;
  font-weight: 600;
  padding: 0.35rem 0.25rem;
  border-bottom: 2px solid transparent;
}

.site-nav a[aria-current="page"] {
  border-bottom-color: var(--color-warm);
  color: var(--color-text);
}

.a11y-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.a11y-toolbar button {
  font: inherit;
  border: 2px solid var(--color-border);
  background: var(--color-surface);
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  cursor: pointer;
}

.a11y-toolbar button[aria-pressed="true"] {
  background: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
}

.hero {
  padding: 3rem 0 2.5rem;
}

.hero-grid {
  display: grid;
  gap: 2rem;
  align-items: center;
}

@media (min-width: 768px) {
  .hero-grid {
    grid-template-columns: 1.1fr 0.9fr;
  }
}

.hero h1 {
  font-size: clamp(1.85rem, 4vw, 2.75rem);
  line-height: 1.15;
  margin: 0 0 1rem;
}

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

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.7rem 1.15rem;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  font: inherit;
}

.btn-primary {
  background: var(--color-accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--color-accent-strong);
  color: #fff;
}

.btn-secondary {
  background: transparent;
  border-color: var(--color-accent);
  color: var(--color-accent-strong);
}

.btn-secondary:hover {
  background: rgba(107, 63, 160, 0.08);
}

.section {
  padding: 2.5rem 0;
}

.section h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin: 0 0 0.75rem;
}

.section-intro {
  color: var(--color-muted);
  max-width: 42rem;
  margin: 0 0 1.75rem;
}

.card-grid {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 640px) {
  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 960px) {
  .card-grid.cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
}

.card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
}

.card p {
  margin: 0 0 1rem;
  color: var(--color-muted);
}

.meta {
  font-size: 0.9rem;
  color: var(--color-muted);
}

.badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(232, 163, 23, 0.18);
  color: var(--color-text);
}

.badge-soon {
  background: rgba(107, 63, 160, 0.15);
}

.site-footer {
  margin-top: 2rem;
  padding: 2.5rem 0;
  background: #1a1424;
  color: #f5f0fa;
}

.site-footer a {
  color: #ffe699;
}

.footer-grid {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr;
  }
}

.footer-grid h2 {
  font-size: 1rem;
  margin: 0 0 0.75rem;
}

.footer-grid ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-grid li + li {
  margin-top: 0.35rem;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.social-links a {
  text-decoration: none;
  font-weight: 600;
}

.form-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
}

.field {
  margin-bottom: 1rem;
}

.field label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 2px solid var(--color-border);
  border-radius: var(--radius);
  font: inherit;
  background: var(--color-surface);
  color: var(--color-text);
}

.field textarea {
  min-height: 8rem;
  resize: vertical;
}

.field-hint {
  font-size: 0.9rem;
  color: var(--color-muted);
  margin-top: 0.25rem;
}

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-status {
  margin-top: 0.75rem;
  font-weight: 600;
}

.form-status.is-ok {
  color: #0d6832;
}

.form-status.is-error {
  color: #9b1c1c;
}

.form-status.is-warn {
  color: #8a5a00;
}

.search-panel {
  display: grid;
  gap: 1rem;
}

.search-results {
  list-style: none;
  margin: 0;
  padding: 0;
}

.search-results li + li {
  margin-top: 0.75rem;
}

.search-results a {
  font-weight: 700;
}

.prose {
  max-width: 46rem;
}

.prose h1 {
  margin-top: 0;
}

.prose h2 {
  margin-top: 2rem;
}

.prose ol,
.prose ul {
  padding-left: 1.25rem;
}

.notice {
  border-left: 4px solid var(--color-warm);
  padding: 0.75rem 1rem;
  background: rgba(232, 163, 23, 0.12);
  border-radius: 0 var(--radius) var(--radius) 0;
}

@media (max-width: 860px) {
  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    width: 100%;
    display: none;
  }

  .site-nav.is-open {
    display: block;
  }

  .site-nav ul {
    flex-direction: column;
    padding-bottom: 0.5rem;
  }
}
