:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-alt: #f5f5f3;
  --text: #151515;
  --muted: #686868;
  --border: #e7e7e4;
  --primary: #111111;
  --primary-soft: rgba(17, 17, 17, 0.06);
  --success: #176b45;
  --danger: #a92e2e;
  --shadow: 0 16px 40px rgba(17, 17, 17, 0.07);
  --radius: 12px;
  --radius-small: 8px;
  --font-brand: "Manrope", "Inter", "Segoe UI", sans-serif;
  --font-interface: "Inter", "Segoe UI", sans-serif;
  --container-width: 1240px;
  --focus-ring: 0 0 0 3px rgba(17, 17, 17, 0.18);
  --transition: 180ms ease;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-interface);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
.container {
  width: min(var(--container-width), calc(100% - 48px));
  margin: 0 auto;
}
.page-shell { min-height: 100vh; display: flex; flex-direction: column; }
.page-shell main { flex: 1; }
.section {
  padding: clamp(56px, 7vw, 96px) 0;
}

h1, h2, h3, h4, h5 { line-height: 1.2; margin: 0 0 12px; }
h1, h2, h3 { font-family: var(--font-brand); letter-spacing: -0.035em; }
h1 { font-size: clamp(2.5rem, 5.6vw, 4.5rem); line-height: 1.06; }
h2 { font-size: clamp(1.9rem, 3vw, 2.65rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 16px; color: var(--muted); line-height: 1.7; }
.small { font-size: 0.8rem; }
.badge {
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px; border-radius: 999px;
  background: var(--surface-alt); border: 1px solid var(--border); font-size: 0.7rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
}
.btn {
  min-height: 46px; border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: var(--radius-small);
  padding: 11px 18px; font-weight: 600; font-size: .9rem; cursor: pointer; transition: background var(--transition), color var(--transition), border-color var(--transition), transform var(--transition), box-shadow var(--transition); display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.btn:hover { background: #f1f1ef; border-color: #d8d8d4; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: white; border-color: var(--primary); }
.btn-primary:hover { background: #303030; border-color: #303030; box-shadow: 0 5px 14px rgba(17, 17, 17, .12); }
.btn-secondary { background: var(--surface-alt); }
.btn-outline { background: transparent; }
.link-inline { color: var(--text); font-weight: 600; }
.link-inline:hover, .text-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.card {
  border: 1px solid var(--border); background: var(--surface); border-radius: var(--radius); overflow: hidden;
}
.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}
input, select, textarea { min-width: 0; }
.text-link { text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 980px) {
  .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .container { width: min(var(--container-width), calc(100% - 32px)); }
  .grid-3, .grid-4 { grid-template-columns: 1fr; }
  h1 { font-size: clamp(2.25rem, 10vw, 3.3rem); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
