/*
 * Cyberstan "coming soon" pages (ai.cyberstan.uz, cp.cyberstan.uz).
 * Tokens, type and texture follow the live cyberstan.uz: obsidian background,
 * emerald accent, Bricolage Grotesque headings, Plus Jakarta Sans body,
 * JetBrains Mono labels, a faint dot grid and soft green glows. No JavaScript.
 * Fonts come from Google Fonts with the same families and weights as cyberstan.uz.
 */

:root {
  color-scheme: dark;
  --obsidian: #080a09;
  --charcoal: #0b0e0d;
  --surface: #101412;
  --surface-raised: #131815;
  --line: rgb(255 255 255 / 0.08);
  --line-strong: rgb(255 255 255 / 0.14);
  --cyber: #00e676;
  --cyber-bright: #34f596;
  --cyber-dim: rgb(0 230 118 / 0.12);
  --ink: #f4f6f5;
  --body: #a7b1ac;
  --muted: #9ba5a0;
  --subtle: #7e8983;
  --radius: 6px;
  --radius-lg: 12px;
  --font-display: 'Bricolage Grotesque', ui-sans-serif, system-ui, sans-serif;
  --font-sans: 'Plus Jakarta Sans', ui-sans-serif, system-ui, sans-serif;
  --font-mono:
    'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --gutter: clamp(1rem, 4vw, 2rem);
}

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

/* overflow-x on html (not only body): body's value would propagate to the viewport and
   stop clipping the decorative glows, which extend past the right edge. */
html {
  overflow-x: clip;
  background-color: var(--obsidian);
  color: var(--ink);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  overflow-x: clip;
  background-color: var(--obsidian);
}

/* Dot grid, faded towards the bottom, and the two soft glows of the main site's hero. */
body::before,
body::after {
  content: '';
  position: absolute;
  pointer-events: none;
  z-index: 0;
}

body::before {
  inset: 0;
  background-image: radial-gradient(
    rgb(255 255 255 / 0.07) 1px,
    transparent 1.2px
  );
  background-size: 32px 32px;
  -webkit-mask-image: linear-gradient(
    to bottom,
    #000 0%,
    #000 45%,
    transparent 95%
  );
  mask-image: linear-gradient(to bottom, #000 0%, #000 45%, transparent 95%);
}

body::after {
  top: -9rem;
  right: -6rem;
  width: min(680px, 90vw);
  height: 520px;
  background: radial-gradient(
    ellipse at center,
    rgb(0 230 118 / 0.1),
    transparent 68%
  );
}

.glow-left {
  position: absolute;
  top: -7rem;
  left: -6rem;
  z-index: 0;
  width: 24rem;
  height: 24rem;
  pointer-events: none;
  background: radial-gradient(circle, rgb(0 230 118 / 0.08), transparent 68%);
}

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

::selection {
  background: rgb(0 230 118 / 0.25);
}

a {
  color: inherit;
}

.skip-link {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 10;
  padding: 0.5rem 0.875rem;
  border-radius: var(--radius);
  background: var(--cyber);
  color: var(--obsidian);
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

.container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Header ---------- */

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

/* The cyberstan.uz header logo: 36 px tall on phones, 40 px from 640 px. Like the main
   site, it is the original PNG cropped by the svg viewBox. */
.brand svg {
  display: block;
  width: auto;
  height: 36px;
}

.brand__tag {
  padding: 0.15rem 0.45rem;
  border: 1px solid rgb(0 230 118 / 0.35);
  border-radius: 4px;
  color: var(--cyber);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  line-height: 1.3;
}

.header-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.25rem;
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s ease;
}

.header-link:hover {
  color: var(--ink);
}

.header-link svg {
  width: 14px;
  height: 14px;
}

/* ---------- Hero ---------- */

main {
  flex: 1;
  display: flex;
  align-items: center;
}

.hero {
  display: grid;
  gap: clamp(2.5rem, 6vw, 4.5rem);
  align-items: center;
  padding-block: clamp(2.5rem, 7vw, 5.5rem);
}

@media (min-width: 960px) {
  .hero {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  }
}

.eyebrow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.6rem;
  margin: 0 0 1.5rem;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}

.eyebrow__host {
  color: var(--cyber);
}

.eyebrow__sep {
  color: var(--subtle);
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 1.25rem;
  padding: 0.35rem 0.75rem 0.35rem 0.6rem;
  border: 1px solid rgb(0 230 118 / 0.3);
  border-radius: 999px;
  background: var(--cyber-dim);
  color: var(--cyber-bright);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.status__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cyber);
  box-shadow: 0 0 0 4px rgb(0 230 118 / 0.15);
}

h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.75rem, 8vw, 5.25rem);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

h1 .accent {
  color: var(--cyber);
}

.lead {
  max-width: 34rem;
  margin: 1.5rem 0 0;
  color: var(--body);
  font-size: clamp(1rem, 1.6vw, 1.125rem);
  line-height: 1.65;
}

.lead strong {
  color: var(--ink);
  font-weight: 600;
}

.topics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.75rem 0 0;
  padding: 0;
  list-style: none;
}

.topics li {
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: rgb(16 20 18 / 0.7);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.02em;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2.25rem;
}

/* Same as the cyberstan.uz hero buttons: 14 px, 600, 12 x 24 px, radius 6 px. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.5;
  text-decoration: none;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
}

.btn svg {
  width: 16px;
  height: 16px;
}

.btn--primary {
  background: var(--cyber);
  color: var(--obsidian);
}

.btn--primary:hover {
  background: var(--cyber-bright);
}

.btn--secondary {
  border-color: var(--line-strong);
  background: rgb(19 24 21 / 0.9);
  color: var(--ink);
}

.btn--secondary:hover {
  border-color: rgb(0 230 118 / 0.4);
}

/* ---------- Visual panel ---------- */

.panel {
  position: relative;
  margin: 0; /* <figure> has 40 px side margins by default */
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgb(19 24 21 / 0.92), rgb(11 14 13 / 0.92)),
    var(--charcoal);
  box-shadow: 0 30px 80px -40px rgb(0 0 0 / 0.8);
}

.panel__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--line);
  color: var(--subtle);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}

.panel__dots {
  display: inline-flex;
  gap: 6px;
}

.panel__dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--line-strong);
}

.panel__body {
  padding: clamp(1rem, 3vw, 1.5rem);
}

.panel__caption {
  margin: 0;
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--line);
  color: var(--subtle);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.02em;
}

/* AI: a small neural network. */
.network {
  display: block;
  width: 100%;
  height: auto;
}

.network .edge {
  stroke: rgb(0 230 118 / 0.18);
  stroke-width: 1;
}

.network .edge--hot {
  stroke: rgb(0 230 118 / 0.55);
  stroke-width: 1.4;
}

.network .node {
  fill: var(--surface-raised);
  stroke: rgb(0 230 118 / 0.55);
  stroke-width: 1.5;
}

.network .node--hot {
  fill: var(--cyber);
  stroke: var(--cyber-bright);
}

.network .label {
  fill: var(--subtle);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
}

/* CP: a code listing. */
.code {
  margin: 0;
  overflow-x: auto;
  color: var(--body);
  font-family: var(--font-mono);
  font-size: clamp(0.75rem, 1.7vw, 0.84rem);
  line-height: 1.75;
  tab-size: 4;
}

.code code {
  display: grid;
  font: inherit;
}

.code .ln {
  display: inline-block;
  width: 2.25ch;
  margin-right: 1.25ch;
  color: rgb(126 137 131 / 0.6);
  text-align: right;
  user-select: none;
}

.code .kw {
  color: var(--cyber);
}

.code .fn {
  color: var(--ink);
  font-weight: 600;
}

.code .num {
  color: #f5c451;
}

.code .cm {
  color: var(--subtle);
  font-style: italic;
}

.complexity {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.complexity span {
  padding: 0.3rem 0.6rem;
  border: 1px solid rgb(0 230 118 / 0.25);
  border-radius: 4px;
  background: var(--cyber-dim);
  color: var(--cyber-bright);
  font-family: var(--font-mono);
  font-size: 0.72rem;
}

/* ---------- Footer ---------- */

.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--line);
}

.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding-block: 1.5rem;
  color: var(--subtle);
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
}

.site-footer a {
  color: var(--muted);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--cyber);
}

@media (min-width: 640px) {
  .brand svg {
    height: 40px;
  }
}

@media (max-width: 420px) {
  .brand__tag {
    display: none;
  }

  .actions .btn {
    flex: 1 1 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
