/* Calendar "Больше хороших товаров" 2027: landing page
   Desktop: 1200 px grid (from 1200 px). Below that: a responsive column layout. */

:root {
  --bg: #eee1ce;
  --beige: #e7d5bf;
  --green: #878466;
  --olive: #b8b090;
  --red: #b54c39;
  --red-dark: #8f3a2b;
  --red-title: #b34938;
  --red-year: #b24937;
  --cream: #efe3d2;
  --ink: #35300f;
  --dark-green: #2f3f2f;
  --shadow: 0 10.6px 10.6px rgba(0, 0, 0, 0.25);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: #000;
  font-family: "Roboto", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.2;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
ul { list-style: none; }

.stage { position: relative; width: 1200px; margin: 0 auto; }
.abs { position: absolute; left: var(--x); top: var(--y); }

/* ---------- Button ---------- */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 64px;
  padding: 0 16px;
  background: var(--red);
  color: var(--cream);
  font: 400 24px/1.1 "Roboto", sans-serif; /* as in the design: regular weight, capitals typed in the text, "руб." in lowercase */
  text-transform: none;
  text-align: center;
  text-decoration: none;
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: background-color 0.25s, color 0.25s, transform 0.25s, box-shadow 0.25s;
}
.btn:not(.abs) { position: relative; }
/* Cart icon (Lucide "shopping-cart", lucide.dev): collapsed by default, slides out to the left of the text on hover */
.btn__icon {
  flex: none;
  width: 0;
  height: 28px;
  margin-right: 0;
  opacity: 0;
  transform: translateX(-14px) rotate(-12deg);
  transition: width 0.3s ease, margin-right 0.3s ease, opacity 0.25s, transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
/* shine that runs across the button */
.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.35) 50%, transparent 70%);
  transform: translateX(-120%);
  pointer-events: none;
}
.btn:active {
  background: var(--red-dark);
  transform: translateY(1px) scale(0.99);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}
.btn:focus-visible { outline: 3px solid var(--dark-green); outline-offset: 3px; }

/* ---------- Hero ---------- */
.hero { position: relative; height: 544px; overflow: hidden; }
.hero__band { position: absolute; left: 0; right: 0; top: 212px; height: 332px; background: var(--beige); }
.hero__stage { height: 544px; }

.hero__gum { opacity: 0.62; }

/* the red block runs 3px past the hero bottom (clipped) so no beige gap shows above the green band */
.hero__corner { height: 360px; object-fit: fill; }

.hero__lead {
  width: 193px;
  color: var(--cream);
  font: 700 30px/37px "Roboto Condensed", sans-serif;
  text-transform: uppercase;
}
.hero__months {
  width: 190px;
  color: var(--cream);
  font-size: 16px;
  text-transform: uppercase;
}
.hero__author {
  width: 480px;
  font-size: 24px;
  text-transform: uppercase;
}
.hero__author strong { display: block; font-size: 32px; font-weight: 700; }
.hero__tagline { width: 465px; color: #000; font-size: 24px; text-transform: uppercase; }
.hero__tagline strong { display: block; font-weight: 700; }

.hero__buy {
  width: 366px;
  height: 53px;
  background: rgba(181, 76, 57, 0.7);
  box-shadow: none;
  padding: 0; /* label is centred in the button */
  font: 400 24px/1.1 "Roboto", sans-serif;
  text-transform: none;
  justify-content: center;
  text-align: center;
}
/* the hero button has no hover icon: nothing may push the label off the centre */
.hero__buy .btn__icon { display: none; }

.hero__contacts { display: flex; align-items: center; width: 330px; }
.hero__phone {
  flex: 0 0 232px;
  color: var(--ink);
  font: 500 20px/1 "Montserrat", sans-serif;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
}
.hero__contacts a:not(.hero__phone) { display: block; }
.hero__phone,
.footer__phone { transition: color 0.2s; }
.hero__contacts a img,
.footer__social a img { transition: transform 0.25s; }
.hero__contacts a + a { margin-left: 15px; }

.hero__title { width: 400px; white-space: nowrap; }
.hero__title-main {
  display: block;
  color: var(--red-title);
  font: 800 54px/1 "Montserrat", sans-serif;
  text-transform: uppercase;
}
.hero__title-sub {
  display: block;
  margin: 0 0 0 49px;
  color: var(--dark-green);
  font: 400 42px/1.1 "Roboto Condensed", "Arial Narrow", "Helvetica Neue", sans-serif;
  font-stretch: condensed;
  letter-spacing: 0.76px;
  text-transform: uppercase;
}
.hero__title-sub em { font-style: normal; color: var(--red-year); }

/* ---------- Green bands ---------- */
.note { background: var(--green); color: #fff; }
.note__inner {
  display: flex;
  align-items: flex-start;
  width: 1200px;
  min-height: 117px;
  margin: 0 auto;
  padding: 23px 0;
}
.note__icon { flex: 0 0 82px; margin: 1px 73px 0 29px; }
.note__text { flex: 0 1 812px; }
.note__text p + p { margin-top: 1.2em; }
.note__text--tight p + p { margin-top: 0; }

/* ---------- About the author ---------- */
.about { position: relative; height: 463px; background: var(--olive); overflow: hidden; }
.about__stage { height: 463px; }
.about__grid {
  position: absolute;
  left: 0;
  top: 262px; /* below the text blocks, with breathing room */
  width: 100%;
  height: auto; /* keeps the artwork's own proportions so the date row is never cropped */
  min-height: 47px;
  object-fit: fill;
}
.about__calendar {
  position: absolute;
  left: 50%;
  top: 10px;
  width: 319px;
  height: 448px;
  transform: translateX(-50%);
}
.about__calendar.carousel__open { position: absolute; overflow: visible; }
.about__calendar img { width: 100%; height: 100%; }
/* PNGs with a baked-in shadow need no rectangular dimming: only the zoom badge */
.about__calendar::before { display: none; }
.about__text {
  font-family: "Roboto Condensed", sans-serif;
  font-size: 16px;
  font-weight: 400;
}
.about__text strong,
.about__text .caps { font-weight: 500; text-transform: uppercase; }
.about__text p + p { margin-top: 0; }
.about__text--left { width: 377px; }
.about__text--right { width: 363px; }
.about__caption { width: 365px; text-align: center; }

/* "Календарь-постер" block: its own section with breathing room above and below */
.about--poster { height: auto; padding: 30px 0; }
.about--poster .about__grid { top: 356px; } /* below the (longer) text columns, above the captions */
.about--poster .about__text p + p { margin-top: 10px; }

/* ---------- "Buy + delivery" row ---------- */
.buy__row {
  display: grid;
  grid-template-columns: 531px 1fr auto;
  align-items: center;
  width: 1042px;
  margin: 0 auto;
  padding: 26px 0;
}
.buy__label { text-align: center; text-transform: uppercase; }
.buy__label span { text-transform: none; }
.shops { display: flex; gap: 16.3px; }
.shops img { width: 63.68px; height: 63.68px; }

/* ---------- Galleries ---------- */
.section-title {
  color: #fff;
  font: 700 32px/1.15 "Roboto", sans-serif;
  text-align: center;
  text-transform: uppercase;
}
.gallery { padding: 26px 0 34px; background: var(--olive); }
.gallery .section-title { margin-bottom: 17px; }

.poster { padding: 26px 0; background: var(--olive); }
.poster .section-title { margin-bottom: 18px; }

/* ---------- Carousel ---------- */
.carousel { position: relative; width: 1200px; margin: 0 auto; padding: 0 30px; }
.carousel__track {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
}
.carousel__track::-webkit-scrollbar { display: none; }
.carousel__track:focus-visible { outline: 3px solid var(--dark-green); outline-offset: 4px; }
.carousel__slide { flex: 0 0 auto; scroll-snap-align: start; }
.carousel--months .carousel__slide img { width: 270px; height: 382px; object-fit: cover; }
.carousel--posters .carousel__slide img { width: 367px; height: 367px; object-fit: cover; }

.carousel__btn {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-top: -22px;
  border: 0;
  border-radius: 50%;
  background: var(--cream);
  color: var(--red);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  transition: background 0.2s, opacity 0.2s, transform 0.2s;
}
.carousel__btn[hidden] { display: none; }
.carousel__btn--prev { left: 4px; }
.carousel__btn--next { right: 4px; }
.carousel__btn:active:not(:disabled) { transform: scale(0.92); }
.carousel__btn:focus-visible { outline: 3px solid var(--dark-green); outline-offset: 2px; }
.carousel__btn:disabled { opacity: 0.35; cursor: default; }
.carousel__btn svg { width: 20px; height: 20px; }

/* Slide link: on hover the picture grows a little and a "zoom in" badge appears */
.carousel__open {
  position: relative;
  display: block;
  overflow: hidden;
  cursor: pointer;
}
.carousel__open img {
  transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
  will-change: transform;
}
/* dim layer under the badge */
.carousel__open::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(40, 24, 12, 0.5), rgba(40, 24, 12, 0.12) 60%);
  opacity: 0;
  transition: opacity 0.35s;
  pointer-events: none;
}
/* the badge: round icon + label in one cream pill */
.carousel__open::after {
  content: "Увеличить";
  position: absolute;
  left: 50%;
  top: 50%;
  display: flex;
  align-items: center;
  height: 48px;
  padding: 0 20px 0 56px;
  border-radius: 24px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23efe3d2' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m21 21-4.3-4.3M11 8v6M8 11h6'/%3E%3C/svg%3E") 14px center / 20px no-repeat,
    radial-gradient(circle at 24px 50%, var(--red) 0 19px, transparent 20px),
    var(--cream);
  color: #8f3a2b;
  font: 700 13px/1 "Montserrat", sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.4);
  opacity: 0;
  transform: translate(-50%, -30%) scale(0.85);
  transition: opacity 0.3s, transform 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.3);
  pointer-events: none;
}
@media (hover: hover) and (pointer: fine) {
  .carousel__open:hover img,
  .carousel__open:focus-visible img { transform: scale(1.07); }
  .carousel__open:hover::before,
  .carousel__open:focus-visible::before { opacity: 1; }
  .carousel__open:hover::after,
  .carousel__open:focus-visible::after { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
/* touch screens have no hover: a small round icon badge sits in the corner all the time */
@media (hover: none), (pointer: coarse) {
  .carousel__open::after {
    content: "";
    left: auto;
    top: auto;
    right: 10px;
    bottom: 10px;
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 50%;
    background: var(--red) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23efe3d2' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m21 21-4.3-4.3M11 8v6M8 11h6'/%3E%3C/svg%3E") center / 20px no-repeat;
    opacity: 0.95;
    transform: none;
  }
}
/* slides with the lightbox switched off in the admin panel get no badge */
.carousel__open[data-lb="off"] { cursor: default; }
.carousel__open[data-lb="off"]::before,
.carousel__open[data-lb="off"]::after { display: none; }
.carousel__open:focus-visible { outline: 3px solid var(--dark-green); outline-offset: 3px; }

/* ---------- Lightbox (GLightbox): styled to match the page ---------- */
.goverlay { background: rgba(24, 21, 9, 0.92); }
.glightbox-container .gslide-image img {
  height: min(78vh, 760px) !important;
  width: auto !important;
  max-width: 92vw !important;
  object-fit: contain;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}
.glightbox-clean .gslide-description { background: transparent; }
.glightbox-clean .gdesc-inner { padding: 14px 0 0; text-align: center; }
.glightbox-clean .gslide-title { margin: 0; color: #fff; font: 500 16px/1.2 "Roboto", sans-serif; }
.glightbox-clean .gclose,
.glightbox-clean .gnext,
.glightbox-clean .gprev { background-color: var(--cream); }
.glightbox-clean .gclose:hover,
.glightbox-clean .gnext:hover,
.glightbox-clean .gprev:hover { background-color: #fff; }
.glightbox-clean .gclose path,
.glightbox-clean .gnext path,
.glightbox-clean .gprev path { fill: var(--red); }

/* ---------- Perks ---------- */
.perks { background: var(--olive); }
.perks__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  width: 1200px;
  margin: 0 auto;
  padding: 26px 0 25px;
  text-align: center;
  text-transform: uppercase;
}
.perks__item img { width: 110px; height: 110px; margin: 0 auto 26px; }

/* ---------- Strip + footer ---------- */
.rigel { width: 100%; height: 406px; object-fit: cover; }

.footer { background: var(--green); color: #fff; }
.footer__stage { height: 157px; }
.footer__copy { width: 666px; font: 500 16px/1.2 "Montserrat", sans-serif; text-decoration: underline; }
.right_block {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.footer__links {
    display: flex;
    flex-direction: column;
    gap: 5px;
    font: 500 16px / 1.2 "Montserrat", sans-serif;
    margin-top: 15px;
}
.footer__links a {
  text-underline-offset: 3px;
  transition: color 0.2s, text-underline-offset 0.2s;
}
.footer__phone {
  color: var(--ink);
  font: 500 24px/1 "Montserrat", sans-serif;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
}
.footer__social { display: flex; gap: 13px; align-items: center; }

/* =====================================================
   Hover effects (only where a mouse is present)
   ===================================================== */
@media (hover: hover) and (pointer: fine) {
  /* "Buy" button: darkens, lifts, a shine runs across it */
  .btn:hover,
  .btn:focus-visible {
    background: var(--red-dark);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 16px 18px rgba(0, 0, 0, 0.3);
  }
  .btn:hover .btn__icon,
  .btn:focus-visible .btn__icon {
    width: 28px;
    margin-right: 12px;
    opacity: 1;
    transform: none;
  }
  .btn:hover::after,
  .btn:focus-visible::after {
    transform: translateX(120%);
    transition: transform 0.7s ease;
  }

  /* Phone numbers and social icons */
  .hero__phone:hover { color: var(--red-title); }
  .footer__phone:hover { color: #fff; }
  .hero__contacts a:hover img,
  .footer__social a:hover img { transform: scale(1.18) rotate(-6deg); }

  /* Footer links */
  .footer__links a:hover,
  .footer__links a:focus-visible {
    color: var(--cream);
    text-underline-offset: 7px;
  }

  /* Carousel arrows */
  .carousel__btn:hover:not(:disabled) {
    background: #fff;
    transform: scale(1.12);
  }
}

/* =====================================================
   Below 1200 px: responsive column layout
   ===================================================== */
@media (max-width: 1199px) {
  .stage,
  .note__inner,
  .perks__grid { width: 100%; max-width: 760px; }

  .abs { position: static; }

  /* Hero */
  .hero { height: auto; padding-bottom: 28px; }
  .hero__band { top: 140px; height: auto; bottom: 0; }
  .hero__stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    height: auto;
    padding: 20px 20px 0;
    text-align: center;
  }
  .hero__corner,
  .hero__gum,
  .hero__stamp { display: none; }

  .hero__logo { order: 1; }
  .hero__logo img { width: 200px; height: auto; }
  .hero__contacts { order: 2; width: auto; gap: 14px; justify-content: center; }
  .hero__phone { flex: 0 0 auto; }
  .hero__contacts a + a { margin-left: 0; }
  .hero__title { order: 3; width: auto; }
  .hero__title-main { font-size: clamp(36px, 9vw, 54px); }
  .hero__title-sub { margin: 4px 0 0; font-size: clamp(28px, 7vw, 42px); }
  .hero__girl { order: 4; width: min(100%, 460px); height: auto; }
  .hero__author { order: 5; width: auto; font-size: 20px; }
  .hero__author strong { font-size: 26px; }
  .hero__buy { position: relative; left: auto; top: auto; order: 6; width: min(100%, 366px); height: 56px; margin: 6px 0; background: var(--red); }
  .hero__tagline { order: 7; width: auto; font-size: 20px; }
  .hero__lead,
  .hero__months {
    order: 8;
    width: 100%;
    max-width: 420px;
    padding: 18px 20px;
    background: var(--red);
  }
  .hero__lead { font-size: 26px; line-height: 1.25; }
  .hero__months { order: 9; margin-top: -18px; padding-top: 0; }

  /* Bands */
  .note__inner { flex-direction: column; align-items: center; gap: 14px; padding: 24px 20px; text-align: center; }
  .note__icon { flex: none; margin: 0; width: 82px; height: auto; }
  .note__text { flex: none; }

  /* About the author */
  .about { height: auto; overflow: visible; }
  .about--poster { padding: 0; } /* the stage already has its own padding on small screens */
  .about--poster .about__text p + p { margin-top: 8px; }
  .about__stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    height: auto;
    padding: 24px 20px;
  }
  .about__grid { display: none; }
  .about__calendar.carousel__open { position: relative; left: auto; top: auto; width: min(100%, 319px); height: auto; transform: none; }
  .about__calendar img { height: auto; }
  .about__text--left,
  .about__text--right,
  .about__caption { width: 100%; max-width: 520px; }
  .about__calendar { order: 1; }
  .about__text--left { order: 2; }
  .about__text--right { order: 3; }
  .about__caption { order: 4; }

  /* "Buy" row */
  .buy__row {
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 100%;
    padding: 24px 20px;
  }
  .buy .btn { width: 100%; max-width: 531px; }
  .shops { flex-wrap: wrap; justify-content: center; }

  /* Galleries */
  .section-title { padding: 0 20px; font-size: clamp(22px, 5vw, 32px); }
  .carousel { width: 100%; padding: 0; }
  .carousel__track { gap: 14px; padding: 0 20px; scroll-padding: 0 20px; }
  .carousel--months .carousel__slide { width: min(62vw, 270px); }
  .carousel--posters .carousel__slide { width: min(82vw, 367px); }
  .carousel__slide img { width: 100%; height: auto; }
  .carousel--months .carousel__slide img { height: auto; aspect-ratio: 270 / 382; }
  .carousel--posters .carousel__slide img { height: auto; aspect-ratio: 1; }
  .carousel__btn { width: 38px; height: 38px; margin-top: -19px; }
  .carousel__btn--prev { left: 6px; }
  .carousel__btn--next { right: 6px; }

  /* Perks */
  .perks__grid { grid-template-columns: repeat(2, 1fr); gap: 24px 12px; padding: 28px 16px; }

  /* Strip */
  .rigel { height: clamp(150px, 34vw, 406px); }

  /* Footer */
  .footer__stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    height: auto;
    padding: 24px 20px;
    text-align: center;
  }
  .right_block {
    align-items: center;
}
  .footer__logo img { width: 160px; height: auto; }
  .footer__copy { width: auto; }
  .footer__links { flex-wrap: wrap; justify-content: center; gap: 8px 24px; margin-top: 0;}
}

@media (max-width: 480px) {
  .btn { font-size: 18px; height: 56px; }
  .hero__phone { font-size: 17px; }
  .perks__grid { font-size: 13px; }
  .perks__item img { width: 88px; height: 88px; }
  .footer__phone { font-size: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn,
  .carousel__btn,
  .hero__contacts a img,
  .footer__social a img,
  .footer__links a,
  .hero__phone,
  .footer__phone { transition: none; }
  .btn:hover,
  .btn:focus-visible,
  .carousel__btn:hover:not(:disabled) { transform: none; }
  .btn::after { display: none; }
  .btn__icon { transition: none; }
  .carousel__open img,
  .carousel__open::before,
  .carousel__open::after { transition: none; }
  .carousel__open:hover img,
  .carousel__open:focus-visible img { transform: none; }
}
