:root {
  --terra: #a8705a;
  --terra-hi: #c08a72;
  --terra-lo: #5f4537;
  --teal: #2c4a4e;
  --brown: #4a3b2e;
  --script: 'Shrikhand', 'Unbounded', serif;
  --cream: #f4e8d6;
  --ink: #1c3033;
  --ink-2: #1e1918;
  --lime: #e2dfae;
  --red: #ff4b3a;
  --geo: 'Noto Sans Georgian', system-ui, sans-serif;
  --mono: 'Space Mono', 'Noto Sans Georgian', monospace;
  --display: 'Unbounded', 'Noto Sans Georgian', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body.locked { overflow: hidden; }
body {
  background: var(--terra);
  color: var(--cream);
  font-family: var(--geo);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
.mono { font-family: var(--mono); letter-spacing: .08em; text-transform: uppercase; }
em { font-style: normal; }

/* ---------- texture overlays ---------- */
.grain {
  position: fixed; inset: 0; z-index: 50; pointer-events: none; opacity: .12; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1s steps(6) infinite;
}
@keyframes grain {
  0% { background-position: 0 0; } 20% { background-position: -37px 23px; } 40% { background-position: 41px -52px; }
  60% { background-position: -66px -14px; } 80% { background-position: 29px 47px; } 100% { background-position: 0 0; }
}
.scan {
  position: fixed; inset: 0; z-index: 49; pointer-events: none; opacity: .07;
  background: repeating-linear-gradient(0deg, #000 0 1px, transparent 1px 3px);
}

/* ---------- hero ---------- */
#hero {
  position: relative; height: 100vh; height: 100svh; min-height: 600px; overflow: hidden;
  background:
    radial-gradient(ellipse 60% 55% at 50% 52%, var(--terra-hi) 0%, transparent 70%),
    radial-gradient(ellipse 120% 90% at 50% 50%, var(--terra) 40%, var(--terra-lo) 100%);
}
#hero::before { /* faint retro grid floor */
  content: ''; position: absolute; left: -50%; right: -50%; bottom: -10%; height: 55%;
  background:
    repeating-linear-gradient(90deg, rgba(255, 230, 210, .07) 0 1px, transparent 1px 80px),
    repeating-linear-gradient(0deg, rgba(255, 230, 210, .07) 0 1px, transparent 1px 80px);
  transform: perspective(500px) rotateX(62deg); transform-origin: 50% 100%;
  mask-image: linear-gradient(to top, #000 10%, transparent 85%);
}

.bigword {
  position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-46%);
  display: flex; justify-content: center;
  font-family: var(--script); font-weight: 400; font-size: clamp(64px, 17vw, 350px); line-height: 1;
  letter-spacing: -.01em; color: rgba(74, 59, 46, .34); user-select: none; white-space: nowrap;
}
.bigword span { display: inline-block; }

#scene { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

/* nav */
.nav {
  position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 40;
  width: min(940px, calc(100% - 32px));
  display: flex; align-items: center; gap: 18px;
  padding: 7px 7px 7px 22px; border-radius: 999px;
  background: rgba(244, 232, 214, .78); color: var(--ink);
  backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2);
  box-shadow: 0 10px 30px rgba(60, 15, 5, .18), inset 0 1px 0 rgba(255, 255, 255, .6);
}
.logo { font-family: var(--script); font-weight: 400; font-size: 22px; color: var(--teal); text-shadow: 2px 2px 0 rgba(74, 59, 46, .28); display: flex; align-items: baseline; gap: 8px; }
.logo small { font-size: 9px; font-weight: 400; opacity: .55; }
.links { list-style: none; display: flex; gap: 22px; margin: 0 auto; font-size: 12.5px; font-weight: 600; font-stretch: 80%; letter-spacing: .03em; }
.links a { opacity: .7; padding: 4px 0; transition: opacity .2s; }
.links a:hover, .links a.active { opacity: 1; }
.links a.active { box-shadow: 0 1.5px 0 currentColor; }
.cta {
  display: flex; align-items: center; gap: 10px; white-space: nowrap;
  background: var(--teal); color: var(--cream); padding: 11px 20px; border-radius: 999px;
  font-size: 13px; font-weight: 700; font-stretch: 80%; letter-spacing: .04em;
  transition: transform .25s, background .25s;
}
.cta:hover { transform: translateY(-1px); background: var(--ink); }
.cta .arr { color: var(--lime); transition: transform .25s; }
.cta:hover .arr { transform: translateX(3px); }

/* stats */
.stats {
  position: absolute; top: 96px; left: 50%; transform: translateX(-50%); z-index: 3;
  width: min(1180px, calc(100% - 64px)); list-style: none;
  display: flex; justify-content: space-between; pointer-events: none;
}
.stats li { display: flex; flex-direction: column; gap: 4px; }
.stats li:nth-child(2) { align-items: center; text-align: center; }
.stats li:nth-child(3) { align-items: flex-end; text-align: right; }
.stats b.geo { font-family: var(--geo); font-weight: 800; font-stretch: 70%; letter-spacing: .02em; }
.stats b { font-family: var(--display); font-weight: 500; font-size: clamp(20px, 2vw, 28px); letter-spacing: -.02em; }
.stats small { font-size: 10px; font-weight: 600; font-stretch: 75%; letter-spacing: .12em; opacity: .7; }

/* floating tag over the editor */
.tag {
  position: absolute; left: 0; top: 0; z-index: 4; opacity: 0;
  transform: translate(-50%, -100%);
  display: flex; align-items: center; gap: 10px;
  padding: 10px 18px 10px 14px; border-radius: 999px;
  background: var(--teal); color: var(--cream);
  font-size: 14px; font-weight: 800; font-stretch: 80%; letter-spacing: .05em; white-space: nowrap;
  box-shadow: 0 12px 28px rgba(30, 20, 12, .35), 0 0 0 1px rgba(226, 223, 174, .25);
  transition: background .2s, color .2s, box-shadow .2s;
}
.tag::after { /* pointer stem */
  content: ''; position: absolute; left: 50%; bottom: -7px; width: 14px; height: 14px; margin-left: -7px;
  background: inherit; transform: rotate(45deg); border-radius: 2px; z-index: -1;
}
.tag:hover, .tag.hot { background: var(--lime); color: var(--ink); box-shadow: 0 14px 34px rgba(40, 8, 2, .4), 0 0 30px rgba(226, 223, 174, .5); }
.ping { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--lime); flex: none; }
.tag:hover .ping, .tag.hot .ping { background: var(--ink); }
.ping::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: inherit; animation: ping 1.6s ease-out infinite; }
@keyframes ping { to { transform: scale(3.2); opacity: 0; } }

/* viewfinder corners */
.corner { position: absolute; width: 22px; height: 22px; z-index: 3; border-color: rgba(244, 232, 214, .55); border-style: solid; border-width: 0; pointer-events: none; }
.corner.tl { top: 14px; left: 14px; border-top-width: 1.5px; border-left-width: 1.5px; }
.corner.tr { top: 14px; right: 14px; border-top-width: 1.5px; border-right-width: 1.5px; }
.corner.bl { bottom: 14px; left: 14px; border-bottom-width: 1.5px; border-left-width: 1.5px; }
.corner.br { bottom: 14px; right: 14px; border-bottom-width: 1.5px; border-right-width: 1.5px; }

/* bottom row */
.bottom {
  position: absolute; left: 50%; bottom: 34px; transform: translateX(-50%); z-index: 3;
  width: min(1180px, calc(100% - 64px));
  display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; pointer-events: none;
}
.eyebrow { font-size: 10.5px; display: flex; align-items: center; gap: 8px; margin-bottom: 12px; opacity: .85; }
.rec { width: 8px; height: 8px; border-radius: 50%; background: var(--red); box-shadow: 0 0 10px var(--red); animation: blink 1.2s steps(2) infinite; }
@keyframes blink { 50% { opacity: .2; } }
.headline h1 {
  font-size: clamp(28px, 3.6vw, 54px); font-weight: 800; font-stretch: 70%; line-height: 1.02; letter-spacing: .005em;
  max-width: 13ch;
}
.headline h1 em { color: var(--lime); text-shadow: 3px 3px 0 var(--brown); }
.tc { font-size: 10.5px; opacity: .7; padding-bottom: 6px; }
.hint { font-size: 10.5px; opacity: .8; padding-bottom: 6px; }
.hint span { display: inline-block; color: var(--lime); animation: nudge 1.4s ease-in-out infinite; }
@keyframes nudge { 50% { transform: translate(3px, -3px); } }

/* ---------- transition flash (CRT on) ---------- */
.flash {
  position: fixed; inset: 0; z-index: 46; pointer-events: none; opacity: 0;
  background: radial-gradient(ellipse at center, #fff 0%, #e9ffd0 40%, var(--lime) 100%);
  transform: scaleY(.004);
}

/* ---------- contact ---------- */
#contact {
  position: fixed; inset: 0; z-index: 45; visibility: hidden; opacity: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 24px; overflow-y: auto;
  background:
    radial-gradient(ellipse 70% 60% at 20% 0%, rgba(192, 138, 114, .28), transparent 70%),
    radial-gradient(ellipse 60% 60% at 100% 100%, rgba(226, 223, 174, .08), transparent 70%),
    #132225;
}
#contact.open { visibility: visible; }
.win {
  width: min(1120px, 100%); margin: auto;
  border-radius: 18px; overflow: hidden;
  background: linear-gradient(180deg, #213638, #192b2d);
  border: 1px solid rgba(244, 232, 214, .1);
  box-shadow: 0 40px 100px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .05);
}
.win-bar {
  display: flex; align-items: center; gap: 14px; padding: 12px 14px 12px 18px;
  border-bottom: 1px solid rgba(244, 232, 214, .08); background: rgba(255, 255, 255, .02);
}
.dots { display: flex; gap: 7px; }
.dots i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; }
.dots i:nth-child(2) { background: #febc2e; }
.dots i:nth-child(3) { background: #28c840; }
.win-title { font-size: 10.5px; opacity: .5; text-transform: none; letter-spacing: .04em; }
.back {
  margin-left: auto; padding: 8px 16px; white-space: nowrap; border-radius: 999px; font-size: 12px; font-weight: 700; font-stretch: 80%; letter-spacing: .05em;
  background: rgba(244, 232, 214, .08); transition: background .2s, color .2s;
}
.back:hover { background: var(--cream); color: var(--ink); }

.win-body { display: grid; grid-template-columns: 1fr 1.25fr; }
.pane { padding: 40px 44px; }
.intro { border-right: 1px solid rgba(244, 232, 214, .08); display: flex; flex-direction: column; }
.intro h2, .done h2 { font-size: clamp(34px, 4.2vw, 62px); font-weight: 800; font-stretch: 68%; line-height: .98; margin-bottom: 18px; }
.intro h2 em { color: var(--lime); text-shadow: 3px 3px 0 var(--brown); }
.lead { font-size: 15px; line-height: 1.6; opacity: .72; max-width: 36ch; }
.direct { list-style: none; margin-top: auto; padding-top: 32px; display: grid; gap: 8px; }
.direct a {
  display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-radius: 12px;
  background: rgba(244, 232, 214, .04); border: 1px solid rgba(244, 232, 214, .07);
  font-size: 14px; transition: border-color .2s, background .2s, transform .2s;
}
.direct a:hover { border-color: rgba(226, 223, 174, .5); background: rgba(226, 223, 174, .06); transform: translateX(3px); }
.direct .mono { width: 26px; font-size: 10px; color: var(--lime); }

.form { display: flex; flex-direction: column; gap: 20px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field > span, legend { font-size: 10.5px; font-weight: 700; font-stretch: 75%; letter-spacing: .14em; opacity: .55; }
input, textarea {
  font: inherit; color: var(--cream); font-size: 15px; width: 100%;
  background: rgba(0, 0, 0, .25); border: 1px solid rgba(244, 232, 214, .12); border-radius: 10px;
  padding: 13px 14px; outline: none; resize: vertical; transition: border-color .2s, box-shadow .2s;
}
input::placeholder, textarea::placeholder { color: rgba(244, 232, 214, .3); }
input:focus, textarea:focus { border-color: var(--lime); box-shadow: 0 0 0 3px rgba(226, 223, 174, .12); }
.field.bad input { border-color: var(--red); }

.chips { border: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips legend { margin-bottom: 10px; }
.chips label { cursor: pointer; }
.chips input { position: absolute; opacity: 0; width: 0; height: 0; }
.chips span {
  display: inline-block; padding: 9px 15px; border-radius: 999px; font-size: 13.5px;
  border: 1px solid rgba(244, 232, 214, .16); transition: all .18s;
}
.chips label:hover span { border-color: rgba(244, 232, 214, .4); }
.chips input:checked + span { background: var(--lime); color: var(--ink); border-color: var(--lime); font-weight: 600; }
.chips input:focus-visible + span { box-shadow: 0 0 0 3px rgba(226, 223, 174, .3); }

.submit-row { display: flex; align-items: center; gap: 18px; margin-top: 4px; }
.render {
  display: flex; align-items: center; gap: 12px; padding: 15px 26px; border-radius: 999px;
  background: var(--lime); color: var(--ink); font-weight: 800; font-stretch: 80%; letter-spacing: .06em; font-size: 15px;
  box-shadow: 0 0 0 0 rgba(226, 223, 174, .5); transition: transform .2s, box-shadow .3s;
}
.render:hover { transform: translateY(-1px); box-shadow: 0 0 32px rgba(226, 223, 174, .45); }
.render kbd { font-family: var(--mono); font-size: 12px; padding: 2px 7px; border-radius: 5px; background: rgba(0, 0, 0, .12); }
.render:disabled { opacity: .5; pointer-events: none; }
.progress { flex: 1; display: flex; align-items: center; gap: 12px; opacity: 0; transition: opacity .3s; }
.progress.on { opacity: 1; }
.progress .bar { flex: 1; height: 6px; border-radius: 6px; background: rgba(244, 232, 214, .1); overflow: hidden; position: relative; }
.progress .bar::after { content: ''; position: absolute; inset: 0; width: var(--p, 0%); background: var(--lime); box-shadow: 0 0 12px var(--lime); }
.pct { font-size: 11px; min-width: 4ch; }
.err { min-height: 1em; font-size: 13px; color: var(--red); margin-top: -8px; }

.done { grid-column: 2; display: flex; flex-direction: column; justify-content: center; }
.done[hidden] { display: none; }
.done .eyebrow { color: var(--lime); }

.timeline {
  position: relative; padding: 12px 18px 14px 58px; display: grid; gap: 5px;
  border-top: 1px solid rgba(244, 232, 214, .08); background: rgba(0, 0, 0, .2);
}
.track { position: relative; height: 16px; }
.track b { position: absolute; left: -40px; top: 0; font: 700 9px/16px var(--mono); opacity: .4; }
.track i { position: absolute; top: 0; bottom: 0; border-radius: 4px; background: linear-gradient(180deg, #c08a72, #a8705a); border: 1px solid rgba(255, 255, 255, .15); }
.track:nth-child(1) i { background: linear-gradient(180deg, #efecc4, #d4d09a); }
.track.a i { background: repeating-linear-gradient(90deg, rgba(226, 223, 174, .55) 0 2px, rgba(226, 223, 174, .2) 2px 4px); }
.playhead { position: absolute; top: 6px; bottom: 6px; left: 58px; width: 2px; background: var(--red); box-shadow: 0 0 10px var(--red); animation: play 9s linear infinite; }
@keyframes play { to { left: calc(100% - 18px); } }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .links { display: none; }
  .nav { justify-content: space-between; }
  .stats { top: 84px; width: calc(100% - 40px); display: grid; grid-template-columns: repeat(3, auto); justify-content: space-between; }
  .stats b { font-size: 19px; }
  .stats small { font-size: 9px; letter-spacing: .08em; }
  .bottom { width: calc(100% - 40px); bottom: 26px; flex-direction: column; align-items: flex-start; gap: 10px; }
  .tc { display: none; }
  .hint { position: absolute; right: 0; bottom: 0; }
  .win-body { grid-template-columns: 1fr; }
  .intro { border-right: 0; border-bottom: 1px solid rgba(244, 232, 214, .08); }
  .pane { padding: 28px 22px; }
  .done { grid-column: 1; }
  .direct { padding-top: 22px; }
}
@media (max-width: 520px) {
  .nav { padding-left: 16px; }
  .cta { padding: 10px 14px; font-size: 12px; }
  .row2 { grid-template-columns: 1fr; }
  #contact { padding: 10px; }
  .win-title { display: none; }
  .hint { display: none; }
  .headline h1 { font-size: 30px; }
}
@media (prefers-reduced-motion: reduce) {
  .grain, .playhead, .ping::after, .rec, .hint span { animation: none; }
}
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
