/* ============================
   FONTS (Google Fonts, локально)
   Папка: /fonts рядом с styles/
   ============================ */

/* RUBIK — основной текст (Google Fonts: Rubik) */
@font-face {
  font-family: "Rubik";
  src: url("../fonts/Rubik-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Rubik";
  src: url("../fonts/Rubik-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Rubik";
  src: url("../fonts/Rubik-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* NUNITO SANS — заголовки и акценты (Google Fonts: Nunito Sans) */
@font-face {
  font-family: "Nunito Sans";
  src: url("../fonts/Nunito-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Nunito Sans";
  src: url("../fonts/Nunito-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* IBM PLEX MONO — цифры, координаты, код (Google Fonts: IBM Plex Mono) */
@font-face {
  font-family: "IBM Plex Mono";
  src: url("../fonts/IBMPlexMono-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ============================
   Переменные шрифтов проекта
   ============================ */

:root {
  --pfq-font-sans: "Rubik", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --pfq-font-accent: "Nunito Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --pfq-font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

/* Базовая типографика */
body {
  font-family: var(--pfq-font-sans);
}

h1,
h2,
h3,
.pfq-heading {
  font-family: var(--pfq-font-accent);
}

code,
kbd,
pre,
.pfq-mono {
  font-family: var(--pfq-font-mono);
}

/* ================================
   ЦВЕТА И ПЕРЕМЕННЫЕ (НОВЫЙ ДИЗАЙН)
   ================================ */
:root {
  /* Фон — светлый снежный день */
  --pfq-color-bg: #f3f4f6;
  --pfq-color-bg-soft: #e5f2ff;
  --pfq-color-bg-elevated: #ffffff;
  --pfq-color-border-soft: rgba(148, 163, 184, 0.4);

  /* Текст — тёмно-серый, читаемый */
  --pfq-color-text: #111827;
  --pfq-color-text-soft: #1f2937;
  --pfq-color-text-muted: #6b7280;

  /* Акценты — северное сияние + тёплый закат */
  --pfq-color-accent-ice: #0891b2;     /* бирюзовый лёд */
  --pfq-color-accent-deep: #047857;    /* еловый зелёный */
  --pfq-color-accent-warm: #f97316;    /* тёплый закат */

  --pfq-color-danger-ice: #b91c1c;

  --pfq-radius-lg: 26px;
  --pfq-radius-md: 18px;
  --pfq-radius-sm: 12px;

  --pfq-shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.16);
  --pfq-shadow-chip: 0 10px 25px rgba(15, 23, 42, 0.18);

  --pfq-header-height: 76px;
  --pfq-transition-fast: 0.18s ease-out;
  --pfq-transition-med: 0.3s ease-out;
}

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

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  font-family: "PolarFinText", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--pfq-color-text);
  background-color: var(--pfq-color-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

/* Ограничиваем ширину любых изображений на сайте */
.pfq-img {
  width: 100%;
  max-width: 350px;
  border-radius: var(--pfq-radius-md);
}

/* Убираем горизонтальный скролл */
html,
body {
  overflow-x: hidden;
}

/* ================================
   ОБЩИЕ ЭЛЕМЕНТЫ
   ================================ */
.pfq-body--nav-open {
  overflow: hidden;
}

.pfq-wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding-inline: 16px;
}

.pfq-main {
  padding-top: var(--pfq-header-height);
  background:
    radial-gradient(circle at 0 0, #e0f2fe 0, #e5f2ff 35%, #f3f4f6 70%, #e5e7eb 100%);
}

/* Заголовки и текст */
h1,
h2,
h3,
h4 {
  font-family: "PolarFinDisplay", "PolarFinText", system-ui, sans-serif;
  margin: 0;
}

p {
  margin: 0;
}

/* Кнопки */
.pfq-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0.9rem 1.8rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.96rem;
  line-height: 1.2;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition:
    background-color var(--pfq-transition-med),
    color var(--pfq-transition-med),
    box-shadow var(--pfq-transition-med),
    transform var(--pfq-transition-fast),
    border-color var(--pfq-transition-med);
}

.pfq-btn--primary {
  background: linear-gradient(135deg, #10b981, #0ea5e9);
  color: #f9fafb;
  box-shadow: 0 15px 40px rgba(16, 185, 129, 0.35);
}

.pfq-btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 20px 55px rgba(16, 185, 129, 0.55);
}

.pfq-btn--ghost {
  border-color: rgba(148, 163, 184, 0.7);
  background: radial-gradient(circle at 100% 0, #ffffff 0, #e5f2ff 80%);
  color: var(--pfq-color-text-soft);
}

.pfq-btn--ghost:hover {
  border-color: var(--pfq-color-accent-ice);
  color: var(--pfq-color-accent-ice);
  transform: translateY(-1px);
}

/* ================================
   HEADER (НОВЫЙ — СВЕТЛЫЙ)
   ================================ */
.pfq-header {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 1000;
  height: var(--pfq-header-height);
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.35);
}

.pfq-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

/* Лого */
.pfq-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--pfq-color-text-soft);
}

.pfq-logo__mark {
  width: 30px;
  height: 30px;
  border-radius: 40% 60% 55% 45%;
  background:
    radial-gradient(circle at 30% 10%, #e0f2fe 0, #bae6fd 35%, #7dd3fc 60%, #0ea5e9 100%);
  box-shadow: 0 0 0 1px rgba(226, 232, 240, 0.7), 0 0 30px rgba(59, 130, 246, 0.4);
}

.pfq-logo__text {
  font-family: "PolarFinDisplay", "PolarFinText", system-ui, sans-serif;
  font-size: 1.05rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.pfq-logo__accent {
  color: var(--pfq-color-accent-ice);
}

/* Навигация */
.pfq-nav {
  display: flex;
  align-items: center;
  gap: 20px;
}

.pfq-nav__list {
  display: flex;
  align-items: center;
  gap: 18px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.pfq-nav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding-inline: 6px;
  padding-block: 6px;
  font-size: 0.9rem;
  text-decoration: none;
  color: var(--pfq-color-text-muted);
  transition:
    color var(--pfq-transition-fast),
    opacity var(--pfq-transition-fast);
}

.pfq-nav__link::after {
  content: "";
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 0;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, #10b981, #0ea5e9, #f97316);
  opacity: 0;
  transform: scaleX(0.4);
  transform-origin: center;
  transition:
    opacity var(--pfq-transition-fast),
    transform var(--pfq-transition-fast);
}

.pfq-nav__link:hover {
  color: var(--pfq-color-text-soft);
}

.pfq-nav__link:hover::after {
  opacity: 1;
  transform: scaleX(1);
}

.pfq-nav__link--active {
  color: var(--pfq-color-accent-ice);
}

.pfq-nav__link--active::after {
  opacity: 1;
  transform: scaleX(1);
}

/* Бургер */
.pfq-nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.7);
  background: radial-gradient(circle at 0 0, #ffffff 0, #e5f2ff 85%);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 0;
  transition:
    border-color var(--pfq-transition-fast),
    box-shadow var(--pfq-transition-fast),
    background-color var(--pfq-transition-fast),
    transform var(--pfq-transition-fast);
}

.pfq-nav-toggle__bar {
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background-color: #111827;
  transition:
    transform var(--pfq-transition-fast),
    opacity var(--pfq-transition-fast);
}

.pfq-nav-toggle:hover {
  border-color: var(--pfq-color-accent-ice);
  box-shadow: 0 0 24px rgba(56, 189, 248, 0.35);
}

/* Состояние открытого меню */
.pfq-nav.pfq-nav--open .pfq-nav-toggle__bar:nth-child(1) {
  transform: translateY(5px) rotate(45deg);
}

.pfq-nav.pfq-nav--open .pfq-nav-toggle__bar:nth-child(2) {
  opacity: 0;
}

.pfq-nav.pfq-nav--open .pfq-nav-toggle__bar:nth-child(3) {
  transform: translateY(-5px) rotate(-45deg);
}

/* Скролл хедера */
.pfq-header--scrolled {
  background: rgba(255, 255, 255, 0.98);
  border-bottom-color: rgba(148, 163, 184, 0.7);
}

/* ================================
   FOOTER — КОНТРАСТНЫЙ ВЕЧЕРНИЙ ЛЁД
   ================================ */
.pfq-footer {
  border-top: 1px solid rgba(148, 163, 184, 0.35);
  background: radial-gradient(circle at 100% 0, #0b1120 0, #020617 55%, #020617 100%);
  padding-block: 2.5rem 1.8rem;
  margin-top: 4rem;
}

.pfq-footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr) minmax(0, 0.8fr);
  gap: 32px;
  align-items: flex-start;
}

.pfq-foot__brand p {
  color: #e5e7eb;
  font-size: 0.9rem;
  line-height: 1.7;
}

.pfq-foot__label {
  display: block;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: #9ca3af;
  margin-bottom: 4px;
}

.pfq-foot__link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  font-size: 0.9rem;
  color: #e5e7eb;
  transition:
    color var(--pfq-transition-fast),
    opacity var(--pfq-transition-fast);
}

.pfq-foot__link:hover {
  color: #bae6fd;
}

.pfq-foot__muted {
  font-size: 0.86rem;
  color: #9ca3af;
}

.pfq-foot__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.pfq-footer__bottom {
  margin-top: 2rem;
  border-top: 1px solid rgba(55, 65, 81, 0.9);
  padding-top: 1rem;
}

.pfq-foot__copy {
  font-size: 0.8rem;
  color: #9ca3af;
}

/* ================================
   АНИМАЦИИ REVEAL
   ================================ */
.pfq-reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity var(--pfq-transition-med),
    transform var(--pfq-transition-med);
}

.pfq-reveal--visible {
  opacity: 1;
  transform: translateY(0);
}

/* ================================
   АДАПТИВ
   ================================ */
@media (max-width: 960px) {
  :root {
    --pfq-header-height: 72px;
  }

  .pfq-footer__grid {
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
    row-gap: 24px;
  }
}

@media (max-width: 768px) {
  .pfq-header__inner {
    gap: 16px;
  }

  .pfq-nav__list {
    position: fixed;
    inset-inline: 0;
    top: var(--pfq-header-height);
    padding: 18px 18px 24px;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    background: radial-gradient(circle at 0 0, #ffffff 0, #e5f2ff 50%, #eff6ff 100%);
    border-bottom: 1px solid rgba(148, 163, 184, 0.5);
    transform: translateY(-110%);
    opacity: 0;
    pointer-events: none;
    transition:
      transform var(--pfq-transition-med),
      opacity var(--pfq-transition-med);
  }

  .pfq-nav.pfq-nav--open .pfq-nav__list {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .pfq-nav-toggle {
    display: inline-flex;
  }

  .pfq-nav__link {
    font-size: 0.95rem;
  }

  .pfq-footer__grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 540px) {
  .pfq-wrap {
    padding-inline: 14px;
  }

  .pfq-footer {
    padding-block: 2rem 1.6rem;
  }

  .pfq-foot__copy {
    text-align: left;
  }
}
