@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Russo+One&display=swap");

:root {
  --ink: #070a08;
  --ink-soft: #0c120e;
  --panel: rgba(11, 17, 13, 0.82);
  --panel-strong: rgba(8, 12, 9, 0.94);
  --paper: #f4f6ec;
  --muted: #aeb9aa;
  --lime: #a8ff3e;
  --green: #72da52;
  --yellow: #ffd65a;
  --red: #ff544f;
  --line: rgba(190, 255, 137, 0.22);
  --line-bright: rgba(206, 255, 159, 0.58);
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.58);
  --pointer-x: 0;
  --pointer-y: 0;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--paper);
  font-family: "Inter", Arial, sans-serif;
  background:
    radial-gradient(circle at 16% -10%, rgba(114, 218, 82, 0.14), transparent 32rem),
    linear-gradient(140deg, #080b09 0%, #101711 50%, #080a08 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: -3%;
  z-index: -2;
  background:
    linear-gradient(rgba(4, 7, 5, 0.84), rgba(4, 7, 5, 0.94)),
    url("/assets/evolved-hero.png") center / cover no-repeat;
  filter: blur(24px) saturate(0.55);
  transform: scale(1.08);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  opacity: 0.2;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.18'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

a {
  color: inherit;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 100;
  padding: 10px 14px;
  color: #081007;
  background: var(--lime);
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-shell {
  width: min(1460px, calc(100% - 34px));
  margin: 0 auto;
  padding: 18px 0 44px;
}

.topbar {
  position: sticky;
  top: 12px;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 70px;
  margin-bottom: 18px;
  padding: 10px 12px 10px 18px;
  border: 1px solid var(--line);
  background: linear-gradient(100deg, rgba(8, 12, 9, 0.94), rgba(13, 21, 15, 0.82));
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(18px);
  clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 0 100%);
}

.topbar::after {
  content: "";
  position: absolute;
  right: 0;
  top: 0;
  width: 90px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--lime));
  box-shadow: 0 0 18px var(--lime);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  text-decoration: none;
}

.brand-icon {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  object-fit: cover;
  border: 1px solid rgba(202, 255, 145, 0.6);
  box-shadow: 0 0 24px rgba(168, 255, 62, 0.22);
  clip-path: polygon(0 0, 82% 0, 100% 18%, 100% 100%, 18% 100%, 0 82%);
}

.brand-copy {
  display: grid;
  line-height: 1;
}

.brand-copy strong {
  font-family: "Russo One", sans-serif;
  font-size: 1.32rem;
  font-weight: 400;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.brand-copy small {
  margin-top: 7px;
  color: var(--lime);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.top-nav a {
  position: relative;
  padding: 11px 14px;
  overflow: hidden;
  color: #c4cec0;
  border: 1px solid transparent;
  text-decoration: none;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color 180ms ease, border-color 180ms ease, background 180ms ease;
}

.top-nav a::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 4px;
  height: 2px;
  background: var(--lime);
  box-shadow: 0 0 12px var(--lime);
  transform: scaleX(0);
  transition: transform 180ms ease;
}

.top-nav a:hover,
.top-nav a:focus-visible,
.top-nav a.active {
  color: #fff;
  border-color: rgba(168, 255, 62, 0.2);
  background: rgba(168, 255, 62, 0.07);
}

.top-nav a:hover::after,
.top-nav a:focus-visible::after,
.top-nav a.active::after {
  transform: scaleX(1);
}

.hero-stage {
  position: relative;
  min-height: clamp(620px, 76vh, 800px);
  overflow: hidden;
  isolation: isolate;
  border: 1px solid var(--line-bright);
  background: #080b08;
  box-shadow: var(--shadow), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
  clip-path: polygon(0 0, calc(100% - 36px) 0, 100% 36px, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0 100%);
  animation: sceneEnter 700ms cubic-bezier(0.2, 0.75, 0.2, 1) both;
}

.hero-backdrop {
  position: absolute;
  inset: -14px;
  z-index: -3;
  background: url("/assets/evolved-hero.png") center / cover no-repeat;
  transform: translate(calc(var(--pointer-x) * -7px), calc(var(--pointer-y) * -5px)) scale(1.025);
  transition: transform 180ms ease-out;
}

.hero-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(5, 8, 6, 0.97) 0%, rgba(5, 9, 6, 0.86) 28%, rgba(5, 8, 6, 0.3) 57%, rgba(5, 8, 6, 0.08) 100%),
    linear-gradient(0deg, rgba(5, 8, 6, 0.9) 0%, transparent 42%);
}

.hero-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 8;
  pointer-events: none;
  opacity: 0.24;
  background: repeating-linear-gradient(0deg, transparent 0 5px, rgba(198, 255, 143, 0.08) 6px);
  mix-blend-mode: screen;
  animation: scanSweep 9s linear infinite;
}

.hero-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(270px, 0.55fr);
  gap: 48px;
  min-height: inherit;
  padding: clamp(48px, 7vw, 94px) clamp(28px, 6vw, 86px) 180px;
}

.hero-copy {
  align-self: center;
  max-width: 760px;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.8);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  color: var(--lime);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 34px;
  height: 2px;
  background: var(--lime);
  box-shadow: 0 0 14px var(--lime);
}

.hero-copy h1 {
  max-width: 780px;
  margin: 0;
  font-family: "Russo One", sans-serif;
  font-size: clamp(3rem, 7vw, 6.7rem);
  font-weight: 400;
  line-height: 0.93;
  letter-spacing: -0.035em;
  text-transform: uppercase;
}

.hero-copy h1 .accent {
  display: block;
  color: var(--lime);
  text-shadow: 0 0 34px rgba(168, 255, 62, 0.24);
}

.hero-copy p {
  max-width: 650px;
  margin: 24px 0 0;
  color: #d2d9cf;
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button {
  position: relative;
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 22px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  background: rgba(12, 18, 13, 0.78);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  cursor: pointer;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.button::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -65%;
  width: 38%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.38), transparent);
  transform: skewX(-18deg);
}

.button:hover,
.button:focus-visible {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.45);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.34);
}

.button:hover::before,
.button:focus-visible::before {
  animation: buttonSheen 650ms ease;
}

.button-primary {
  color: #10170b;
  border-color: var(--lime);
  background: linear-gradient(135deg, #b7ff5d, #77dd42);
  box-shadow: 0 0 28px rgba(168, 255, 62, 0.18);
}

.button-telegram {
  border-color: rgba(72, 185, 255, 0.65);
  background: linear-gradient(135deg, #218cca, #2fb5e9);
}

.battle-readout {
  align-self: end;
  justify-self: end;
  width: min(100%, 320px);
  margin-bottom: 72px;
  padding: 18px;
  border-left: 2px solid var(--lime);
  background: linear-gradient(90deg, rgba(8, 13, 9, 0.9), rgba(8, 13, 9, 0.55));
  backdrop-filter: blur(8px);
}

.readout-title {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 15px;
  color: #dce8d7;
  font-size: 0.71rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 14px var(--lime);
  animation: statusPulse 1.8s ease-in-out infinite;
}

.is-offline .status-dot,
.readout-title.is-offline .status-dot {
  background: var(--red);
  box-shadow: 0 0 14px var(--red);
}

.readout-row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 9px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.readout-row strong {
  color: #fff;
  font-weight: 700;
}

.connect-dock {
  position: absolute;
  z-index: 12;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  grid-template-columns: auto minmax(240px, 1fr) auto;
  align-items: stretch;
  border-top: 1px solid rgba(206, 255, 159, 0.28);
  background: rgba(7, 11, 8, 0.9);
  backdrop-filter: blur(16px);
}

.dock-label {
  display: grid;
  place-content: center;
  min-width: 150px;
  padding: 18px 24px;
  color: var(--lime);
  border-right: 1px solid var(--line);
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.code-wrap {
  display: grid;
  align-content: center;
  min-width: 0;
  padding: 14px 22px;
}

.server-code {
  overflow: hidden;
  color: #fff;
  font-family: "Russo One", monospace;
  font-size: clamp(1.2rem, 3vw, 2.2rem);
  letter-spacing: 0.055em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.copy-feedback {
  min-height: 17px;
  margin-top: 4px;
  color: var(--lime);
  font-size: 0.72rem;
}

.dock-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 16px;
  border-left: 1px solid var(--line);
}

.ember-field {
  position: absolute;
  inset: 0;
  z-index: 4;
  overflow: hidden;
  pointer-events: none;
}

.ember-field i {
  position: absolute;
  bottom: -20px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--yellow);
  box-shadow: 0 0 10px var(--yellow);
  animation: emberDrift 6s linear infinite;
}

.ember-field i:nth-child(1) { left: 61%; animation-delay: -1s; }
.ember-field i:nth-child(2) { left: 73%; animation-delay: -3.2s; animation-duration: 8s; }
.ember-field i:nth-child(3) { left: 86%; animation-delay: -5s; animation-duration: 7s; }
.ember-field i:nth-child(4) { left: 48%; animation-delay: -2.1s; animation-duration: 9s; }
.ember-field i:nth-child(5) { left: 94%; animation-delay: -4.2s; animation-duration: 5.8s; }

.content-stack {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}

.section-panel {
  position: relative;
  padding: clamp(28px, 5vw, 64px);
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    linear-gradient(130deg, rgba(14, 22, 16, 0.94), rgba(8, 13, 10, 0.9)),
    repeating-linear-gradient(90deg, transparent 0 74px, rgba(168, 255, 62, 0.03) 75px);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.28);
  clip-path: polygon(0 0, calc(100% - 24px) 0, 100% 24px, 100% 100%, 0 100%);
}

.section-panel::before {
  content: attr(data-index);
  position: absolute;
  top: -0.18em;
  right: 0.05em;
  color: rgba(168, 255, 62, 0.045);
  font-family: "Russo One", sans-serif;
  font-size: clamp(7rem, 16vw, 13rem);
  line-height: 1;
}

.section-kicker {
  margin-bottom: 11px;
  color: var(--lime);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.section-panel h2 {
  position: relative;
  max-width: 850px;
  margin: 0;
  font-family: "Russo One", sans-serif;
  font-size: clamp(2rem, 4.5vw, 4rem);
  font-weight: 400;
  line-height: 1.05;
  text-transform: uppercase;
}

.section-lead {
  position: relative;
  max-width: 760px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1.03rem;
  line-height: 1.7;
}

.feature-grid,
.step-grid,
.principle-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 34px;
}

.feature-card,
.step-card,
.principle-card {
  min-height: 210px;
  padding: 24px;
  border: 1px solid rgba(206, 255, 159, 0.16);
  background: rgba(4, 8, 5, 0.6);
  transition: transform 220ms ease, border-color 220ms ease, background 220ms ease;
}

.feature-card:hover,
.step-card:hover,
.principle-card:hover {
  transform: translateY(-5px);
  border-color: rgba(206, 255, 159, 0.46);
  background: rgba(14, 25, 16, 0.85);
}

.card-number {
  display: inline-flex;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  margin-bottom: 28px;
  color: #0b1108;
  background: var(--lime);
  font-family: "Russo One", sans-serif;
  font-size: 0.9rem;
  clip-path: polygon(0 0, 75% 0, 100% 25%, 100% 100%, 25% 100%, 0 75%);
}

.feature-card h3,
.step-card h3,
.principle-card h3 {
  margin: 0 0 11px;
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.feature-card p,
.step-card p,
.principle-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.wide-cta {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 32px;
  padding: 24px;
  border-left: 3px solid var(--lime);
  background: rgba(168, 255, 62, 0.06);
}

.wide-cta strong {
  display: block;
  margin-bottom: 5px;
  font-size: 1.1rem;
  text-transform: uppercase;
}

.wide-cta span {
  color: var(--muted);
}

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 26px 4px 0;
  color: #899486;
  font-size: 0.78rem;
}

.footer b {
  color: var(--paper);
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 650ms ease, transform 650ms cubic-bezier(0.2, 0.72, 0.2, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

body.page-leave .site-shell {
  animation: pageLeave 260ms ease both;
}

@keyframes sceneEnter {
  from { opacity: 0; transform: scale(0.985) translateY(12px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes emberDrift {
  0% { opacity: 0; transform: translate(0, 0) scale(0.6); }
  14% { opacity: 1; }
  100% { opacity: 0; transform: translate(80px, -520px) scale(1.5); }
}

@keyframes scanSweep {
  from { background-position: 0 0; }
  to { background-position: 0 -120px; }
}

@keyframes muzzlePulse {
  0%, 88%, 100% { filter: brightness(1); }
  91% { filter: brightness(1.14); }
}

@keyframes buttonSheen {
  from { left: -65%; }
  to { left: 130%; }
}

@keyframes statusPulse {
  0%, 100% { opacity: 0.55; transform: scale(0.85); }
  50% { opacity: 1; transform: scale(1.16); }
}

@keyframes pageLeave {
  to { opacity: 0; transform: translateY(12px); }
}

@media (max-width: 980px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .top-nav {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .top-nav a {
    flex: 0 0 auto;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    padding-bottom: 200px;
  }

  .battle-readout {
    display: none;
  }

  .feature-grid,
  .step-grid,
  .principle-grid {
    grid-template-columns: 1fr;
  }

  .feature-card,
  .step-card,
  .principle-card {
    min-height: 0;
  }
}

@media (max-width: 760px) {
  .site-shell {
    width: min(100% - 18px, 1460px);
    padding-top: 9px;
  }

  .topbar {
    top: 5px;
    padding: 10px;
  }

  .brand-icon {
    width: 42px;
    height: 42px;
    flex-basis: 42px;
  }

  .brand-copy strong {
    font-size: 1.08rem;
  }

  .top-nav a {
    padding: 9px 10px;
    font-size: 0.67rem;
  }

  .hero-stage {
    min-height: 760px;
  }

  .hero-backdrop {
    background-position: 58% center;
  }

  .hero-stage::before {
    background:
      linear-gradient(0deg, rgba(5, 8, 6, 0.98) 0%, rgba(5, 8, 6, 0.78) 52%, rgba(5, 8, 6, 0.16) 100%),
      linear-gradient(90deg, rgba(5, 8, 6, 0.74), transparent);
  }

  .hero-grid {
    align-items: end;
    padding: 210px 22px 238px;
  }

  .hero-copy h1 {
    font-size: clamp(2.55rem, 14vw, 4rem);
  }

  .hero-copy p {
    font-size: 0.96rem;
  }

  .hero-actions,
  .hero-actions .button {
    width: 100%;
  }

  .connect-dock {
    grid-template-columns: 1fr;
  }

  .dock-label {
    min-width: 0;
    padding: 10px 18px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .code-wrap {
    padding: 12px 18px;
    text-align: center;
  }

  .server-code {
    font-size: clamp(1.05rem, 6vw, 1.65rem);
  }

  .dock-actions {
    justify-content: center;
    padding: 10px 12px 14px;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .dock-actions .button {
    min-height: 46px;
    padding: 0 14px;
    font-size: 0.69rem;
  }

  .section-panel {
    padding: 28px 20px;
  }

  .wide-cta,
  .footer {
    align-items: stretch;
    flex-direction: column;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .hero-backdrop {
    transform: none !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
