/* Zvanis (atbild.lv). Minimal: one screen, the sphere, a headline. Details live in a side panel. No icons.
   Quiet palette: dark graphite, accent at 190° with low saturation. Never #2563EB. */
:root {
  --bg: #0A0F15;
  --panel-bg: rgba(12, 17, 24, 0.88);
  --line: #243040;
  --line-2: rgba(143, 211, 228, 0.24);
  --text: #E8EDF2;
  --text-2: #9AA7B4;
  --text-3: #6B7886;
  --accent: #5FA8BF;
  --accent-2: #8FD3E4;
  --sans: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: "DM Mono", ui-monospace, Menlo, Consolas, monospace;
  --header-h: 64px;
  --panel-w: min(560px, 100vw);
  --ease: cubic-bezier(.22, .8, .24, 1);
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--sans); font-size: 15px; line-height: 1.55; font-weight: 400;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
a { color: inherit; }
button { font: inherit; color: inherit; }
::selection { background: rgba(143, 211, 228, 0.28); }

/* Sphere: fixed canvas behind everything */
#sphere { position: fixed; inset: 0; width: 100%; height: 100%; display: block; z-index: 0; pointer-events: none; }
#sphere-fallback { position: fixed; inset: 0; z-index: 0; pointer-events: none; display: none; background: radial-gradient(60vmin 60vmin at 71% 50%, rgba(95, 168, 191, 0.30), transparent 65%), var(--bg); }
body.no-webgl #sphere { display: none; }
body.no-webgl #sphere-fallback { display: block; }

/* Header */
.header {
  position: fixed; top: 0; left: 0; right: 0; height: var(--header-h); z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 0 clamp(16px, 3vw, 40px);
}
.mark { font-weight: 500; letter-spacing: .01em; text-decoration: none; font-size: 15px; }
.mark small { font-weight: 400; color: var(--text-3); margin-left: 6px; font-size: 12px; letter-spacing: .04em; }
.nav { display: flex; gap: 4px; }
.nav button { background: none; border: 0; padding: 6px 10px; font-size: 13.5px; color: var(--text-2); cursor: pointer; border-radius: 8px; transition: color .2s, background .2s; }
.nav button:hover { color: var(--text); background: rgba(255,255,255,.05); }
.header-actions { display: flex; align-items: center; gap: 8px; }
.lang { display: flex; gap: 2px; font-size: 12px; color: var(--text-3); margin-right: 8px; font-family: var(--mono); }
.lang a, .lang span { padding: 4px 6px; text-decoration: none; border-radius: 6px; }
.lang a[aria-current="page"] { color: var(--text); background: rgba(255,255,255,.06); }
.lang span { opacity: .45; cursor: default; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px; border-radius: 999px; padding: 10px 18px;
  font-size: 13.5px; font-weight: 500; text-decoration: none; cursor: pointer;
  border: 1px solid var(--line); color: var(--text); background: transparent;
  transition: background .2s, border-color .2s;
}
.btn:hover { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.28); }
.btn:focus-visible, .nav button:focus-visible, .chip:focus-visible, .tabs button:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #07131A; }
.btn-primary:hover { background: var(--accent-2); border-color: var(--accent-2); }
.btn-ghost { border-color: transparent; color: var(--text-2); }
.btn-ghost:hover { color: var(--text); background: rgba(255,255,255,.05); }
.btn-lg { padding: 13px 22px; font-size: 14.5px; }
.textlink { font-size: 13.5px; color: var(--text-2); text-decoration: none; padding: 6px 4px; border-bottom: 1px solid transparent; transition: color .2s, border-color .2s; }
.textlink:hover { color: var(--text); border-bottom-color: var(--line-2); }

/* Hero: the only screen */
.hero { position: relative; z-index: 1; min-height: 100vh; min-height: 100svh; display: grid; align-items: center; padding: calc(var(--header-h) + 24px) clamp(16px, 6vw, 96px) 96px; }
.hero-copy { max-width: min(560px, 46vw); transition: opacity .5s var(--ease), transform .5s var(--ease); }
body.panel-open .hero-copy { opacity: 0.1; pointer-events: none; }
.eyebrow { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-2); margin: 0 0 22px; font-family: var(--mono); }
.hero h1 { font-weight: 300; font-size: clamp(36px, 4.6vw, 62px); line-height: 1.04; letter-spacing: -0.025em; margin: 0 0 20px; text-wrap: balance; }
.hero h1 em { font-style: normal; color: var(--accent-2); }
.hero .lead { color: var(--text-2); font-size: clamp(15px, 1.25vw, 17.5px); max-width: 46ch; margin: 0 0 32px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.hero-note { margin-top: 22px; font-size: 12.5px; color: var(--text-3); }

/* State chips: bottom centre, they follow the sphere when the panel is open */
.states {
  position: fixed; z-index: 2; left: 50%; bottom: 28px; transform: translateX(-50%);
  display: flex; align-items: center; gap: 4px; padding: 5px;
  border: 1px solid var(--line); border-radius: 999px; background: rgba(12, 17, 24, 0.55); backdrop-filter: blur(12px);
  transition: left .5s var(--ease);
}
body.panel-open .states { left: calc((100vw - var(--panel-w)) / 2); }
.chip { border: 1px solid transparent; background: transparent; color: var(--text-2); border-radius: 999px; padding: 7px 13px; font-size: 12.5px; cursor: pointer; transition: all .2s; }
.chip:hover { color: var(--text); background: rgba(255,255,255,.05); }
.chip[aria-pressed="true"] { background: rgba(143, 211, 228, 0.12); border-color: var(--line-2); color: var(--text); }
.foot { position: absolute; left: clamp(16px, 6vw, 96px); bottom: 30px; margin: 0; font-size: 12px; color: var(--text-3); transition: opacity .4s; }
.foot a { color: var(--text-3); text-decoration: none; }
.foot a:hover { color: var(--text-2); }
body.panel-open .foot { opacity: 0; }

/* Information panel */
.panel {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 30; width: var(--panel-w);
  background: var(--panel-bg); backdrop-filter: blur(18px); border-left: 1px solid var(--line);
  transform: translateX(102%); transition: transform .5s var(--ease); display: flex; flex-direction: column;
  visibility: hidden;
}
.panel.is-open { transform: none; visibility: visible; }
.panel-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px 12px clamp(20px, 3vw, 32px); border-bottom: 1px solid var(--line); }
.tabs { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; flex: 1; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { flex: none; background: none; border: 0; padding: 7px 10px; font-size: 13px; color: var(--text-3); cursor: pointer; border-radius: 8px; white-space: nowrap; transition: color .2s, background .2s; }
.tabs button:hover { color: var(--text-2); }
.tabs button[aria-selected="true"] { color: var(--text); background: rgba(255,255,255,.06); }
.panel-close { background: none; border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: 12.5px; color: var(--text-2); cursor: pointer; flex: none; }
.panel-close:hover { color: var(--text); border-color: rgba(255,255,255,.3); }
.panel-body { overflow-y: auto; padding: clamp(24px, 4vh, 40px) clamp(20px, 3vw, 32px) 48px; }
.panel h2 { font-weight: 400; font-size: clamp(22px, 2.2vw, 28px); line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 12px; text-wrap: balance; }
.panel .intro { color: var(--text-2); margin: 0 0 26px; font-size: 14.5px; }
.list { margin: 0; padding: 0; }
.list dt { font-weight: 500; font-size: 15px; padding-top: 16px; border-top: 1px solid var(--line); }
.list dd { margin: 4px 0 16px; color: var(--text-2); font-size: 14px; }
.list > div { transition: background .2s; border-radius: 8px; }
.list.steps > div { cursor: default; }
.list.steps > div:hover dt, .list.steps > div.is-active dt { color: var(--accent-2); }
.list .n { font-family: var(--mono); font-size: 11px; color: var(--text-3); letter-spacing: .1em; margin-right: 12px; }
.tags { font-family: var(--mono); font-size: 11.5px; letter-spacing: .04em; color: var(--text-3); margin: 22px 0 0; }
.contacts { margin: 28px 0 0; font-size: 13px; color: var(--text-3); line-height: 1.8; }
.contacts a { color: var(--text-2); text-decoration: none; border-bottom: 1px solid var(--line); }
.contacts a:hover { color: var(--text); border-bottom-color: var(--accent-2); }

/* Form */
form.lead-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: grid; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 12.5px; color: var(--text-2); }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 14px; color: var(--text); background: rgba(10, 15, 21, 0.6);
  border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px; outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(95,168,191,.15); }
.field textarea { min-height: 88px; resize: vertical; }
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--text-3) 50%), linear-gradient(135deg, var(--text-3) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.consent { grid-column: 1 / -1; display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--text-2); }
.consent input { margin-top: 3px; accent-color: var(--accent); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-foot { grid-column: 1 / -1; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.form-foot small { color: var(--text-3); font-size: 12px; }
.form-status { grid-column: 1 / -1; margin: 0; font-size: 13.5px; color: var(--accent-2); display: none; }
.form-status.is-visible { display: block; }

/* Lab mode (?lab=1): internal tuning only */
.lab { position: fixed; z-index: 40; left: 16px; bottom: 16px; width: min(380px, calc(100% - 32px)); background: var(--panel-bg); border: 1px solid var(--line); border-radius: 12px; backdrop-filter: blur(14px); padding: 12px 14px; display: none; gap: 10px; font-size: 12px; }
.lab.is-visible { display: grid; }
.lab .row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; color: var(--text-3); }
.lab label { display: flex; justify-content: space-between; color: var(--text-2); width: 100%; }
.lab label span { font-family: var(--mono); color: var(--text); }
.lab input[type=range] { width: 100%; accent-color: var(--accent-2); margin: 2px 0 0; }
.lab .stats { font-family: var(--mono); color: var(--text-3); font-size: 11px; }

@media (prefers-reduced-motion: reduce) { .panel, .hero-copy, .states { transition: none; } }

/* Responsive */
@media (max-width: 1000px) { .nav { display: none; } }
@media (max-width: 899px) {
  body.panel-open .hero-copy { opacity: 1; }
  body.panel-open .states { left: 50%; }
}
@media (max-width: 720px) {
  body { font-size: 14.5px; }
  .hero { align-items: end; padding-bottom: 120px; }
  .hero-copy { max-width: none; }
  .states { left: 16px; right: 16px; transform: none; bottom: 16px; justify-content: center; overflow-x: auto; }
  body.panel-open .states { left: 16px; }
  .foot { display: none; }
  .header-actions .btn-primary, .lang { display: none; }
  form.lead-form { grid-template-columns: 1fr; }
}
