/* Сайт-визитка — адаптивная вёрстка (телефон / планшет / ПК). Без внешних шрифтов: работает и в локальной сети. */
:root {
  --navy: #0e2a47;
  --blue: #1d5c96;
  --gold: #c8a04a;
  --surface: #eef1f5;
  --card: #ffffff;
  --ink: #18222d;
  --muted: #5b6878;
  --line: #d5dce5;
  --radius: 6px;
  --wrap: 1200px;
  --serif: "PT Serif", Georgia, "Times New Roman", serif;
  --sans: "PT Sans", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  box-sizing: border-box;
}
*, *::before, *::after { box-sizing: inherit; }

html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  color: var(--ink);
  font: 16px/1.5 var(--sans);
}
main { flex: 1; }
img { max-width: 100%; }
a { color: var(--blue); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left));
  padding-right: max(16px, env(safe-area-inset-right));
}
.muted { color: var(--muted); }

/* ---------- шапка ---------- */
.site-header {
  background: var(--navy);
  color: #fff;
  border-bottom: 4px solid var(--gold);
  padding-top: env(safe-area-inset-top, 0px);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  min-height: 96px;
  padding-top: 12px;
  padding-bottom: 12px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 18px;
  color: inherit;
  text-decoration: none;
  min-width: 0;
}
.brand__logo { width: 96px; height: auto; flex: none; }
.brand__title {
  font-family: var(--serif);
  font-size: clamp(1.15rem, 0.9rem + 1.1vw, 1.7rem);
  line-height: 1.25;
  letter-spacing: 0.005em;
  text-wrap: balance;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 22px;
  border-radius: var(--radius);
  font: 600 1rem/1.2 var(--sans);
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .15s, color .15s;
}
.btn--light { background: #fff; color: var(--navy); }
.btn--light:hover { background: var(--gold); color: var(--navy); }

/* ---------- слайдер ---------- */
.slider { position: relative; background: var(--navy); }
.slider__viewport { overflow: hidden; touch-action: pan-y; }
.slider__track {
  display: flex;
  transition: transform .5s ease;
  will-change: transform;
}
.slider__track.is-dragging { transition: none; }
.slide {
  position: relative;
  flex: 0 0 100%;
  height: clamp(210px, 38vw, 480px);
}
.slide__link { display: block; height: 100%; color: inherit; }
.slide__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  user-select: none;
  -webkit-user-drag: none;
}
.slide__caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 48px max(16px, calc((100% - var(--wrap)) / 2 + 16px)) 44px;
  background: linear-gradient(transparent, rgba(8, 22, 38, .78));
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.slide__title {
  font-family: var(--serif);
  font-size: clamp(1.1rem, 0.8rem + 1.4vw, 2rem);
  line-height: 1.2;
  max-width: 34ch;
}
.slide__sub { font-size: clamp(.9rem, .85rem + .3vw, 1.1rem); max-width: 60ch; opacity: .92; }

.slider__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(14, 42, 71, .55);
  color: #fff;
  cursor: pointer;
  transition: background-color .15s;
}
.slider__arrow:hover { background: rgba(14, 42, 71, .85); }
.slider__arrow svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.slider__arrow--prev { left: max(12px, env(safe-area-inset-left)); }
.slider__arrow--next { right: max(12px, env(safe-area-inset-right)); }

.slider__dots {
  position: absolute;
  left: 50%; bottom: 10px;
  transform: translateX(-50%);
  display: flex;
  gap: 2px;
}
.slider__dot {
  width: 28px; height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  display: grid; place-items: center;
}
.slider__dot::before {
  content: "";
  width: 10px; height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .55);
  transition: background-color .2s, transform .2s;
}
.slider__dot[aria-current="true"]::before { background: var(--gold); transform: scale(1.25); }

/* ---------- ресурсы ---------- */
.resources { padding-top: clamp(24px, 4vw, 48px); padding-bottom: clamp(32px, 5vw, 64px); }
.resources__title {
  margin: 0 0 20px;
  font: 400 clamp(1.3rem, 1.1rem + .8vw, 1.75rem)/1.25 var(--serif);
  color: var(--navy);
}
.tiles {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr));
  gap: clamp(12px, 2vw, 20px);
}
.tiles > li { display: flex; }
.tile {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  color: var(--ink);
  text-decoration: none;
  transition: border-color .15s, box-shadow .15s;
}
a.tile:hover { border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue); }
.tile__img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 248 / 114;
  object-fit: contain;
  background: #fff;
}
.tile__name {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 248 / 114;  /* та же высота, что у плиток с картинкой */
  padding: 10px 14px;
  text-align: center;
  font: 600 1.05rem/1.3 var(--sans);
  color: var(--navy);
  border-top: 4px solid var(--blue);
}
.tile__desc {
  padding: 10px 14px 12px;
  border-top: 1px solid var(--line);
  font-size: .9rem;
  line-height: 1.4;
  color: var(--muted);
}
.tile--static { cursor: default; }

/* ---------- подвал ---------- */
.site-footer {
  background: var(--navy);
  color: rgba(255, 255, 255, .78);
  font-size: .9rem;
  padding: 18px 0 max(18px, env(safe-area-inset-bottom));
}

/* ---------- планшет ---------- */
@media (max-width: 860px) {
  .brand__logo { width: 76px; }
  .brand { gap: 14px; }
}

/* ---------- телефон ---------- */
@media (max-width: 600px) {
  .site-header__inner { flex-direction: column; align-items: stretch; min-height: 0; }
  .brand__logo { width: 60px; }
  .btn { width: 100%; }
  .slide { height: clamp(180px, 56vw, 300px); }
  .slider__arrow { display: none; }  /* на телефоне листаем свайпом */
  .slide__caption { padding-bottom: 40px; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 340px) {
  .tiles { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .slider__track, .btn, .tile, .slider__dot::before { transition: none; }
}
@media print {
  .slider, .btn { display: none; }
  .site-header, .site-footer { background: none; color: #000; border: 0; }
}
