@import url("fonts.css");

/* ------------------------------------------------------------------
   PANTEON — panteon.org.ua
   Палітра знята з фірмового превʼю (синій камінь) і з мініатюри (вохра)
   ------------------------------------------------------------------ */

:root {
  --ink:       #08111E;
  --ink-2:     #0C1827;
  --surface:   #111F31;
  --surface-2: #17293C;
  --stone:     #E6E1D6;
  --muted:     #8C99A5;
  --amber:     #C89A62;
  --amber-hi:  #E9C591;
  --amber-dim: #7C603C;
  --rust:      #A85F58;
  --line:      rgba(140, 153, 165, .20);
  --line-soft: rgba(140, 153, 165, .10);

  --display: "Forum", Georgia, serif;
  --text: "PT Serif", Georgia, serif;

  --gut: clamp(20px, 5vw, 60px);
  --maxw: 1220px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--ink);
  color: var(--stone);
  font-family: var(--text);
  font-size: clamp(16px, 1vw + 12px, 18px);
  line-height: 1.66;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* фактура штукатурки — ледь помітні мазки */
body::before {
  content: "";
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(120% 70% at 20% 0%, rgba(30, 49, 67, .55), transparent 60%),
    repeating-linear-gradient(101deg, rgba(255,255,255,.012) 0 2px, transparent 2px 9px);
}

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

a { color: var(--amber); text-underline-offset: .22em; text-decoration-color: var(--line); }
a:hover { color: var(--amber-hi); }
:focus-visible { outline: 2px solid var(--amber-hi); outline-offset: 3px; border-radius: 2px; }

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gut); position: relative; z-index: 1; }
.skip { position: absolute; left: -9999px; background: var(--amber); color: var(--ink); padding: .6em 1em; z-index: 99; }
.skip:focus { left: 12px; top: 12px; }

h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.06; margin: 0; letter-spacing: .01em; }

.eyebrow {
  font-family: var(--text); text-transform: uppercase; letter-spacing: .28em;
  font-size: .7rem; color: var(--amber-dim);
}
.lead { font-size: clamp(1.06rem, .5vw + .96rem, 1.3rem); }
.muted { color: var(--muted); }
.small { font-size: .86rem; line-height: 1.55; }

/* ---------- словомарка ---------- */

.wordmark {
  aspect-ratio: 983 / 314;
  -webkit-mask: url(wordmark.svg) center / contain no-repeat;
          mask: url(wordmark.svg) center / contain no-repeat;
  background: var(--stone);
  display: block;
}
.wordmark--hero {
  background: linear-gradient(176deg, #F3EFE6 0%, #D8D2C6 46%, #A9AFB4 100%);
  width: min(560px, 82vw);
  filter: drop-shadow(0 14px 40px rgba(0,0,0,.55));
}

/* ---------- шапка ---------- */

.top {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding-block: clamp(14px, 2vw, 22px); border-bottom: 1px solid var(--line-soft);
  position: relative; z-index: 3;
}
.top .wordmark { width: 128px; }
.lang { display: flex; gap: .5rem; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; }
.lang a, .lang span { text-decoration: none; }
.lang [aria-current] { color: var(--stone); border-bottom: 1px solid var(--amber); }
.lang .sep { color: var(--amber-dim); }

/* ---------- герой ---------- */

.hero { padding-block: clamp(44px, 8vw, 96px) clamp(36px, 6vw, 72px); }
.hero__inner { display: grid; justify-items: center; text-align: center; gap: clamp(18px, 2.6vw, 30px); }
.hero h1 { font-size: clamp(1.5rem, 4.4vw, 2.6rem); color: var(--stone); }
.hero__lead { max-width: 52ch; }
.hero__lead b { color: var(--amber-hi); font-weight: 400; }

.status {
  display: inline-flex; align-items: center; gap: .6em;
  border: 1px solid var(--line); border-radius: 999px; padding: .4em 1.1em;
  font-size: .78rem; color: var(--muted); background: rgba(23,41,60,.5);
}
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--amber); }

.figures { display: flex; flex-wrap: wrap; gap: clamp(22px, 5vw, 56px); justify-content: center; }
.figure { text-align: center; }
.figure b {
  display: block; font-family: var(--display); font-weight: 400;
  font-size: clamp(2rem, 5.4vw, 3.1rem); line-height: 1; color: var(--amber);
  font-variant-numeric: tabular-nums;
}
.figure span { display: block; margin-top: .45em; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }

/* ---------- секції ---------- */

.band { padding-block: clamp(52px, 8vw, 104px); border-top: 1px solid var(--line-soft); position: relative; z-index: 1; }
.band--deep { background: linear-gradient(180deg, #0B1626, var(--ink) 76%); }
.sec-head { display: grid; gap: .8rem; margin-bottom: clamp(26px, 4vw, 44px); max-width: 64ch; }
.sec-head h2 { font-size: clamp(1.7rem, 4.2vw, 2.9rem); color: var(--stone); }
.sec-head p { max-width: 56ch; }

/* ---------- стіна ---------- */

.wall-head { display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: flex-end; justify-content: space-between; margin-bottom: 1.2rem; }
.wall-stat { font-family: var(--display); font-size: clamp(1.05rem, 2.4vw, 1.4rem); color: var(--stone); }
.wall-stat b { color: var(--amber); font-variant-numeric: tabular-nums; }

.controls { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.controls input[type="search"] {
  background: var(--surface); border: 1px solid var(--line); color: var(--stone);
  font-family: var(--text); font-size: .9rem; padding: .5em .8em; border-radius: 2px; min-width: 15ch;
}
.controls input[type="search"]::placeholder { color: var(--muted); }
.chip {
  appearance: none; cursor: pointer; border: 1px solid var(--line); background: transparent;
  color: var(--muted); font-family: var(--text); font-size: .82rem; padding: .45em .9em; border-radius: 999px;
}
.chip:hover { color: var(--stone); border-color: var(--amber-dim); }
.chip[aria-pressed="true"] { color: var(--ink); background: var(--amber); border-color: var(--amber); }

.wall {
  display: grid; gap: 5px;
  grid-template-columns: repeat(auto-fill, minmax(20px, 1fr));
  margin-bottom: 1.1rem;
}
@media (min-width: 760px)  { .wall { gap: 4px; grid-template-columns: repeat(auto-fill, minmax(16px, 1fr)); } }
@media (min-width: 1100px) { .wall { grid-template-columns: repeat(auto-fill, minmax(15px, 1fr)); } }
.wall button {
  appearance: none; padding: 0; cursor: pointer;
  aspect-ratio: 1; border-radius: 50%;
  border: 1px solid rgba(140,153,165,.28); background: transparent;
  transition: transform .12s ease, box-shadow .12s ease;
}
.wall button[data-k="photo"]    { background: #EDE7DA; border-color: #EDE7DA; }
.wall button[data-k="portrait"] { background: #DFBB84; border-color: #DFBB84; }
.wall button[data-k="icon"]     { background: #C89A62; border-color: #C89A62; }
.wall button[data-k="coin"]     { background: #B4834F; border-color: #B4834F; }
.wall button[data-k="desc"]     { background: #8E6B44; border-color: #8E6B44; }
.wall button[data-k="yes"]      { background: rgba(200,154,98,.55); border-color: rgba(200,154,98,.7); }
.wall button:hover, .wall button:focus-visible { transform: scale(1.9); box-shadow: 0 0 0 2px var(--ink), 0 0 12px rgba(233,197,145,.6); z-index: 2; }
.wall button[aria-pressed="true"] { transform: scale(1.9); box-shadow: 0 0 0 2px var(--ink), 0 0 0 3px var(--amber-hi); z-index: 2; }
.wall.dim button:not([data-known]) { opacity: .16; }

.wall-legend { display: flex; flex-wrap: wrap; gap: .4rem 1.1rem; font-size: .76rem; color: var(--muted); }
.wall-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: .45em; vertical-align: baseline; border: 1px solid rgba(140,153,165,.28); }

.record {
  margin-top: clamp(20px, 3vw, 30px);
  border: 1px solid var(--line); background: rgba(17,31,49,.7);
  padding: clamp(18px, 2.6vw, 28px);
  display: grid; gap: .5rem; min-height: 11.5em; align-content: start;
}
.record__name { font-family: var(--display); font-size: clamp(1.3rem, 3.2vw, 1.9rem); color: var(--stone); }
.record__name em { font-style: normal; color: var(--muted); font-size: .62em; margin-left: .6em; }
.record__state { color: var(--amber); font-size: .96rem; }
.record dl { display: grid; grid-template-columns: max-content 1fr; gap: .3rem 1.2rem; margin: .4rem 0 0; font-size: .93rem; }
.record dt { color: var(--muted); }
.record dd { margin: 0; }
.record__empty { color: var(--muted); }

/* ---------- картки ---------- */

.cards { display: grid; gap: 1px; background: var(--line-soft); border: 1px solid var(--line-soft); }
@media (min-width: 860px) { .cards { grid-template-columns: repeat(3, 1fr); } }
.card { background: var(--ink); padding: clamp(22px, 3vw, 34px); display: grid; gap: .6rem; align-content: start; }
.card h3 { font-size: 1.3rem; color: var(--amber); }
.card p { color: var(--muted); font-size: .95rem; }

/* ---------- драбина доказів ---------- */

.ladder { display: grid; gap: 1px; background: var(--line-soft); border: 1px solid var(--line-soft); }
.rung {
  background: var(--ink); display: grid; gap: .2rem .9rem; align-items: baseline;
  grid-template-columns: auto 1fr; padding: clamp(14px, 1.8vw, 20px) clamp(16px, 2vw, 24px);
}
@media (min-width: 720px) { .rung { grid-template-columns: 2.4rem 12rem 1fr auto; } }
.rung__dot { width: 12px; height: 12px; border-radius: 50%; border: 1px solid rgba(140,153,165,.28); }
.rung__name { font-family: var(--display); font-size: 1.12rem; color: var(--stone); }
.rung__note { color: var(--muted); font-size: .92rem; grid-column: 1 / -1; }
@media (min-width: 720px) { .rung__note { grid-column: auto; } }
.rung__n { font-variant-numeric: tabular-nums; color: var(--amber); font-family: var(--display); font-size: 1.15rem; }
.rung--none .rung__name, .rung--none .rung__n { color: var(--muted); }

/* ---------- проби ---------- */

.faces { display: grid; gap: clamp(10px, 1.4vw, 16px); grid-template-columns: repeat(2, 1fr); }
@media (min-width: 780px) { .faces { grid-template-columns: repeat(4, 1fr); } }
.faces img { width: 100%; height: auto; filter: saturate(.9) contrast(1.02); }
.faces figure { margin: 0; }
.warn {
  margin-top: clamp(18px, 2.4vw, 26px); border-left: 2px solid var(--rust);
  padding-left: 1.1em; max-width: 64ch; color: var(--muted);
}

.miniature { margin-top: clamp(22px, 3vw, 34px); border: 1px solid var(--line); }
.miniature img { width: 100%; height: auto; }

/* ---------- реєстр ---------- */

.note { border-left: 2px solid var(--amber-dim); padding-left: 1.1em; max-width: 66ch; color: var(--muted); }
.note + .note { margin-top: 1.1em; }

/* ---------- підвал ---------- */

.foot { border-top: 1px solid var(--line-soft); padding-block: clamp(32px, 5vw, 52px); }
.foot__row { display: flex; flex-wrap: wrap; gap: clamp(16px, 4vw, 40px); align-items: center; justify-content: space-between; }
.foot .wordmark { width: 118px; }
.foot__legal { margin-top: clamp(20px, 3vw, 30px); color: var(--muted); font-size: .82rem; max-width: 72ch; }
.foot__legal p + p { margin-top: .35em; }
.foot a.dom { letter-spacing: .1em; text-decoration: none; }
