/* ============================================================
   Galexa Pro — design system
   Drenched deep-green stage · champagne-gold spotlight · cream ink
   Fonts: Unbounded (display) + Sofia Sans (text) — full Cyrillic
   ============================================================ */

:root {
  /* color — OKLCH with hex anchors in comments */
  --bg:        oklch(0.27 0.05 150);   /* deep pine  ~#12291b */
  --bg-deep:   oklch(0.22 0.04 150);   /* darker band */
  --surface:   oklch(0.32 0.05 148);   /* raised panel */
  --surface-2: oklch(0.36 0.055 147);
  --line:      oklch(0.55 0.05 148 / 0.35);
  --ink:       oklch(0.965 0.012 110); /* warm cream */
  --ink-soft:  oklch(0.86 0.03 130);
  --gold:      oklch(0.84 0.105 88);   /* champagne  ~#e5c07b */
  --gold-soft: oklch(0.88 0.09 90);
  --leaf:      oklch(0.76 0.13 145);   /* fresh green accent */

  --font-display: "Unbounded", "Sofia Sans", system-ui, sans-serif;
  --font-text: "Sofia Sans", system-ui, sans-serif;

  --wrap: 68rem;
  --pad: clamp(1.25rem, 4vw, 3rem);

  /* z-scale */
  --z-sticky: 10;
  --z-toast: 20;
}

* { box-sizing: border-box; margin: 0; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  background: #12291b; /* fallback */
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }

h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.5rem, 3.4vw, 2.4rem);
  line-height: 1.2;
  letter-spacing: -0.01em;
}

a { color: var(--gold); text-underline-offset: 3px; }
a:hover { color: var(--gold-soft); }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 2px;
}

::selection { background: var(--gold); color: var(--bg-deep); }

/* ============ buttons ============ */

.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--bg-deep);
  background: var(--gold);
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.8em 1.7em;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}
.btn:hover { background: var(--gold-soft); color: var(--bg-deep); transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn-ghost:hover { background: var(--surface); color: var(--ink); border-color: var(--gold); }

.btn-small { padding: 0.55em 1.2em; font-size: 0.85rem; white-space: nowrap; }
.btn-large { padding: 0.95em 2.4em; font-size: 1.05rem; }

@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
  .btn:hover { transform: none; }
}

/* ============ header ============ */

.site-head {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0.9rem var(--pad);
  background: color-mix(in oklab, var(--bg-deep) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.wordmark { display: block; line-height: 0; }
.wordmark img { height: 2.6rem; width: auto; display: block; }

.site-nav { display: flex; gap: 1.4rem; margin-inline: auto; }
.site-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
}
.site-nav a:hover { color: var(--gold); }

.head-actions { display: flex; align-items: center; gap: 0.8rem; margin-left: auto; }
.site-nav + .head-actions { margin-left: 0; }

@media (max-width: 720px) {
  .site-nav { display: none; }
}

/* ============ hero ============ */

.hero {
  position: relative;
  max-width: var(--wrap);
  margin-inline: auto;
  padding: clamp(4rem, 10vh, 7rem) var(--pad) 0;
  min-height: 82vh;
  display: flex;
  flex-direction: column;
}

.hero-kicker {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 0.9rem;
  color: var(--leaf);
  margin-bottom: 1.4rem;
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.1rem, 5.6vw, 4rem);
  line-height: 1.12;
  letter-spacing: -0.015em;
  max-width: 16ch;
}

.hero-sub {
  max-width: 58ch;
  margin-top: 1.6rem;
  color: var(--ink-soft);
  font-size: 1.1rem;
}

.hero-cta { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 2.2rem; }

/* animated equalizer — bars are generated by JS */
.wave {
  margin-top: auto;
  padding-top: 3rem;
  display: flex;
  align-items: flex-end;
  gap: clamp(3px, 0.6vw, 7px);
  height: clamp(6rem, 16vh, 10rem);
  overflow: hidden;
}
.wave span {
  flex: 1;
  min-width: 3px;
  height: 100%;
  border-radius: 99px 99px 0 0;
  background: var(--gold);
  transform-origin: bottom;
  transform: scaleY(var(--h, 0.3));
  opacity: 0.85;
  animation: wave-bounce var(--d, 1.4s) ease-in-out var(--delay, 0s) infinite alternate;
}
.wave span:nth-child(3n) { background: var(--leaf); }
.wave span:nth-child(7n) { opacity: 0.5; }

@keyframes wave-bounce {
  from { transform: scaleY(var(--h, 0.3)); }
  to   { transform: scaleY(var(--h2, 0.8)); }
}

@media (prefers-reduced-motion: reduce) {
  .wave span { animation: none; }
}

/* ============ sections ============ */

.section {
  max-width: var(--wrap);
  margin-inline: auto;
  padding: clamp(4rem, 9vw, 6.5rem) var(--pad) 0;
}

.section-head { max-width: 46rem; margin-bottom: 2.6rem; }
.section-head p { color: var(--ink-soft); margin-top: 0.7rem; }

/* scroll reveal — armed only by JS when motion is allowed */
.reveal-armed .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal-armed .reveal.in { opacity: 1; transform: none; }

/* ============ demos ============ */

.demo-list { list-style: none; padding: 0; border-top: 1px solid var(--line); }

.demo-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-areas: "play meta time" "play bar bar";
  align-items: center;
  column-gap: 1.1rem;
  row-gap: 0.35rem;
  padding: 0.9rem 0.4rem;
  border-bottom: 1px solid var(--line);
  transition: background 0.2s ease-out;
}
.demo-row:hover { background: color-mix(in oklab, var(--surface) 55%, transparent); }
.demo-row.playing { background: color-mix(in oklab, var(--surface) 80%, transparent); }

.demo-play {
  grid-area: play;
  width: 2.9rem;
  height: 2.9rem;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--gold);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.2s ease-out, border-color 0.2s ease-out;
}
.demo-play:hover { border-color: var(--gold); background: var(--surface-2); }
.demo-row.playing .demo-play { background: var(--gold); color: var(--bg-deep); border-color: var(--gold); }
.demo-play svg { width: 1rem; height: 1rem; display: block; }

.demo-meta { grid-area: meta; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.3rem 0.9rem; }
.demo-title { font-weight: 600; font-size: 1.02rem; }
.demo-tag { color: var(--leaf); font-size: 0.85rem; }

.demo-time {
  grid-area: time;
  font-variant-numeric: tabular-nums;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.demo-bar {
  grid-area: bar;
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 99px;
  background: linear-gradient(to right, var(--gold) var(--p, 0%), var(--surface-2) var(--p, 0%));
  cursor: pointer;
  display: none;
  border: 0;
}
.demo-row.playing .demo-bar,
.demo-row.paused .demo-bar { display: block; }
.demo-bar::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--gold);
  border: none;
  cursor: grab;
}
.demo-bar::-moz-range-thumb {
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--gold);
  border: none;
  cursor: grab;
}


/* ============ services / split ============ */

.section-split {
  display: grid;
  grid-template-columns: minmax(16rem, 2fr) 3fr;
  gap: clamp(2rem, 5vw, 4.5rem);
}
.split-intro p { color: var(--ink-soft); margin-top: 0.8rem; }
@media (min-width: 860px) {
  .split-intro { position: sticky; top: 6rem; align-self: start; }
}
@media (max-width: 860px) {
  .section-split { grid-template-columns: 1fr; }
}

.service-list { list-style: none; padding: 0; }
.service-list li {
  padding: 1.3rem 0;
  border-bottom: 1px solid var(--line);
}
.service-list li:first-child { border-top: 1px solid var(--line); }
.service-list h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.1rem;
  margin-bottom: 0.3rem;
}
.service-list p { color: var(--ink-soft); max-width: 52ch; }

/* ============ language band (gold) ============ */

.lang-band {
  margin-top: clamp(4.5rem, 10vw, 7rem);
  background: var(--gold);
  color: var(--bg-deep);
  padding: clamp(3rem, 7vw, 5rem) var(--pad);
}
.lang-band > * { max-width: var(--wrap); margin-inline: auto; }
.lang-band h2 { color: var(--bg-deep); }

.lang-row {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 2.4rem;
  margin-top: 1.6rem;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.1rem, 2.6vw, 1.7rem);
}
.lang-row span {
  font-family: var(--font-text);
  font-size: 0.75em;
  font-style: italic;
  opacity: 0.75;
  margin-left: 0.3em;
}
.lang-note {
  margin-top: 1.8rem;
  max-width: 56ch;
  font-size: 1.05rem;
  font-weight: 500;
}

/* ============ process ============ */

.process-steps {
  list-style: none;
  padding: 0;
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.6rem 2rem;
}
.process-steps li { counter-increment: step; }
.process-steps li::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 1.6rem;
  color: var(--leaf);
  margin-bottom: 0.5rem;
}
.process-steps h3 { font-size: 1.05rem; font-weight: 600; margin-bottom: 0.3rem; }
.process-steps p { color: var(--ink-soft); font-size: 0.98rem; }

/* ============ about ============ */

.portrait {
  position: relative;
  width: min(100%, 17rem);
  aspect-ratio: 4 / 5;
  border-radius: 1rem;
  overflow: hidden;
  background:
    radial-gradient(circle at 30% 20%, color-mix(in oklab, var(--leaf) 25%, transparent), transparent 60%),
    var(--surface);
  border: 1px solid var(--line);
}
.portrait img { width: 100%; height: 100%; object-fit: cover; display: block; position: relative; z-index: 1; }
.portrait-mark {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 3rem;
  color: var(--gold);
  letter-spacing: 0.1em;
}

.portrait-2 {
  width: min(70%, 12rem);
  margin: -4rem 0 0 auto;
  border: 3px solid var(--bg);
  position: relative;
  z-index: 2;
}

.about-body p { max-width: 60ch; }
.about-body p + p { margin-top: 1rem; }
.about-body h2 { margin-bottom: 1.2rem; }
.credits {
  margin-top: 1.6rem;
  color: var(--leaf);
  font-size: 0.95rem;
}

/* ============ contact form ============ */

.contact { padding-bottom: clamp(4rem, 9vw, 6.5rem); }

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.3rem 1.6rem;
  max-width: 46rem;
}
@media (max-width: 680px) {
  .form-grid { grid-template-columns: 1fr; }
}
.field { display: flex; flex-direction: column; gap: 0.4rem; }
.field-wide { grid-column: 1 / -1; }

.field label { font-weight: 600; font-size: 0.95rem; }
.field label small { font-weight: 400; color: var(--ink-soft); }

.field input,
.field select,
.field textarea {
  font: inherit;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0.6rem;
  padding: 0.7em 0.9em;
}
.field input::placeholder,
.field textarea::placeholder { color: oklch(0.74 0.02 130); }
.field select { cursor: pointer; }
.field textarea { resize: vertical; min-height: 7rem; }

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 2px solid var(--gold);
  outline-offset: 0;
  border-color: transparent;
}

.field.invalid input,
.field.invalid textarea { border-color: oklch(0.7 0.19 25); }

.consent {
  flex-direction: row;
  align-items: flex-start;
  gap: 0.7rem;
}
.consent input { width: 1.15rem; height: 1.15rem; margin-top: 0.25rem; accent-color: var(--gold); flex-shrink: 0; }
.consent label { font-weight: 400; color: var(--ink-soft); font-size: 0.92rem; }

/* honeypot — off-screen, not display:none (bots skip those) */
.hp {
  position: absolute;
  left: -6000px;
  top: -6000px;
}

.form-note {
  margin: 1.4rem 0 1rem;
  min-height: 1.5em;
  max-width: 46rem;
  font-weight: 500;
}
.form-note.ok { color: var(--leaf); }
.form-note.err { color: oklch(0.78 0.15 40); }

#formSubmit[disabled] { opacity: 0.6; cursor: wait; }

/* ============ footer ============ */

.site-foot {
  background: var(--bg-deep);
  border-top: 1px solid var(--line);
  margin-top: 2rem;
  padding: 2.8rem var(--pad) 3.2rem;
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.95rem;
}
.foot-brand { line-height: 0; }
.foot-brand img { height: 3.4rem; width: auto; }
.site-foot p + p { margin-top: 0.45rem; }
.foot-note { margin-top: 1.2rem; font-size: 0.85rem; opacity: 0.8; }

/* ============ payment (Revolut) ============ */

.pay-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: clamp(1.4rem, 3vw, 2.2rem);
}
.pay-brand {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.2rem;
  color: var(--gold);
  margin-bottom: 0.4rem;
}
.pay-lead { color: var(--ink-soft); margin-bottom: 1.4rem; max-width: 52ch; }
.pay-card .form-grid { margin-bottom: 0.6rem; }
.pay-note { margin-top: 1rem; font-size: 0.88rem; color: var(--ink-soft); }

.demo-filters { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.2rem; }
.demo-filters button {
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink-soft);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.4em 1.1em;
  cursor: pointer;
}
.demo-filters button:hover { border-color: var(--gold); color: var(--ink); }
.demo-filters button[aria-pressed="true"] { background: var(--gold); border-color: var(--gold); color: var(--bg-deep); }
.demo-row.failed .demo-time { color: oklch(0.78 0.15 40); }
