/* ===========================================
   MEDCOPY — Design System / Base Styles
   =========================================== */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=PT+Serif:wght@700&display=swap');

/* --- CSS Custom Properties --- */
:root {
  /* Colors */
  --color-primary: #506251;
  /* Кнопки, активные элементы, футер */
  --color-secondary: #81947e;
  /* Иконки, акценты, подчёркивания */
  --color-surface: #FFFFFF;
  /* Фон карточек и блоков */
  --color-bg: #edefea;
  /* Базовый фон страницы */
  --color-text: #3f413e;
  /* Основной цвет текста */

  /* Typography — Families */
  --font-heading: 'PT Serif', serif;
  --font-body: 'Inter', sans-serif;

  /* Layout */
  --container-max: 1200px;
  --container-padding: 20px;

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-base: 0.3s ease;
}

/* --- Reset / Normalize --- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--color-text);
  background-color: var(--color-bg);
  background-image:
    radial-gradient(circle 600px at 0% 20%, rgba(176, 199, 173, 0.1) 0%, transparent 60%),
    radial-gradient(circle 700px at 100% 50%, rgba(176, 199, 173, 0.1) 0%, transparent 60%),
    radial-gradient(circle 650px at 15% 100%, rgba(176, 199, 173, 0.1) 0%, transparent 60%);
  background-attachment: fixed;
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition-fast);
}

ul,
ol {
  list-style: none;
}

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

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* --- Container --- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

/* --- Typography Utilities --- */

/* PT Serif Bold — Заголовки */
.heading-xl {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 56px;
  line-height: 1.15;
}

.heading-lg {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 54px;
  line-height: 1.15;
}

.heading-md {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 48px;
  line-height: 1.2;
}

.heading-sm {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 40px;
  line-height: 1.25;
}

/* Inter — Текст */
.text-xl {
  font-family: var(--font-body);
  font-size: 32px;
  font-weight: 500;
  line-height: 1.3;
}

.text-lg {
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: 500;
  line-height: 1.5;
}

.text-md {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
}

.text-sm {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 18px;
  padding: 14px;
  border-radius: 8px;
  transition: background-color var(--transition-fast), transform var(--transition-fast);
  cursor: pointer;
  white-space: nowrap;
}

.btn-primary {
  background-color: var(--color-primary);
  color: #FFFFFF;
}
@media (hover: hover) and (pointer: fine) {
.btn-primary:hover {
  background-color: #355637;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.2);
  transform: translateY(-2px);
}
}

.btn-outline {
  background-color: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-secondary);
}
@media (hover: hover) and (pointer: fine) {
.btn-outline:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  transform: translateY(-2px);
}
}

/* --- Visually Hidden (для доступности) --- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* ===========================================
   RESPONSIVE — Mobile (393px)
   =========================================== */
@media (max-width: 1024px) {
  .heading-xl {
    font-size: 46px;
  }
  .heading-lg {
    font-size: 44px;
  }
  .heading-md {
    font-size: 38px;
  }
  .heading-sm {
    font-size: 28px;
  }
  .text-xl {
    font-size: 24px;
  }
}

@media (max-width: 768px) {
  :root {
    --container-padding: 16px;
  }

  .heading-xl {
    font-size: 36px;
  }

  .heading-lg {
    font-size: 34px;
  }

  .heading-md {
    font-size: 30px;
  }

  .hero-actions {
    flex-direction: column;
  }

  .text-xl {
    font-size: 22px;
  }
}

/* ===========================================
   SCROLL ANIMATIONS
   =========================================== */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: opacity, transform;
}

.animate-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.animate-fade-up-short {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: opacity, transform;
}

.animate-fade-up-short.is-visible {
  opacity: 1;
  transform: translateY(0);
}