:root {
  --bg: #0a0705;
  --bg-2: #14100c;
  --ember: #ff6a00;
  --amber: #ffb347;
  --flame-red: #ff3d00;
  --text: #f5ede4;
  --muted: #b8a996;
  --maxw: 1080px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

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

section, footer { padding: 72px 0; }

/* Кнопка */
.btn {
  display: inline-block;
  padding: 16px 34px;
  border-radius: 999px;
  font-size: 1.05rem;
  font-weight: 700;
  text-decoration: none;
  color: #1a0d00;
  background: linear-gradient(135deg, var(--amber), var(--ember) 55%, var(--flame-red));
  box-shadow: 0 0 24px rgba(255, 106, 0, 0.45);
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 40px rgba(255, 106, 0, 0.7);
}

/* Hero */
#hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  text-align: center;
}
.hero__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 60% at 50% 100%, rgba(255, 61, 0, 0.55), transparent 70%),
    radial-gradient(50% 50% at 50% 40%, rgba(255, 106, 0, 0.35), transparent 70%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
  animation: flamePulse 6s ease-in-out infinite alternate;
}
@keyframes flamePulse {
  from { opacity: .8; transform: scale(1); }
  to   { opacity: 1;  transform: scale(1.05); }
}
.hero__inner { position: relative; }
.hero__title {
  font-size: clamp(2.8rem, 9vw, 5.5rem);
  letter-spacing: .04em;
  text-shadow: 0 0 30px rgba(255, 106, 0, 0.6);
}
.hero__subtitle {
  margin: 14px 0 34px;
  font-size: clamp(1.1rem, 3.4vw, 1.6rem);
  color: var(--muted);
}

/* Огонёк вместо точки над «i» (буква бесточечная «ı», пламя = её точка) */
.hero__i { position: relative; display: inline-block; }
.hero__i .flame {
  position: absolute;
  left: 50%;
  margin-left: -0.10em;
  top: 0.39em;
  width: 0.12em;
  height: 0.22em;
  border-radius: 0 50% 50% 50%;
  background: linear-gradient(to top left,
    #ff2a00 0%, #ff6a00 42%, #ffb347 72%, #fff3b3 100%);
  transform: rotate(45deg);
  transform-origin: 50% 85%;
  filter: drop-shadow(0 0 6px rgba(255, 106, 0, 0.9));
  animation: flameDance 1s ease-in-out infinite alternate;
}
/* Внутреннее яркое ядро пламени */
.hero__i .flame::before {
  content: "";
  position: absolute;
  inset: 24% 26% 8% 26%;
  border-radius: 0 50% 50% 50%;
  background: linear-gradient(to top left, #ff8a00, #ffe07a 60%, #fff7d6);
}
@keyframes flameDance {
  0%   { transform: rotate(45deg) scale(1, 1);        opacity: .92; }
  50%  { transform: rotate(45deg) scale(1.08, 0.9);   opacity: 1;   }
  100% { transform: rotate(45deg) scale(0.94, 1.1);   opacity: .88; }
}

.section-title {
  font-size: clamp(1.6rem, 5vw, 2.4rem);
  text-align: center;
  margin-bottom: 36px;
  text-shadow: 0 0 20px rgba(255, 106, 0, 0.35);
}
#about { background: var(--bg-2); }
.about__text {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
  font-size: 1.15rem;
  color: var(--muted);
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.card {
  background: var(--bg-2);
  border: 1px solid rgba(255, 106, 0, 0.25);
  border-radius: 16px;
  padding: 28px 24px;
  text-align: center;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--ember);
  box-shadow: 0 0 30px rgba(255, 106, 0, 0.3);
}
.card__icon { font-size: 2.4rem; margin-bottom: 12px; }
.card__title { margin-bottom: 10px; font-size: 1.25rem; }
.card__text { color: var(--muted); }

.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.gallery__tile {
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: var(--muted);
  font-size: .95rem;
  background:
    repeating-linear-gradient(45deg, rgba(255,106,0,.08) 0 12px, transparent 12px 24px),
    var(--bg-2);
  border: 1px dashed rgba(255, 106, 0, 0.35);
}
.gallery__note {
  margin-top: 18px;
  text-align: center;
  color: var(--muted);
  font-size: .95rem;
}

#contact {
  background: var(--bg-2);
  text-align: center;
}
.contact__text { color: var(--muted); margin-bottom: 26px; }
.contact__meta { margin-top: 30px; color: var(--muted); font-size: .9rem; }

/* Плавное появление секций */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* Планшет */
@media (max-width: 860px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
}

/* Телефон */
@media (max-width: 560px) {
  section, footer { padding: 52px 0; }
  .cards { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  #hero { min-height: 80vh; }
}

/* Уважать системную настройку «меньше движения» */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero__bg { animation: none; }
  .hero__title .flame { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .card { transition: none; }
}
