/* Не показывать «разваленную» вёрстку до Tailwind CDN */
html:not(.fabricaes-ready) body {
  visibility: hidden;
}

html.fabricaes-ready body {
  visibility: visible;
}

:root {
  --font-serif: 'Playfair Display', serif;
  --font-script: 'Caveat', cursive;
  --font-sans: 'Manrope', system-ui, sans-serif;
  --color-gold: #c9a86c;
  --color-gold-dark: #8b6914;
  --color-brown: #6b4423;
  /* Макеты home / catalog / services / kurs */
  --page-cream: #f9f7f2;
  --accent-tan: #b08d6a;
  --accent-tan-hover: #9a7a5c;
  --footer-dark: #1a1a1a;
  --site-header-h: 4.75rem;
}

html {
  font-family: var(--font-sans);
}

.font-serif {
  font-family: var(--font-serif);
}

.font-script {
  font-family: var(--font-script);
}

.font-sans {
  font-family: var(--font-sans);
}

.text-gradient-gold {
  background: linear-gradient(135deg, #c9a86c 0%, #f4e5c2 50%, #b8944a 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 2px 4px rgba(201, 168, 108, 0.3));
}

/* Герой: рукописный Caveat — читаемее Marck Script */
.hero-title {
  font-family: var(--font-script);
  line-height: 1.12;
  overflow: visible;
  width: 100%;
  max-width: 100%;
}

.hero-line {
  display: block;
  overflow: visible;
  font-weight: 600;
  font-size: clamp(1.85rem, 6vw, 2.65rem);
  color: #fff;
  letter-spacing: 0.02em;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.55), 0 2px 20px rgba(0, 0, 0, 0.4);
  padding-bottom: 0.1em;
  line-height: 1.14;
}

.hero-accent-gold {
  font-weight: 700;
  color: #ffecb8;
  -webkit-text-fill-color: #ffecb8;
  background: none;
  filter: none;
  text-shadow:
    0 0 24px rgba(255, 200, 110, 0.8),
    0 2px 8px rgba(0, 0, 0, 0.95),
    0 0 2px rgba(255, 255, 255, 0.45);
}

@media (min-width: 640px) {
  .hero-line {
    font-size: clamp(2.15rem, 4.8vw, 3.35rem);
  }
}

@media (min-width: 1024px) {
  .hero-copy {
    max-width: 42rem;
  }

  .hero-line {
    font-size: clamp(2.5rem, 3.4vw, 3.85rem);
    line-height: 1.1;
  }
}

/* Герой: слайдер заголовков (сетка — высота под самый высокий слайд, стрелки не под текстом) */
.hero-headline-slider {
  position: relative;
}

.hero-headline-slider__viewport {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  position: relative;
  overflow: visible;
}

.hero-slide {
  grid-area: 1 / 1;
  align-self: start;
  justify-self: stretch;
  width: 100%;
  position: relative;
  overflow: visible;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.45s ease, visibility 0.45s ease;
  pointer-events: none;
  z-index: 0;
}

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  z-index: 1;
}

.hero-headline-slider__nav {
  position: relative;
  z-index: 2;
  margin-top: 0.75rem;
}

@media (min-width: 640px) {
  .hero-headline-slider__nav {
    margin-top: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-slide {
    transition: none;
  }
}

/* Marquee animation */
.marquee-container {
  animation: marquee 30s linear infinite;
}

@keyframes marquee {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.marquee-content {
  flex-shrink: 0;
}

/* Floating animations for hero images */
.animate-float {
  animation: float 6s ease-in-out infinite;
}

.animate-float-delayed {
  animation: float 6s ease-in-out infinite;
  animation-delay: 3s;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px) rotate(6deg);
  }
  50% {
    transform: translateY(-20px) rotate(6deg);
  }
}

/* Smooth scroll */
html {
  scroll-behavior: smooth;
}

/* Custom selection color */
::selection {
  background-color: rgba(201, 168, 108, 0.3);
  color: inherit;
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #000;
}

::-webkit-scrollbar-thumb {
  background: #333;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* Product card hover lift */
.group:hover .group-hover\:scale-105 {
  transform: scale(1.05);
}

.group:hover .group-hover\:scale-110 {
  transform: scale(1.1);
}

/* Line clamp for descriptions if needed */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Mobile menu transition */
#mobile-menu {
  transition: all 0.3s ease;
}


/* Кнопки под слайдером на главной */
.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

@media (min-width: 640px) {
  .hero-cta-row {
    gap: 0.75rem;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .marquee-container,
  .animate-float,
  .animate-float-delayed {
    animation: none;
  }
  
  html {
    scroll-behavior: auto;
  }

}

.hero-bg-img {
  z-index: 0;
}

/* Страница услуг: отложенная отрисовка списка карточек ниже первого экрана */
.services-list-section {
  content-visibility: auto;
  contain-intrinsic-size: auto 2200px;
}

.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.55);
  transition: color 0.2s ease;
}

.social-icon:hover {
  color: #fff;
}

.social-max {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 0.35rem 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 0.35rem;
  line-height: 1;
}

.catalog-layout .catalog-filters {
  position: sticky;
  top: calc(var(--site-header-h) + 0.5rem);
  align-self: flex-start;
}

.page-cream {
  background-color: var(--page-cream);
}

.btn-tan {
  background-color: var(--accent-tan);
  color: #fff;
  transition: background-color 0.2s ease;
}

.btn-tan:hover {
  background-color: var(--accent-tan-hover);
}

.filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 500;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #fff;
  color: #444;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.filter-pill:hover {
  border-color: rgba(176, 141, 106, 0.45);
  color: #1a1a1a;
}

.filter-pill.is-active {
  background: #6b4c3b;
  border-color: #6b4c3b;
  color: #fff;
}

/* Единая чёрная шапка */
.site-header {
  background-color: #000;
}

/* Плитки категорий на главной: один фон + затемнение для белого текста */
.home-cat-tile {
  isolation: isolate;
}

.home-cat-tile__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: url('bgcat1.jpg');
  background-size: cover;
  background-position: center;
  transform: scale(1);
  transition: transform 0.55s ease;
}

.home-cat-tile:hover .home-cat-tile__bg,
.home-cat-tile:focus-visible .home-cat-tile__bg {
  transform: scale(1.06);
}

.home-cat-tile__veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.82) 0%,
    rgba(0, 0, 0, 0.55) 42%,
    rgba(0, 0, 0, 0.38) 100%
  );
}

.home-cat-tile__caption {
  position: relative;
  z-index: 2;
}

/* Пункты меню в шапке: «пилюли» со стеклянным фоном (чуть плотнее — больше пунктов) */
.nav-link-header {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.38rem 0.62rem;
  border-radius: 9999px;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.82);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 1px 2px rgba(0, 0, 0, 0.2);
  transition:
    color 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.15s ease;
}

.nav-link-header:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 8px 28px rgba(0, 0, 0, 0.35);
  transform: translateY(-1px);
}

.nav-link-header.is-active {
  color: #1c1610;
  background: linear-gradient(160deg, #f0e4d2 0%, #d4b896 38%, #b08d6a 100%);
  border-color: rgba(255, 255, 255, 0.45);
  box-shadow:
    0 0 0 1px rgba(201, 168, 108, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    0 10px 32px rgba(0, 0, 0, 0.45);
}

.nav-link-header.is-active:hover {
  color: #14100c;
  transform: translateY(-1px);
}

/* Мобильное меню — те же визуальные принципы */
.nav-link-mobile {
  display: block;
  padding: 0.7rem 1rem;
  border-radius: 0.75rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.88);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.nav-link-mobile:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
}

.nav-link-mobile.is-active {
  color: #1c1610;
  background: linear-gradient(160deg, #f0e4d2 0%, #c9a86c 55%, #9a7a5c 100%);
  border-color: rgba(255, 255, 255, 0.35);
}

.icon-btn-header {
  color: rgba(255, 255, 255, 0.72);
}

.icon-btn-header:hover {
  color: #fff;
}

/* Логотип в шапке: крупнее, без лишнего сглаживания при масштабе */
.site-logo.site-logo--header {
  height: 2.15rem;
  width: auto;
  max-width: min(280px, 46vw);
  object-fit: contain;
  object-position: left center;
  transform: translateZ(0);
  backface-visibility: hidden;
}

@media (min-width: 768px) {
  .site-logo.site-logo--header {
    height: 2.4rem;
    max-width: min(300px, 34vw);
  }
}

@media (min-width: 1024px) {
  .site-logo.site-logo--header {
    height: 2.55rem;
    max-width: 320px;
  }
}

.site-logo.site-logo--footer {
  height: 2.1rem;
  width: auto;
  max-width: 180px;
  object-fit: contain;
  object-position: left center;
}

.social-circle {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.65);
  transition: color 0.2s ease, background-color 0.2s ease;
}

.social-circle:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

/* Главная: блок «Станьте мастером…» по макету blok.jpg */
.edu-promo-blok {
  background: #0a0a0a;
}

.edu-promo-blok__panel {
  background: #1a1a1a;
}

.edu-promo-blok__script-rose {
  font-family: var(--font-script);
  font-weight: 400;
  background: linear-gradient(125deg, #f5d4cc 0%, #d4a08f 38%, #c58d7e 62%, #9e6a5f 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 1px 12px rgba(197, 141, 126, 0.25));
}

.edu-promo-blok__serif-rose {
  font-family: var(--font-serif);
  font-weight: 700;
  background: linear-gradient(125deg, #f0c9c0 0%, #c58d7e 45%, #a86b5c 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.edu-promo-blok__price-card {
  background: #0d0d0d;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.edu-promo-blok__cta:focus-visible {
  outline: 2px solid rgba(197, 141, 126, 0.8);
  outline-offset: 3px;
}

/* --- Разделители между секциями (главная и др.) --- */
.section-sep {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(0.75rem, 3vw, 1.25rem);
  padding: clamp(1.35rem, 3.5vw, 2.15rem) clamp(1rem, 5vw, 2.5rem);
  margin: 0;
}

.section-sep__arm {
  flex: 1 1 0;
  height: 1px;
  max-width: min(280px, 38vw);
  border-radius: 9999px;
}

.section-sep__arm--l {
  background: linear-gradient(90deg, transparent 0%, rgba(176, 141, 106, 0.55) 100%);
}

.section-sep__arm--r {
  background: linear-gradient(270deg, transparent 0%, rgba(176, 141, 106, 0.55) 100%);
}

.section-sep__mark {
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  transform: rotate(45deg);
  border-radius: 1px;
  background: linear-gradient(135deg, #e8d5b7 0%, #b08d6a 55%, #8b6f4a 100%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.35),
    0 4px 14px rgba(139, 111, 74, 0.28);
}

/* Плавный спуск с тёмного героя к светлому контенту */
.section-sep--blend-hero {
  display: block;
  height: clamp(3rem, 8vw, 4.5rem);
  padding: 0;
  margin: 0;
  background: linear-gradient(
    180deg,
    #0a0a0a 0%,
    #1f1a16 28%,
    #ebe6dc 78%,
    #ffffff 100%
  );
}

/* Переход к тёмному футеру */
.section-sep--to-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(0.75rem, 3vw, 1.25rem);
  padding: clamp(2rem, 5vw, 3rem) clamp(1rem, 5vw, 2.5rem) clamp(1.75rem, 4vw, 2.5rem);
  margin: 0;
  background: linear-gradient(
    180deg,
    #fafaf9 0%,
    #eceae7 42%,
    #4a4540 82%,
    #1a1a1a 100%
  );
}

.section-sep--to-footer .section-sep__arm--l {
  background: linear-gradient(90deg, transparent 0%, rgba(232, 213, 183, 0.5) 100%);
}

.section-sep--to-footer .section-sep__arm--r {
  background: linear-gradient(270deg, transparent 0%, rgba(232, 213, 183, 0.5) 100%);
}

.section-sep--to-footer .section-sep__mark {
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.2),
    0 4px 18px rgba(0, 0, 0, 0.35);
}