/* ===== KINTAMIEJI ===== */
:root {
  --bg: #121212;
  --bg-alt: #1E1E1E;
  --text: #E5E5E5;
  --muted: #A0A0A0;
  --accent: #8B2626;
  --accent-light: #B34747;
  --line: #333;
  --font-head: "Merriweather", Georgia, serif;
  --font-body: "Inter", system-ui, sans-serif;
  --header-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font-body); line-height: 1.65;
}
body.no-scroll { overflow: hidden; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent-light); outline-offset: 3px; }

.container { width: min(1120px, 100% - 2.5rem); margin-inline: auto; }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.25; margin: 0 0 .75rem; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 1.5rem; }
h3 { font-size: 1.2rem; }
p { max-width: 68ch; }

/* ===== NAVIGACIJA ===== */
.site-header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  background: rgba(18,18,18,.88); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 100%; }
.nav__brand { font-family: var(--font-head); font-weight: 700; text-decoration: none; }
.nav__menu { display: flex; gap: 2rem; list-style: none; margin: 0; padding: 0; }
.nav__menu a { text-decoration: none; color: var(--muted); padding: .4rem 0; border-bottom: 2px solid transparent; transition: color .2s, border-color .2s; }
.nav__menu a:hover, .nav__menu a.is-current { color: var(--text); border-color: var(--accent); }
.nav__toggle { display: none; background: none; border: 0; padding: .5rem; cursor: pointer; }
.nav__toggle span { display: block; width: 24px; height: 2px; background: var(--text); margin: 5px 0; transition: transform .25s, opacity .25s; }
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== HERO ===== */
.hero {
  min-height: calc(100vh - var(--header-h)); display: flex; align-items: center;
  background:
    linear-gradient(180deg, rgba(18,18,18,.55), var(--bg) 96%),
    radial-gradient(ellipse at 75% 20%, rgba(139,38,38,.28), transparent 55%),
    linear-gradient(135deg, #1a1a1a, #0e0e0e);
}
.hero__inner { padding-block: 4rem; }
.hero h1 { font-size: clamp(2rem, 5.2vw, 3.8rem); max-width: 18ch; letter-spacing: -.01em; }
.hero__lead { font-size: 1.15rem; color: var(--muted); margin: 1.5rem 0 2.25rem; }
.btn {
  display: inline-block; padding: .85rem 1.75rem; background: var(--accent); color: #fff;
  text-decoration: none; border: 0; border-radius: 2px; font: 500 1rem var(--font-body); cursor: pointer;
  transition: background .2s;
}
.btn:hover { background: var(--accent-light); }

/* ===== SEKCIJOS ===== */
.section { padding-block: clamp(3.5rem, 8vw, 6rem); }
.section--alt { background: var(--bg-alt); }
.section__intro { color: var(--muted); margin-bottom: 1.5rem; }
.columns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.5rem; }
.columns article { border-top: 2px solid var(--accent); padding-top: 1rem; }
.columns p { color: var(--muted); }

.stats { list-style: none; margin: 3.5rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.stats li { background: var(--bg-alt); border: 1px solid var(--line); padding: 1.5rem; }
.stats__num { display: block; font: 700 clamp(1.6rem, 3vw, 2.2rem) var(--font-head); color: var(--accent-light); }
.stats li span:last-child { color: var(--muted); font-size: .92rem; }

/* ===== FILTRAI IR KORTELĖS ===== */
.filters { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: 2rem; }
.filter {
  background: transparent; color: var(--muted); border: 1px solid var(--line);
  padding: .55rem 1.1rem; border-radius: 2px; font: 500 .95rem var(--font-body); cursor: pointer;
  transition: background .2s, color .2s, border-color .2s;
}
.filter:hover { color: var(--text); border-color: var(--muted); }
.filter.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.5rem; }
.card {
  background: var(--bg); border: 1px solid var(--line); border-left: 3px solid var(--accent);
  padding: 1.5rem; display: flex; flex-direction: column; transition: opacity .25s, transform .25s;
}
.card.is-hiding { opacity: 0; transform: scale(.97); }
.card[hidden] { display: none; }
.card__place { color: var(--muted); font-size: .9rem; margin: 0 0 .75rem; }
.card dl { margin: 0 0 1rem; display: grid; grid-template-columns: auto 1fr; gap: .25rem 1rem; font-size: .92rem; }
.card dt { color: var(--muted); }
.card dd { margin: 0; }
.card p.card__summary { color: var(--muted); font-size: .95rem; flex: 1; }
.card__btn {
  align-self: flex-start; background: none; color: var(--text); border: 1px solid var(--muted);
  padding: .5rem 1rem; border-radius: 2px; font: 500 .9rem var(--font-body); cursor: pointer; transition: background .2s, border-color .2s;
}
.card__btn:hover { background: var(--accent); border-color: var(--accent); }

/* ===== CHRONOLOGIJA ===== */
.timeline { list-style: none; margin: 0; padding: 0 0 0 1.5rem; border-left: 2px solid var(--line); max-width: 760px; }
.timeline li { position: relative; padding: 0 0 2rem 1.5rem; }
.timeline li::before {
  content: ""; position: absolute; left: -1.5rem; top: .45rem; width: 12px; height: 12px;
  background: var(--accent); border-radius: 50%; transform: translateX(-50%); box-shadow: 0 0 0 4px var(--bg);
}
.timeline time { font: 700 1.1rem var(--font-head); color: var(--accent-light); display: block; }
.timeline p { margin: .25rem 0 0; color: var(--muted); }

/* ===== CITATA IR PORAŠTĖ ===== */
.section--quote { background: var(--bg-alt); text-align: center; }
blockquote { margin: 0 auto; max-width: 760px; }
blockquote p { font: italic 400 clamp(1.4rem, 3vw, 2.1rem) var(--font-head); margin: 0 auto 1rem; max-width: none; }
blockquote footer { color: var(--muted); }
.site-footer { padding: 2.5rem 0; border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; }
.site-footer__small { color: var(--text); }

/* ===== MODALAS ===== */
.modal {
  position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center;
  padding: 1rem; background: rgba(0,0,0,.8); animation: fade .2s ease;
}
.modal[hidden] { display: none; }
.modal__dialog {
  position: relative; width: min(680px, 100%); max-height: 90vh; overflow-y: auto;
  background: var(--bg-alt); border: 1px solid var(--line); border-top: 3px solid var(--accent); padding: 2rem;
}
.modal__close { position: absolute; top: .5rem; right: .75rem; background: none; border: 0; color: var(--text); font-size: 2rem; line-height: 1; cursor: pointer; }
.modal__place { color: var(--muted); margin-top: 0; }
.modal__meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1rem; margin: 1.25rem 0; }
.modal__meta div { border-left: 2px solid var(--accent); padding-left: .75rem; }
.modal__meta dt { color: var(--muted); font-size: .85rem; }
.modal__meta dd { margin: 0; font-weight: 500; }
.modal h4 { margin-top: 1.5rem; }
.modal ul { padding-left: 1.2rem; color: var(--muted); }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ===== ADAPTYVUMAS ===== */
@media (max-width: 900px) {
  .columns { grid-template-columns: 1fr; gap: 2rem; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .nav__toggle { display: block; }
  .nav__menu {
    position: absolute; top: var(--header-h); left: 0; right: 0; flex-direction: column; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--line); display: none;
  }
  .nav__menu.is-open { display: flex; }
  .nav__menu a { display: block; padding: 1rem 1.25rem; border-bottom: 1px solid var(--line); }
  .grid { grid-template-columns: 1fr; }
  .modal__dialog { padding: 1.5rem 1.25rem; }
}
@media (max-width: 480px) { .stats { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
