/* ==========================================================================
   GenResurs Design System 2026 - Tokens & Core Styles
   Direction: Signature Smoked Glass & Gold Glass Architecture
   Unified Authentic Televenta / GenResurs Style Kit
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600&family=Manrope:wght@300;400;500;600;700;800&display=swap');

:root {
  /* Signature Smoked Glass Color Palette */
  --gr-bg-base: #08090d;
  --gr-bg-surface: rgba(24, 20, 28, 0.85);
  --gr-bg-card: linear-gradient(145deg, rgba(46, 39, 54, 0.52) 0%, rgba(20, 16, 24, 0.78) 100%);
  --gr-bg-card-hover: linear-gradient(145deg, rgba(62, 53, 72, 0.65) 0%, rgba(28, 22, 34, 0.88) 100%);
  --gr-bg-elevated: rgba(38, 31, 45, 0.75);
  --gr-bg-elevated-hover: rgba(52, 43, 62, 0.9);
  --gr-bg-glass: rgba(28, 23, 33, 0.65);
  --gr-bg-glass-card: rgba(28, 23, 33, 0.55);
  --gr-bg-input: rgba(116, 101, 117, 0.12);

  /* Glass Edge Borders */
  --gr-border-subtle: rgba(225, 222, 231, 0.12);
  --gr-border-medium: rgba(225, 222, 231, 0.20);
  --gr-border-highlight: rgba(225, 222, 231, 0.32);
  --gr-border-accent: rgba(255, 220, 0, 0.40);
  --gr-border-gold: rgba(255, 220, 0, 0.35);
  --gr-border-indigo: rgba(140, 155, 230, 0.35);

  /* Typography Colors */
  --gr-text-primary: #f4f3f5;
  --gr-text-secondary: #cbd5e1;
  --gr-text-muted: #9fb8dc;
  --gr-text-dim: #6b7280;

  /* Signature Gold Accents */
  --gr-accent-primary: #ffdc00;
  --gr-accent-primary-hover: #fff044;
  --gr-accent-primary-dark: #ccb000;
  --gr-accent-primary-glow: rgba(255, 220, 0, 0.25);
  --gr-accent-gold: #ffd009;
  --gr-accent-gold-bright: #fff044;
  --gr-accent-gold-text: #f4d922;
  --gr-accent-secondary: #9fa6bd;
  --gr-accent-wa: #25D366;
  --gr-accent-wa-dark: #1EAA52;
  --gr-accent-amber: #f59e0b;
  --gr-accent-rose: #f43f5e;

  /* Typography Stack */
  --gr-font-sans: 'Manrope', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --gr-font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  /* Glass Shadows & Glows */
  --gr-shadow-sm: 0 4px 16px rgba(0, 0, 0, 0.4);
  --gr-shadow-md: 0 10px 32px 0 rgba(0, 0, 0, 0.55);
  --gr-shadow-lg: 0 20px 50px -10px rgba(0, 0, 0, 0.75);
  --gr-shadow-gold: 0 4px 22px rgba(255, 220, 0, 0.3);
  --gr-shadow-glass: 0 12px 40px rgba(0, 0, 0, 0.55), inset 0 1px 1px rgba(255, 255, 255, 0.14);

  /* Layout */
  --gr-container-max: 1240px;
}

/* ==========================================================================
   Base Elements
   ========================================================================== */

#app-landing {
  font-family: var(--gr-font-sans);
  background-color: var(--gr-bg-base);
  color: var(--gr-text-primary);
  line-height: 1.55;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

#app-landing ::selection {
  background-color: var(--gr-accent-primary);
  color: #10191c;
}

#app-landing code,
#app-landing pre,
#app-landing .font-mono {
  font-family: var(--gr-font-mono);
}

/* Authentic Radial Background Glow (Gold Glass) */
.gr-ambient-glow {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 1280px;
  height: 640px;
  background: radial-gradient(circle at 50% 12%, rgba(255, 220, 0, 0.09) 0%, rgba(255, 208, 9, 0.02) 45%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.gr-grid-mesh {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(to right, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
                    linear-gradient(to bottom, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(circle at 50% 35%, black 40%, transparent 85%);
  -webkit-mask-image: radial-gradient(circle at 50% 35%, black 40%, transparent 85%);
  pointer-events: none;
  z-index: 0;
}

/* ==========================================================================
   Component: Badges & Tags (Gold Glass Style)
   ========================================================================== */

.gr-badge-teal,
.gr-badge-gold {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.3rem 0.75rem;
  border-radius: 9999px;
  background: rgba(255, 220, 0, 0.12);
  border: 1px solid rgba(255, 220, 0, 0.35);
  color: #ffe735;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.gr-badge-indigo {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.3rem 0.75rem;
  border-radius: 9999px;
  background: rgba(140, 155, 230, 0.12);
  border: 1px solid rgba(140, 155, 230, 0.35);
  color: #b8c5f8;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  backdrop-filter: blur(8px);
}

.gr-badge-neutral {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.3rem 0.75rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--gr-border-subtle);
  color: var(--gr-text-secondary);
  font-size: 0.75rem;
  font-weight: 500;
  backdrop-filter: blur(8px);
}

.gr-badge-pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #ffd009;
  box-shadow: 0 0 8px #ffd009;
  animation: gr-pulse 2s infinite;
}

@keyframes gr-pulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

/* ==========================================================================
   Component: Buttons (Signature Gold Gradient & Smoked Glass)
   ========================================================================== */

.gr-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.45rem;
  border-radius: 12px;
  background: linear-gradient(110deg, #fff044 0%, #ffdc00 100%);
  color: #10191c;
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: -0.01em;
  border: 1px solid rgba(255, 240, 68, 0.5);
  box-shadow: 0 4px 18px rgba(255, 220, 0, 0.28), inset 0 1px 1px rgba(255, 255, 255, 0.6);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  text-decoration: none;
}

.gr-btn-primary:hover {
  background: linear-gradient(110deg, #ffffff 0%, #fff044 50%, #ffdc00 100%);
  box-shadow: 0 6px 26px rgba(255, 220, 0, 0.45), inset 0 1px 1px rgba(255, 255, 255, 0.8);
  transform: translateY(-1px);
  color: #10191c;
}

.gr-btn-primary:active {
  transform: translateY(0);
}

.gr-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.45rem;
  border-radius: 12px;
  background: rgba(30, 25, 36, 0.65);
  color: var(--gr-text-primary);
  font-weight: 600;
  font-size: 0.875rem;
  border: 1px solid rgba(225, 222, 231, 0.16);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.08);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  text-decoration: none;
}

.gr-btn-secondary:hover {
  border-color: rgba(255, 231, 53, 0.42);
  background: rgba(45, 38, 54, 0.85);
  color: #ffffff;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.5), 0 0 14px rgba(255, 220, 0, 0.1);
  transform: translateY(-1px);
}

.gr-btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.15rem;
  border-radius: 10px;
  background: transparent;
  color: #b7b2bb;
  font-weight: 600;
  font-size: 0.875rem;
  border: 1px solid transparent;
  transition: all 0.16s ease;
  cursor: pointer;
  text-decoration: none;
}

.gr-btn-ghost:hover {
  color: #ffffff;
  background: rgba(116, 101, 117, 0.18);
  border-color: rgba(225, 222, 231, 0.14);
}

/* ==========================================================================
   Component: Стеклянные блоки (Smoked Glass Cards & Panels)
   ========================================================================== */

.gr-card {
  position: relative;
  background: var(--gr-bg-card);
  border: 1px solid var(--gr-border-subtle);
  border-radius: 16px;
  padding: 1.5rem;
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  box-shadow: 0 10px 36px 0 rgba(0, 0, 0, 0.55), inset 0 1px 1px rgba(255, 255, 255, 0.10);
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.gr-card.gold-major-block,
.gr-calc-card.gold-major-block,
.gr-auth-container.gold-major-block {
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
}

.gr-card-interactive:hover,
.gr-card:hover {
  border-color: rgba(255, 231, 53, 0.42);
  background: var(--gr-bg-card-hover);
  transform: translateY(-2px);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.65), 0 0 24px rgba(255, 220, 0, 0.12), inset 0 1px 1px rgba(255, 255, 255, 0.18);
}

.gr-card-highlight {
  position: relative;
  background: linear-gradient(145deg, rgba(50, 42, 60, 0.68) 0%, rgba(22, 17, 28, 0.88) 100%);
  border: 1px solid var(--gr-border-accent);
  box-shadow: 0 14px 44px -8px rgba(0, 0, 0, 0.7), 0 0 28px rgba(255, 220, 0, 0.15), inset 0 1px 1px rgba(255, 255, 255, 0.2);
  border-radius: 18px;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

/* Typography Gradient (Signature Gold) */
.gr-text-gradient-teal,
.gr-gold-gradient-text {
  background: linear-gradient(120deg, #FFFFFF 0%, #fff496 45%, #ffd009 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.gr-text-gradient-indigo {
  background: linear-gradient(120deg, #FFFFFF 0%, #d8dffc 50%, #8c9be8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Navigation Links */
.gr-nav-link {
  font-size: 0.8125rem;
  font-weight: 500;
  color: #cbd5e1;
  transition: color 0.16s ease, background 0.16s ease;
  text-decoration: none;
  padding: 0.35rem 0.55rem;
  border-radius: 8px;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

@media (min-width: 1280px) {
  .gr-nav-link {
    font-size: 0.875rem;
    padding: 0.4rem 0.75rem;
  }
}

.gr-nav-link:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}

.gr-nav-link.active {
  color: #ffe735;
}

/* Hero Showcase Glass Window */
.gr-showcase-window {
  position: relative;
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(35, 29, 42, 0.75) 0%, rgba(18, 14, 22, 0.9) 100%);
  border: 1px solid rgba(225, 222, 231, 0.14);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 25px 60px -12px rgba(0, 0, 0, 0.8), 0 0 32px rgba(255, 220, 0, 0.08);
  overflow: hidden;
}

.gr-showcase-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 1.25rem;
  background: rgba(22, 18, 28, 0.9);
  border-bottom: 1px solid rgba(225, 222, 231, 0.10);
}

/* Live Traffic Signal & Status */
.gr-status-live {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: #ffe735;
}

.gr-status-dot-live {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ffd009;
  box-shadow: 0 0 8px #ffd009;
  animation: gr-pulse 1.8s infinite;
}

/* Audio Waveform Animation (Gold Hue) */
.gr-waveform {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 20px;
}

.gr-waveform span {
  display: block;
  width: 3px;
  height: 6px;
  background: #ffdc00;
  border-radius: 2px;
  animation: gr-wave 1.2s ease-in-out infinite;
}

.gr-waveform span:nth-child(2) { animation-delay: 0.15s; height: 12px; }
.gr-waveform span:nth-child(3) { animation-delay: 0.3s; height: 18px; }
.gr-waveform span:nth-child(4) { animation-delay: 0.45s; height: 10px; }
.gr-waveform span:nth-child(5) { animation-delay: 0.6s; height: 16px; }
.gr-waveform span:nth-child(6) { animation-delay: 0.75s; height: 8px; }

@keyframes gr-wave {
  0%, 100% { transform: scaleY(0.4); opacity: 0.6; }
  50% { transform: scaleY(1.2); opacity: 1; }
}

/* Tab Switcher */
.gr-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.15rem;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #b7b2bb;
  background: transparent;
  border: 1px solid transparent;
  transition: all 0.18s ease;
  cursor: pointer;
}

.gr-tab-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}

.gr-tab-btn.active {
  background: rgba(38, 31, 46, 0.95);
  color: #ffe735;
  border: 1px solid rgba(255, 220, 0, 0.35);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

/* Interactive Calculator (Glass Card) */
.gr-calc-card {
  background: linear-gradient(145deg, rgba(46, 38, 54, 0.7) 0%, rgba(20, 16, 25, 0.9) 100%);
  border: 1px solid rgba(255, 220, 0, 0.35);
  border-radius: 20px;
  padding: 2.25rem;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.65), 0 0 35px rgba(255, 220, 0, 0.12), inset 0 1px 1px rgba(255, 255, 255, 0.18);
}

.gr-calc-pill {
  padding: 0.45rem 1rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.85rem;
  background: rgba(28, 23, 34, 0.85);
  color: #cbd5e1;
  border: 1px solid rgba(225, 222, 231, 0.14);
  backdrop-filter: blur(10px);
  cursor: pointer;
  transition: all 0.16s ease;
}

.gr-calc-pill:hover {
  border-color: rgba(255, 231, 53, 0.4);
  color: #ffffff;
}

.gr-calc-pill.active {
  background: linear-gradient(110deg, #fff044 0%, #ffdc00 100%);
  color: #10191c;
  border-color: rgba(255, 240, 68, 0.5);
  font-weight: 700;
  box-shadow: 0 2px 10px rgba(255, 220, 0, 0.28);
}

/* Slider (Gold Track & Thumb) */
.gr-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: #251f2d;
  outline: none;
  cursor: pointer;
}

.gr-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffdc00;
  border: 2px solid #10191c;
  box-shadow: 0 0 10px rgba(255, 220, 0, 0.6);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.gr-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  box-shadow: 0 0 14px rgba(255, 220, 0, 0.85);
}

.gr-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffdc00;
  border: 2px solid #10191c;
  box-shadow: 0 0 10px rgba(255, 220, 0, 0.6);
  cursor: pointer;
}

/* FAQ Accordion (Glass Items) */
.gr-faq-item {
  border: 1px solid rgba(225, 222, 231, 0.12);
  background: linear-gradient(145deg, rgba(38, 32, 46, 0.55) 0%, rgba(20, 16, 25, 0.78) 100%);
  border-radius: 12px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  overflow: hidden;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.gr-faq-item:hover {
  border-color: rgba(255, 231, 53, 0.4);
  background: linear-gradient(145deg, rgba(48, 40, 58, 0.68) 0%, rgba(24, 20, 30, 0.88) 100%);
}

.gr-faq-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.15rem 1.4rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--gr-text-primary);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: color 0.16s ease;
}

.gr-faq-btn:hover {
  color: #ffe735;
}

.gr-faq-btn i {
  color: var(--gr-text-muted);
  transition: transform 0.2s ease, color 0.2s ease;
}

.gr-faq-item.active .gr-faq-btn i {
  transform: rotate(180deg);
  color: #ffe735;
}

.gr-faq-content {
  padding: 0 1.4rem 1.25rem 1.4rem;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--gr-text-secondary);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 0.9rem;
}

/* Routing Diagram Connection Lines (Gold Glow) */
.gr-route-line {
  stroke-dasharray: 6;
  animation: gr-dash 30s linear infinite;
}

@keyframes gr-dash {
  to {
    stroke-dashoffset: -1000;
  }
}

/* Accessible focus styling */
#app-landing a:focus-visible,
#app-landing button:focus-visible,
#app-landing input:focus-visible {
  outline: 2px solid var(--gr-accent-primary);
  outline-offset: 2px;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *, ::before, ::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
