/* ===== CSS VARIABLES ===== */
:root {
  --color-hero:    #909cb8;
  --color-bg:      #e6dbcc;
  --color-text:    #2e3752;
  --color-text-light: #5a6278;
  --color-card:    #ffffff;
  --color-accent:  #2e3752;
  --color-btn-bg:  #909cb8;
  --color-btn-text:#ffffff;
  --radius-card:   0px;
  --shadow-card:   0 1px 4px rgba(46,55,82,0.10);
  --max-width:     1200px;
  --gap:           4rem;
}

/* ===== RESET & BASE ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 1.2rem;
  scroll-behavior: smooth;
}

body {
  font-family: 'PT Sans', sans-serif;
  background-color: var(--color-bg);
  color: var(--color-text);
}

body.menu-open {
  overflow: hidden;
}

/* ===== LAYOUT HELPERS ===== */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 64px 0;
}

/* ===== HEADER / NAV ===== */
.header {
  background-color: var(--color-hero);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 1rem 0;
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: var(--color-text);
  flex-shrink: 0;
}

.nav__logo {
  width: 80%;
  height: auto;
  display: block;
}

.nav__links {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 48px;
  margin-left: auto;
}

.nav__links-inner {
  display: flex;
  align-items: center;
  gap: 48px;
}

.nav__link {
  text-decoration: none;
  color: var(--color-text);
  font-family: 'Roboto Slab', serif;
  font-weight: 400;
  padding: 1rem 1.5rem;
  background-color: transparent;
  transition: background-color 0.2s;
}

.nav__link:hover,
.nav__link--active {
  background-color: var(--color-bg);
}

/* hamburger */
.nav__toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  margin-left: auto;
  flex-direction: column;
  gap: 5px;
}

.nav__toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--color-text);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

/* Close button - hidden in desktop */
.nav__close {
  display: none;
}

/* Menu overlay for dimming */
.nav__overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 98;
}

.nav__overlay.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* ===== HERO ===== */
.hero {
  background-color: var(--color-hero);
  position: relative;
  overflow: hidden;
  padding: 60px 0 72px;
}

.hero__inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  position: relative;
  z-index: 1;
}

.hero__content {
  flex: 1;
}

.hero__title {
  font-family: 'Roboto Slab', serif;
  font-size: clamp(1.5rem, 2.75vw, 2rem);
  font-weight: 500;
  color: #fff;
  line-height: 1.25;
  margin-bottom: 24px;
}

.hero__subtitle {
  font-family: 'Roboto Slab', serif;
  font-size: clamp(1rem, 1.25vw, 1.25rem);
  color: var(--color-text);
  line-height: 1.5;
}

.hero__birds-wrap {
  flex-shrink: 0;
  position: relative;
}

.hero__birds {
  /* width: clamp(280px, 35vw, 480px); */
  height: auto;
  display: block;
  /* Сдвигаем птиц правее и выше, чтобы выглядывали из сетки */
  transform: translate(40px, -40px);
  pointer-events: none;
}

/* ===== SECTION HEADING ===== */
.section-heading {
  font-family: 'PT Sans', sans-serif;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-text);
  text-align: center;
  margin-bottom: 2rem;
  font-size: clamp(1rem, 1.2rem, 1.25rem);
}

/* ===== CARDS GRID ===== */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
  align-items: start;
}

/* ===== PRODUCT CARD ===== */
.card {
  background: var(--color-card);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: box-shadow 0.25s, transform 0.25s;
}

.card:hover {
  box-shadow: 0 6px 20px rgba(46,55,82,0.15);
  transform: translateY(-3px);
}

.card__image-wrap {
  overflow: hidden;
  padding: 2.5rem 2.5rem 0;
}

.card__image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.card__body {
  padding: 2.5rem 0;
  text-align: center;
}

.card__title {
  font-family: 'PT Sans', sans-serif;
  color: var(--color-text);
  font-weight: 400;
}

/* ===== BUTTON ===== */
.btn {
  display: inline-block;
  text-decoration: none;
  font-family: 'PT Sans', sans-serif;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 18px 56px;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.2s;
}

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

.btn--primary {
  background-color: var(--color-btn-bg);
  color: var(--color-btn-text);
  border-radius: 2px;
}

/* ===== CTA SECTION ===== */
.cta {
  text-align: center;
  padding: 48px 0 72px;
}

/* ===== FOOTER ===== */
.footer {
  background-color: var(--color-hero);
  padding: 2rem 0;
}

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

.footer__brand {
  font-family: 'PT Sans', sans-serif;
  color: var(--color-text);
}

.footer__links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.footer__link {
  text-decoration: none;
  color: var(--color-text);
  transition: opacity 0.2s;
  opacity: 0.8;
}

.footer__link:hover {
  opacity: 1;
}

/* ===== RESPONSIVE ===== */

/* Tablet */
@media (max-width: 900px) {
  .cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .nav__links {
    gap: 28px;
  }
}

/* Mobile */
@media (max-width: 600px) {
  :root {
    --gap: 20px;
  }

  .nav {
    padding: 0.5rem 0;
  }

  .nav__logo {
    width: 50%;
  }

  .nav__close {
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    margin-bottom: 24px;
    align-self: flex-end;
    position: relative;
    overflow: hidden;
  }

  .nav__close span {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 2px;
    background-color: var(--color-text);
    border-radius: 2px;
    margin-left: -12px;
    margin-top: -1px;
  }

  .nav__close span:first-child {
    transform: rotate(45deg);
  }

  .nav__close span:last-child {
    transform: rotate(-45deg);
  }

  .nav__links {
    display: block;
    position: fixed;
    top: 0;
    right: -80%;
    width: 80%;
    max-width: 480px;
    height: 100vh;
    background: var(--color-hero);
    flex-direction: column;
    gap: 0;
    padding: 24px;
    box-shadow: -4px 0 16px rgba(0,0,0,0.1);
    transition: right 0.3s ease;
    z-index: 99;
  }

  .nav__links.is-open {
    right: 0;
  }

  .nav__links-inner {
    position: relative;
    width: 100%;
    height: 100%;
    flex-direction: column;
    gap: 0;
  }

  .nav__links li {
    width: 100%;
  }

  .nav__link {
    display: block;
    padding: 16px 24px;
    border: none;
    border-radius: 0;
    width: 100%;
  }

  .nav__link--active,
  .nav__link:hover {
    background: var(--color-bg);
  }

  .nav__toggle {
    display: flex;
  }

  .nav__close {
    display: block;
  }

  .nav {
    position: relative;
    flex-wrap: wrap;
  }

  /* Mobile hero layout: birds on top, then title, then subtitle */
  .hero {
    padding: 40px 0 52px;
  }

  .hero__inner {
    flex-direction: column;
    align-items: center;
    gap: 24px;
  }

  .hero__birds-wrap {
    order: -3;
    width: 100%;
    display: flex;
    justify-content: right;
  }

  .hero__birds {
    width: clamp(340px, 80%, 450px);
    transform: translate(20px, 0px);
    display: block;
  }

  .hero__content {
    order: -2;
    max-width: 100%;
  }

  .hero__title {
    max-width: 100%;
    margin-bottom: 20px;
  }

  .hero__subtitle {
    max-width: 100%;
  }

  .cards-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin: 0 auto;
  }

  .section {
    padding: 48px 0;
  }

  .btn {
    padding: 16px 40px;
  }

  .footer__inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
}
