/* ==========================================================================
   StilRU (Стиль РУ) - Component & Section Layouts (sections.css)
   Milestone 2: UI Design System & Modular CSS
   Header, Hero, Services Bento Grid, About, Contacts (Yandex Maps), Footer,
   Floating Action Buttons & Cookie Consent Banner
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. SITE HEADER & NAVIGATION (.site-header)
   -------------------------------------------------------------------------- */
.site-header {
  position: fixed;
  z-index: var(--z-header);
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: rgba(10, 13, 20, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  transition: background 250ms ease, border-color 250ms ease, box-shadow 250ms ease;
}

.site-header.is-scrolled {
  background: rgba(10, 13, 20, 0.94);
  border-bottom-color: var(--line-cyan);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo-icon {
  width: 36px;
  height: 36px;
  background: var(--accent-cyan-subtle);
  border: 1px solid var(--line-cyan);
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  color: var(--accent-cyan);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.25rem;
  line-height: 1.1;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.brand-name span {
  color: var(--accent-cyan);
}

.brand-tagline {
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-link {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-muted);
  position: relative;
  transition: color 200ms ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--accent-cyan);
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent-cyan);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 250ms cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-link:hover::after,
.nav-link.active::after {
  transform: scaleX(1);
  transform-origin: left;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.header-phone {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-main);
  transition: color 200ms ease;
}

.header-phone:hover {
  color: var(--accent-cyan);
}

.header-phone-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent-cyan-subtle);
  color: var(--accent-cyan);
  display: grid;
  place-items: center;
}

/* --------------------------------------------------------------------------
   2. HERO SECTION (.hero)
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  padding-top: var(--header-height);
  overflow: hidden;
  background: var(--bg-obsidian);
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: var(--z-below);
}

.hero-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: brightness(0.45) contrast(1.15);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(10, 13, 20, 0.85) 0%, rgba(10, 13, 20, 0.65) 50%, rgba(10, 13, 20, 0.98) 100%),
    radial-gradient(circle at 80% 20%, rgba(0, 229, 255, 0.18) 0%, transparent 60%);
}

.hero-inner {
  position: relative;
  z-index: var(--z-normal);
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 48px;
  align-items: center;
  padding-block: 60px;
}

.hero-title {
  font-size: clamp(2.5rem, 5.2vw, 4.5rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}

.hero-subtitle {
  font-size: clamp(1.05rem, 1.8vw, 1.25rem);
  line-height: 1.6;
  color: var(--text-muted);
  margin-bottom: 36px;
  max-width: 580px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-num {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 2.5vw, 2.4rem);
  font-weight: 900;
  color: var(--accent-cyan);
  line-height: 1;
}

.stat-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 6px;
}

/* Quick Contact / Badge Card Widget in Hero */
.hero-card-widget {
  background: var(--bg-surface);
  border: 1px solid var(--line-cyan);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-card), var(--shadow-glow);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.hero-widget-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-widget-title svg {
  color: var(--accent-cyan);
}

.hero-widget-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: var(--accent-cyan-subtle);
  border: 1px solid var(--line-cyan);
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent-cyan);
  width: fit-content;
}

.hero-widget-badge::before {
  content: "";
  width: 6px;
  height: 6px;
  background: var(--accent-cyan);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent-cyan);
}

.hero-widget-text {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* --------------------------------------------------------------------------
   3. SERVICES SECTION & BENTO GRID (.services, .services-grid)
   -------------------------------------------------------------------------- */
.services {
  background: var(--bg-obsidian);
}

.section-header {
  margin-bottom: 48px;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 16px;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
}

/* Bento Card Element */
.bento-card {
  position: relative;
  background: var(--bg-surface);
  border: 1px solid var(--line-subtle);
  border-radius: var(--radius-lg);
  padding: 32px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 300ms cubic-bezier(0.16, 1, 0.3, 1);
}

.bento-card:hover {
  border-color: var(--line-cyan-strong);
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4), 0 0 20px rgba(0, 229, 255, 0.15);
}

/* Bento Grid Column Spans for 8 Advertising Directions */
.bento-card:nth-child(1) { grid-column: span 8; } /* Наружная реклама - Featured Hero Card */
.bento-card:nth-child(2) { grid-column: span 4; } /* Реклама на транспорте */
.bento-card:nth-child(3) { grid-column: span 4; } /* Таблички и стенды */
.bento-card:nth-child(4) { grid-column: span 4; } /* Широкоформатная печать */
.bento-card:nth-child(5) { grid-column: span 4; } /* Дизайн */
.bento-card:nth-child(6) { grid-column: span 4; } /* Фрезеровка */
.bento-card:nth-child(7) { grid-column: span 4; } /* Полиграфия */
.bento-card:nth-child(8) { grid-column: span 4; } /* Размещение рекламы */

.bento-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
}

.bento-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: var(--accent-cyan-subtle);
  border: 1px solid var(--line-cyan);
  color: var(--accent-cyan);
  display: grid;
  place-items: center;
  transition: background 250ms ease, border-color 250ms ease;
}

.bento-card:hover .bento-icon {
  background: rgba(0, 229, 255, 0.15);
  border-color: var(--accent-cyan);
}

.bento-badge {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  border: 1px solid var(--line-subtle);
}

.bento-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-main);
}

.bento-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 24px;
}

.bento-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--accent-cyan);
  margin-top: auto;
}

.bento-link svg {
  transition: transform 200ms ease;
}

.bento-card:hover .bento-link svg {
  transform: translateX(5px);
}

/* --------------------------------------------------------------------------
   4. ABOUT SECTION (.about-section, .about-grid)
   -------------------------------------------------------------------------- */
.about-section {
  background: var(--bg-surface);
  border-block: 1px solid var(--line-subtle);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.about-content p {
  margin-bottom: 20px;
  font-size: 1.02rem;
  color: var(--text-muted);
}

.about-features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 32px;
}

.feature-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.feature-icon {
  width: 24px;
  height: 24px;
  color: var(--accent-cyan);
  flex-shrink: 0;
  margin-top: 2px;
}

.feature-text {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-main);
}

.about-metrics {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.about-metric-card {
  background: var(--bg-card);
  border: 1px solid var(--line-subtle);
  border-radius: var(--radius-md);
  padding: 24px 28px;
  display: flex;
  align-items: center;
  gap: 24px;
  transition: border-color 200ms ease, transform 200ms ease;
}

.about-metric-card:hover {
  border-color: var(--line-cyan);
  transform: translateX(4px);
}

.metric-num {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--accent-cyan);
  line-height: 1;
  min-width: 90px;
}

.metric-info h4 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--text-main);
}

.metric-info p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
}

/* --------------------------------------------------------------------------
   5. CONTACT SECTION & MAP (.contact-section, .contacts-grid)
   -------------------------------------------------------------------------- */
.contact-section {
  background: var(--bg-obsidian);
}

.contacts-grid {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 48px;
  align-items: stretch;
}

.contacts-info {
  background: var(--bg-surface);
  border: 1px solid var(--line-subtle);
  border-radius: var(--radius-lg);
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.contact-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 24px;
  margin-bottom: 32px;
}

.contact-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.contact-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent-cyan-subtle);
  border: 1px solid var(--line-cyan);
  color: var(--accent-cyan);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.contact-details h4 {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.contact-details p,
.contact-details a {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-main);
  margin: 0;
}

.contact-details a:hover {
  color: var(--accent-cyan);
}

/* Working Hours Grid */
.working-hours {
  background: var(--bg-card);
  border: 1px solid var(--line-subtle);
  border-radius: var(--radius-md);
  padding: 20px 24px;
}

.working-hours-title {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-cyan);
  margin-bottom: 12px;
}

.working-hours-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  font-size: 0.88rem;
}

.working-hours-item span:first-child {
  color: var(--text-muted);
  display: block;
}

.working-hours-item span:last-child {
  font-weight: 700;
  color: var(--text-main);
}

/* Yandex Maps Container */
.map-container {
  width: 100%;
  min-height: 460px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line-subtle);
  background: var(--bg-surface);
  position: relative;
}

.map-iframe {
  width: 100%;
  height: 100%;
  min-height: 460px;
  border: 0;
  filter: contrast(0.95) saturate(0.9);
}

/* --------------------------------------------------------------------------
   6. SITE FOOTER (.site-footer)
   -------------------------------------------------------------------------- */
.site-footer {
  background: #06080E;
  border-top: 1px solid var(--line-subtle);
  padding-block: 60px 30px;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.2fr;
  gap: 40px;
  margin-bottom: 48px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer-brand p {
  font-size: 0.88rem;
  color: var(--text-muted);
  max-width: 320px;
}

.footer-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 16px;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-link {
  color: var(--text-muted);
  transition: color 200ms ease;
}

.footer-link:hover {
  color: var(--accent-cyan);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.8rem;
}

.legal-disclaimer {
  font-size: 0.76rem;
  color: var(--text-dim);
}

/* --------------------------------------------------------------------------
   7. FLOATING ACTION BUTTONS (.floating-actions, .floating-phone, .back-to-top)
   -------------------------------------------------------------------------- */
.floating-actions {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: var(--z-floating);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.float-btn,
.floating-phone {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 1px solid var(--line-cyan);
  color: var(--accent-cyan);
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  transition: all 250ms ease;
  text-decoration: none;
}

.float-btn:hover,
.floating-phone:hover {
  background: var(--accent-cyan);
  color: var(--bg-obsidian);
  transform: translateY(-3px) scale(1.05);
  box-shadow: var(--shadow-glow);
}

.floating-phone,
.float-phone {
  animation: pulse-glow 3s infinite;
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0, 229, 255, 0.4); }
  50% { box-shadow: 0 0 0 14px rgba(0, 229, 255, 0); }
}

.back-to-top {
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 250ms ease;
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* --------------------------------------------------------------------------
   8. COOKIE CONSENT BANNER (.cookie-banner)
   -------------------------------------------------------------------------- */
.cookie-banner {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: var(--z-banner);
  max-width: 420px;
  background: var(--bg-surface);
  border: 1px solid var(--line-cyan);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  gap: 14px;
  transform: translateY(140%);
  opacity: 0;
  transition: transform 400ms cubic-bezier(0.16, 1, 0.3, 1), opacity 400ms ease;
}

.cookie-banner.is-active {
  transform: translateY(0);
  opacity: 1;
}

.cookie-text {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.cookie-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}
