:root {
  --color-bg: #f3f1ea;
  --color-surface: #ffffff;
  --color-surface-muted: #eae6dc;
  --color-border: #e6e2d8;
  --color-border-strong: #cfcabe;
  --color-text: #17201b;
  --color-text-muted: #5b655f;
  --color-accent: #1f6f4a;
  --color-accent-strong: #175a3b;
  --color-accent-soft: #e2eee6;
  --color-accent-contrast: #ffffff;
  --color-ink: #10231a;
  --color-warn: #b4471b;
  --color-warn-text: #a63f16;
  --color-warn-bg: #f8e4da;
  --color-danger-text: #a8261c;

  --radius-sm: 12px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --radius-xl: 22px;
  --radius-2xl: 32px;

  --shadow-sm: 0 1px 2px rgba(23, 32, 27, 0.06);
  --shadow-md: 0 10px 30px -12px rgba(23, 32, 27, 0.18);
  --shadow-lg: 0 30px 60px -20px rgba(16, 35, 26, 0.35);
  --shadow-cta: 0 10px 24px -10px rgba(31, 111, 74, 0.7);

  --font-body: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Space Grotesk', 'Manrope', system-ui, sans-serif;

  --container: 1160px;
  --header-height: 68px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 12px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

[hidden] {
  display: none !important;
}

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

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.025em;
}

p {
  margin: 0;
}

a {
  color: inherit;
}

button,
input,
select {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 3px solid rgba(31, 111, 74, 0.45);
  outline-offset: 2px;
}

.container {
  width: min(100% - 32px, var(--container));
  margin-inline: auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.icon {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 700;
  font-size: 16px;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--color-accent);
  color: var(--color-accent-contrast);
  box-shadow: var(--shadow-cta);
}

.btn-primary:hover {
  background: var(--color-accent-strong);
  transform: translateY(-1px);
}

.btn-primary[disabled] {
  opacity: 0.7;
  cursor: progress;
  transform: none;
}

.btn-light {
  background: var(--color-surface);
  color: var(--color-accent-strong);
}

.btn-light:hover {
  transform: translateY(-1px);
}

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

.btn-ghost:hover {
  background: var(--color-surface);
}

.btn-lg {
  min-height: 58px;
  padding: 0 30px;
  font-size: 17px;
}

.btn-block {
  width: 100%;
}

.btn .icon {
  transition: transform 0.15s ease;
}

.btn:hover .icon-arrow {
  transform: translateX(3px);
}

/* Logo */
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 23px;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.logo svg {
  width: 34px;
  height: 34px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(243, 241, 234, 0.88);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

.site-header.is-scrolled {
  border-bottom-color: var(--color-border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: var(--header-height);
}

/* Forms */
.field {
  display: grid;
  align-content: start;
  gap: 6px;
}

.field label {
  font-weight: 700;
  font-size: 14px;
}

.field-hint {
  font-size: 13px;
  color: var(--color-text-muted);
}

.field-error {
  display: none;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-danger-text);
}

.field.has-error .field-error {
  display: block;
}

.field.has-error .field-hint {
  display: none;
}

.input {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  font-size: 16px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.input::placeholder {
  color: #8d958f;
}

.input:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 4px rgba(31, 111, 74, 0.14);
}

.field.has-error .input {
  border-color: var(--color-danger-text);
}

.field.has-error .input:focus {
  box-shadow: 0 0 0 4px rgba(168, 38, 28, 0.12);
}

select.input {
  appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235b655f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 18px;
}

/* Footer */
.site-footer {
  padding: 40px 0 48px;
  border-top: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-size: 14px;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-links a {
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--color-text);
  text-decoration: underline;
}

.spinner {
  width: 20px;
  height: 20px;
  border: 2.5px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@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;
  }
}
