/* Мой цветочный сад — лендинг */

:root {
  --bg: #f6f3ee;
  --bg-elevated: #fffcf7;
  --ink: #1a2f24;
  --ink-muted: #4a5c52;
  --leaf: #2d6a4f;
  --leaf-deep: #1b4332;
  --petal: #e8b4bc;
  --accent: #bc6c25;
  --accent-soft: #dda15e;
  --sun: #f4d35e;
  --stem: #40916c;
  --white: #fff;
  --shadow: 0 18px 50px rgba(26, 47, 36, 0.12);
  --shadow-sm: 0 8px 24px rgba(26, 47, 36, 0.08);
  --radius: 18px;
  --radius-sm: 12px;
  --max: 1120px;
  --font: "Outfit", system-ui, sans-serif;
  --font-display: "Fraunces", Georgia, serif;
}

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

html {
  scroll-behavior: smooth;
}

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(45, 106, 79, 0.08), transparent),
    radial-gradient(ellipse 60% 40% at 100% 50%, rgba(232, 180, 188, 0.12), transparent);
}

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

a {
  color: var(--leaf);
}

a:hover {
  color: var(--leaf-deep);
}

.section-inner {
  width: min(100% - 2.5rem, var(--max));
  margin-inline: auto;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.65rem, 4vw, 2.25rem);
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 1rem;
  color: var(--leaf-deep);
  letter-spacing: -0.02em;
}

.section-title--center {
  text-align: center;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(246, 243, 238, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(45, 106, 79, 0.1);
}

.site-header__inner {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
  padding: 0.75rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
}

.brand__logo svg {
  display: block;
  filter: drop-shadow(0 4px 8px rgba(45, 106, 79, 0.2));
}

.brand__text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.brand__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.brand__tagline {
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-muted);
}

.header-cta {
  flex-shrink: 0;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  background: var(--leaf);
  color: var(--white) !important;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, background 0.2s ease;
}

.header-cta:hover {
  background: var(--leaf-deep);
  transform: translateY(-1px);
  color: var(--white) !important;
}

/* Hero */
.hero {
  position: relative;
}

.hero__viewport {
  position: relative;
  width: 100%;
  min-height: min(72vh, 640px);
  max-height: 85vh;
  overflow: hidden;
  background: var(--leaf-deep);
}

.hero__track {
  display: flex;
  height: 100%;
  min-height: inherit;
  transition: transform 0.55s cubic-bezier(0.33, 1, 0.68, 1);
  will-change: transform;
}

.hero__slide {
  flex: 0 0 100%;
  min-height: inherit;
  position: relative;
}

.hero__slide img {
  width: 100%;
  height: 100%;
  min-height: inherit;
  object-fit: cover;
  object-position: center;
}

.hero__overlay {
  pointer-events: none;
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    rgba(27, 67, 50, 0.75) 0%,
    rgba(27, 67, 50, 0.35) 45%,
    rgba(27, 67, 50, 0.2) 100%
  );
}

.hero__content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(1.5rem, 5vw, 3.5rem);
  max-width: min(90%, 560px);
  z-index: 2;
}

.hero__eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
}

.hero__heading {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 6vw, 3.25rem);
  font-weight: 600;
  color: var(--white);
  line-height: 1.1;
  letter-spacing: -0.03em;
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.25);
}

.hero__lead {
  margin: 0;
  font-size: clamp(1rem, 2.4vw, 1.2rem);
  color: rgba(255, 255, 255, 0.92);
  max-width: 36ch;
  line-height: 1.5;
}

.hero__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 4;
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  cursor: pointer;
  display: grid;
  place-items: center;
  color: var(--white);
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero__nav:hover {
  background: rgba(255, 255, 255, 0.32);
  transform: translateY(-50%) scale(1.05);
}

.hero__nav:focus-visible {
  outline: 2px solid var(--sun);
  outline-offset: 2px;
}

.hero__nav--prev {
  left: clamp(0.75rem, 3vw, 1.5rem);
}

.hero__nav--next {
  right: clamp(0.75rem, 3vw, 1.5rem);
}

.hero__nav::after {
  content: "";
  width: 10px;
  height: 10px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
}

.hero__nav--prev::after {
  transform: rotate(45deg);
  margin-left: 4px;
}

.hero__nav--next::after {
  transform: rotate(-135deg);
  margin-right: 4px;
}

.hero__dots {
  position: absolute;
  bottom: clamp(1rem, 3vw, 1.75rem);
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  display: flex;
  gap: 0.45rem;
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(6px);
}

.hero__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.hero__dot[aria-selected="true"] {
  background: var(--white);
  transform: scale(1.25);
}

.hero__dot:focus-visible {
  outline: 2px solid var(--sun);
  outline-offset: 2px;
}

@media (max-width: 640px) {
  .hero__content {
    /* запас под абсолютные .hero__dots, чтобы не налезали на подпись */
    padding-bottom: calc(clamp(1.5rem, 5vw, 3.5rem) + 3.5rem);
    /* запас под .hero__nav (48px) + их отступ от края — чтобы «Домашний питомник» не заходил под стрелку */
    padding-left: max(
      clamp(1.5rem, 5vw, 3.5rem),
      calc(clamp(0.75rem, 3vw, 1.5rem) + 48px + 0.75rem)
    );
    padding-right: max(
      clamp(1.5rem, 5vw, 3.5rem),
      calc(clamp(0.75rem, 3vw, 1.5rem) + 48px + 0.75rem)
    );
  }
}

/* Intro */
.intro {
  padding: clamp(3rem, 8vw, 5rem) 0;
}

.intro__copy {
  max-width: 65ch;
}

.intro__text {
  margin: 0 0 1rem;
  color: var(--ink-muted);
}

.intro__text strong {
  color: var(--ink);
}

.intro__copy .button {
  margin-top: 1.25rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  background: var(--leaf);
  color: var(--white) !important;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  border: 2px solid transparent;
  box-shadow: var(--shadow-sm);
  transition: background 0.2s ease, transform 0.2s ease;
}

.button:hover {
  background: var(--leaf-deep);
  transform: translateY(-2px);
  color: var(--white) !important;
}

.button--wa {
  background: #25d366;
}

.button--wa:hover {
  background: #1da851;
}

.button--outline {
  background: transparent;
  color: var(--leaf) !important;
  border-color: var(--leaf);
  box-shadow: none;
}

.button--outline:hover {
  background: rgba(45, 106, 79, 0.08);
  color: var(--leaf-deep) !important;
}

/* Gallery */
.gallery-section {
  padding: clamp(2.5rem, 6vw, 4rem) 0 clamp(4rem, 10vw, 6rem);
}

.gallery-section__sub {
  text-align: center;
  max-width: 52ch;
  margin: 0 auto 1.75rem;
  color: var(--ink-muted);
  font-size: 0.82rem;
  font-style: italic;
  opacity: 0.92;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1.25rem;
}

@media (min-width: 600px) {
  .gallery {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
  }
}

.gallery__item {
  margin: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-elevated);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(45, 106, 79, 0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.gallery__item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.gallery__btn {
  display: block;
  width: 100%;
  padding: 0;
  border: none;
  background: #e8ebe9;
  cursor: pointer;
  aspect-ratio: 1;
  position: relative;
  overflow: hidden;
}

.gallery__btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.gallery__item:hover .gallery__btn img {
  transform: scale(1.06);
}

.gallery__btn:focus-visible {
  outline: 3px solid var(--accent-soft);
  outline-offset: 2px;
}

.gallery__caption {
  padding: 0.75rem 0.85rem 1rem;
  font-size: 0.9rem;
  font-weight: 500;
  text-align: center;
  color: var(--ink);
  line-height: 1.35;
}

/* Contacts */
.contacts {
  padding: clamp(3rem, 8vw, 5rem) 0;
  background: linear-gradient(180deg, transparent, rgba(45, 106, 79, 0.06));
  border-top: 1px solid rgba(45, 106, 79, 0.1);
}

.contacts__grid {
  display: grid;
  gap: 1.5rem;
  margin-top: 2rem;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}

.contacts__card {
  padding: 2rem;
  border-radius: var(--radius);
  background: var(--bg-elevated);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(45, 106, 79, 0.08);
}

.contacts__name {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: 1.75rem;
  color: var(--leaf-deep);
}

.contacts__phone {
  display: inline-block;
  font-size: 1.5rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--leaf-deep);
  margin-bottom: 1rem;
}

.contacts__phone:hover {
  color: var(--accent);
}

.contacts__hint {
  margin: 0;
  font-size: 0.95rem;
  color: var(--ink-muted);
}

.contacts__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-top: 2.25rem;
}

/* Footer */
.site-footer {
  padding: 2rem 0 2.5rem;
  border-top: 1px solid rgba(45, 106, 79, 0.1);
}

.site-footer__inner {
  text-align: center;
}

.site-footer__brand {
  margin: 0 0 0.5rem;
  font-weight: 600;
  color: var(--leaf-deep);
}

.site-footer__copy {
  margin: 0;
  font-size: 0.82rem;
  color: var(--ink-muted);
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(15, 25, 20, 0.92);
  display: grid;
  place-items: center;
  padding: 1rem;
  backdrop-filter: blur(4px);
}

.lightbox[hidden] {
  display: none;
}

.lightbox__figure {
  margin: 0;
  max-width: min(96vw, 1200px);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.lightbox__img {
  max-width: 100%;
  max-height: min(78vh, 900px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius-sm);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

.lightbox__caption {
  font-size: 1.05rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.95);
  text-align: center;
}

.lightbox__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
  z-index: 2;
  transition: background 0.2s ease;
}

.lightbox__close:hover {
  background: rgba(255, 255, 255, 0.22);
}

.lightbox__close::before,
.lightbox__close::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 22px;
  height: 2px;
  background: currentColor;
}

.lightbox__close::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.lightbox__close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
  z-index: 2;
  transition: background 0.2s ease;
}

.lightbox__nav:hover {
  background: rgba(255, 255, 255, 0.22);
}

.lightbox__nav--prev {
  left: clamp(0.5rem, 2vw, 1.5rem);
}

.lightbox__nav--next {
  right: clamp(0.5rem, 2vw, 1.5rem);
}

.lightbox__nav::after {
  content: "";
  display: block;
  width: 12px;
  height: 12px;
  margin: 0 auto;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
}

.lightbox__nav--prev::after {
  transform: rotate(45deg);
  margin-left: 6px;
}

.lightbox__nav--next::after {
  transform: rotate(-135deg);
  margin-right: 6px;
}

@media (max-width: 640px) {
  .lightbox__nav {
    top: auto;
    bottom: 1rem;
    transform: none;
  }
  .lightbox__nav--prev {
    left: 25%;
  }
  .lightbox__nav--next {
    right: 25%;
  }
}
