/* ═══════════════════════════════════════════════════════
   CookieLP Bot — Alice Madness Returns Theme
   ═══════════════════════════════════════════════════════ */

/* ── Variables ─────────────────────────────────────── */
:root {
  --bg:       #0a0205;
  --bg2:      #0f0308;
  --bg3:      #140510;
  --red:      #8b0000;
  --red-bright: #c0001a;
  --teal:     #1a9b8a;
  --teal-dim: #0d5a52;
  --text:     #e8d5b7;
  --text-dim: #9a8878;
  --glow:     #ff2d55;
  --gold:     #c9a84c;
  --white:    #f0e6d3;

  --font-title: 'Cinzel Decorative', serif;
  --font-body:  'EB Garamond', serif;
  --font-code:  'Share Tech Mono', monospace;

  --transition: 0.4s cubic-bezier(0.23, 1, 0.32, 1);
  --radius:     6px;
}

/* ── Reset ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.7;
  overflow-x: hidden;
  cursor: none;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; }

/* ── SVG filters (hidden) ───────────────────────────── */
.svg-filters { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ══════════════════════════════════════════════════════
   CUSTOM CURSOR
══════════════════════════════════════════════════════ */
.cursor {
  position: fixed;
  width: 20px;
  height: 20px;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  mix-blend-mode: difference;
}
.cursor::before,
.cursor::after {
  content: '';
  position: absolute;
  background: var(--teal);
  border-radius: 1px;
}
/* Crosshair horizontal */
.cursor::before {
  width: 20px; height: 2px;
  top: 50%; left: 0;
  transform: translateY(-50%);
}
/* Crosshair vertical */
.cursor::after {
  width: 2px; height: 20px;
  left: 50%; top: 0;
  transform: translateX(-50%);
}

.cursor-trail {
  position: fixed;
  width: 8px;
  height: 8px;
  background: var(--glow);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  opacity: 0.6;
  transition: opacity 0.3s;
  box-shadow: 0 0 8px var(--glow), 0 0 16px var(--glow);
}

/* ══════════════════════════════════════════════════════
   NAVBAR
══════════════════════════════════════════════════════ */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  padding: 0 2.5rem;
  height: 70px;
  background: rgba(10, 2, 5, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(139, 0, 0, 0.3);
  transition: background var(--transition), box-shadow var(--transition);
}
.navbar.scrolled {
  background: rgba(10, 2, 5, 0.97);
  box-shadow: 0 4px 30px rgba(139, 0, 0, 0.3);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-title);
  font-size: 1.2rem;
  color: var(--text);
  margin-right: auto;
}
.logo-symbol {
  color: var(--red);
  font-size: 1.4rem;
  filter: drop-shadow(0 0 6px var(--red));
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
}
.nav-links a {
  font-family: var(--font-body);
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  transition: color var(--transition);
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0; right: 0;
  height: 1px;
  background: var(--teal);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition);
}
.nav-links a:hover { color: var(--teal); }
.nav-links a:hover::after { transform: scaleX(1); }

.lang-toggle {
  background: none;
  border: 1px solid rgba(139, 0, 0, 0.5);
  color: var(--text-dim);
  font-family: var(--font-code);
  font-size: 0.8rem;
  padding: 0.3rem 0.8rem;
  cursor: none;
  border-radius: var(--radius);
  margin-left: 2rem;
  transition: border-color var(--transition), color var(--transition);
  letter-spacing: 0.1em;
}
.lang-toggle:hover {
  border-color: var(--teal);
  color: var(--teal);
}
.lang-sep { margin: 0 0.3rem; opacity: 0.4; }
.lang-en { opacity: 0.5; }
body.lang-en .lang-ru { opacity: 0.5; }
body.lang-en .lang-en { opacity: 1; }
body:not(.lang-en) .lang-ru { opacity: 1; }

.nav-burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: none;
  padding: 0.5rem;
  margin-left: 1rem;
}
.nav-burger span {
  display: block;
  width: 24px; height: 2px;
  background: var(--text);
  border-radius: 1px;
  transition: var(--transition);
}

/* ══════════════════════════════════════════════════════
   HERO
══════════════════════════════════════════════════════ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 0%, #1a0008 0%, var(--bg) 70%);
}

#heroCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* Fog layers */
.fog-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  animation: fogDrift 0s linear infinite;
}
.fog-1 {
  background: radial-gradient(ellipse 80% 40% at 20% 60%, rgba(26,155,138,0.06) 0%, transparent 60%);
  animation: fogDrift 18s linear infinite;
}
.fog-2 {
  background: radial-gradient(ellipse 60% 30% at 80% 30%, rgba(139,0,0,0.05) 0%, transparent 60%);
  animation: fogDrift 24s linear infinite reverse;
  animation-delay: -8s;
}
.fog-3 {
  background: radial-gradient(ellipse 100% 50% at 50% 100%, rgba(10,2,5,0.8) 0%, transparent 60%);
  animation: fogPulse 6s ease-in-out infinite;
}
@keyframes fogDrift {
  0%   { opacity: 0.4; transform: translateX(-3%) scale(1); }
  50%  { opacity: 0.7; transform: translateX(3%) scale(1.05); }
  100% { opacity: 0.4; transform: translateX(-3%) scale(1); }
}
@keyframes fogPulse {
  0%, 100% { opacity: 0.6; }
  50%       { opacity: 0.3; }
}

.hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: 2rem;
  max-width: 900px;
}

.hero-eyebrow {
  font-family: var(--font-body);
  font-style: italic;
  color: var(--text-dim);
  letter-spacing: 0.15em;
  font-size: 1rem;
  margin-bottom: 1.5rem;
  animation: fadeSlideDown 1.2s ease both;
  animation-delay: 0.3s;
}

/* ── Glitch title ───────────────────────────────────── */
.hero-title {
  font-family: var(--font-title);
  font-size: clamp(3.5rem, 10vw, 9rem);
  font-weight: 900;
  letter-spacing: 0.05em;
  line-height: 1;
  margin-bottom: 1.5rem;
  animation: fadeSlideDown 1.2s ease both;
  animation-delay: 0.5s;
}

.glitch-wrap {
  display: inline-block;
  position: relative;
}

.glitch-text {
  position: relative;
  color: var(--text);
  text-shadow:
    0 0 20px rgba(139,0,0,0.8),
    0 0 40px rgba(139,0,0,0.4),
    0 0 80px rgba(139,0,0,0.2);
  animation: glitchMain 6s infinite;
}

.glitch-text::before,
.glitch-text::after {
  content: attr(data-text);
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
}

.glitch-text::before {
  color: var(--teal);
  animation: glitchBefore 6s infinite;
  clip-path: polygon(0 20%, 100% 20%, 100% 40%, 0 40%);
  opacity: 0;
}
.glitch-text::after {
  color: var(--glow);
  animation: glitchAfter 6s infinite;
  clip-path: polygon(0 60%, 100% 60%, 100% 80%, 0 80%);
  opacity: 0;
}

@keyframes glitchMain {
  0%, 89%, 100% { transform: none; }
  90%  { transform: skewX(-3deg); }
  91%  { transform: skewX(3deg); }
  92%  { transform: none; }
  94%  { transform: translate(-2px, 1px); }
  95%  { transform: translate(2px, -1px); }
  96%  { transform: none; }
}
@keyframes glitchBefore {
  0%, 89%, 100% { opacity: 0; transform: none; }
  90%  { opacity: 0.8; transform: translate(-3px, 0); }
  91%  { opacity: 0; }
  93%  { opacity: 0.6; transform: translate(3px, 2px); }
  94%  { opacity: 0; }
}
@keyframes glitchAfter {
  0%, 89%, 100% { opacity: 0; transform: none; }
  90%  { opacity: 0; }
  91%  { opacity: 0.7; transform: translate(3px, -2px); }
  92%  { opacity: 0; }
  95%  { opacity: 0.5; transform: translate(-3px, 1px); }
  96%  { opacity: 0; }
}

.hero-subtitle {
  font-family: var(--font-body);
  font-size: 1.15rem;
  color: var(--text-dim);
  letter-spacing: 0.08em;
  margin-bottom: 2rem;
  animation: fadeSlideDown 1.2s ease both;
  animation-delay: 0.7s;
}

.hero-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2.5rem;
  animation: fadeSlideDown 1.2s ease both;
  animation-delay: 0.9s;
}
.hero-divider span:first-child,
.hero-divider span:last-child {
  color: var(--red);
  font-size: 1rem;
  filter: drop-shadow(0 0 4px var(--red));
}
.hero-divider .line {
  flex: 1;
  max-width: 120px;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--red), transparent);
}

.hero-buttons {
  display: flex;
  gap: 1.2rem;
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeSlideDown 1.2s ease both;
  animation-delay: 1.1s;
}

/* ── Buttons ────────────────────────────────────────── */
.btn {
  font-family: var(--font-title);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  padding: 0.9rem 2.2rem;
  border-radius: var(--radius);
  cursor: none;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.05);
  transform: translateX(-100%);
  transition: transform 0.4s ease;
}
.btn:hover::before { transform: translateX(0); }

.btn-primary {
  background: var(--red);
  color: var(--white);
  border: 1px solid var(--red-bright);
  box-shadow: 0 0 20px rgba(139,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.1);
}
.btn-primary:hover {
  background: var(--red-bright);
  box-shadow: 0 0 40px rgba(255,45,85,0.5), 0 0 80px rgba(255,45,85,0.2);
  transform: translateY(-2px);
}

.btn-secondary {
  background: transparent;
  color: var(--teal);
  border: 1px solid var(--teal);
  box-shadow: 0 0 10px rgba(26,155,138,0.2);
}
.btn-secondary:hover {
  background: rgba(26,155,138,0.1);
  box-shadow: 0 0 30px rgba(26,155,138,0.4);
  transform: translateY(-2px);
}

.btn-shop {
  background: transparent;
  color: #ff0000;
  border: 1px solid #ff0000;
  font-family: 'Press Start 2P', 'Cinzel Decorative', monospace;
  font-size: 0.65rem;
  box-shadow: 0 0 10px rgba(255,0,0,0.2);
  letter-spacing: 0.08em;
}
.btn-shop:hover {
  background: rgba(255,0,0,0.1);
  box-shadow: 0 0 30px rgba(255,0,0,0.5);
  transform: translateY(-2px);
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-dim);
  font-family: var(--font-body);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  animation: fadeIn 2s ease both 2s;
}
.scroll-blade {
  width: 2px;
  height: 40px;
  background: linear-gradient(to bottom, transparent, var(--red), transparent);
  animation: bladePulse 2s ease-in-out infinite;
}
@keyframes bladePulse {
  0%, 100% { opacity: 0.3; transform: scaleY(1); }
  50%       { opacity: 1;   transform: scaleY(1.2); }
}

/* ══════════════════════════════════════════════════════
   SECTIONS — common
══════════════════════════════════════════════════════ */
.section {
  position: relative;
  padding: 7rem 0;
  overflow: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-tag {
  font-family: var(--font-code);
  font-size: 0.8rem;
  color: var(--red);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  margin-bottom: 0.8rem;
  filter: drop-shadow(0 0 4px var(--red));
}

.section-title {
  font-family: var(--font-title);
  font-size: clamp(2rem, 5vw, 3.5rem);
  color: var(--text);
  margin-bottom: 1rem;
  text-shadow: 0 0 40px rgba(139,0,0,0.3);
}

.title-ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  color: var(--gold);
}
.title-ornament .line {
  width: 80px; height: 1px;
  background: linear-gradient(to right, transparent, var(--gold), transparent);
}

.section-desc {
  margin-top: 1.2rem;
  color: var(--text-dim);
  font-style: italic;
  font-size: 1.1rem;
}

.section-bg-ornament {
  position: absolute;
  top: 50%; left: -1rem;
  transform: translateY(-50%);
  font-size: 20rem;
  color: rgba(139,0,0,0.03);
  font-family: serif;
  pointer-events: none;
  user-select: none;
  line-height: 1;
}
.section-bg-ornament.right {
  left: auto; right: -1rem;
}

/* Reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ══════════════════════════════════════════════════════
   ABOUT
══════════════════════════════════════════════════════ */
.about {
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg2) 100%);
}

.about-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 3rem;
  align-items: center;
}

.about-card {
  background: rgba(139,0,0,0.05);
  border: 1px solid rgba(139,0,0,0.2);
  border-radius: var(--radius);
  padding: 2.5rem;
  position: relative;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.about-card:hover {
  border-color: rgba(139,0,0,0.5);
  box-shadow: 0 0 30px rgba(139,0,0,0.15), inset 0 0 30px rgba(139,0,0,0.03);
}
.card-glow { }

.card-suit {
  position: absolute;
  top: 1rem; right: 1.5rem;
  font-size: 3rem;
  color: rgba(139,0,0,0.15);
}

.about-text p {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text);
  min-height: 1.8em;
}

.about-stats {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.stat-item {
  text-align: center;
}
.stat-number {
  font-family: var(--font-title);
  font-size: 3rem;
  color: var(--red);
  line-height: 1;
  text-shadow: 0 0 20px rgba(139,0,0,0.6);
  transition: color var(--transition);
}
.stat-number.teal { color: var(--teal); text-shadow: 0 0 20px rgba(26,155,138,0.6); }
.stat-label {
  font-size: 0.9rem;
  color: var(--text-dim);
  letter-spacing: 0.05em;
}
.stat-divider {
  color: var(--gold);
  font-size: 0.8rem;
  opacity: 0.5;
}

/* ══════════════════════════════════════════════════════
   FEATURES — Flip Cards
══════════════════════════════════════════════════════ */
.features {
  background: var(--bg2);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

.flip-card {
  height: 220px;
  perspective: 1000px;
}
.flip-inner {
  position: relative;
  width: 100%; height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.7s cubic-bezier(0.23, 1, 0.32, 1);
}
.flip-card:hover .flip-inner {
  transform: rotateY(180deg);
}

.flip-front,
.flip-back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  border-radius: var(--radius);
  padding: 1.8rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  border: 1px solid rgba(139,0,0,0.25);
}

.flip-front {
  background: linear-gradient(135deg, rgba(20,5,16,0.95) 0%, rgba(30,5,10,0.95) 100%);
  gap: 1rem;
}

.flip-back {
  background: linear-gradient(135deg, rgba(139,0,0,0.15) 0%, rgba(10,2,5,0.98) 100%);
  border-color: rgba(26,155,138,0.3);
  transform: rotateY(180deg);
}

.card-bg-pattern {
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  background-image:
    repeating-linear-gradient(
      45deg,
      rgba(139,0,0,0.03) 0px,
      rgba(139,0,0,0.03) 1px,
      transparent 1px,
      transparent 12px
    );
  pointer-events: none;
}

.card-corner {
  position: absolute;
  font-size: 0.9rem;
  color: rgba(139,0,0,0.5);
}
.card-corner.tl { top: 0.7rem; left: 0.9rem; }
.card-corner.br { bottom: 0.7rem; right: 0.9rem; transform: rotate(180deg); }

.flip-icon {
  font-size: 2.2rem;
  filter: drop-shadow(0 0 8px rgba(26,155,138,0.5));
}

.flip-front h3 {
  font-family: var(--font-title);
  font-size: 1rem;
  color: var(--text);
  letter-spacing: 0.08em;
}

.flip-back p {
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.7;
}

/* ══════════════════════════════════════════════════════
   INSTALL — Steps
══════════════════════════════════════════════════════ */
.install {
  background: linear-gradient(180deg, var(--bg2) 0%, var(--bg3) 100%);
}

.steps-container {
  max-width: 700px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.step {
  display: grid;
  grid-template-columns: 60px 40px 1fr;
  gap: 0 1.5rem;
  align-items: start;
  position: relative;
}

.step-number {
  font-family: var(--font-title);
  font-size: 1.4rem;
  color: var(--red);
  text-shadow: 0 0 12px rgba(139,0,0,0.7);
  text-align: right;
  padding-top: 0.2rem;
  flex-shrink: 0;
}

.step-connector {
  display: flex;
  justify-content: center;
  position: relative;
}
.step-connector::before {
  content: '';
  position: absolute;
  top: 0; bottom: -2rem;
  width: 1px;
  background: linear-gradient(to bottom, var(--red), rgba(139,0,0,0.1));
  left: 50%;
  transform: translateX(-50%);
}
.step:last-child .step-connector::before { display: none; }

.step-content {
  background: rgba(139,0,0,0.04);
  border: 1px solid rgba(139,0,0,0.15);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 2rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.step-content:hover {
  border-color: rgba(139,0,0,0.4);
  box-shadow: 0 0 20px rgba(139,0,0,0.1);
}

.step-icon {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  display: block;
}

.step-content h3 {
  font-family: var(--font-title);
  font-size: 0.9rem;
  color: var(--teal);
  margin-bottom: 0.5rem;
  letter-spacing: 0.06em;
}

.step-content p {
  color: var(--text-dim);
  font-size: 0.95rem;
  margin-bottom: 0.8rem;
}

.step-code {
  background: rgba(0,0,0,0.5);
  border: 1px solid rgba(26,155,138,0.2);
  border-radius: 4px;
  padding: 0.5rem 0.9rem;
  margin-top: 0.5rem;
}
.step-code code {
  font-family: var(--font-code);
  font-size: 0.85rem;
  color: var(--teal);
  display: block;
  line-height: 1.6;
}

/* Security note */
.security-note {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  max-width: 700px;
  margin: 3rem auto 0;
  /* overridden inside .connect-notes */
  background: rgba(26,155,138,0.05);
  border: 1px solid rgba(26,155,138,0.2);
  border-radius: var(--radius);
  padding: 1.2rem 1.5rem;
  font-size: 0.95rem;
  color: var(--text-dim);
  line-height: 1.6;
}
.security-icon { font-size: 1.4rem; flex-shrink: 0; margin-top: 0.05rem; }
.security-text strong { color: var(--teal); }

.connect-notes {
  max-width: 700px;
  margin: 3rem auto 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.connect-notes .security-note {
  margin: 0;
}

/* ══════════════════════════════════════════════════════
   COMMANDS
══════════════════════════════════════════════════════ */
.commands {
  background: var(--bg3);
}

.cmd-filters {
  display: flex;
  gap: 0.7rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}
.cmd-filter {
  background: none;
  border: 1px solid rgba(139,0,0,0.25);
  color: var(--text-dim);
  font-family: var(--font-code);
  font-size: 0.8rem;
  padding: 0.4rem 1rem;
  border-radius: 20px;
  cursor: none;
  transition: var(--transition);
  letter-spacing: 0.08em;
}
.cmd-filter:hover,
.cmd-filter.active {
  background: rgba(139,0,0,0.15);
  border-color: var(--red);
  color: var(--text);
  box-shadow: 0 0 12px rgba(139,0,0,0.2);
}
.cmd-filter.active {
  color: var(--glow);
  border-color: var(--glow);
  box-shadow: 0 0 16px rgba(255,45,85,0.3);
}

.cmd-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.cmd-item {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  background: rgba(139,0,0,0.04);
  border: 1px solid rgba(139,0,0,0.12);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition), opacity 0.3s;
}
.cmd-item:hover {
  border-color: rgba(26,155,138,0.4);
  box-shadow: 0 0 15px rgba(26,155,138,0.1);
  transform: translateX(4px);
}
.cmd-item.hidden {
  display: none;
}

.cmd-name {
  font-family: var(--font-code);
  font-size: 0.95rem;
  color: var(--teal);
  filter: drop-shadow(0 0 4px rgba(26,155,138,0.4));
}
.cmd-desc {
  font-size: 0.88rem;
  color: var(--text-dim);
}

/* 18+ badge */
.cmd-item--18 {
  border-color: rgba(139,0,0,0.3);
}
.cmd-badge {
  display: inline-block;
  background: var(--red);
  color: var(--white);
  font-family: var(--font-code);
  font-size: 0.65rem;
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
  margin-bottom: 0.2rem;
  letter-spacing: 0.05em;
}

/* Prefix note */
.cmd-prefix-note code {
  font-family: var(--font-code);
  background: rgba(26,155,138,0.12);
  border: 1px solid rgba(26,155,138,0.25);
  padding: 0.1rem 0.5rem;
  border-radius: 3px;
  font-size: 0.9rem;
  color: var(--teal);
}

/* ══════════════════════════════════════════════════════
   CONTACT
══════════════════════════════════════════════════════ */
.contact {
  background: linear-gradient(180deg, var(--bg3) 0%, #0d0008 100%);
  position: relative;
}
#roseCanvas {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  opacity: 0.5;
}

.contact-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
  max-width: 900px;
  margin: 0 auto;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  background: rgba(139,0,0,0.05);
  border: 1px solid rgba(139,0,0,0.2);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: var(--transition);
  cursor: none;
}
.contact-card:hover {
  background: rgba(139,0,0,0.12);
  border-color: var(--red);
  box-shadow: 0 0 30px rgba(139,0,0,0.25), 0 8px 32px rgba(0,0,0,0.4);
  transform: translateY(-4px);
}

.contact-icon {
  font-size: 1.8rem;
  flex-shrink: 0;
}
.contact-info {
  flex: 1;
}
.contact-info h3 {
  font-family: var(--font-title);
  font-size: 0.85rem;
  color: var(--teal);
  margin-bottom: 0.2rem;
  letter-spacing: 0.06em;
}
.contact-info span {
  font-family: var(--font-code);
  font-size: 0.9rem;
  color: var(--text-dim);
}
.contact-arrow {
  color: var(--red);
  font-size: 1.2rem;
  opacity: 0;
  transform: translateX(-8px);
  transition: var(--transition);
}
.contact-card:hover .contact-arrow {
  opacity: 1;
  transform: translateX(0);
}

/* ══════════════════════════════════════════════════════
   FOOTER
══════════════════════════════════════════════════════ */
.footer {
  background: #050103;
  border-top: 1px solid rgba(139,0,0,0.2);
  text-align: center;
  padding: 3rem 2rem;
}
.footer-ornament {
  font-size: 1.2rem;
  color: var(--red);
  margin-bottom: 1rem;
  filter: drop-shadow(0 0 6px rgba(139,0,0,0.5));
  letter-spacing: 0.5rem;
}
.footer-quote {
  font-family: var(--font-body);
  font-style: italic;
  color: var(--text-dim);
  margin-bottom: 0.8rem;
  font-size: 1rem;
}
.footer-copy {
  font-family: var(--font-code);
  font-size: 0.75rem;
  color: rgba(154,136,120,0.4);
  letter-spacing: 0.1em;
}

/* ══════════════════════════════════════════════════════
   UTILITY ANIMATIONS
══════════════════════════════════════════════════════ */
@keyframes fadeSlideDown {
  from { opacity: 0; transform: translateY(-20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ══════════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════════ */

/* ── Touch devices: restore normal cursor ─────────── */
@media (hover: none) and (pointer: coarse) {
  body { cursor: auto; }
  .cursor, .cursor-trail { display: none; }
  a, button, .flip-card, .cmd-filter, .contact-card,
  .btn, .lang-toggle, .nav-burger { cursor: pointer; }
}

/* ── Tablet landscape / large tablet (≤1024px) ─────── */
@media (max-width: 1024px) {
  .container { padding: 0 1.5rem; }
  .features-grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  }
  .contact-cards {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  }
}

/* ── Tablet portrait (≤900px) ───────────────────────── */
@media (max-width: 900px) {
  .about-grid {
    grid-template-columns: 1fr;
  }
  .about-stats {
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
  }
  .section { padding: 5rem 0; }
  .section-header { margin-bottom: 3rem; }
}

/* ── Mobile landscape / small tablet (≤768px) ──────── */
@media (max-width: 768px) {
  /* Navbar */
  .nav-links {
    display: none;
    position: absolute;
    top: 70px; left: 0; right: 0;
    background: rgba(10,2,5,0.97);
    flex-direction: column;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid rgba(139,0,0,0.3);
    gap: 1.2rem;
    z-index: 999;
  }
  .nav-links.open { display: flex; }
  .nav-burger { display: flex; }
  .lang-toggle { margin-left: auto; }
  .navbar { padding: 0 1.2rem; }

  /* Hero */
  .hero-content { padding: 1.2rem; }
  .hero-subtitle { font-size: 1rem; }

  /* Sections */
  .section { padding: 4rem 0; }
  .container { padding: 0 1.2rem; }

  /* About */
  .about-card { padding: 1.8rem 1.5rem; }
  .about-text p { font-size: 1rem; }

  /* Features */
  .features-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1.2rem;
  }
  .flip-card { height: 200px; }

  /* Steps */
  .step {
    grid-template-columns: 40px 30px 1fr;
    gap: 0 1rem;
  }
  .step-content { padding: 1.2rem; }

  /* Commands */
  .cmd-grid {
    grid-template-columns: 1fr 1fr;
  }
  .cmd-filters { gap: 0.5rem; }

  /* Contact */
  .contact-cards {
    grid-template-columns: 1fr 1fr;
  }
}

/* ── Mobile portrait (≤480px) ───────────────────────── */
@media (max-width: 480px) {
  body { font-size: 16px; }

  /* Navbar */
  .nav-logo { font-size: 1rem; }

  /* Hero */
  .hero-buttons {
    flex-direction: column;
    align-items: center;
    gap: 0.9rem;
  }
  .btn { width: 100%; max-width: 280px; text-align: center; }
  .hero-eyebrow { font-size: 0.85rem; }
  .hero-subtitle { font-size: 0.95rem; letter-spacing: 0.04em; }

  /* Sections */
  .section { padding: 3.5rem 0; }
  .container { padding: 0 1rem; }
  .section-header { margin-bottom: 2.5rem; }

  /* About */
  .about-stats { flex-direction: column; align-items: center; }
  .about-card { padding: 1.5rem 1.2rem; }
  .stat-number { font-size: 2.5rem; }

  /* Features */
  .features-grid { grid-template-columns: 1fr; gap: 1rem; }
  .flip-card { height: 180px; }
  /* На мобиле флип по тапу вместо hover — JS добавляет класс .flipped */
  .flip-card.flipped .flip-inner { transform: rotateY(180deg); }

  /* Steps */
  .step {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
  .step-number { text-align: left; font-size: 1.1rem; }
  .step-connector { display: none; }
  .step-content { margin-bottom: 1.5rem; }
  .step-code code { font-size: 0.78rem; word-break: break-all; }

  /* Commands */
  .cmd-grid { grid-template-columns: 1fr; }
  .cmd-item { padding: 0.9rem 1rem; }
  .cmd-filters {
    gap: 0.4rem;
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 0.5rem;
    -webkit-overflow-scrolling: touch;
  }
  .cmd-filter { flex-shrink: 0; font-size: 0.75rem; padding: 0.35rem 0.8rem; }

  /* Contact */
  .contact-cards { grid-template-columns: 1fr; }

  /* Footer */
  .footer { padding: 2rem 1rem; }
  .footer-ornament { letter-spacing: 0.3rem; }
}

/* ── Very small (≤360px) ────────────────────────────── */
@media (max-width: 360px) {
  .hero-title { font-size: clamp(2.5rem, 14vw, 4rem); }
  .btn { font-size: 0.65rem; padding: 0.8rem 1.5rem; }
  .flip-card { height: 160px; }
  .flip-front h3 { font-size: 0.85rem; }
  .step-code code { font-size: 0.72rem; }
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
  background: var(--red);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover { background: var(--glow); }

/* Selection */
::selection {
  background: rgba(139,0,0,0.4);
  color: var(--white);
}
