/* ============================================================
   kurtanidze.ge — style.css
   Typeface declarations live in fonts.css.
   ============================================================ */

:root {
  color-scheme: dark;

  --bg: #09090b;
  --fg: #f3f1ec;
  --muted: rgba(243, 241, 236, .62);
  --faint: rgba(243, 241, 236, .40);
  --line: rgba(243, 241, 236, .13);
  --line-strong: rgba(243, 241, 236, .30);
  --glass: rgba(255, 255, 255, .035);
  --glass-hover: rgba(255, 255, 255, .075);

  --indigo: 99 110 255;
  --teal: 45 212 191;
  --peach: 255 168 118;
  --ok: #34d399;

  --font-display: "Instrument Serif", "Iowan Old Style", "Palatino Linotype", "Times New Roman", serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-ka: "Noto Serif Georgian", "Sylfaen", serif;

  --pad: clamp(20px, 4vw, 56px);
  --measure: 1240px;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: var(--pad);
  padding-top: max(var(--pad), env(safe-area-inset-top));
  padding-bottom: max(var(--pad), env(safe-area-inset-bottom));
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

::selection { background: rgb(var(--indigo) / .45); color: #fff; }

a { color: inherit; }

/* ---------- Background: aurora, grain, vignette, cursor light ---------- */
.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.bg__orb {
  position: absolute;
  width: 80vmax;
  height: 80vmax;
  border-radius: 50%;
  will-change: transform;
  animation: drift 26s ease-in-out infinite alternate;
}
.bg__orb--1 {
  left: -32vmax; top: -36vmax;
  background: radial-gradient(circle, rgb(var(--indigo) / .50) 0%, rgb(var(--indigo) / 0) 58%);
}
.bg__orb--2 {
  right: -36vmax; bottom: -42vmax;
  background: radial-gradient(circle, rgb(var(--teal) / .30) 0%, rgb(var(--teal) / 0) 58%);
  animation-duration: 32s;
  animation-delay: -9s;
}
.bg__orb--3 {
  left: 38vw; top: 18vh;
  width: 46vmax; height: 46vmax;
  background: radial-gradient(circle, rgb(var(--peach) / .20) 0%, rgb(var(--peach) / 0) 60%);
  animation-duration: 22s;
  animation-delay: -15s;
}

@keyframes drift {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  50%  { transform: translate3d(6vw, -4vh, 0) scale(1.08); }
  100% { transform: translate3d(-4vw, 6vh, 0) scale(.96); }
}

.bg__glyph {
  position: absolute;
  right: -3vw;
  bottom: -16vh;
  font-family: var(--font-ka);
  font-size: min(78vh, 62vw);
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(243, 241, 236, .075);
  user-select: none;
}

.bg__noise {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 240px 240px;
  opacity: .055;
}

.bg__vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 90% at 50% 45%, transparent 45%, rgba(0, 0, 0, .62) 100%);
}

.bg__spot {
  position: absolute;
  inset: 0;
  background: radial-gradient(640px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, .055), transparent 60%);
  opacity: 0;
  transition: opacity .8s ease;
}
.has-pointer .bg__spot { opacity: 1; }

/* ---------- Redirect progress (top edge) ---------- */
.progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 2px;
  z-index: 50;
  background: rgba(255, 255, 255, .06);
  transition: opacity .5s ease;
}
.progress__bar {
  height: 100%;
  width: 100%;
  transform-origin: left center;
  transform: scaleX(0);
  background: linear-gradient(90deg, rgb(var(--indigo)), rgb(var(--teal)));
  box-shadow: 0 0 12px rgb(var(--teal) / .6);
  transition: transform .08s linear;
}
.progress.is-done { opacity: 0; }

/* ---------- Layout frame ---------- */
.top, .hero, .bottom {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--measure);
  margin-inline: auto;
}

/* ---------- Header ---------- */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 13px;
  color: var(--muted);
}
.wordmark {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 23px;
  line-height: 1;
  color: var(--fg);
  text-decoration: none;
}
.wordmark span { color: var(--faint); }

.meta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.meta__dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--ok);
  animation: pulse 2.6s ease-out infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgb(52 211 153 / .55); }
  70%  { box-shadow: 0 0 0 9px rgb(52 211 153 / 0); }
  100% { box-shadow: 0 0 0 0 rgb(52 211 153 / 0); }
}
.meta__sep { color: var(--faint); }
.meta__tz { color: var(--faint); }
.meta__tz:empty { display: none; }

/* ---------- Hero ---------- */
.hero {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding-block: clamp(32px, 7vh, 88px);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 clamp(14px, 2vw, 22px);
  font-family: var(--font-ka);
  font-size: clamp(15px, 1.5vw, 19px);
  letter-spacing: .01em;
  color: var(--muted);
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--line-strong);
}

.name {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(3.75rem, 11vw, 9.5rem);
  line-height: .96;
  letter-spacing: -.02em;
  text-wrap: balance;
}
.name em {
  font-style: italic;
  color: transparent;
  background: linear-gradient(100deg, #fff 0%, #d6dbff 45%, #a8e6dc 100%);
  -webkit-background-clip: text;
  background-clip: text;
  padding-inline: .06em;
  margin-inline: -.06em;
}

.tagline {
  max-width: 46ch;
  margin: clamp(22px, 3vw, 34px) 0 0;
  font-size: clamp(16px, 1.3vw, 19px);
  line-height: 1.6;
  color: var(--muted);
  text-wrap: pretty;
}
.tagline a {
  color: var(--fg);
  text-decoration: none;
  border-bottom: 1px solid var(--line-strong);
  transition: border-color .25s ease;
}
.tagline a:hover { border-color: var(--fg); }

/* ---------- Actions ---------- */
.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: clamp(32px, 4vw, 44px);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 54px;
  padding: 0 24px 0 22px;
  border-radius: 999px;
  font: 500 15px/1 var(--font-body);
  letter-spacing: .005em;
  text-decoration: none;
  white-space: nowrap;
  transition:
    transform .55s var(--ease),
    background-color .25s ease,
    border-color .25s ease,
    box-shadow .55s var(--ease);
  will-change: transform;
}
.btn:focus-visible {
  outline: 2px solid rgb(var(--teal));
  outline-offset: 4px;
}
.btn__icon { width: 18px; height: 18px; flex: none; }
.btn__arrow { width: 16px; height: 16px; flex: none; transition: transform .45s var(--ease); }
.btn:hover .btn__arrow { transform: translateX(4px); }

.btn--primary {
  background: var(--fg);
  color: #0b0b0d;
  box-shadow: 0 12px 32px -12px rgba(255, 255, 255, .28);
}
.btn--primary:hover {
  background: #fff;
  box-shadow: 0 22px 48px -14px rgba(255, 255, 255, .42);
}

.btn--ghost {
  color: var(--fg);
  border: 1px solid var(--line);
  background: var(--glass);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.btn--ghost:hover {
  border-color: var(--line-strong);
  background: var(--glass-hover);
}
.btn--ghost:hover .btn__arrow { transform: translate(3px, -3px); }

/* ---------- Auto-redirect status ---------- */
.redirect {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: clamp(22px, 3vw, 30px);
  padding: 7px 7px 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--glass);
  font-size: 13px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  transition: opacity .5s ease, transform .5s var(--ease);
}
.redirect b { color: var(--fg); font-weight: 500; }
.redirect__stay {
  appearance: none;
  border: 0;
  margin: 0;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .07);
  color: var(--fg);
  font: 500 12px/1 var(--font-body);
  cursor: pointer;
  transition: background-color .2s ease;
}
.redirect__stay:hover { background: rgba(255, 255, 255, .14); }
.redirect__stay:focus-visible { outline: 2px solid rgb(var(--teal)); outline-offset: 2px; }
.redirect.is-done {
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Footer ---------- */
.bottom {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  letter-spacing: .01em;
  color: var(--faint);
}

/* ---------- Motion ---------- */
.reveal {
  animation: rise 1.1s var(--ease) backwards;
  animation-delay: var(--d, 0s);
}
@keyframes rise {
  from { opacity: 0; transform: translateY(22px); }
}

.top, .hero, .bottom {
  transition: opacity .42s ease, transform .42s var(--ease);
}
.is-leaving .top,
.is-leaving .hero,
.is-leaving .bottom {
  opacity: 0;
  transform: translateY(-10px);
}

/* ---------- Small screens ---------- */
@media (max-width: 640px) {
  .name { font-size: clamp(3.6rem, 17.5vw, 5.4rem); }
  .wordmark { font-size: 21px; }
  .btn { height: 52px; padding: 0 20px 0 18px; }
  .actions { gap: 10px; }
  .bottom { flex-direction: column; gap: 4px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .bg__orb, .meta__dot, .reveal { animation: none; }
  .btn, .btn__arrow, .redirect, .top, .hero, .bottom { transition: none; }
}
