/* ===== Variables ===== */
:root {
  --bg: #fafafa;
  --bg-soft: #f1f3f5;
  --surface: #ffffff;
  --border: rgba(15, 23, 42, 0.08);
  --border-strong: rgba(15, 23, 42, 0.16);
  --text: #0a0a0a;
  --text-soft: #475569;
  --text-muted: #94a3b8;

  /* ChatGPT-style green + cyber accents */
  --accent: #10a37f;
  --accent-hover: #0d8a6a;
  --accent-soft: rgba(16, 163, 127, 0.08);
  --accent-glow: rgba(16, 163, 127, 0.4);

  --neon-cyan: #00d4ff;
  --neon-pink: #ff006e;
  --neon-yellow: #ffe066;

  --success: #10a37f;
  --error: #ef4444;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 16px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.08);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;

  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Consolas, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
}

/* Декоративные scan-lines поверх всей страницы — добавляют киберстиль на светлом */
.scan-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background-image: repeating-linear-gradient(
    180deg,
    transparent 0px,
    transparent 3px,
    rgba(16, 163, 127, 0.015) 3px,
    rgba(16, 163, 127, 0.015) 4px
  );
  mix-blend-mode: multiply;
}

/* Тонкая grid-сетка на фоне — киберстиль */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(16, 163, 127, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 163, 127, 0.025) 1px, transparent 1px);
  background-size: 48px 48px;
}

main { flex: 1; position: relative; z-index: 2; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 1080px; margin: 0 auto; padding: 0 24px; width: 100%; }
.container.narrow { max-width: 620px; }

/* ===== Header ===== */
.site-header {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 20;
}

.header-inner { display: flex; justify-content: space-between; align-items: center; }

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  color: var(--text);
  font-family: var(--mono);
  letter-spacing: -0.01em;
}
.logo:hover { text-decoration: none; }

.logo-mark {
  width: 28px;
  height: 28px;
  color: var(--accent);
  filter: drop-shadow(0 0 6px var(--accent-glow));
}

.logo-cursor {
  color: var(--accent);
  font-weight: 700;
  animation: cursorBlink 1.1s steps(2) infinite;
}

@keyframes cursorBlink {
  to { opacity: 0; }
}

.grad {
  background: linear-gradient(120deg, var(--accent) 0%, var(--neon-cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.header-nav { display: flex; gap: 22px; }
.header-nav a {
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 500;
  font-family: var(--mono);
  position: relative;
}
.header-nav a:hover { color: var(--accent); text-decoration: none; }
.header-nav a::before { content: "// "; opacity: 0.4; }

/* ===== Screens (steps) ===== */
.screen { display: none; padding: 64px 0; }
.screen-active { display: block; }
@media (max-width: 640px) { .screen { padding: 32px 0; } }

/* ===== Hero ===== */
.hero { text-align: center; margin-bottom: 36px; }

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  color: var(--text);
  padding: 6px 14px 6px 10px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 22px;
  font-family: var(--mono);
  letter-spacing: 0.02em;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 var(--accent-glow);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 var(--accent-glow); }
  50% { box-shadow: 0 0 0 6px transparent; }
}

.hero h1 {
  font-size: clamp(34px, 6vw, 56px);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.025em;
  margin-bottom: 18px;
}

.hero-sub {
  font-size: 17px;
  color: var(--text-soft);
  max-width: 480px;
  margin: 0 auto;
}

/* ===== Glitch h1/h2 — простое смещение вправо иногда ===== */
.glitch-h {
  position: relative;
  display: inline-block;
  animation: glitchShift 7s infinite;
}

/* Псевдо-элементы убраны — простой эффект только смещения */

@keyframes glitchShift {
  0%, 100% { transform: translate(0); }
  /* Короткий двойной "икр" каждые 7 сек: */
  /* 95-95.5% — небольшой сдвиг */
  /* 95.5-96% — обратно */
  /* 96-96.5% — снова */
  /* 97% — спокойствие */
  95%   { transform: translate(0); }
  95.5% { transform: translate(4px, 0); }
  96%   { transform: translate(0); }
  96.5% { transform: translate(3px, 0); }
  97%   { transform: translate(0); }
}

/* ===== Terminal-style card ===== */
.terminal-card {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md), 0 0 0 1px rgba(16, 163, 127, 0.04);
  overflow: hidden;
  padding: 0;
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-muted);
}

.t-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  display: inline-block;
}
.t-r { background: #ff5f57; }
.t-y { background: #febc2e; }
.t-g { background: #28c840; }

.t-title {
  margin-left: 8px;
  letter-spacing: 0.02em;
}

.terminal-body { padding: 28px 32px 32px; }

@media (max-width: 640px) { .terminal-body { padding: 20px; } }

.field-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-soft);
  margin-bottom: 10px;
  font-family: var(--mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

#key-input, #session-input {
  width: 100%;
  padding: 14px 16px;
  font-family: var(--mono);
  font-size: 15px;
  background: var(--bg-soft);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  color: var(--text);
  margin-bottom: 16px;
  transition: border 0.15s, box-shadow 0.15s;
}

#key-input {
  text-align: center;
  letter-spacing: 0.08em;
  font-weight: 600;
  font-size: 16px;
}

#session-input {
  resize: vertical;
  min-height: 140px;
  line-height: 1.5;
  font-size: 13px;
}

#key-input:focus, #session-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.terminal-hint {
  margin-top: 18px;
  padding: 12px 14px;
  background: var(--bg-soft);
  border-left: 2px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 13px;
  color: var(--text-soft);
  line-height: 1.55;
  font-family: var(--mono);
}

.hint-icon {
  color: var(--accent);
  font-weight: 700;
  margin-right: 6px;
}

/* ===== Buttons ===== */
.btn-primary, .btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: var(--mono);
  font-weight: 600;
  font-size: 14px;
  padding: 14px 24px;
  border-radius: var(--radius-md);
  cursor: pointer;
  border: none;
  transition: transform 0.1s, background 0.15s, box-shadow 0.15s, opacity 0.15s;
  width: 100%;
  letter-spacing: 0.02em;
  text-decoration: none;
}

.btn-primary {
  background: var(--text);
  color: white;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transform: translateX(-100%);
  transition: transform 0.5s;
}

.btn-primary:hover:not(:disabled) {
  background: var(--accent);
  box-shadow: 0 6px 20px var(--accent-glow);
}

.btn-primary:hover:not(:disabled)::before { transform: translateX(100%); }
.btn-primary:active:not(:disabled) { transform: translateY(1px); }
.btn-primary:disabled, .btn-secondary:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-cursor {
  display: inline-block;
  margin-left: 2px;
  animation: cursorBlink 1.1s steps(2) infinite;
}

.btn-secondary {
  background: var(--bg-soft);
  color: var(--text);
  border: 1px solid var(--border-strong);
}
.btn-secondary:hover:not(:disabled) { background: #e5e7eb; }

.btn-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: none;
}

.btn-loading .btn-text { opacity: 0.7; }
.btn-loading .btn-cursor { display: none; }
.btn-loading .btn-spinner { display: inline-block; }

@keyframes spin { to { transform: rotate(360deg); } }

.error-msg {
  color: var(--error);
  font-size: 13px;
  margin-top: 12px;
  min-height: 18px;
  text-align: center;
  font-family: var(--mono);
}

/* ===== Step header ===== */
.step-header { text-align: center; margin-bottom: 32px; }

.step-badge {
  display: inline-block;
  background: var(--text);
  color: white;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-family: var(--mono);
}

.step-header h2 {
  font-size: clamp(26px, 4.5vw, 36px);
  font-weight: 800;
  letter-spacing: -0.015em;
  margin-bottom: 12px;
}

.step-sub {
  font-size: 15px;
  color: var(--text-soft);
  max-width: 460px;
  margin: 0 auto;
}

/* ===== Step 2: instruction list ===== */
.step-list { list-style: none; margin-bottom: 28px; }

.step-list li {
  display: flex;
  gap: 14px;
  margin-bottom: 18px;
  font-size: 15px;
  color: var(--text);
  line-height: 1.55;
}

.step-list .num {
  flex-shrink: 0;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 6px;
  padding: 3px 8px;
  margin-top: 2px;
  letter-spacing: 0.04em;
}

.copy-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-family: var(--mono);
  font-size: 13px;
}

.copy-row code { flex: 1; word-break: break-all; color: var(--accent); }

.copy-btn {
  background: transparent;
  border: none;
  font-size: 16px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 0.15s;
  color: var(--text-soft);
}
.copy-btn:hover { background: var(--accent-soft); color: var(--accent); }

/* ===== Modal ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 16px;
}

.modal-overlay.modal-open {
  display: flex;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 32px;
  max-width: 440px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

@keyframes modalIn {
  from { transform: translateY(20px) scale(0.95); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

.modal-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 800;
}

.modal h3 {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 8px;
}

.modal-text {
  color: var(--text-soft);
  margin-bottom: 14px;
  font-size: 15px;
}

.email-pill {
  display: inline-block;
  background: var(--text);
  color: white;
  padding: 10px 16px;
  border-radius: 100px;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 16px;
  word-break: break-all;
  letter-spacing: 0.02em;
}

.modal-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 24px;
  font-family: var(--mono);
  line-height: 1.6;
}

.modal-hint #confirm-countdown {
  color: var(--accent);
  font-weight: 600;
}

.modal-actions { display: flex; gap: 10px; }
.modal-actions .btn-primary, .modal-actions .btn-secondary { flex: 1; width: auto; }

/* ===== Step 3: activation ===== */
.activation-card .terminal-body { padding: 40px 32px 36px; text-align: center; }

.orbit {
  position: relative;
  width: 160px;
  height: 160px;
  margin: 0 auto 28px;
}

.orbit-core {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 72px;
  height: 72px;
  transform: translate(-50%, -50%);
  background: var(--text);
  color: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 30px var(--accent-glow);
  z-index: 3;
  animation: corePulse 2.5s ease-in-out infinite;
}

.orbit-core svg {
  width: 40px;
  height: 40px;
}

@keyframes corePulse {
  0%, 100% { box-shadow: 0 0 25px var(--accent-glow); }
  50% { box-shadow: 0 0 55px var(--accent-glow); }
}

.orbit-ring {
  position: absolute;
  inset: 0;
  border: 1.5px solid transparent;
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: orbit 2s linear infinite;
}

.orbit-ring.r1 { animation-duration: 2s; }
.orbit-ring.r2 {
  inset: 16px;
  border-top-color: var(--neon-cyan);
  animation-duration: 2.8s;
  animation-direction: reverse;
}
.orbit-ring.r3 {
  inset: 32px;
  border-top-color: var(--neon-pink);
  animation-duration: 3.5s;
  opacity: 0.5;
}

@keyframes orbit { to { transform: rotate(360deg); } }

.activation-text {
  font-size: 17px;
  color: var(--text);
  font-weight: 500;
  min-height: 50px;
  margin-bottom: 20px;
  line-height: 1.5;
  transition: opacity 0.3s;
}

.activation-text.glitching {
  animation: textGlitch 0.4s ease;
}

@keyframes textGlitch {
  0%, 100% { transform: translate(0); filter: none; opacity: 1; }
  25% { transform: translate(-1.5px, 0); filter: hue-rotate(90deg); opacity: 0.85; }
  50% { transform: translate(1.5px, 1px); filter: hue-rotate(-90deg); }
  75% { transform: translate(-1px, -1px); filter: hue-rotate(45deg); }
}

/* Hacker terminal log */
.hacker-log {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  text-align: left;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-soft);
  margin-bottom: 18px;
  max-height: 90px;
  overflow: hidden;
  position: relative;
}

.log-row {
  white-space: nowrap;
  margin-bottom: 4px;
}

.log-prompt {
  color: var(--accent);
  margin-right: 6px;
  font-weight: 700;
}

.log-ok {
  color: var(--accent);
  font-weight: 600;
}

.log-cursor {
  color: var(--accent);
  animation: cursorBlink 1s steps(2) infinite;
}

.activation-meta { display: flex; justify-content: center; }

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-soft);
  color: var(--text-soft);
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 500;
  font-family: var(--mono);
  letter-spacing: 0.04em;
  border: 1px solid var(--border);
}

.status-chip::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 6px var(--accent);
  animation: pulse 2s infinite;
}

/* ===== Final screens ===== */
.success-card .terminal-body, .fail-card .terminal-body {
  padding: 40px 32px;
  text-align: center;
}

.success-mark {
  width: 72px;
  height: 72px;
  margin: 0 auto 16px;
  background: var(--accent);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 38px;
  font-weight: 800;
  box-shadow: 0 0 40px var(--accent-glow);
  animation: corePulse 2.5s ease-in-out infinite;
}

.fail-mark {
  width: 72px;
  height: 72px;
  margin: 0 auto 16px;
  background: var(--error);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 38px;
  font-weight: 800;
}

.success-card h2, .fail-card h2 {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 12px;
}

.success-sub, .fail-msg {
  color: var(--text);
  font-size: 15px;
  margin-bottom: 8px;
}

.success-sub strong {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 2px 6px;
  border-radius: 4px;
}

.success-hint {
  color: var(--text-muted);
  font-size: 13px;
  margin-bottom: 24px;
  font-family: var(--mono);
  line-height: 1.6;
}

.success-card .btn-primary { max-width: 260px; margin: 0 auto; }

/* ===== Sections ===== */
.section { padding: 80px 0; position: relative; z-index: 2; }
.section-light { padding: 80px 0; background: var(--surface); position: relative; z-index: 2; }

.section-title {
  font-size: clamp(24px, 4vw, 32px);
  text-align: center;
  margin-bottom: 40px;
  font-weight: 800;
  letter-spacing: -0.015em;
}

.how-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.how-item {
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 28px;
  position: relative;
  transition: border-color 0.2s, transform 0.2s;
}

.how-item:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.how-num {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-soft);
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  margin-bottom: 14px;
  letter-spacing: 0.04em;
}

.how-item h3 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 8px;
}

.how-item p {
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.6;
}

/* ===== FAQ ===== */
.faq-item {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 18px 22px;
  margin-bottom: 10px;
  transition: border 0.15s;
}

.faq-item[open] {
  border-color: var(--accent);
  box-shadow: var(--shadow-sm);
}

.faq-item summary {
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  position: relative;
  padding-right: 32px;
  font-size: 15px;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  color: var(--accent);
  font-size: 22px;
  font-weight: 300;
  transition: transform 0.15s;
}

.faq-item[open] summary::after { content: "−"; }

.faq-item p {
  color: var(--text-soft);
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.65;
}

/* ===== Footer ===== */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 22px 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  font-family: var(--mono);
  position: relative;
  z-index: 2;
  background: var(--surface);
}

/* ===== Responsive ===== */
@media (max-width: 640px) {
  .container { padding: 0 16px; }
  .terminal-body { padding: 20px; }
  .modal { padding: 24px 20px; }
  .modal-actions { flex-direction: column; }
  .section, .section-light { padding: 48px 0; }
  .header-nav { display: none; }
}
