/* Refined header and footer presentation. */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  max-width: none;
  min-height: 86px;
  padding: 0 max(3.2%, calc((100vw - 1480px) / 2));
  gap: 22px;
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid rgba(18, 18, 18, .08);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .045);
  backdrop-filter: blur(14px);
}

header .brand { width: 164px; transition: transform .2s ease; }
header .brand .logo { display: block; width: 100%; height: auto; max-width: none; }
header .brand:hover { transform: translateY(-2px); }
header nav { gap: 20px; }
header nav a,
header nav button { position: relative; font-size: 13px; letter-spacing: .01em; }
header nav a::after,
header nav button::after {
  content: '';
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 3px;
  height: 2px;
  background: var(--red);
  transition: right .2s ease;
}
header nav a:hover::after,
header nav button:hover::after { right: 0; }
header .header-actions { gap: 10px; }
header .header-actions .btn {
  min-height: 40px;
  padding: 10px 14px;
  border-radius: 2px;
  letter-spacing: .035em;
}
header .header-actions .btn.outline { border-color: #c9c9c9; }

footer {
  position: relative;
  overflow: hidden;
  padding: 0 max(3.2%, calc((100vw - 1480px) / 2));
  background: linear-gradient(135deg, #171717 0%, #0d0d0d 72%);
  border-top: 4px solid var(--red);
}
footer::before {
  content: '';
  position: absolute;
  width: 360px;
  height: 360px;
  right: -190px;
  top: -210px;
  border: 1px solid rgba(235, 0, 20, .22);
  border-radius: 50%;
  box-shadow: 0 0 0 58px rgba(235, 0, 20, .025), 0 0 0 118px rgba(235, 0, 20, .018);
  pointer-events: none;
}
.footer-grid {
  position: relative;
  grid-template-columns: 1.7fr repeat(4, 1fr);
  gap: 44px;
  padding: 52px 0 42px;
}
.footer-grid > div:first-child { padding-right: 40px; border-right: 1px solid #2e2e2e; }
.footer-grid .footer-logo {
  width: 235px;
  max-width: 100%;
  margin: 0 0 22px;
  padding: 13px 17px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 14px 35px rgba(0, 0, 0, .22);
}
.footer-grid p { max-width: 285px; margin-top: 0; color: #bdbdbd; font-size: 14px; line-height: 1.65; }
.footer-grid h3 {
  position: relative;
  margin-bottom: 21px;
  color: #fff;
  font-size: 12px;
  letter-spacing: .08em;
}
.footer-grid h3::after { content: ''; display: block; width: 24px; height: 2px; margin-top: 10px; background: var(--red); }
.footer-grid button,
.footer-grid a:not(.footer-logo) {
  width: max-content;
  max-width: 100%;
  margin-bottom: 11px;
  color: #bdbdbd;
  font-size: 13px;
  line-height: 1.35;
  transition: color .18s ease, transform .18s ease;
}
.footer-grid button:hover,
.footer-grid a:not(.footer-logo):hover { color: #fff; transform: translateX(4px); }
.contact-bar {
  position: relative;
  align-items: center;
  margin-top: 0;
  padding: 20px 0 22px;
  border-top: 1px solid #303030;
  color: #aaa;
  font-size: 12px;
  letter-spacing: .015em;
}
.contact-bar a { color: #efefef; transition: color .18s ease; }
.contact-bar a:hover { color: var(--red); }
.contact-bar a:last-child {
  padding: 10px 14px;
  border: 1px solid #3a3a3a;
  border-radius: 3px;
  color: #fff;
}
.contact-bar a:last-child:hover { border-color: var(--red); background: var(--red); color: #fff; }

@media (max-width: 1150px) {
  header { min-height: 80px; padding-top: 0; padding-bottom: 0; gap: 14px; }
  header .brand { width: 152px; }
  header nav { gap: 16px; }
  header nav a,
  header nav button { font-size: 12px; }
  header .header-actions .btn { min-height: 39px; }
  .footer-grid { gap: 28px; }
}

@media (max-width: 800px) {
  header { min-height: 70px; padding: 0 5%; gap: 10px; }
  header .brand { width: 132px; }
  header .menu-toggle {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border: 1px solid #dedede;
    border-radius: 4px;
    background: #fff;
  }
  header nav {
    order: 5;
    flex-basis: 100%;
    margin-top: 2px;
    padding: 12px 16px 16px;
    background: #fff;
    border: 1px solid #ededed;
    border-radius: 7px;
    box-shadow: 0 18px 34px rgba(0, 0, 0, .09);
  }
  header nav a,
  header nav button { width: 100%; font-size: 15px; border-bottom: 1px solid #f1f1f1; text-align: left; }
  header nav a:last-child,
  header nav button:last-child { border-bottom: 0; }
  header nav a::after,
  header nav button::after { display: none; }
  header .header-actions { margin-left: auto; }
  header .header-actions .btn { min-height: 42px; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); gap: 34px 24px; padding: 42px 0 34px; }
  .footer-grid > div:first-child { grid-column: 1 / -1; padding: 0 0 30px; border-right: 0; border-bottom: 1px solid #2e2e2e; }
  .footer-grid p { max-width: 420px; }
  .contact-bar { gap: 14px 20px; }
  .contact-bar > * { width: calc(50% - 10px); }
  .contact-bar a:last-child { width: max-content; margin-left: auto; text-align: center; }
}

@media (max-width: 480px) {
  header .header-actions .btn { padding: 11px 12px; font-size: 10px; }
  header .brand { width: 128px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px 20px; }
  .footer-grid .footer-logo { width: 210px; }
  .contact-bar { display: grid; grid-template-columns: 1fr; gap: 12px; padding: 18px 0 22px; }
  .contact-bar > * { width: 100%; }
  .contact-bar a:last-child { width: 100%; margin: 4px 0 0; }
}
