:root {
  --bg: #f3f5f7;
  --surface: #ffffff;
  --surface-alt: #e9eef2;
  --text: #101418;
  --muted: #51606f;
  --line: #d4dbe2;
  --accent: #123b5d;
  --accent-strong: #0b2c46;
  --accent-surface: #0b2c46;
  --highlight: #dbe8f3;
  --brand-simple: #101418;
  --brand-tenders: #0b0b87;
  --max-width: 1160px;
  --radius: 20px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f151a;
    --surface: #182127;
    --surface-alt: #1d2830;
    --text: #edf4f8;
    --muted: #b5c4cf;
    --line: #2f3d47;
    --accent: #8fb9da;
    --accent-strong: #d7e8f6;
    --accent-surface: #33526a;
    --highlight: #243745;
    --brand-simple: #edf4f8;
    --brand-tenders: #8fd4f4;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #0f151a;
  --surface: #182127;
  --surface-alt: #1d2830;
  --text: #edf4f8;
  --muted: #b5c4cf;
  --line: #2f3d47;
  --accent: #8fb9da;
  --accent-strong: #d7e8f6;
  --accent-surface: #33526a;
  --highlight: #243745;
  --brand-simple: #edf4f8;
  --brand-tenders: #8fd4f4;
  color-scheme: dark;
}

:root[data-theme="light"] {
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system,
    BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.site-header {
  border-bottom: 1px solid var(--line);
  background: rgba(243, 245, 247, 0.92);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 20;
}

:root[data-theme="dark"] .site-header {
  background: rgba(15, 21, 26, 0.92);
}

.header-inner {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.brand {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  position: relative;
  flex: 0 0 auto;
  font-size: 1.9rem;
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 0.98;
  white-space: nowrap;
}

.brand-word {
  display: inline-block;
}

.brand-word-simple {
  color: var(--brand-simple);
}

.brand-word-tenders {
  color: var(--brand-tenders);
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.nav a {
  font-size: 0.95rem;
  color: var(--muted);
}

.nav a:hover {
  color: var(--text);
}

.nav-contact {
  color: var(--text) !important;
  font-weight: 700;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  min-width: 32px;
  padding: 0.2rem;
  border-radius: 999px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
}

.theme-toggle-icon {
  display: inline-block;
  width: 1rem;
  text-align: center;
  font-size: 0.95rem;
  line-height: 1;
}

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

.hero-panel {
  background: linear-gradient(135deg, var(--surface) 0%, #f8fbfd 100%);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 2rem;
}

:root[data-theme="dark"] .hero-panel {
  background: linear-gradient(135deg, var(--surface) 0%, #1f2a32 100%);
}

.eyebrow {
  display: inline-block;
  margin-bottom: 1rem;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: var(--highlight);
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 2rem;
  align-items: stretch;
}

h1,
h2 {
  margin: 0 0 1rem;
  letter-spacing: -0.04em;
  line-height: 0.98;
}

h1 {
  font-size: clamp(3rem, 8vw, 5.6rem);
  max-width: 10ch;
  font-weight: 900;
}

h2 {
  font-size: clamp(2rem, 4vw, 3.1rem);
  max-width: 12ch;
  font-weight: 850;
}

h3 {
  margin: 0 0 0.6rem;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

p,
li {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 1.03rem;
}

.lead {
  font-size: 1.15rem;
  max-width: 60ch;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.9rem 1.1rem;
  border-radius: 999px;
  font-weight: 700;
  border: 1px solid transparent;
}

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

.button-secondary {
  border-color: var(--line);
  background: var(--surface);
  color: var(--text);
}

.hero-aside {
  display: grid;
  gap: 1rem;
}

.stat-card,
.note-card,
.card,
.article-card,
.service-card,
.quote-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.stat-card,
.note-card {
  padding: 1.25rem;
}

.stat-label {
  font-size: 0.82rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.stat-value {
  font-size: 2rem;
  line-height: 1;
  font-weight: 900;
  letter-spacing: -0.04em;
  margin-bottom: 0.5rem;
}

.section {
  padding: 2.5rem 0;
}

.section-header {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 2rem;
  align-items: center;
  margin-bottom: 1.5rem;
}

.section-header > :last-child {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.section-header > :last-child > *:last-child {
  margin-bottom: 0;
}

.section-kicker {
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 0.8rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.card,
.article-card,
.service-card,
.quote-card {
  padding: 1.3rem;
}

.problem-card {
  background: var(--surface-alt);
}

.mini-label {
  display: inline-block;
  margin-bottom: 0.7rem;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  font-weight: 800;
}

.steps {
  display: grid;
  gap: 1rem;
}

.step {
  display: grid;
  grid-template-columns: 68px 1fr;
  gap: 1rem;
  align-items: start;
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.step-num {
  width: 68px;
  height: 68px;
  border-radius: 18px;
  background: var(--highlight);
  color: var(--accent-strong);
  display: grid;
  place-items: center;
  font-size: 1.05rem;
  font-weight: 900;
}

.article-card,
.service-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.card-link {
  margin-top: 1rem;
  font-weight: 700;
  color: var(--accent-strong);
}

.newsletter-block {
  background: var(--accent-surface);
  color: white;
  border-radius: 28px;
  padding: 2rem;
}

.newsletter-block p {
  color: rgba(255, 255, 255, 0.8);
}

.newsletter-form {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.newsletter-form input {
  flex: 1 1 280px;
  min-width: 0;
  padding: 0.95rem 1rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: white;
  font: inherit;
}

:root[data-theme="dark"] .newsletter-form input {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(15, 21, 26, 0.3);
  color: #f4f8fb;
}

.newsletter-form input::placeholder {
  color: rgba(255, 255, 255, 0.55);
}

.newsletter-form button {
  border: 0;
  cursor: pointer;
}

.newsletter-meta {
  margin-top: 0.9rem;
  margin-bottom: 0;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.72) !important;
}

.newsletter-meta a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 0.16em;
}

.newsletter-fallback {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
}

.quote-card {
  background: #f8fafc;
}

:root[data-theme="dark"] .quote-card {
  background: #162027;
}

.page-section {
  padding-top: 3rem;
}

.page-title {
  max-width: 14ch;
}

.article-shell {
  display: grid;
  gap: 2rem;
}

.article-meta {
  max-width: 56rem;
}

.article-content {
  max-width: 48rem;
}

.rich-text h2,
.rich-text h3 {
  margin-top: 2rem;
}

.rich-text ul,
.rich-text ol {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
}

.rich-text strong {
  color: var(--text);
}

.newsletter-kicker {
  color: rgba(255, 255, 255, 0.7);
}

.contact-panel {
  margin-bottom: 0;
}

.footer {
  padding: 2rem 0 3rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.95rem;
  border-top: 1px solid var(--line);
  padding-top: 1.5rem;
}

@media (max-width: 920px) {
  .header-inner {
    min-height: auto;
    align-items: flex-start;
    flex-direction: column;
    padding: 1rem 0;
  }

  .header-controls {
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1rem;
  }

  .brand {
    font-size: 1.55rem;
  }

  .nav {
    flex: 1 1 18rem;
    gap: 0.7rem 1rem;
  }

  .nav a {
    font-size: 0.92rem;
  }

  .theme-toggle {
    font-size: 0.84rem;
  }

  .hero-grid,
  .section-header,
  .grid-3,
  .grid-2 {
    grid-template-columns: 1fr;
  }

  .step {
    grid-template-columns: 56px 1fr;
  }

  .step-num {
    width: 56px;
    height: 56px;
  }

  h1,
  h2 {
    max-width: 100%;
  }
}

@media (max-width: 640px) {
  .header-controls {
    align-items: center;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.85rem;
  }

  .nav {
    flex: 0 0 auto;
    width: 100%;
    justify-content: flex-start;
    gap: 0.75rem 1rem;
  }

  .theme-toggle {
    margin-left: auto;
  }
}

@media (max-width: 425px) {
  .header-inner {
    padding: 0.85rem 0 0.95rem;
    gap: 0.75rem;
  }

  .brand {
    font-size: 1.38rem;
    min-height: 0;
  }

  .nav {
    flex: 0 0 auto;
    gap: 0.55rem 0.9rem;
  }

  .nav a {
    font-size: 0.88rem;
  }

  .theme-toggle {
    min-height: 0;
  }
}
