/* ==========================================================================
   Ostrich Nest — стили
   Структура: 1. Переменные и сброс 2. Типографика 3. Утилиты и кнопки
   4. Хедер и навигация 5. Hero 6. Секции (about/animals/tours/school/products/contacts)
   7. Footer 8. Анимации 9. Медиа-запросы
   ========================================================================== */

/* ---------- 1. Переменные и сброс ---------- */
:root {
  --dark-green: #234B32;
  --grass-green: #91C54B;
  --cream: #F7F2E7;
  --sand: #D9BC8C;
  --terracotta: #C97855;
  --text: #1F2922;

  --dark-green-700: #1b3a27;
  --cream-soft: #efe7d6;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-script: "SignPainter-HouseScript", "SignPainter", "Snell Roundhand", cursive;

  --header-h: 84px;
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --container-w: 1180px;
  --shadow-soft: 0 20px 45px -20px rgba(35, 75, 50, 0.35);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: var(--header-h); overflow-x: hidden; }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--cream);
  line-height: 1.55;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
ul { list-style: none; margin: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
h1, h2, h3, p { margin: 0; }

.container {
  width: 100%;
  max-width: var(--container-w);
  margin-inline: auto;
  padding-inline: 24px;
}

.icon { flex-shrink: 0; }

/* ---------- 2. Типографика ---------- */
h1, h2, h3 {
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--dark-green);
}

h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); line-height: 1.1; }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.3rem); line-height: 1.2; }
h3 { font-size: 1.15rem; font-weight: 700; }

.eyebrow {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--terracotta);
  margin-bottom: 12px;
}
.eyebrow-light { color: var(--grass-green); }

.lead-text {
  font-size: 1.05rem;
  color: var(--text);
  opacity: 0.9;
  margin-top: 16px;
  max-width: 52ch;
}

.section-head { max-width: 640px; margin-bottom: 44px; }
.section-head h2 { margin-top: 4px; }

/* ---------- 3. Утилиты и кнопки ---------- */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--dark-green);
  color: var(--cream);
  padding: 12px 20px;
  border-radius: 0 0 10px 0;
  z-index: 1000;
}
.skip-link:focus { left: 0; }

.section { padding: 88px 0; }
.section-alt { background: var(--cream-soft); }
.section-dark {
  background: var(--dark-green);
  color: var(--cream);
}
.section-dark h2, .section-dark h3 { color: var(--cream); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.98rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease, color 0.18s ease;
  text-align: center;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--terracotta);
  color: var(--cream);
  box-shadow: 0 14px 28px -12px rgba(201, 120, 85, 0.55);
}
.btn-primary:hover { background: #b8683f; }

.btn-outline-light {
  border-color: rgba(247, 242, 231, 0.55);
  color: var(--cream);
}
.btn-outline-light:hover { background: rgba(247, 242, 231, 0.12); }

.btn-ghost {
  background: rgba(247, 242, 231, 0.08);
  border-color: rgba(247, 242, 231, 0.35);
  color: var(--cream);
  padding: 11px 18px;
  font-size: 0.92rem;
}
.btn-ghost:hover { background: rgba(247, 242, 231, 0.18); }

.btn-block { width: 100%; justify-content: center; }

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--cream);
  border: 1px solid var(--sand);
  color: var(--dark-green);
  padding: 9px 16px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
}

/* placeholder media boxes */
.media-placeholder {
  position: relative;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: var(--cream);
  isolation: isolate;
}
.media-placeholder::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(255,255,255,0.18), transparent 55%),
    radial-gradient(circle at 85% 90%, rgba(0,0,0,0.12), transparent 60%);
  z-index: 0;
}
.icon-illustration { position: relative; z-index: 1; opacity: 0.92; }
.media-placeholder img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.placeholder-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(31, 41, 34, 0.35);
  color: var(--cream);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 5px 12px;
  border-radius: 999px;
  z-index: 1;
  backdrop-filter: blur(2px);
}

.media-hero {
  aspect-ratio: 4 / 5;
  background: linear-gradient(150deg, var(--dark-green) 0%, #2f6144 55%, var(--grass-green) 130%);
  border-radius: 32px;
  box-shadow: var(--shadow-soft);
}
.media-hero .icon-illustration { width: 40%; height: auto; color: var(--cream); }

.media-about {
  aspect-ratio: 1 / 1;
  background: linear-gradient(150deg, var(--sand) 0%, var(--terracotta) 130%);
  box-shadow: var(--shadow-soft);
}
.media-about .icon-illustration { width: 34%; height: auto; }

.media-card { aspect-ratio: 4 / 3; border-radius: var(--radius-md); }
.media-card .icon-illustration { width: 30%; height: auto; }
.media-tone-1 { background: linear-gradient(140deg, var(--dark-green), #3a7752); }
.media-tone-2 { background: linear-gradient(140deg, var(--terracotta), #a8623f); }
.media-tone-3 { background: linear-gradient(140deg, var(--sand), #c2a06e); }
.media-tone-4 { background: linear-gradient(140deg, var(--grass-green), #6ea233); }
.media-tone-5 { background: linear-gradient(140deg, #3a7752, var(--sand)); }
.media-tone-6 { background: linear-gradient(140deg, var(--terracotta), var(--dark-green)); }

/* ---------- 4. Хедер и навигация ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(247, 242, 231, 0.97);
  border-bottom: 1px solid rgba(35, 75, 50, 0.08);
}

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

.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand-logo { height: 56px; width: 56px; object-fit: cover; border-radius: 14px; }
.brand-name {
  font-family: var(--font-script);
  font-size: 1.9rem;
  line-height: 1;
  color: var(--dark-green);
  white-space: nowrap;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: transparent;
  border: 1px solid rgba(35, 75, 50, 0.18);
  color: var(--dark-green);
  cursor: pointer;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-link {
  font-weight: 600;
  font-size: 0.96rem;
  color: var(--text);
  position: relative;
  padding: 6px 0;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: var(--terracotta);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.25s ease;
}
.nav-link:hover::after,
.nav-link.is-active::after {
  transform: scaleX(1);
  transform-origin: left;
}
.nav-link.is-active { color: var(--dark-green); }

.nav-cta-item { margin-left: 6px; }
.nav-cta { padding: 11px 22px; font-size: 0.92rem; }

/* ---------- 5. Hero ---------- */
.hero {
  position: relative;
  background: var(--dark-green);
  color: var(--cream);
  padding-top: 64px;
  padding-bottom: 0;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  top: -120px; right: -120px;
  width: 420px; height: 420px;
  background: radial-gradient(circle, rgba(145, 197, 75, 0.25), transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
  padding-bottom: 72px;
  position: relative;
  z-index: 1;
}

.hero-text h1 { color: var(--cream); }
.hero-lead {
  margin-top: 18px;
  font-size: 1.1rem;
  max-width: 46ch;
  color: rgba(247, 242, 231, 0.88);
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 32px;
}

.wave { line-height: 0; }
.wave svg { width: 100%; height: 60px; display: block; }

/* ---------- 6. Секции ---------- */

/* About */
.about-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 56px;
  align-items: center;
}

/* Animal & product grids */
.card-grid {
  display: grid;
  gap: 26px;
}
.animal-grid { grid-template-columns: repeat(3, 1fr); }
.product-grid { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--cream);
  border-radius: var(--radius-md);
  padding: 16px;
  border: 1px solid rgba(35, 75, 50, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-soft); }
.card h3 { margin-top: 16px; padding: 0 4px; }
.product-card h3 { font-size: 1.02rem; }

/* Tours (family / school) shared layout */
.tour-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}
.tour-grid-reverse .tour-card { order: -1; }

.benefits { margin-top: 24px; display: flex; flex-direction: column; gap: 12px; }
.benefits li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
}
.benefits .icon { color: var(--grass-green); flex-shrink: 0; }
.section-dark .benefits .icon { color: var(--grass-green); }

.tour-card {
  background: var(--cream);
  color: var(--text);
  border-radius: var(--radius-lg);
  padding: 40px 36px;
  text-align: center;
  box-shadow: var(--shadow-soft);
}
.tour-card-light {
  background: linear-gradient(160deg, var(--cream-soft), var(--cream));
  border: 1px solid var(--sand);
  box-shadow: none;
}
.price-label {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--terracotta);
}
.price-value {
  font-size: clamp(1.6rem, 3.4vw, 2.1rem);
  font-weight: 800;
  color: var(--dark-green);
  margin-top: 10px;
}
.price-value-text { font-size: 1.35rem; }
.price-note {
  margin-top: 4px;
  color: var(--text);
  opacity: 0.75;
  font-weight: 600;
}
.tour-card .btn { margin-top: 28px; }

/* Contacts */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}
.contact-card {
  background: rgba(247, 242, 231, 0.06);
  border: 1px solid rgba(247, 242, 231, 0.16);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}
.contact-card.is-highlighted {
  border-color: var(--grass-green);
  box-shadow: 0 0 0 3px rgba(145, 197, 75, 0.35);
}
.contact-role {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--grass-green);
}
.contact-name {
  font-size: 1.5rem;
  font-weight: 800;
  margin-top: 8px;
}
.contact-phone {
  margin-top: 4px;
  color: rgba(247, 242, 231, 0.8);
  font-weight: 600;
}
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

/* ---------- 7. Footer ---------- */
.site-footer {
  background: var(--dark-green-700);
  color: rgba(247, 242, 231, 0.85);
  padding: 48px 0 0;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(247, 242, 231, 0.12);
}
.footer-inner .brand-name { color: var(--cream); }
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  font-weight: 600;
  font-size: 0.92rem;
}
.footer-nav a:hover { color: var(--grass-green); }
.footer-contacts {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.92rem;
  font-weight: 600;
  text-align: right;
}
.footer-contacts a:hover { color: var(--grass-green); }
.footer-bottom {
  padding: 20px 0 28px;
  font-size: 0.82rem;
  opacity: 0.7;
}

/* ---------- 8. Анимации ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn:hover { transform: none; }
}

/* ---------- 9. Медиа-запросы ---------- */
@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; gap: 40px; padding-top: 8px; }
  .hero-media { max-width: 420px; }
  .about-grid { grid-template-columns: 1fr; }
  .about-media { max-width: 420px; }
  .tour-grid { grid-template-columns: 1fr; }
  .tour-grid-reverse .tour-card { order: 0; }
  .animal-grid { grid-template-columns: repeat(2, 1fr); }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  :root { --header-h: 72px; }

  .brand-name { font-size: 1.4rem; }
  .nav-toggle { display: inline-flex; }

  .nav {
    position: fixed;
    top: 72px;
    right: 0;
    bottom: 0;
    left: 0;
    background: var(--cream);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    z-index: 90;
    visibility: hidden;
  }
  .nav.is-open { transform: translateX(0); visibility: visible; }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 24px;
  }
  .nav-link {
    display: block;
    padding: 14px 6px;
    border-bottom: 1px solid rgba(35, 75, 50, 0.08);
  }
  .nav-cta-item { margin: 16px 6px 0; }
  .nav-cta { display: flex; justify-content: center; }

  .section { padding: 64px 0; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-contacts { text-align: left; }
}

@media (max-width: 600px) {
  .container { padding-inline: 18px; }
  .animal-grid { grid-template-columns: 1fr; }
  .product-grid { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { justify-content: center; }
  .tour-card { padding: 30px 22px; }
  .contact-actions .btn { flex: 1 1 auto; justify-content: center; }
}

@media (max-width: 360px) {
  .container { padding-inline: 14px; }
}
