/* ===========================
   GLOBAL VARIABLES & RESETS
   =========================== */

@font-face {
  font-family: "SnowLineSans";
  src: url("../fonts/Montserrat-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "SnowLineSans";
  src: url("../fonts/Montserrat-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

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

@font-face {
  font-family: "SnowLineMono";
  src: url("../fonts/RobotoMono-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  /* ЛЕДЯНАЯ СВЕТЛАЯ ПАЛИТРА */
  --sg-bg: #e7f3ff;
  --sg-bg-mid: #d4e4f7;
  --sg-bg-deep: #bed3f2;

  --sg-ice-line: rgba(160, 196, 238, 0.6);

  --sg-surface: #ffffff;
  --sg-surface-soft: rgba(255, 255, 255, 0.88);

  --sg-accent: #0fa9c5;
  --sg-accent-soft: #37c9de;
  --sg-accent-strong: #0982a1;

  --sg-text: #17263f;
  --sg-text-soft: #3a4d6e;
  --sg-text-muted: #657898;

  --sg-danger: #ff6672;

  --sg-radius-lg: 1.9rem;
  --sg-radius-md: 1.2rem;
  --sg-radius-pill: 999px;

  --sg-shadow-soft: 0 18px 45px rgba(64, 101, 150, 0.25);
  --sg-shadow-glow: 0 22px 60px rgba(12, 120, 172, 0.25);

  --sg-header-height: 80px;

  --sg-transition-fast: 140ms ease-out;
  --sg-transition-med: 210ms ease-out;
  --sg-transition-slow: 340ms cubic-bezier(0.22, 0.61, 0.36, 1);

  --sg-border-subtle: 1px solid rgba(152, 188, 227, 0.6);
}

/* ===========================
   RESET & BASE
   =========================== */

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

html {
  scroll-behavior: smooth;
}

body.sg-body {
  margin: 0;
  min-height: 100vh;
  font-family: "SnowLineSans", system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  color: var(--sg-text);
  background:
    radial-gradient(circle at 10% 0%, #ffffff 0, #e9f4ff 40%, transparent 70%),
    radial-gradient(circle at 90% 0%, #f7fbff 0, #dce9ff 45%, transparent 72%),
    linear-gradient(180deg, var(--sg-bg) 0, var(--sg-bg-mid) 40%, var(--sg-bg-deep) 100%);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  position: relative;
}

/* ледяные трещинки поверх фона */
body.sg-body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    repeating-linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.9) 0 1px,
      transparent 1px 10px
    ),
    repeating-linear-gradient(
      45deg,
      rgba(171, 200, 236, 0.7) 0 1px,
      transparent 1px 14px
    );
  opacity: 0.55;
  mix-blend-mode: screen;
  z-index: -1;
}

/* ледяные пятна / «сколы» */
body.sg-body::after {
  content: "";
  position: fixed;
  inset: -30px;
  pointer-events: none;
  background:
    radial-gradient(circle at 15% 80%, rgba(255, 255, 255, 0.8), transparent 60%),
    radial-gradient(circle at 85% 25%, rgba(255, 255, 255, 0.85), transparent 60%),
    radial-gradient(circle at 40% 10%, rgba(217, 235, 255, 0.9), transparent 60%);
  mix-blend-mode: multiply;
  opacity: 0.9;
  z-index: -2;
}

img {
  display: block;
  height: auto;
}

/* Лэйаут */

.sg-shell {
  width: min(1120px, 100% - 3rem);
  margin-inline: auto;
}

/* ===========================
   HEADER & NAV
   =========================== */

.sg-header {
  position: fixed;
  inset-inline: 0;
  top: 0;
  height: var(--sg-header-height);
  z-index: 40;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  background: linear-gradient(
    120deg,
    rgba(255, 255, 255, 0.94),
    rgba(235, 245, 255, 0.95)
  );
  border-bottom: 1px solid rgba(160, 195, 233, 0.7);
  box-shadow: 0 12px 28px rgba(128, 165, 208, 0.2);
}

.sg-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 1.5rem;
}

.sg-logo {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  text-decoration: none;
  color: var(--sg-text);
}

.sg-logo__mark {
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 0.9rem;
}

.sg-logo__sub {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--sg-text-muted);
}

/* Навигация — десктоп */

.sg-nav {
  display: flex;
}

.sg-nav__list {
  display: flex;
  align-items: center;
  gap: 1.8rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sg-nav__link {
  position: relative;
  text-decoration: none;
  color: var(--sg-text-soft);
  font-size: 0.86rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding-block: 0.2rem;
  transition:
    color var(--sg-transition-med);
}

.sg-nav__link::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -0.28rem;
  width: 0;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--sg-accent), var(--sg-accent-soft));
  box-shadow: 0 0 8px rgba(15, 169, 197, 0.7);
  transform: translateX(-50%);
  transition: width var(--sg-transition-med);
}

.sg-nav__link:hover,
.sg-nav__link:focus-visible {
  color: var(--sg-accent-strong);
}

.sg-nav__link:hover::after,
.sg-nav__link:focus-visible::after {
  width: 100%;
}

.sg-nav__link--active {
  color: var(--sg-accent-strong);
}

.sg-nav__link--active::after {
  width: 100%;
}

/* Бургер */

.sg-nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(132, 171, 214, 0.9);
  background: radial-gradient(circle at 30% 0%, #ffffff, #d4e6fb);
  padding: 0;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  transition:
    box-shadow var(--sg-transition-med),
    transform var(--sg-transition-fast),
    border-color var(--sg-transition-med),
    background 200ms ease-out;
}

.sg-nav-toggle__bar {
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: var(--sg-text-soft);
  transition:
    transform var(--sg-transition-med),
    opacity var(--sg-transition-med),
    background var(--sg-transition-med);
}

.sg-nav-toggle:hover {
  box-shadow: 0 0 0 1px rgba(151, 189, 229, 0.9),
    0 0 18px rgba(9, 130, 167, 0.55);
  transform: translateY(-1px);
}

/* Состояние открытого бургера */

.sg-header--nav-open .sg-nav-toggle__bar:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

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

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

/* Заголовок при скролле — лёгкая тень */

.sg-header--scrolled {
  box-shadow: 0 14px 32px rgba(128, 165, 208, 0.38);
}

/* ===========================
   MAIN & SECTIONS
   =========================== */

.sg-main {
  padding-top: calc(var(--sg-header-height) + 1.6rem);
}

.sg-section {
  position: relative;
  padding-block: 5rem;
}

/* ===========================
   BUTTONS
   =========================== */

.sg-btn {
  --sg-btn-border: rgba(146, 184, 224, 0.7);

  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 210px;
  padding: 0.9rem 1.6rem;
  border-radius: var(--sg-radius-pill);
  border: 1px solid var(--sg-btn-border);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  overflow: hidden;
  transition:
    transform var(--sg-transition-fast),
    box-shadow var(--sg-transition-med),
    border-color var(--sg-transition-med),
    background var(--sg-transition-med),
    color var(--sg-transition-med);
}

.sg-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 0 0, rgba(255, 255, 255, 0.6), transparent 60%);
  opacity: 0;
  transition:
    opacity var(--sg-transition-med),
    transform var(--sg-transition-med);
}

.sg-btn:hover::before {
  opacity: 1;
  transform: translateX(40%);
}

.sg-btn:hover {
  transform: translateY(-1px);
}

.sg-btn--primary {
  background: linear-gradient(135deg, #0fa9c5, #1bbee0);
  color: #f5fbff;
  box-shadow: var(--sg-shadow-glow);
  border-color: rgba(8, 131, 161, 0.7);
}

.sg-btn--primary:hover {
  box-shadow: 0 0 0 1px rgba(7, 118, 146, 0.9),
    0 20px 38px rgba(9, 130, 167, 0.55);
}

.sg-btn--ghost {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.85),
    rgba(232, 244, 255, 0.98)
  );
  color: var(--sg-text-soft);
}

/* ===========================
   PILLS & DOTS
   =========================== */

.sg-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.3rem 0.9rem;
  border-radius: var(--sg-radius-pill);
  border: 1px solid rgba(152, 188, 227, 0.85);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sg-text-muted);
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.95),
    rgba(232, 244, 255, 0.98)
  );
}

.sg-dot {
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  margin-right: 0.5rem;
  background: radial-gradient(circle, #ffffff 0, var(--sg-accent-soft) 60%, #0e3746 100%);
  box-shadow: 0 0 10px rgba(15, 169, 197, 0.9);
}

/* ===========================
   GENERIC PHOTO CONSTRAINTS
   =========================== */

.sg-photo {
  width: 100%;
  max-width: 350px;
  border-radius: 1.5rem;
  border: 1px solid rgba(157, 193, 232, 0.9);
  box-shadow: var(--sg-shadow-soft);
  object-fit: cover;
}

/* ===========================
   REVEAL ANIMATION
   =========================== */

.sg-reveal {
  opacity: 0;
  transform: translateY(26px) scale(0.99);
  transition:
    opacity var(--sg-transition-slow),
    transform var(--sg-transition-slow);
}

.sg-reveal.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* ===========================
   FOOTER
   =========================== */

.sg-footer {
  margin-top: 2rem;
  padding: 3rem 0 2.2rem;
  background: linear-gradient(
    180deg,
    #d5e4f9 0,
    #e3efff 45%,
    #f5f9ff 100%
  );
  border-top: 1px solid rgba(162, 196, 234, 0.85);
}

.sg-footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 2.1fr) repeat(3, minmax(0, 1fr));
  gap: 2.5rem;
  align-items: flex-start;
}

.sg-foot__brand p {
  margin: 0.6rem 0 0;
  font-size: 0.94rem;
  color: var(--sg-text-soft);
  max-width: 30rem;
}

.sg-foot__title {
  margin: 0 0 0.8rem;
  font-size: 0.88rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sg-text-muted);
}

.sg-foot__list {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.9rem;
  color: var(--sg-text-soft);
}

.sg-foot__list li + li {
  margin-top: 0.35rem;
}

.sg-foot__list a {
  text-decoration: none;
  color: inherit;
  position: relative;
  padding-bottom: 0.05rem;
  transition: color var(--sg-transition-fast);
}

.sg-foot__list a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.18rem;
  width: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--sg-accent), var(--sg-accent-soft));
  transition: width var(--sg-transition-fast);
}

.sg-foot__list a:hover,
.sg-foot__list a:focus-visible {
  color: var(--sg-accent-strong);
}

.sg-foot__list a:hover::after,
.sg-foot__list a:focus-visible::after {
  width: 100%;
}

.sg-footer__meta {
  margin-top: 2.2rem;
  border-top: 1px solid rgba(162, 196, 234, 0.85);
  padding-top: 1.1rem;
}

.sg-footer__meta-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  row-gap: 0.5rem;
}

.sg-footer__meta small {
  font-size: 0.78rem;
  color: var(--sg-text-muted);
}

/* ===========================
   RESPONSIVE
   =========================== */

@media (max-width: 960px) {
  .sg-footer__grid {
    grid-template-columns: minmax(0, 2fr) minmax(0, 1.2fr);
    row-gap: 2rem;
  }
}

@media (max-width: 768px) {
  .sg-shell {
    width: min(100% - 2rem, 720px);
  }

  .sg-nav {
    position: fixed;
    inset: var(--sg-header-height) 0 auto 0;
    padding: 1.5rem 1.2rem 2rem;
    background: linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.97),
      rgba(225, 239, 255, 0.98)
    );
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition:
      transform var(--sg-transition-slow),
      opacity var(--sg-transition-slow);
  }

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

  .sg-nav__list {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.1rem;
  }

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

  .sg-main {
    padding-top: calc(var(--sg-header-height) + 1.2rem);
  }

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

  .sg-foot__brand p {
    max-width: none;
  }

  .sg-footer__meta-inner {
    flex-direction: column;
    gap: 0.3rem;
  }
}

@media (max-width: 480px) {
  :root {
    --sg-header-height: 76px;
  }

  .sg-main {
    padding-top: calc(var(--sg-header-height) + 0.8rem);
  }

  .sg-footer {
    padding-inline: 0;
  }
}
/* ============ FOOTER NAV STYLES ============ */

.sg-footer {
  margin-top: 4rem;
  padding-block: 2.8rem 2.2rem;
  background: linear-gradient(
    180deg,
    rgba(218, 234, 252, 0.9),
    rgba(201, 222, 246, 0.95)
  );
  color: var(--sg-text-main, #0c263f);
}

.sg-footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) repeat(2, minmax(0, 1.2fr));
  gap: 2.4rem;
  align-items: flex-start;
}

.sg-footer__brand p {
  margin: 0.4rem 0 0;
  font-size: 0.9rem;
  color: var(--sg-text-soft, #44556b);
}

.sg-footer__title {
  margin: 0 0 0.7rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--sg-text-main, #0c263f);
}

/* списки в футере */

.sg-footer__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.sg-footer__list li {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.3rem;
}

/* кастомная точка вместо стандартного буллета */
.sg-footer__list li::before {
  content: "";
  flex: 0 0 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--sg-accent-strong, #0ea9c5);
  opacity: 0.75;
}

/* ссылки */

.sg-footer__list a {
  font-size: 0.9rem;
  color: var(--sg-link-footer, #18365a);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition:
    color 0.18s ease-out,
    border-color 0.18s ease-out,
    transform 0.18s ease-out;
}

.sg-footer__list a:hover,
.sg-footer__list a:focus-visible {
  color: var(--sg-accent-strong, #0ea9c5);
  border-color: rgba(14, 169, 197, 0.5);
  transform: translateY(-1px);
}

/* нижняя плашка футера */

.sg-footer__bottom {
  border-top: 1px solid rgba(148, 181, 216, 0.6);
  margin-top: 2rem;
}

.sg-footer__bottom-inner {
  display: flex;
  justify-content: center;
  align-items: center;
  padding-top: 1rem;
}

.sg-footer__copy {
  margin: 0;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--sg-text-muted, #5f7086);
}

/* адаптив футера */

@media (max-width: 800px) {
  .sg-footer__grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    row-gap: 1.8rem;
  }
}

@media (max-width: 560px) {
  .sg-footer {
    padding-block: 2.4rem 2rem;
  }

  .sg-footer__grid {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 1.6rem;
  }

  .sg-footer__brand {
    max-width: 20rem;
  }

  .sg-footer__bottom-inner {
    text-align: center;
  }
}
