/* ------------------ Fonts (local TTF) ------------------ */
@font-face {
  font-family: "InterLocal";
  src: url("../fonts/Inter-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "PlayfairLocal";
  src: url("../fonts/PlayfairDisplay-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ------------------ Root & Reset ------------------ */
:root{
  --bg: #051923;
  --ink: #e8fbff;
  --ink-dim:#b8e7ef;
  --brand:#49c1e7;
  --brand-ink:#042c3a;
  --muted:#7fd4e6;
  --glass: rgba(12, 60, 80, 0.35);
  --glass-2: rgba(12, 60, 80, 0.55);
  --border: rgba(127, 212, 230, .25);
  --header-h: 72px;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(0,0,0,.2);
  --shadow-soft: 0 6px 18px rgba(0,0,0,.18);
}

*{box-sizing:border-box}
html,body{height:100%}
html{scroll-behavior:smooth}
body{
  margin:0;
  color:var(--ink);
  background: var(--bg);
  font-family: InterLocal, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  line-height:1.6;
  overflow-x:hidden; /* защита от горизонтального скролла */
}
img{display:block; max-width:100%; height:auto}
a{color:var(--muted); text-decoration:none}
a:hover{color:var(--ink)}
.visually-hidden{
  position:absolute!important; width:1px; height:1px; margin:-1px; padding:0; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; border:0;
}
.container{
  width:min(1120px, 100% - 32px);
  margin-inline:auto;
}

/* ------------------ Skip link ------------------ */
.skip-link{
  position:absolute; left:-999px; top:auto; width:1px; height:1px; overflow:hidden;
}
.skip-link:focus{
  left:16px; top:16px; width:auto; height:auto; padding:.5rem .75rem; background:#00394f; color:#fff; z-index:9999; border-radius:8px;
}

/* ------------------ Header (fixed) ------------------ */
.site-header{
  position:fixed; inset:0 0 auto 0; height:var(--header-h);
  backdrop-filter: blur(6px);
  background: linear-gradient(180deg, rgba(1,20,32,0.85), rgba(1,20,32,0.35));
  border-bottom: 1px solid var(--border);
  z-index: 1000;
}
.header-row{
  height:100%; display:flex; align-items:center; justify-content:space-between; gap:16px;
}
.brand{display:flex; align-items:center; gap:10px; color:var(--ink)}
.brand-mark{
  display:grid; place-items:center; inline-size:36px; block-size:36px;
  border-radius:10px;
  background: radial-gradient(100% 100% at 30% 20%, #77e3ff 0%, #28afd3 40%, #0b4565 100%);
  color:#041c27; font-weight:800;
  box-shadow: var(--shadow-soft);
}
.brand-name{font-weight:700; letter-spacing:.3px}

.primary-nav{display:flex; align-items:center; gap:8px}
.nav-toggle{
  display:none; border:1px solid var(--border); background:var(--glass); color:var(--ink);
  padding:8px 10px; border-radius:12px; cursor:pointer;
}
.nav-toggle:focus-visible{outline:2px solid var(--muted); outline-offset:2px}
.nav-toggle-box{display:block; width:22px; height:2px; background:var(--ink); margin:4px 0; border-radius:2px}
.nav-toggle-text{position:absolute; left:-9999px}

.nav-list{display:flex; list-style:none; gap:20px; margin:0; padding:0}
.nav-list a{
  display:inline-block; padding:10px 12px; border-radius:12px;
  transition:transform .2s ease, background .2s ease, color .2s ease;
}
.nav-list a:hover{background:var(--glass); transform:translateY(-2px)}

/* push content below fixed header */
main{padding-top:calc(var(--header-h) + 20px)}

/* ------------------ Footer ------------------ */
.site-footer{
  border-top:1px solid var(--border);
  background: linear-gradient(180deg, rgba(3,24,36,.6), rgba(3,24,36,.2));
  margin-top:64px;
}
.footer-row{display:flex; align-items:center; justify-content:space-between; gap:16px; padding:18px 0}
.foot-brand{display:flex; align-items:center; gap:12px}
.foot-brand .mark{
  inline-size:36px; block-size:36px; display:grid; place-items:center;
  background: radial-gradient(100% 100% at 30% 20%, #77e3ff 0%, #28afd3 40%, #0b4565 100%);
  border-radius:10px; color:#041c27; font-weight:800;
}
.foot-name{margin:0; font-weight:700}
.foot-info p{margin:.25rem 0}
.foot-note{color:var(--ink-dim)}

/* ------------------ Buttons ------------------ */
.btn{
  --bpad: 12px 16px;
  display:inline-block; padding:var(--bpad); border-radius:14px; font-weight:600;
  border:1px solid var(--border);
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
  will-change: transform;
}
.btn-primary{
  color:var(--brand-ink);
  background: linear-gradient(180deg, #7ae3ff, #2fb9d9);
  box-shadow: 0 8px 20px rgba(72, 193, 231, .35);
}
.btn-primary:hover{transform:translateY(-2px); box-shadow: 0 12px 26px rgba(72,193,231,.45)}
.btn-ghost{
  color:var(--ink); background:transparent;
}
.btn-ghost:hover{background:var(--glass)}

/* ------------------ Utilities ------------------ */
.cap-img{
  width:100%;
  max-width:350px; /* требование: не больше 350px */
  height:auto;
  border-radius:16px;
  border:1px solid var(--border);
  box-shadow: var(--shadow-soft);
}

/* ------------------ Media ------------------ */
@media (max-width: 992px){
  .nav-toggle{display:inline-block}
  .nav-list{
    position:fixed; inset:var(--header-h) 0 auto 0;
    background: rgba(3,24,36,.94); backdrop-filter: blur(6px);
    border-bottom:1px solid var(--border);
    padding:12px 16px; display:none; flex-direction:column; gap:8px; z-index:999;
  }
  body.nav-open .nav-list{display:flex}
}
@media (max-width: 480px){
  :root{ --header-h: 64px }
  .brand-name{font-size:14px}
  .footer-row{flex-direction:column; align-items:flex-start}
}
/* Жёстко запрещаем горизонтальный скролл */
html, body { max-width: 100vw; overflow-x: hidden; }

/* Контейнер: безопасные внутренние отступы вместо "100% - 32px" */
.container{
  max-width:1120px;
  width:100%;
  margin-inline:auto;
  padding-inline:16px;
}

/* Изображения никогда не больше контейнера и ≤350px */
.cap-img{
  width:100%;
  max-width:min(100%, 350px);
  height:auto;
  border-radius:16px;
  border:1px solid var(--border);
  box-shadow: var(--shadow-soft);
}

/* Текст не ломает сетку на узких экранах */
h1, h2, h3, p, li, figcaption {
  overflow-wrap:anywhere;
  word-break:break-word;
}

/* Мобильное меню на всю ширину вьюпорта */
@media (max-width: 992px){
  .nav-list{
    position:fixed;
    left:0; right:0;
    width:100vw;               /* предотвращает едва заметный оверфлоу */
  }
}
/* Footer (универсальный стиль под водную палитру сайта) */
.footer{
  border-top:1px solid var(--border);
  background: linear-gradient(180deg, rgba(3,24,36,.6), rgba(3,24,36,.2));
  padding:18px 0;
}
.footer-container{
  display:flex; align-items:flex-start; justify-content:space-between; gap:24px;
}
.footer-brand{ margin:0 0 6px; font-weight:700; letter-spacing:.3px }
.footer-column p{ margin:.25rem 0 }
.footer-links{
  display:flex; gap:12px; flex-wrap:wrap;
}
.footer-links a{
  display:inline-block; padding:8px 12px; border-radius:12px;
  border:1px solid var(--border); background:var(--glass);
  transition: background .2s ease, transform .2s ease;
}
.footer-links a:hover{ background:var(--glass-2); transform: translateY(-2px) }

/* Анимация появления, если элемент имеет класс .animate-on-scroll */
.animate-on-scroll{ opacity:0; transform: translateY(10px); transition: opacity .6s ease, transform .6s ease }
.animate-on-scroll.in-view{ opacity:1; transform:none }

/* Адаптив футера */
@media (max-width: 576px){
  .footer-container{ flex-direction:column; align-items:flex-start; gap:14px }
  .footer-links a{ padding:8px 10px }
}
