/* ============================================
   COMPONENTS.CSS — Buttons, Cards, UI Elements
   ============================================ */

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-head);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.875rem 1.75rem;
  border-radius: var(--r2);
  transition: all var(--t2);
  cursor: pointer;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
  border: none;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity var(--t2);
  background: radial-gradient(circle at center, rgba(255,255,255,0.08), transparent 70%);
}

.btn:hover::before { opacity: 1; }

/* Primary */
.btn--primary {
  background: var(--cyan);
  color: #000;
  box-shadow: 0 0 0 0 var(--cyan-dim);
}

.btn--primary:hover {
  background: #20f5ff;
  color: #000;
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0,240,255,0.25);
}

/* Secondary */
.btn--secondary {
  background: rgba(255,255,255,0.08);
  color: var(--text-primary);
  border: 1px solid rgba(255,255,255,0.18);
}

.btn--secondary:hover {
  background: rgba(255,255,255,0.14);
  border-color: rgba(255,255,255,0.28);
  transform: translateY(-2px);
  color: var(--text-primary);
}

/* Ghost */
.btn--ghost {
  background: transparent;
  color: var(--cyan);
  border: 1px solid var(--border-active);
}

.btn--ghost:hover {
  background: var(--cyan-dim);
  transform: translateY(-2px);
  color: var(--cyan);
}

/* Icon Arrow */
.btn__arrow {
  font-size: 1rem;
  transition: transform var(--t2);
  display: inline-block;
}

.btn:hover .btn__arrow {
  transform: translateX(4px);
}

/* Small size modifier */
.btn--sm {
  font-size: 0.8rem;
  padding: 0.6rem 1rem;
}

.btn-group {
  display: flex;
  align-items: center;
  gap: var(--s2);
  flex-wrap: wrap;
}

/* ============================================
   CARDS
   ============================================ */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r4);
  padding: var(--s4);
  transition: all var(--t3);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  opacity: 0;
  transition: opacity var(--t3);
}

.card:hover {
  border-color: rgba(0,240,255,0.15);
  background: var(--surface-hover);
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.4), 0 0 0 1px rgba(0,240,255,0.05);
}

.card:hover::before { opacity: 1; }

.card__label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: var(--s2);
  display: flex;
  align-items: center;
  gap: var(--s1);
}

.card__label::before {
  content: '';
  display: inline-block;
  width: 16px;
  height: 1px;
  background: var(--cyan);
}

.card__title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: var(--s2);
  letter-spacing: -0.025em;
}

.card__desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: var(--s3);
}

.card__features {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: var(--s4);
}

.card__feature {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.card__feature::before {
  content: '';
  flex-shrink: 0;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--cyan);
}

/* System Card (larger) */
.system-card {
  background: var(--base-2);
  border: 1px solid var(--border);
  border-radius: var(--r4);
  padding: var(--s5);
  position: relative;
  overflow: hidden;
  transition: all var(--t3);
}

.system-card__glow {
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0;
  transition: opacity var(--t4);
  pointer-events: none;
}

.system-card--cyan .system-card__glow {
  background: var(--cyan);
  top: -100px;
  right: -100px;
}

.system-card--blue .system-card__glow {
  background: var(--blue);
  bottom: -100px;
  left: -100px;
}

.system-card:hover .system-card__glow {
  opacity: 0.06;
}

.system-card:hover {
  border-color: rgba(0,240,255,0.12);
  transform: translateY(-6px);
  box-shadow: 0 30px 80px rgba(0,0,0,0.5);
}

/* Pathway Card */
.pathway-card {
  padding: var(--s5);
  border: 1px solid var(--border);
  border-radius: var(--r4);
  background: var(--surface);
  position: relative;
  transition: all var(--t3);
}

.pathway-card__number {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  margin-bottom: var(--s3);
}

.pathway-card__title {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  margin-bottom: var(--s1);
  background: linear-gradient(135deg, var(--text-primary), var(--text-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.pathway-card__tagline {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--cyan);
  letter-spacing: 0.08em;
  margin-bottom: var(--s3);
}

.pathway-card__steps {
  display: flex;
  flex-direction: column;
  gap: var(--s2);
  margin-top: var(--s4);
  padding-top: var(--s4);
  border-top: 1px solid var(--border);
}

.pathway-card__step {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: var(--s2);
  align-items: start;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.pathway-card__step-num {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  padding-top: 2px;
}

.pathway-card:hover {
  border-color: rgba(0,240,255,0.15);
  background: var(--surface-hover);
  transform: translateY(-4px);
}

/* ============================================
   SECTION HEADER
   ============================================ */
.section-header {
  margin-bottom: var(--s6);
}

.section-header--center {
  text-align: center;
  max-width: 600px;
  margin: 0 auto var(--s6);
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cyan);
  display: flex;
  align-items: center;
  gap: var(--s2);
  margin-bottom: var(--s3);
}

.section-label--center {
  justify-content: center;
}

.section-label::before {
  content: '';
  width: 20px;
  height: 1px;
  background: var(--cyan);
  flex-shrink: 0;
}

.section-label--center::before,
.section-label--center::after {
  content: '';
  width: 20px;
  height: 1px;
  background: var(--cyan);
  flex-shrink: 0;
}

.section-label--center::before { order: -1; }

.section-title {
  line-height: 1.05;
}

.section-sub {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 560px;
  margin-top: var(--s2);
  line-height: 1.75;
}

/* ============================================
   DIVIDER / SEPARATOR
   ============================================ */
.divider {
  width: 100%;
  height: 1px;
  background: var(--border);
  margin: var(--s6) 0;
}

.divider--glow {
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  opacity: 0.3;
}

/* ============================================
   BADGE / TAG
   ============================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.3rem 0.75rem;
  border-radius: 100px;
  border: 1px solid var(--border);
  color: var(--text-muted);
  background: var(--surface);
}

.badge--cyan {
  color: var(--cyan);
  border-color: rgba(0,240,255,0.25);
  background: rgba(0,240,255,0.05);
}

.badge--blue {
  color: #6b9fff;
  border-color: rgba(0,85,255,0.25);
  background: rgba(0,85,255,0.05);
}

/* ============================================
   STAT / METRIC
   ============================================ */
.stat {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.stat__value {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--text-primary);
  line-height: 1;
}

.stat__label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  letter-spacing: 0.08em;
}

/* ============================================
   FLOW / PIPELINE DISPLAY
   ============================================ */
.flow {
  display: flex;
  align-items: center;
  gap: 0;
  flex-wrap: wrap;
}

.flow__step {
  display: flex;
  align-items: center;
  gap: 0;
}

.flow__label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--r2);
  background: var(--surface);
  transition: all var(--t2);
  white-space: nowrap;
}

.flow__label:hover,
.flow__label.active {
  color: var(--cyan);
  border-color: rgba(0,240,255,0.3);
  background: var(--cyan-glow);
}

.flow__arrow {
  color: var(--text-muted);
  font-size: 0.75rem;
  padding: 0 0.5rem;
  flex-shrink: 0;
}

/* ============================================
   GLASS PANEL
   ============================================ */
.glass {
  background: rgba(255,255,255,0.03);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--r4);
}

/* ============================================
   AI CHAT (TERMINAL HUD)
   ============================================ */
.chat-trigger {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 900;
  width: 56px;
  height: 56px;
  border-radius: var(--r2);
  background: rgba(0, 240, 255, 0.15);
  border: 1px solid var(--cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 0 25px rgba(0,240,255,0.4), inset 0 0 15px rgba(0,240,255,0.3);
  transition: all var(--t2);
}

.chat-trigger:hover {
  transform: translateY(-4px);
  box-shadow: 0 0 25px rgba(0,240,255,0.4), inset 0 0 15px rgba(0,240,255,0.2);
  background: rgba(0,240,255,0.05);
}

.chat-trigger__icon {
  width: 24px;
  height: 24px;
  color: var(--cyan);
}

.chat-trigger__pulse {
  position: absolute;
  inset: -4px;
  border-radius: var(--r2);
  border: 1px dashed rgba(0,240,255,0.4);
  animation: spin-slow 10s linear infinite;
}

@keyframes spin-slow {
  100% { transform: rotate(360deg); }
}

.chat-panel {
  position: fixed;
  bottom: 6.5rem;
  right: 2rem;
  width: 380px;
  height: 520px;
  background: rgba(10, 10, 12, 0.95);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-top: 1px solid rgba(0,240,255,0.3);
  border-radius: var(--r3);
  z-index: 899;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 80px rgba(0,0,0,0.8), 0 0 30px rgba(0,240,255,0.05);
  transform: translateY(20px) scale(0.95);
  opacity: 0;
  pointer-events: none;
  transition: all var(--t3) cubic-bezier(0.16, 1, 0.3, 1);
  font-family: var(--font-mono);
}

.chat-panel.open {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: all;
}

.chat-panel__header {
  padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #111;
  -webkit-user-select: none;
  user-select: none;
}

.chat-panel__controls {
  display: flex;
  gap: 6px;
}

.control-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}

.close-dot { background: #ff5f56; cursor: pointer; }
.close-dot:hover { filter: brightness(1.2); }
.min-dot { background: #ffbd2e; cursor: default; }
.max-dot { background: #27c93f; cursor: default; }

.chat-panel__title {
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-left: auto;
}

.chat-panel__messages {
  flex: 1;
  padding: 1rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  background: #0a0a0c;
}

.chat-panel__messages::-webkit-scrollbar {
  width: 6px;
}

.chat-panel__messages::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

.system-bootup {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  line-height: 1.5;
}

.chat-msg {
  font-size: 0.8rem;
  line-height: 1.5;
  animation: fadeInUp 0.2s ease;
  word-wrap: break-word;
}

.chat-msg--system {
  color: #27c93f; /* Terminal Green */
}

.chat-msg--system::before {
  content: "SYS>";
  color: var(--text-muted);
  margin-right: 8px;
}

.chat-msg--user {
  color: var(--cyan);
}

.chat-msg--user::before {
  content: "USR>";
  color: var(--text-muted);
  margin-right: 8px;
}

#typing-indicator {
  color: var(--text-muted);
}

#typing-indicator::before {
  content: "SYS>";
}

.chat-panel__input {
  padding: 0.8rem 1rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
  background: #111;
}

.cli-prompt {
  color: var(--cyan);
  font-size: 0.8rem;
  flex-shrink: 0;
}

.chat-panel__input input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  outline: none;
  min-width: 0;
}

.chat-panel__input input::placeholder {
  color: var(--text-muted);
  opacity: 0.5;
}

.chat-panel__send {
  width: 24px;
  height: 24px;
  background: transparent;
  color: var(--cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  border: none;
  transition: transform var(--t1);
  padding: 0;
}

.chat-panel__send:hover {
  transform: translateX(2px) scale(1.1);
  color: #fff;
}

.cli-icon {
  width: 16px;
  height: 16px;
}

/* ============================================
   PHILOSOPHY QUOTE
   ============================================ */
.hindi-quote {
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  border-left: 3px solid var(--cyan);
  padding-left: var(--s3);
  margin: var(--s4) 0;
  line-height: 1.3;
}

.hindi-quote span {
  display: block;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: var(--s1);
  font-weight: 400;
}

/* ============================================
   ECOSYSTEM GRID
   ============================================ */
.ecosystem-item {
  display: flex;
  align-items: flex-start;
  gap: var(--s3);
  padding: var(--s3) 0;
  border-bottom: 1px solid var(--border);
}

.ecosystem-item:last-child { border-bottom: none; }

.ecosystem-item__num {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  padding-top: 4px;
  flex-shrink: 0;
  width: 24px;
}

.ecosystem-item__body h4 {
  font-size: 1rem;
  margin-bottom: 0.25rem;
  letter-spacing: -0.01em;
}

.ecosystem-item__body p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ============================================
   CONTACT FORM ELEMENTS
   ============================================ */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: var(--s3);
}

.form-label {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 500;
}

.form-input,
.form-textarea {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r2);
  padding: 0.875rem 1rem;
  color: var(--text-primary);
  font-family: var(--font-head);
  font-size: 0.9rem;
  outline: none;
  transition: border-color var(--t1), background var(--t1);
  width: 100%;
}

.form-input:focus,
.form-textarea:focus {
  border-color: rgba(0,240,255,0.3);
  background: rgba(0,240,255,0.02);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text-muted);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

/* Contact Link */
.contact-link {
  display: flex;
  align-items: center;
  gap: var(--s3);
  padding: var(--s3) var(--s4);
  border: 1px solid var(--border);
  border-radius: var(--r3);
  background: var(--surface);
  transition: all var(--t2);
  text-decoration: none;
  color: var(--text-primary);
}

.contact-link:hover {
  border-color: rgba(0,240,255,0.2);
  background: var(--surface-hover);
  transform: translateX(6px);
  color: var(--text-primary);
}

.contact-link__icon {
  width: 40px;
  height: 40px;
  border-radius: var(--r2);
  background: var(--cyan-glow);
  border: 1px solid rgba(0,240,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
  color: var(--cyan);
}

.contact-link__body h4 {
  font-size: 0.95rem;
  margin-bottom: 0.15rem;
  letter-spacing: -0.01em;
}

.contact-link__body p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* About positioning items */
.position-block {
  padding: var(--s4) 0;
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: var(--s4);
  align-items: start;
}

.position-block:last-child { border-bottom: none; }

.position-block__era {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  padding-top: 4px;
}

.position-block__content h4 {
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.position-block__content p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

@media (max-width: 768px) {
  .chat-panel {
    width: calc(100vw - 2rem);
    right: 1rem;
    bottom: 5.5rem;
  }

  .flow { gap: 0.25rem; }
  .flow__label { font-size: 0.78rem; padding: 0.4rem 0.7rem; }

  .position-block {
    grid-template-columns: 1fr;
    gap: var(--s2);
  }
}

/* ============================================
   ACCORDION (System Log)
   ============================================ */
.timeline-accordion {
  display: flex;
  flex-direction: column;
  gap: var(--s2);
}

.accordion-item {
  border: 1px solid var(--border);
  border-radius: var(--r3);
  background: var(--surface);
  overflow: hidden;
  transition: border-color var(--t2), background var(--t2);
}

.accordion-item:hover {
  border-color: var(--border-active);
  background: var(--surface-hover);
}

.accordion-header {
  width: 100%;
  display: flex;
  align-items: center;
  gap: var(--s3);
  padding: var(--s3) var(--s4);
  color: var(--text-primary);
  font-weight: 500;
  text-align: left;
}

.accordion-year {
  font-family: var(--font-mono);
  color: var(--cyan);
  font-size: 0.9rem;
  min-width: 60px;
}

.accordion-title {
  flex: 1;
  font-size: 1.1rem;
}

.accordion-icon {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  line-height: 1;
  color: var(--text-muted);
  transition: transform var(--t2), color var(--t2);
}

.accordion-header[aria-expanded="true"] .accordion-icon {
  transform: rotate(45deg);
  color: var(--cyan);
}

.accordion-content {
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
}

.accordion-header[aria-expanded="false"] + .accordion-content {
  opacity: 0;
}

.accordion-header[aria-expanded="true"] + .accordion-content {
  opacity: 1;
}

.accordion-inner {
  padding: 0 var(--s4) var(--s4) calc(var(--s4) + 60px + var(--s3));
  color: var(--text-secondary);
}

.accordion-inner p {
  margin-bottom: var(--s2);
}

.accordion-inner ul {
  list-style: disc;
  padding-left: var(--s3);
  display: flex;
  flex-direction: column;
  gap: var(--s1);
}

.accordion-inner li {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

@media (max-width: 600px) {
  .accordion-header {
    flex-wrap: wrap;
    gap: var(--s1);
    padding: var(--s2) var(--s3);
  }
  .accordion-year {
    width: 100%;
    margin-bottom: 4px;
  }
  .accordion-inner {
    padding: 0 var(--s3) var(--s3) var(--s3);
  }
}

