/* Tokens, type, header and the pieces every page shares. */
:root {
  --bg: #0a1412;
  --bg-2: #0f1d1a;
  --green: #17302a;
  --green-2: #21443b;
  --ink: #ece5d4;
  --ink-2: rgba(236, 229, 212, 0.74);
  --ink-3: rgba(236, 229, 212, 0.56);
  --brass: #d9b87c;
  --brass-2: #b8935a;
  --ivory: #f1ebdd;
  --ivory-ink: #12201c;
  --ivory-ink-2: #44514b;
  --line: rgba(236, 229, 212, 0.14);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --serif: "Fraunces", "Noto Serif", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: clamp(16px, 4vw, 56px);
  --top-h: 68px;
  color-scheme: dark;
}
:lang(ka) {
  --serif: "Noto Serif Georgian", "Fraunces", serif;
  --sans: "Noto Sans Georgian", "Inter", system-ui, sans-serif;
}
:lang(ru) {
  --serif: "Noto Serif", "Fraunces", Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--top-h) + 12px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1rem/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure, fieldset { margin: 0; padding: 0; }
ul, ol { list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
fieldset { border: 0; min-width: 0; }
[hidden] { display: none !important; }

:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; border-radius: 4px; }
.ivory :focus-visible, .form :focus-visible { outline-color: #1d5547; }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip {
  position: fixed; left: 12px; top: -60px; z-index: 100;
  background: var(--brass); color: var(--bg); padding: 10px 16px; border-radius: 8px; font-weight: 600; text-decoration: none;
  transition: top 0.2s;
}
.skip:focus { top: 12px; }

.wrap { width: min(1240px, 100% - 2 * var(--gutter)); margin-inline: auto; }

.eyebrow {
  font: 600 0.72rem/1.3 var(--sans);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brass);
}
:lang(ka) .eyebrow { letter-spacing: 0.06em; }
.eyebrow span { color: var(--ink-3); margin-right: 0.6em; }

.h2 {
  font: 300 clamp(2rem, 4.4vw, 3.6rem)/1.06 var(--serif);
  letter-spacing: -0.015em;
  text-wrap: balance;
}
.h3 { font: 300 clamp(1.5rem, 2.6vw, 2.2rem)/1.15 var(--serif); text-wrap: balance; }
:lang(ka) .h2, :lang(ka) .h3 { letter-spacing: 0; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  min-height: 48px; padding: 0 1.4em; border-radius: 999px;
  font: 600 0.92rem/1 var(--sans); text-decoration: none; cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.4s var(--ease), background-color 0.3s, border-color 0.3s, color 0.3s;
}
.btn:hover { transform: translateY(-2px); }
.btn--sm { min-height: 40px; padding: 0 1.1em; font-size: 0.84rem; }
.btn--brass { background: var(--brass); color: #16110a; }
.btn--brass:hover { background: #e6c993; }
.btn--ghost { border-color: rgba(236, 229, 212, 0.4); color: var(--ink); background: rgba(10, 20, 18, 0.35); }
.btn--ghost:hover { border-color: var(--brass); color: var(--brass); }
.btn--green { background: #1d3b33; color: var(--ivory); }
.btn--green:hover { background: #24493f; }
.btn--ghost-dark { border-color: rgba(18, 32, 28, 0.35); color: var(--ivory-ink); }

/* header */
.top {
  position: fixed; inset: 0 0 auto 0; z-index: 40;
  height: var(--top-h);
  display: flex; align-items: center; gap: 24px;
  padding: 0 var(--gutter);
  background: linear-gradient(rgba(10, 20, 18, 0.82), rgba(10, 20, 18, 0));
}
.top { transition: background-color 0.4s; }
.top.is-solid { background: rgba(10, 20, 18, 0.94); box-shadow: 0 1px 0 var(--line); }
.top--solid { position: sticky; background: var(--bg); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; margin-right: auto; }
.brand__mark { width: 18px; height: 29px; color: var(--brass); }
.brand__name { font: 400 1.2rem/1 var(--serif); letter-spacing: -0.01em; }
:lang(ka) .brand__name, :lang(ru) .brand__name { font-family: "Fraunces", Georgia, serif; }
.nav { display: flex; gap: 26px; }
.nav a { font-size: 0.86rem; color: var(--ink-2); text-decoration: none; padding: 6px 0; }
.nav a:hover { color: var(--ink); }
.top__tools { display: flex; align-items: center; gap: 14px; }
.langs { display: flex; gap: 2px; }
.langs a {
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.06em; text-decoration: none;
  color: var(--ink-3); padding: 8px 7px; border-radius: 6px; min-width: 32px; text-align: center;
}
.langs a[aria-current] { color: var(--brass); }
.langs a:hover { color: var(--ink); }
.motion-toggle {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  background: transparent; border: 1px solid var(--line); cursor: pointer; color: var(--ink-2);
}
.motion-toggle svg { width: 12px; height: 12px; fill: currentColor; }
.motion-toggle .i-play { display: none; }
.motion-toggle[aria-pressed="true"] .i-play { display: block; }
.motion-toggle[aria-pressed="true"] .i-pause { display: none; }
.progress { display: none; }

@media (max-width: 960px) {
  .nav { display: none; }
}
@media (max-width: 560px) {
  :root { --top-h: 58px; }
  .top { gap: 10px; }
  .brand__name { font-size: 1.05rem; }
  .top__tools { gap: 6px; }
  .langs a { padding: 8px 4px; min-width: 28px; }
  .top .btn--sm { padding: 0 0.85em; font-size: 0.78rem; min-height: 36px; }
}
@media (max-width: 380px) {
  .brand__name { display: none; }
}

/* entrance: once, via IntersectionObserver (js/page.js adds .is-in) */
.js .reveal { opacity: 0; transform: translateY(28px); }
.js .reveal.is-in {
  opacity: 1; transform: none;
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
  transition-delay: calc(var(--i, 0) * 75ms);
}

html.is-paused *, html.is-paused *::before, html.is-paused *::after { animation-play-state: paused !important; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; }
  .btn:hover { transform: none; }
}
