/* lostho.me — спільні стилі для обох сторінок */
@import url('https://fonts.googleapis.com/css2?family=Lora:wght@500;600&family=Inter:wght@400;500;600&display=swap');

:root {
  --bg: #f6f3ee;
  --card: #ffffff;
  --text: #2b2a28;
  --muted: #6d6a64;
  --line: #e4ded4;
  --accent: #b5562f;      /* теплий цегляний */
  --accent-soft: #f3e3da;
  --radius: 10px;
  --wrap: 760px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font: 17px/1.65 'Inter', system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
}
img { max-width: 100%; display: block; }
a { color: var(--accent); }
h1, h2, h3 { font-family: 'Lora', Georgia, serif; line-height: 1.25; margin: 0 0 .6em; }
h1 { font-size: clamp(30px, 6vw, 46px); }
h2 { font-size: 26px; margin-top: 1.8em; }
h3 { font-size: 19px; }
p { margin: 0 0 1em; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }

/* шапка */
.top { border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 10; }
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 56px; }
.logo { font-family: 'Lora', serif; font-weight: 600; font-size: 20px; color: var(--text); text-decoration: none; }
.logo span { color: var(--accent); }
.nav a { margin-left: 18px; color: var(--muted); text-decoration: none; font-size: 15px; }
.nav a.active, .nav a:hover { color: var(--text); }

/* перший екран */
.hero { padding: 48px 0 24px; }
.hero .lead { font-size: 19px; color: var(--muted); max-width: 600px; }
.hero-img { margin: 28px 0 8px; border-radius: var(--radius); overflow: hidden; }
.caption { font-size: 14px; color: var(--muted); }

/* кнопки */
.btn {
  display: inline-block; padding: 12px 22px; border-radius: 8px;
  background: var(--accent); color: #fff; text-decoration: none; font-weight: 600;
  border: 0; cursor: pointer; font-size: 16px;
}
.btn:hover { filter: brightness(1.08); }
.btn-ghost { background: transparent; color: var(--accent); border: 1.5px solid var(--accent); }
.btns { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 20px; }

/* до / після */
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 16px 0; }
.compare figure { margin: 0; }
.compare img { border-radius: var(--radius); aspect-ratio: 4/3; object-fit: cover; width: 100%; }
.compare figcaption { font-size: 14px; color: var(--muted); margin-top: 6px; }

/* галерея */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; margin: 16px 0; }
.gallery a img { aspect-ratio: 1; object-fit: cover; border-radius: 6px; transition: opacity .2s; }
.gallery a:hover img { opacity: .85; }

/* лайтбокс */
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.9); display: none; align-items: center; justify-content: center; z-index: 50; padding: 16px; cursor: zoom-out; }
.lightbox.open { display: flex; }
.lightbox img { max-height: 90vh; border-radius: 6px; }

/* хронологія */
.timeline { list-style: none; padding: 0; margin: 16px 0; border-left: 2px solid var(--line); }
.timeline li { padding: 0 0 18px 20px; position: relative; }
.timeline li::before { content: ''; position: absolute; left: -7px; top: 8px; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); }
.timeline b { display: block; font-size: 14px; color: var(--muted); font-weight: 500; }

/* картки */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin: 16px 0; }
.card.accent { background: var(--accent-soft); border-color: transparent; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* реквізити */
.req { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.req:last-child { border-bottom: 0; }
.req small { display: block; color: var(--muted); font-size: 13px; }
.req code { font: 500 16px/1.4 ui-monospace, monospace; word-break: break-all; }
.copy { flex-shrink: 0; background: none; border: 1px solid var(--line); border-radius: 6px; padding: 6px 12px; cursor: pointer; font-size: 14px; color: var(--muted); }
.copy.done { color: var(--accent); border-color: var(--accent); }

/* документи */
.docs { list-style: none; padding: 0; margin: 0; }
.docs li { padding: 10px 0; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; }
.docs li:last-child { border-bottom: 0; }
.docs span { color: var(--muted); font-size: 14px; white-space: nowrap; }

/* новини */
.news article { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 14px; }
.news time { font-size: 14px; color: var(--muted); }

.foot { margin-top: 60px; padding: 28px 0; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }

@media (max-width: 560px) {
  .compare, .grid2 { grid-template-columns: 1fr; }
  .nav a { margin-left: 12px; font-size: 14px; }
  body { font-size: 16px; }
}
