:root {
  --red:        #be1e2d;
  --red-dark:   #960019;
  --red-light:  #e06070;
  --grey-900:   #1a1c1f;
  --grey-800:   #22252b;
  --grey-700:   #353840;
  --grey-500:   #6b7280;
  --grey-300:   #c4c8cf;
  --grey-100:   #f0f1f3;
  --white:      #ffffff;
}

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

html {
  scroll-behavior: smooth;
  height: 100%;
}

body {
  font-family: Inter, 'Segoe UI', system-ui, sans-serif;
  font-size: clamp(0.9rem, 1.4vw, 1.05rem);
  line-height: 1.65;
  color: var(--grey-800);
  background: var(--grey-100);
  height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* ─── HEADER ─────────────────────────────────── */

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 clamp(1.25rem, 5vw, 4rem);
  height: clamp(56px, 7vw, 72px);
  background: linear-gradient(135deg, var(--red), var(--red-light));
}

.brand {
  display: flex;
  gap: clamp(0.6rem, 1.5vw, 1.1rem);
  align-items: center;
  min-width: 0;
}

.logo {
  width: clamp(28px, 3.5vw, 44px);
  flex-shrink: 0;
}

.brand h1 {
  color: var(--white);
  font-size: clamp(0.99rem, 1.8vw, 1.29rem);
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.brand-surname {
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.brand p {
  color: var(--grey-300);
  font-size: clamp(1.025rem, 1.5vw, 1.175rem);
  margin-top: 2px;
  white-space: nowrap;
}

.header-phone {
  color: var(--white);
  font-size: clamp(0.85rem, 1.4vw, 1.05rem);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  padding: 0.3rem 0.8rem;
  border: 1px solid var(--red);
  border-radius: 6px;
  transition: background 0.2s, color 0.2s;
  flex-shrink: 0;
}

.header-phone:hover {
  background: var(--red);
}

nav {
  display: flex;
  gap: clamp(1rem, 3vw, 2.25rem);
  flex-shrink: 0;
}

nav a {
  color: var(--grey-300);
  text-decoration: none;
  font-size: clamp(0.75rem, 1.2vw, 0.9rem);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: color 0.2s;
}

nav a:hover {
  color: var(--red-light);
}

/* ─── PAGE WRAPPER ───────────────────────────── */

.page-content {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  margin-top: clamp(56px, 7vw, 72px);
}

/* ─── HERO ───────────────────────────────────── */

.hero {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: clamp(1.25rem, 2.5vw, 2rem) clamp(1.5rem, 8vw, 8rem);
  background:
    linear-gradient(155deg, #1f1b1e 0%, #33141b 55%, #1f1b1e 100%);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 75% 70% at 65% 55%, rgba(190, 30, 45, 0.14), transparent),
    radial-gradient(ellipse 45% 55% at 15% 25%, rgba(190, 30, 45, 0.09), transparent);
  pointer-events: none;
}

.overlay {
  position: relative;
  z-index: 5;
  max-width: 760px;
}

.overlay h2 {
  font-size: clamp(1.25rem, 3.3vw, 2.6rem);
  font-weight: 800;
  line-height: 1.1;
  color: var(--white);
  margin-bottom: clamp(0.6rem, 1.5vw, 1rem);
  letter-spacing: -0.025em;
}

/* ─── SPOILER (details / summary) ────────────── */

details {
  margin-top: 0.4rem;
}

summary {
  cursor: pointer;
  font-size: clamp(0.78rem, 1.2vw, 0.9rem);
  font-weight: 600;
  user-select: none;
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  transition: color 0.2s;
}

summary::-webkit-details-marker {
  display: none;
}

summary::before {
  content: '▶';
  font-size: 0.6em;
  display: inline-block;
  transition: transform 0.2s;
}

details[open] summary::before {
  transform: rotate(90deg);
}

.hero-details summary {
  color: var(--grey-300);
}

.hero-details summary:hover {
  color: var(--white);
}

.hero-details[open] summary {
  margin-bottom: 0.5rem;
}

.hero-details p {
  font-size: clamp(0.875rem, 1.5vw, 1rem);
  color: #adb3bc;
  line-height: 1.8;
  max-width: 620px;
}

.card details summary {
  color: var(--red-light);
}

.card details summary:hover {
  color: var(--red-dark);
}

.card details p {
  padding-top: 0.45rem;
  font-size: clamp(0.82rem, 1.4vw, 0.97rem);
  color: var(--grey-500);
  line-height: 1.65;
}

.cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  margin-top: clamp(0.9rem, 2vw, 1.5rem);
  padding: clamp(0.6rem, 1.5vw, 0.85rem) clamp(1.25rem, 3vw, 2rem);
  background: var(--red);
  color: var(--white);
  font-size: clamp(0.875rem, 1.6vw, 1.05rem);
  font-weight: 700;
  border-radius: 8px;
  text-decoration: none;
  letter-spacing: 0.03em;
  box-shadow: 0 4px 24px rgba(190, 30, 45, 0.45);
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}

.cta:hover {
  background: var(--red-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(190, 30, 45, 0.55);
}

/* ─── SERVICE CARDS ──────────────────────────── */

.cards {
  padding: clamp(0.9rem, 2vw, 1.5rem) clamp(1.5rem, 6vw, 6rem);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: clamp(0.75rem, 1.5vw, 1.25rem);
  background: var(--grey-100);
}

.card {
  padding: clamp(0.9rem, 1.8vw, 1.5rem);
  border-radius: 10px;
  background: var(--white);
  border-left: 4px solid var(--red-light);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.07);
  transition: transform 0.25s, box-shadow 0.25s;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.11);
}

.card h3 {
  font-size: clamp(0.9rem, 1.6vw, 1.05rem);
  font-weight: 700;
  color: var(--red-light);
  margin-bottom: 0;
  line-height: 1.3;
}

.hero-image {
  position: relative;
  z-index: 5;
  flex-shrink: 0;
  width: clamp(280px, 65%, 900px);
  align-self: center;
  overflow: hidden;
  border-radius: 18px;
}

.hero-image img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%),
              linear-gradient(to bottom, transparent 0%, black 8%, black 92%, transparent 100%);
  mask-composite: intersect;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%),
                      linear-gradient(to bottom, transparent 0%, black 8%, black 92%, transparent 100%);
  -webkit-mask-composite: source-in;
}

/* ─── FOOTER ─────────────────────────────────── */

footer {
  padding: clamp(0.75rem, 1.5vw, 1.25rem) clamp(1.5rem, 6vw, 6rem);
  text-align: center;
  background: var(--grey-900);
}

.phone {
  display: inline-block;
  padding: clamp(0.55rem, 1.2vw, 0.9rem) clamp(1.5rem, 4vw, 2.75rem);
  border-radius: 10px;
  font-size: clamp(0.95rem, 2.2vw, 1.5rem);
  font-weight: 800;
  text-decoration: none;
  color: var(--white);
  background: linear-gradient(135deg, var(--red), var(--red-light));
  letter-spacing: 0.02em;
  line-height: 1.5;
  box-shadow: 0 4px 20px rgba(190, 30, 45, 0.4);
  transition: opacity 0.2s, transform 0.2s;
}

.phone:hover {
  opacity: 0.9;
  transform: scale(1.03);
}

.footer-contacts {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(0.4rem, 1vw, 0.75rem);
}

.footer-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  color: var(--white);
  text-decoration: none;
  transition: transform 0.2s, opacity 0.2s;
}

.footer-icon:hover {
  transform: scale(1.15);
  opacity: 0.85;
}

.footer-icon:first-of-type {
  background: #25d366;
}

.footer-icon-telegram {
  background: none;
}

/* ─── RESPONSIVE ─────────────────────────────── */

@media (max-width: 1024px) {
  .header-phone {
    display: none;
  }
}

@media (max-width: 768px) {
  body {
    overflow: auto;
  }

  .header {
    height: auto;
    min-height: 56px;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
  }

  .page-content {
    margin-top: 0;
    padding-top: 110px;
  }

  nav {
    gap: 1.25rem;
  }

  .hero {
    flex: none;
    flex-direction: column;
    align-items: flex-start;
    padding: 1.5rem 1.25rem 1.75rem;
  }

  .overlay {
    max-width: 100%;
  }

  .hero-image {
    display: none;
  }
}

@media (max-width: 480px) {
  .header {
    padding: 0.75rem 1rem;
  }

  .brand h1 {
    white-space: normal;
    font-size: 1.01rem;
  }

  nav a {
    font-size: 0.78rem;
    letter-spacing: 0.02em;
  }

  .cards {
    grid-template-columns: 1fr;
  }

  .phone {
    padding: 0.4rem 0.9rem;
    font-size: 0.9rem;
  }
}
