:root {
  --bg: #FAF8F5;
  --navy: #2A3A5C;
  --navy-dark: #22304C;
  --gold: #C9A96A;
  --text: #33353B;
  --muted: #6B7280;
  --white: #FFFFFF;
  --radius: 14px;
  --shadow: 0 4px 24px rgba(42, 58, 92, .08);
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', -apple-system, sans-serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-body); color: var(--text); background: var(--bg); line-height: 1.65; font-size: 16px; }
img { max-width: 100%; display: block; }

.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.section { padding: 56px 0; }
.section-alt { background: var(--white); }
.section-navy { background: var(--navy); color: var(--white); }
.section-title { font-family: var(--font-display); font-size: 1.75rem; color: var(--navy); margin-bottom: 28px; }
.section-navy .section-title { color: var(--white); }

.btn { display: inline-block; padding: 14px 32px; border-radius: 999px; font-weight: 600; text-decoration: none; text-align: center; transition: opacity .2s, transform .2s; border: none; cursor: pointer; font-size: 1rem; }
.btn:hover { opacity: .9; transform: translateY(-1px); }
.btn-primary { background: var(--navy); color: var(--white); }
.section-navy .btn-primary { background: var(--gold); color: var(--navy-dark); }
.btn-small { padding: 10px 22px; font-size: .9rem; }

.card { background: var(--white); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.section-alt .card { background: var(--bg); box-shadow: none; border: 1px solid rgba(42, 58, 92, .1); }
.grid-2 { display: grid; grid-template-columns: 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: 1fr; gap: 20px; }

/* Bento-hero */
.hero-bento.section { padding: 36px 0 44px; }
.hero-heading { margin-bottom: 20px; }
.hero-kicker { color: var(--gold); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; font-size: .8rem; margin-bottom: 8px; }
.hero-heading h1 { font-family: var(--font-display); font-size: 2.1rem; line-height: 1.08; color: var(--navy); margin-bottom: 10px; }
.hero-tagline { color: var(--muted); font-size: .95rem; max-width: 320px; }

.bento { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.bento-tile { position: relative; aspect-ratio: 1; border-radius: var(--radius); overflow: hidden; }

.bento-photo { background: var(--bg); box-shadow: var(--shadow); }
/* .gallery ниже в файле задаёт grid на 2 колонки и aspect-ratio 3/4 картинкам —
   для фото-плитки перебиваем более специфичными селекторами: один статичный
   <img>, заполняющий весь квадрат */
.bento-photo.gallery { display: block; }
.bento-photo.gallery img { width: 100%; height: 100%; aspect-ratio: auto; object-fit: cover; border-radius: 0; cursor: zoom-in; }

.bento-stat, .bento-price {
  background: var(--white);
  border: 1px solid rgba(42, 58, 92, .1);
  box-shadow: var(--shadow);
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.bento-stat-num { font-family: var(--font-display); font-size: 1.35rem; color: var(--navy); line-height: 1.15; margin-bottom: 6px; }
.bento-stat-label { font-size: .78rem; color: var(--muted); line-height: 1.3; }
.bento-stat-double { gap: 14px; }
.bento-stat-double .bento-stat-num { margin-bottom: 2px; }

.bento-price {
  grid-column: span 2;
  aspect-ratio: 2 / 1;
  background: var(--navy);
  border: none;
  color: var(--white);
  align-items: flex-start;
  gap: 2px;
}
.bento-price-old { text-decoration: line-through; opacity: .6; font-size: .9rem; }
.bento-price-now { font-family: var(--font-display); font-size: 2.1rem; font-weight: 700; color: var(--gold); line-height: 1.1; }
.bento-price-label { font-size: .78rem; opacity: .85; margin-bottom: 8px; }
.bento-price-btn { background: var(--gold); color: var(--navy-dark); padding: 9px 20px; font-size: .82rem; align-self: flex-start; }

/* Цена */
.price { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; justify-content: center; }
.price-old { text-decoration: line-through; opacity: .6; font-size: 1.1rem; }
.price-now { font-family: var(--font-display); font-size: 2rem; font-weight: 700; color: var(--gold); }
.register-inner .price { margin-bottom: 28px; }

/* About */
.about-photo { border-radius: var(--radius); box-shadow: var(--shadow); height: auto; }
.about-mission { margin-top: 16px; color: var(--navy); }

/* Списки */
.check-list { list-style: none; margin: 16px 0; }
.check-list li { padding-left: 32px; position: relative; margin-bottom: 12px; }
.check-list li::before { content: '✓'; position: absolute; left: 0; top: 0; color: var(--gold); font-weight: 700; font-size: 1.1rem; }
.check-list-lg li { font-size: 1.05rem; margin-bottom: 16px; }
.program-list { counter-reset: prog; list-style: none; }
.program-list li { counter-increment: prog; padding: 14px 16px 14px 56px; position: relative; background: var(--white); border-radius: var(--radius); margin-bottom: 10px; box-shadow: var(--shadow); }
.program-list li::before { content: counter(prog); position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 50%; background: var(--navy); color: var(--white); display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: .9rem; }
.card h3 { font-family: var(--font-display); color: var(--navy); font-size: 1.1rem; margin-bottom: 8px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: #223657; border-bottom: 1px solid rgba(255, 255, 255, .12); }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding-top: 10px; padding-bottom: 10px; }
.logo-link { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo-img { height: 40px; width: auto; border-radius: 0; object-fit: contain; }
.site-nav { display: none; align-items: center; gap: 24px; }
.site-nav a { color: var(--white); text-decoration: none; font-weight: 500; }
.site-nav a.btn-primary { background: var(--gold); color: var(--navy-dark); }
.site-nav.open { display: flex; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; background: #223657; padding: 20px; box-shadow: var(--shadow); }
.nav-toggle { display: flex; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 24px; height: 2px; background: var(--white); }

/* Footer */
.site-footer { background: var(--navy-dark); color: rgba(255, 255, 255, .85); padding: 40px 0; }
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.footer-brand { font-family: var(--font-display); font-size: 1.05rem; }
.footer-links { display: flex; gap: 20px; }
.footer-links a { color: var(--gold); text-decoration: none; font-weight: 500; }
.footer-note { font-size: .85rem; opacity: .6; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(34, 48, 76, .92); display: flex; align-items: center; justify-content: center; padding: 24px; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 100%; max-height: 90vh; border-radius: 8px; }
.lightbox-close { position: absolute; top: 16px; right: 20px; font-size: 2.2rem; color: var(--white); background: none; border: none; cursor: pointer; line-height: 1; }

/* Галереи */
.section-lead { color: var(--muted); margin: -12px 0 24px; }
.gallery { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); }
.gallery img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: var(--radius); cursor: zoom-in; transition: transform .2s; }
.gallery img:hover { transform: scale(1.02); }

/* Карусель відгуків */
.reviews-carousel { position: relative; }
.gallery-reviews {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.gallery-reviews::-webkit-scrollbar { display: none; }
.gallery-reviews img {
  flex: 0 0 100%;
  min-width: 0;
  scroll-snap-align: start;
  aspect-ratio: auto;
  object-fit: contain;
  height: 380px;
  background: var(--bg);
}
.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(42, 58, 92, .85);
  color: var(--gold);
  font-size: 1.4rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  box-shadow: var(--shadow);
  transition: background .2s, transform .2s;
}
.carousel-arrow:hover { background: var(--navy-dark); }
.carousel-prev { left: 8px; }
.carousel-next { right: 8px; }
.carousel-dots { display: flex; justify-content: center; gap: 8px; margin-top: 18px; }
.carousel-dot { width: 9px; height: 9px; padding: 0; border: none; border-radius: 50%; background: rgba(42, 58, 92, .25); cursor: pointer; transition: background .2s, transform .2s; }
.carousel-dot:hover { background: rgba(42, 58, 92, .45); }
.carousel-dot.active { background: var(--gold); transform: scale(1.25); }

/* Лента заказов (marquee) */
.marquee { overflow: hidden; touch-action: pan-y; cursor: grab; }
.marquee:active { cursor: grabbing; }
/* padding-right = gap: ширина трека (border box) = ровно 2 шага повтора, translateX(-50%) даёт бесшовную петлю без 6px-скачка */
.marquee-track { display: flex; gap: 12px; padding-right: 12px; width: max-content; animation: marquee-scroll 40s linear infinite; will-change: transform; }
.marquee-track img { flex: 0 0 auto; width: auto; -webkit-user-drag: none; user-select: none; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee.is-dragging .marquee-track { animation: none; }
.marquee-orders .marquee-track img { height: 240px; }

@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
  .marquee { overflow-x: auto; touch-action: pan-x pan-y; cursor: auto; }
}

/* Регистрация */
.register-inner { text-align: center; max-width: 640px; }
.register-lead { font-size: 1.1rem; margin-bottom: 28px; opacity: .92; }
.btn-lg { padding: 18px 48px; font-size: 1.1rem; }

.register-form { max-width: 480px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; text-align: left; }
.register-form label { display: flex; flex-direction: column; gap: 6px; font-size: .85rem; font-weight: 500; color: var(--white); }
.register-form input { width: 100%; padding: 14px 16px; border-radius: var(--radius); border: 2px solid transparent; background: var(--white); color: var(--navy-dark); font-family: var(--font-body); font-size: 1rem; }
.register-form input:focus { outline: none; border-color: var(--gold); }
.register-form input.invalid { border-color: #E2695A; }
.register-form .hp-field { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; opacity: 0; pointer-events: none; }
.register-form [hidden] { display: none !important; }
.register-form button[type="submit"] { align-self: center; }
.register-form button[type="submit"]:disabled { opacity: .7; cursor: not-allowed; }
.form-status { min-height: 1.3em; font-size: .9rem; text-align: center; color: var(--white); }
.form-status a { color: var(--gold); font-weight: 600; }

/* Success */
.success-page { min-height: 100vh; display: flex; align-items: center; }
.success-card { text-align: center; max-width: 560px; background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 48px 32px; }
.success-logo { width: 72px; height: 72px; margin: 0 auto 20px; }
.success-card h1 { font-family: var(--font-display); color: var(--navy); font-size: 1.6rem; margin-bottom: 16px; }
.success-card p { color: var(--muted); margin-bottom: 24px; }

@media (min-width: 768px) {
  .section { padding: 80px 0; }
  .section-title { font-size: 2.25rem; }
  .site-nav { display: flex; }
  .nav-toggle { display: none; }
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .marquee-orders .marquee-track img { height: 340px; }
  .gallery-reviews img { flex: 0 0 calc((100% - 24px) / 3); height: 420px; }
  .price-now { font-size: 2.6rem; }
  .about-grid { align-items: center; }
  .hero-bento.section { padding: 56px 0 60px; }
  .hero-heading { display: flex; flex-direction: row; justify-content: space-between; align-items: flex-end; gap: 24px; }
  .hero-heading h1 { font-size: 3rem; }
  .hero-tagline { font-size: 1rem; text-align: right; }
  .bento { grid-template-columns: repeat(4, 1fr); }
  .bento-stat, .bento-price { padding: 20px; }
  .bento-stat-num { font-size: 1.6rem; }
  .bento-price-now { font-size: 2.6rem; }
}
