/* ===================================================================
   БАЛДЕЙСК — общий стиль сайта
   Палитра: морской курорт + отставная военно-морская печать
=================================================================== */

:root{
  --navy: #14233F;
  --navy-deep: #0D1830;
  --teal: #2F7A6B;
  --teal-deep: #22594E;
  --coral: #C1462F;
  --mustard: #D9A441;
  --sand: #EFE3C3;
  --cream: #FAF5E9;
  --ink: #1E2027;
  --ink-soft: #52564F;
  --line: #D8C79E;

  --font-display: "Yanone Kaffeesatz", sans-serif;
  --font-body: "PT Sans", sans-serif;

  --radius-stamp: 6px;
}

*{ box-sizing: border-box; }

html{ scroll-behavior: smooth; }

body{
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.6;
}

h1, h2, h3, .display{
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.2px;
  color: var(--navy);
  margin: 0;
}

p{ margin: 0 0 1em 0; max-width: 62ch; }

a{ color: var(--teal-deep); text-decoration: none; }
a:hover{ text-decoration: underline; }

img, svg{ display: block; max-width: 100%; }

.wrap{
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 28px;
}

/* ---------------- Навигация ---------------- */

.topbar{
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--navy);
  border-bottom: 3px solid var(--mustard);
}

.topbar .wrap{
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand{
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--sand);
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
}
.brand svg{ width: 30px; height: 30px; }
.brand .sub{
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--mustard);
  display: block;
  letter-spacing: 0.5px;
  margin-top: -2px;
}
.brand-text{ display:flex; flex-direction:column; line-height:1; }

.navlinks{
  display: flex;
  gap: 26px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.navlinks a{
  color: var(--sand);
  font-family: var(--font-body);
  font-size: 16px;
  padding-bottom: 6px;
  border-bottom: 3px solid transparent;
}
.navlinks a:hover{ text-decoration:none; border-bottom-color: var(--teal); }
.navlinks a.active{ border-bottom-color: var(--coral); color: #fff; }

.navtoggle{ display:none; }

@media (max-width: 720px){
  .navlinks{
    position: absolute;
    top: 72px; left: 0; right: 0;
    background: var(--navy);
    flex-direction: column;
    gap: 0;
    padding: 8px 28px 18px;
    display: none;
  }
  .navlinks.open{ display: flex; }
  .navlinks a{ padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,0.12); width: 100%; }
  .navtoggle{
    display: block;
    background: none;
    border: 2px solid var(--sand);
    color: var(--sand);
    font-family: var(--font-body);
    font-size: 14px;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
  }
}

/* ---------------- Герой ---------------- */

.hero{
  background: linear-gradient(180deg, var(--navy) 0%, var(--navy-deep) 100%);
  color: var(--cream);
  padding: 64px 0 0;
  position: relative;
  overflow: hidden;
}
.hero .wrap{ position: relative; z-index: 2; padding-bottom: 96px; }

.eyebrow-ribbon{
  display: inline-block;
  background: var(--coral);
  color: #fff;
  font-family: var(--font-body);
  font-size: 14px;
  padding: 6px 14px;
  border-radius: 2px;
  transform: rotate(-1.5deg);
  margin-bottom: 18px;
}

.hero h1{
  font-size: clamp(48px, 9vw, 88px);
  line-height: 0.98;
  color: #fff;
}

.hero .lede{
  color: var(--sand);
  font-size: 20px;
  max-width: 60ch;
  margin-top: 18px;
}

.wave-divider{
  display: block;
  width: 100%;
  height: 64px;
  margin-top: -2px;
}

/* ---------------- Секции ---------------- */

section{ padding: 64px 0; }
section.alt{ background: var(--sand); }

.section-head{ margin-bottom: 36px; max-width: 68ch; }
.section-head h2{ font-size: clamp(32px, 5vw, 44px); }
.section-head .kicker{
  color: var(--coral);
  font-family: var(--font-body);
  font-size: 15px;
  margin-bottom: 6px;
  display: block;
}

/* ---------------- Карточки быстрых ссылок (главная) ---------------- */

.card-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 800px){ .card-grid{ grid-template-columns: 1fr; } }

.card{
  background: #fff;
  border: 1px solid var(--line);
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.card .icon{ width: 44px; height: 44px; }
.card h3{ font-size: 26px; }
.card p{ color: var(--ink-soft); font-size: 16px; margin-bottom: 4px; }
.card a.more{ font-family: var(--font-body); font-weight: 700; color: var(--coral); }

/* ---------------- Штамп / печать ---------------- */

.stamp-box{
  display: flex;
  gap: 22px;
  align-items: flex-start;
  background: #fff;
  border: 2px dashed var(--teal);
  padding: 22px 26px;
  border-radius: var(--radius-stamp);
  max-width: 700px;
}
.stamp-box .stamp{
  flex: none;
  width: 78px; height: 78px;
  border: 3px solid var(--coral);
  border-radius: 50%;
  color: var(--coral);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-family: var(--font-display);
  font-size: 13px;
  line-height: 1.1;
  transform: rotate(-8deg);
}
.stamp-box p{ margin: 0; color: var(--ink-soft); }
.stamp-box strong{ color: var(--navy); }

/* ---------------- Таймлайн (история) ---------------- */

.timeline{
  position: relative;
  margin-left: 12px;
  border-left: 3px solid var(--teal);
  padding-left: 34px;
}
.timeline-item{ position: relative; margin-bottom: 42px; }
.timeline-item:last-child{ margin-bottom: 0; }
.timeline-item::before{
  content: "";
  position: absolute;
  left: -43px;
  top: 4px;
  width: 18px; height: 18px;
  background: var(--mustard);
  border: 3px solid var(--navy);
  border-radius: 50%;
}
.timeline-year{
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--coral);
  display: block;
  margin-bottom: 4px;
}
.timeline-item h3{ font-size: 24px; margin-bottom: 8px; }
.timeline-item p{ color: var(--ink-soft); }

/* ---------------- Районы ---------------- */

.district{
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 26px;
  padding: 30px 0;
  border-top: 1px solid var(--line);
  align-items: start;
}
.district:first-of-type{ border-top: none; }
.district .glyph{
  width: 96px; height: 96px;
  background: var(--navy);
  border-radius: 50%;
  display:flex; align-items:center; justify-content:center;
}
.district .glyph svg{ width: 54px; height: 54px; }
.district h3{ font-size: 30px; margin-bottom: 8px; }
.district .also-known{
  display:inline-block;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--teal-deep);
  background: rgba(47,122,107,0.1);
  padding: 3px 9px;
  border-radius: 3px;
  margin-bottom: 10px;
}
.district p{ color: var(--ink-soft); }

@media (max-width: 640px){
  .district{ grid-template-columns: 1fr; }
  .district .glyph{ width: 72px; height: 72px; }
}

/* ---------------- Достопримечательности ---------------- */

.sight{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 44px;
  align-items: center;
  padding: 56px 0;
  border-top: 1px solid var(--line);
}
.sight:first-of-type{ border-top: none; }
.sight.reverse .sight-art{ order: 2; }
.sight-art{
  background: var(--navy);
  border-radius: 4px;
  padding: 30px;
  display:flex; align-items:center; justify-content:center;
  min-height: 220px;
}
.sight-art svg{ width: 100%; max-width: 220px; }
.sight-copy .tag{
  color: var(--coral);
  font-size: 14px;
  display:block;
  margin-bottom: 6px;
}
.sight-copy h3{ font-size: 30px; margin-bottom: 10px; }
.sight-copy p{ color: var(--ink-soft); }

@media (max-width: 720px){
  .sight, .sight.reverse .sight-art{ grid-template-columns: 1fr; order: 0; }
  .sight{ grid-template-columns: 1fr; }
}

/* ---------------- Подвал ---------------- */

footer{
  background: var(--navy-deep);
  color: var(--sand);
  padding: 36px 0;
}
footer .wrap{
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}
footer p{ margin: 0; font-size: 14px; color: var(--sand); opacity: 0.85; }
footer .foot-links{ display:flex; gap: 18px; }
footer a{ color: var(--mustard); }

/* Focus visibility */
a:focus-visible, button:focus-visible{
  outline: 3px solid var(--mustard);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
}
