/* ============================================================
   dvor.tomica.ru — стили (переписано с Тильды, 2026)
   Палитра оригинала: акценты #ff6600 / #f7a711 / #ffa51f,
   серые секции #f5f5f5 / #f0f0f0, линии #e6e6e6, шрифт Roboto
   ============================================================ */

:root {
  --accent: #ff6600;
  --amber: #f7a711;
  --amber-light: #ffa51f;
  --gray-bg: #f5f5f5;
  --gallery-bg: #f0f0f0;
  --line: #e6e6e6;
  --input-border: #525252;
  --text: #000000;
  --container: 1200px;
  --ease: cubic-bezier(0.19, 1, 0.22, 1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Roboto', Arial, sans-serif;
  font-weight: 300;
  color: var(--text);
  background: #fff;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Кнопки ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 60px;
  padding: 0 60px;
  border: none;
  border-radius: 30px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.btn:hover { opacity: 0.85; text-decoration: none; transform: scale(1.02); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-white { background: #fff; color: #000; }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background-image:
    linear-gradient(to bottom, rgba(0, 0, 0, 0.60), rgba(0, 0, 0, 0.80)),
    url('../img/hero.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  padding: 60px 20px;
}

.hero h1 {
  max-width: 900px;
  color: #fff;
  font-size: 56px;
  font-weight: 600;
  line-height: 1.15;
  margin-bottom: 60px;
}

.hero-actions {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- Секции и заголовки ---------- */

.section { padding: 90px 0; }

.section-title {
  font-size: 30px;
  font-weight: 600;
  text-transform: uppercase;
  text-align: center;
  line-height: 1.3;
}

.overline {
  display: block;
  text-align: center;
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  margin-bottom: 20px;
}

/* ---------- «Что будет на празднике» — 4 колонки ---------- */

.features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  margin-top: 70px;
}

.feature h3 {
  font-size: 20px;
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 24px;
}

.feature hr {
  border: none;
  border-top: 1px solid var(--line);
  margin-bottom: 24px;
}

.feature p { font-size: 19px; line-height: 1.5; }

/* ---------- Карта ---------- */

.map-section { background: var(--gray-bg); }
.map-section .overline { margin-top: 45px; }
.map-section .section-title { margin-bottom: 45px; }
.map-frame {
  width: 100%;
  height: 385px;
  border: 0;
  display: block;
}

/* ---------- Фотоотчёты (плитка карточек) ---------- */

.photo-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 70px;
}

.photo-card {
  position: relative;
  display: block;
  aspect-ratio: 5 / 7;            /* ratio 0.714 как в оригинале */
  overflow: hidden;
  border-radius: 0;
}

.photo-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s ease-in-out;
}

.photo-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.10), rgba(0, 0, 0, 0.60));
  transition: opacity 0.25s ease-in-out;
}

.photo-card:hover img { transform: scale(1.05); }
.photo-card:hover::after { opacity: 0.8; }

.photo-card .caption {
  position: absolute;
  left: 30px;
  right: 30px;
  bottom: 30px;
  z-index: 1;
  color: #fff;
  transition: transform 0.25s ease-in-out;
}

.photo-card:hover .caption { transform: translateY(-10px); }

.photo-card .caption h3 {
  font-size: 24px;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 8px;
}

.photo-card .caption time {
  font-size: 18px;
  font-weight: 300;
}

/* ---------- Форма заявки ---------- */

.form-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 100px 20px;
}

.form-wrap {
  max-width: 620px;
  margin: 0 auto;
  text-align: center;
}

.form-wrap .section-title { margin-bottom: 30px; }

.form-lead {
  font-size: 20px;
  line-height: 1.6;
  margin-bottom: 60px;
}

.form-field {
  width: 100%;
  height: 56px;
  margin-bottom: 20px;
  padding: 0 18px;
  border: 1px solid var(--input-border);
  border-radius: 0;
  background: #fff;
  font-family: inherit;
  font-size: 16px;
  font-weight: 300;
  color: #000;
}

textarea.form-field {
  height: 140px;
  padding: 16px 18px;
  resize: vertical;
}

.form-field::placeholder { color: rgba(0, 0, 0, 0.5); }
.form-field:focus { outline: 1px solid var(--input-border); }

.form-submit {
  width: 100%;
  height: 56px;
  border: none;
  border-radius: 0;
  background: var(--amber);
  color: #fff;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.25s ease;
}
.form-submit:hover { opacity: 0.85; }

.form-note {
  margin-top: 25px;
  font-size: 13px;
  color: #666;
}

/* ---------- Промо-блок провайдера ---------- */

.promo {
  position: relative;
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background-image:
    linear-gradient(to bottom, rgba(77, 77, 77, 0.80), rgba(66, 66, 66, 0.20)),
    url('../img/promo-tomica.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  padding: 60px 20px;
}

.promo h2 {
  max-width: 820px;
  color: #fff;
  font-size: 46px;
  font-weight: 600;
  line-height: 1.25;
}

/* ---------- Футер-кнопка ---------- */

.footer-cta {
  padding: 110px 20px;
  display: flex;
  justify-content: center;
}

.footer-cta .btn-giant {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  min-height: 160px;
  padding: 50px 110px;
  border-radius: 80px;
  background: var(--amber-light);
  color: #000;
  font-family: inherit;
  font-size: 36px;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.footer-cta .btn-giant:hover { opacity: 0.85; text-decoration: none; transform: scale(1.01); }
.btn-giant svg { flex-shrink: 0; }

/* ---------- Страницы фотоотчётов ---------- */

.page-title {
  font-size: 40px;
  font-weight: 600;
  text-align: center;
  padding: 70px 20px 0;
}

.gallery-divider {
  max-width: 66%;
  margin: 45px auto;
  border: none;
  height: 1px;
  background: linear-gradient(to right, transparent, #000, transparent);
  opacity: 0.2;
}

.gallery {
  background: var(--gallery-bg);
  padding: 60px 0;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.gallery-grid a {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  cursor: zoom-in;
}

.gallery-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s ease-in-out;
}
.gallery-grid a:hover img { transform: scale(1.03); }

.album-link {
  padding: 55px 20px 70px;
  text-align: center;
  font-size: 20px;
  line-height: 1.6;
}

.album-link a {
  font-weight: 400;
  word-break: break-all;
}

/* ---------- Страницы камер ---------- */

.camera-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

.camera-page h1 {
  font-size: 36px;
  font-weight: 600;
  margin-bottom: 50px;
}

.camera-frame-wrap {
  width: 100%;
  max-width: 840px;
  aspect-ratio: 16 / 9;
  background: #000;
}

.camera-frame-wrap iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.back-link {
  margin-top: 50px;
  font-size: 15px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #000;
}
.back-link:hover { color: var(--accent); text-decoration: none; }

/* ---------- Лайтбокс ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.92);
  cursor: zoom-out;
}

.lightbox.open { display: flex; }

.lightbox img {
  max-width: 92vw;
  max-height: 90vh;
  object-fit: contain;
  cursor: default;
}

.lightbox-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 56px;
  height: 56px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 28px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}
.lightbox-btn:hover { background: rgba(255, 255, 255, 0.3); }
.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  transform: none;
}

/* ---------- Анимации появления (как fadeinup у Тильды) ----------
   Скрытое состояние включается только при работающем JS (класс .js
   на <html> ставит main.js): без JS весь контент сразу виден. */

.js .reveal {
  opacity: 0;
  transform: translate(0, 100px);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
}

.js .reveal.reveal-fade { transform: none; }

.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero, .promo { background-attachment: scroll; }
}

/* ---------- Адаптив ---------- */

@media (max-width: 980px) {
  .hero h1 { font-size: 40px; }
  .features { grid-template-columns: repeat(2, 1fr); gap: 32px; }
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 640px) {
  .section { padding: 60px 0; }
  .hero h1 { font-size: 30px; margin-bottom: 40px; }
  .btn { padding: 0 34px; }
  .features { grid-template-columns: 1fr; gap: 40px; }
  .photo-cards { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .promo h2 { font-size: 30px; }
  .footer-cta { padding: 60px 20px; }
  .footer-cta .btn-giant { padding: 30px 40px; min-height: 100px; font-size: 22px; border-radius: 50px; }
  .page-title { font-size: 28px; }
  .camera-page h1 { font-size: 26px; }
  .hero, .promo { background-attachment: scroll; }
}
