/* P9: above-the-fold shell — дублирует ключевые правила из frontend/src/site.css (site-shell, mobile nav).
   P7: Inter Fallback — метрики близки к Inter, меньше CLS при font-display: swap.
   При правках layout-слоя обновлять оба места. */
@font-face {
  font-family: "Inter Fallback";
  src: local("Arial");
  size-adjust: 107.4%;
  ascent-override: 90%;
  descent-override: 22.4%;
  line-gap-override: 0%;
}

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

html {
  height: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100%;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: #fff;
  color: #0f172a;
  font-family: "Inter", "Inter Fallback", ui-sans-serif, system-ui, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.site-shell {
  display: flex;
  flex-direction: column;
  flex: 1 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
}

.site-shell > #main {
  flex: 1 0 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

:root {
  --site-header-height: 3.625rem;
  --mobile-bottom-nav-height: 4.25rem;
}

@media (min-width: 64rem) {
  :root {
    --site-header-height: 4rem;
    --mobile-bottom-nav-height: 0px;
  }
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  overflow-x: clip;
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.site-header__inner {
  margin-inline: auto;
  display: flex;
  max-width: 80rem;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1rem;
}

@media (min-width: 640px) {
  .site-header__inner {
    padding-inline: 1.5rem;
  }
}

@media (min-width: 64rem) {
  .site-header__inner {
    padding-inline: 2rem;
  }
}

.site-header img {
  height: 1.75rem;
  width: auto;
}

@media (min-width: 640px) {
  .site-header img {
    height: 2rem;
  }
}

.home-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.home-hero__inner {
  margin-inline: auto;
  max-width: 80rem;
  padding: 2.5rem 1rem 4rem;
}

@media (min-width: 640px) {
  .home-hero__inner {
    padding: 3.5rem 1.5rem 5rem;
  }
}

@media (min-width: 64rem) {
  .home-hero__inner {
    padding: 3.5rem 2rem 6rem;
  }
}

.home-hero h1 {
  margin: 1.5rem 0 0;
  font-size: 2.25rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.1;
  color: #002e67;
}

@media (min-width: 640px) {
  .home-hero h1 {
    font-size: 3rem;
  }
}

.home-hero__lead {
  margin-top: 1.25rem;
  font-size: 1.125rem;
  line-height: 1.625;
  color: #475569;
}

@media (min-width: 640px) {
  .home-hero__lead {
    font-size: 1.25rem;
  }
}

.mobile-bottom-nav {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 55;
  display: none;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: end;
  height: calc(var(--mobile-bottom-nav-height) + env(safe-area-inset-bottom, 0px));
  padding: 0 0.25rem env(safe-area-inset-bottom, 0px);
  background: #fff;
  border-top: 1px solid #e2e8f0;
  box-shadow: 0 -6px 24px rgba(0, 46, 103, 0.08);
}

@media (max-width: 63.999rem) {
  .mobile-bottom-nav {
    display: grid;
  }

  .site-shell {
    padding-bottom: calc(var(--mobile-bottom-nav-height) + env(safe-area-inset-bottom, 0px));
    overflow-x: clip;
  }
}

.mobile-bottom-nav__item,
.mobile-bottom-nav__call {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: #64748b;
  min-height: 3.5rem;
}

.mobile-bottom-nav__item {
  justify-content: center;
  gap: 0.2rem;
  padding: 0.4rem 0.15rem 0.5rem;
}

.mobile-bottom-nav__call {
  color: #002e67;
  justify-content: flex-end;
  gap: 0.15rem;
  padding: 0 0.15rem 0.45rem;
}

.mobile-bottom-nav__icon {
  width: 1.35rem;
  height: 1.35rem;
  flex-shrink: 0;
}

.mobile-bottom-nav__label {
  font-size: 0.65rem;
  font-weight: 600;
  line-height: 1.1;
}

.mobile-bottom-nav__call-fab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.25rem;
  height: 3.25rem;
  margin-top: -1.35rem;
  border-radius: 9999px;
  background: #002e67;
  color: #fff;
  box-shadow: 0 8px 20px rgba(0, 46, 103, 0.35);
}

.mobile-bottom-nav__call-icon {
  width: 1.35rem;
  height: 1.35rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
