/**
 * Spot Academic - Modern High-Performance Landing Stylesheet
 */

:root {
  --bg-deep: #070B14;
  --bg-card: #0F172A;
  --bg-card-hover: #162038;
  --bg-glass: rgba(15, 23, 42, 0.85);
  --border-subtle: #1E293B;
  --border-glow: rgba(20, 184, 166, 0.3);
  --teal: #14B8A6;
  --teal-bright: #2DD4BF;
  --teal-dim: rgba(20, 184, 166, 0.15);
  --amber: #F59E0B;
  --amber-dim: rgba(245, 158, 11, 0.15);
  --blue: #38BDF8;
  --coral: #EF4444;
  --text-main: #F8FAFC;
  --text-muted: #94A3B8;
  --text-dim: #64748B;
  --font-en: 'Plus Jakarta Sans', sans-serif;
  --font-ar: 'Tajawal', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --shadow-lg: 0 20px 40px -15px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 35px -5px rgba(20, 184, 166, 0.25);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  scroll-behavior: smooth;
}

body {
  background: var(--bg-deep);
  color: var(--text-main);
  font-family: var(--font-en);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

[dir="rtl"] body {
  font-family: var(--font-ar);
}

a {
  color: inherit;
  text-decoration: none;
  transition: all 0.2s ease;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

ul {
  list-style: none;
}

.mono {
  font-family: var(--font-mono);
}

.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Live Market Ribbon */
.market-ribbon {
  background: #030712;
  border-bottom: 1px solid var(--border-subtle);
  padding: 8px 0;
  font-size: 12px;
  font-family: var(--font-mono);
  overflow: hidden;
  position: relative;
  z-index: 10;
}

.ribbon-flex {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
}

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(239, 68, 68, 0.15);
  color: #F87171;
  font-weight: 800;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 99px;
  border: 1px solid rgba(239, 68, 68, 0.3);
  white-space: nowrap;
}

.live-pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #EF4444;
  box-shadow: 0 0 8px #EF4444;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.5; }
}

.ticker-scroll {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 24px;
  white-space: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
}

.ticker-scroll::-webkit-scrollbar {
  display: none;
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.ticker-item strong {
  color: #FFF;
}

.ticker-delta.up {
  color: var(--teal-bright);
  font-weight: 700;
}

.ticker-delta.down {
  color: #F87171;
  font-weight: 700;
}

.flash-tick-up {
  animation: flashGreen 0.6s ease;
}

.flash-tick-down {
  animation: flashRed 0.6s ease;
}

@keyframes flashGreen {
  0% { color: #4ADE80; transform: scale(1.08); text-shadow: 0 0 10px rgba(74, 222, 128, 0.6); }
  100% { color: inherit; transform: scale(1); text-shadow: none; }
}

@keyframes flashRed {
  0% { color: #F87171; transform: scale(1.08); text-shadow: 0 0 10px rgba(248, 113, 113, 0.6); }
  100% { color: inherit; transform: scale(1); text-shadow: none; }
}

/* Header Navigation & Dropdowns */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(7, 11, 20, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(30, 41, 59, 0.8);
}

.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 900;
  font-size: 20px;
  letter-spacing: -0.02em;
  color: #FFF;
}

.brand-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #0F172A, #1E293B);
  border: 1px solid rgba(20, 184, 166, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 15px rgba(20, 184, 166, 0.2);
}

.brand-candles {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 16px;
}

.brand-candles span {
  width: 3px;
  border-radius: 1px;
  background: var(--teal);
}

.brand-candles span.red {
  background: var(--coral);
}

.nav-links {
  display: none;
  align-items: center;
  gap: 4px;
}

@media(min-width: 1024px) {
  .nav-links { display: flex; }
}

.nav-item {
  position: relative;
}

.nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-muted);
}

.nav-btn:hover, .nav-btn.active {
  color: #FFF;
  background: rgba(255, 255, 255, 0.06);
}

.nav-caret {
  font-size: 10px;
  opacity: 0.7;
  transition: transform 0.2s;
}

.nav-item:hover .nav-caret {
  transform: rotate(180deg);
}

.nav-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 220px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 100;
}

[dir="rtl"] .nav-dropdown {
  left: auto;
  right: 0;
}

.nav-item:hover .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown a {
  display: block;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

.nav-dropdown a:hover {
  background: rgba(20, 184, 166, 0.12);
  color: var(--teal-bright);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 7px 11px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  transition: all 0.2s ease;
}

.lang-switch:hover {
  background: rgba(30, 41, 59, 1);
  border-color: var(--teal);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: 9px;
  font-size: 13.5px;
  font-weight: 700;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}

.btn-teal {
  background: linear-gradient(135deg, var(--teal), #0D9488);
  color: #022C22;
  box-shadow: 0 4px 15px rgba(20, 184, 166, 0.35);
}

.btn-teal:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(20, 184, 166, 0.5);
  color: #000;
}

.btn-ghost {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
}

.btn-ghost:hover {
  background: rgba(30, 41, 59, 0.8);
  border-color: rgba(255, 255, 255, 0.25);
}

.btn-amber {
  background: linear-gradient(135deg, var(--amber), #D97706);
  color: #451A03;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.35);
}

.btn-amber:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(245, 158, 11, 0.5);
}

/* Hero Section */
.hero-section {
  position: relative;
  padding: 85px 0 65px;
  overflow: hidden;
  background: radial-gradient(circle at 50% -20%, rgba(20, 184, 166, 0.15), transparent 70%),
              radial-gradient(circle at 85% 30%, rgba(56, 189, 248, 0.08), transparent 50%);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 99px;
  background: var(--teal-dim);
  border: 1px solid var(--border-glow);
  color: var(--teal-bright);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 22px;
}

.hero-title {
  font-size: clamp(32px, 5.2vw, 54px);
  font-weight: 900;
  line-height: 1.18;
  letter-spacing: -0.03em;
  max-width: 860px;
  margin-bottom: 20px;
}

.hero-title span.highlight {
  background: linear-gradient(135deg, #FFF 30%, var(--teal-bright) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  font-size: 17px;
  color: var(--text-muted);
  max-width: 680px;
  line-height: 1.7;
  margin-bottom: 32px;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 44px;
}

/* Section Components */
.section {
  padding: 75px 0;
  position: relative;
}

.section-tag {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--teal-bright);
  margin-bottom: 8px;
}

.section-title {
  font-size: clamp(24px, 3.6vw, 36px);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.section-sub {
  color: var(--text-muted);
  font-size: 15.5px;
  max-width: 620px;
  line-height: 1.7;
  margin-bottom: 36px;
}

.grid { display: grid; gap: 22px; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(310px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); }

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 26px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(20, 184, 166, 0.4);
  transform: translateY(-3px);
  box-shadow: var(--shadow-glow);
}

.card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--teal-dim);
  border: 1px solid rgba(20, 184, 166, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--teal-bright);
  font-size: 20px;
  margin-bottom: 16px;
}

.card h3 {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 8px;
  color: #FFF;
}

.card p {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.6;
}

/* Membership Card */
.membership-card {
  background: linear-gradient(145deg, #0F172A, #162038);
  border: 2px solid rgba(245, 158, 11, 0.35);
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: 0 15px 40px rgba(245, 158, 11, 0.1);
}

.membership-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 22px 0;
}

@media(max-width: 600px) {
  .membership-list { grid-template-columns: 1fr; }
}

.membership-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: var(--text-muted);
}

.membership-list li::before {
  content: "✓";
  color: var(--teal-bright);
  font-weight: 800;
}

/* Digital Products Cards */
.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.product-header {
  padding: 20px;
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.1), rgba(56, 189, 248, 0.05));
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.product-badge {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--teal-dim);
  color: var(--teal-bright);
  border: 1px solid rgba(20, 184, 166, 0.3);
}

.product-body {
  padding: 22px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* White Papers */
.paper-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.paper-tag {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(56, 189, 248, 0.15);
  color: var(--blue);
  border: 1px solid rgba(56, 189, 248, 0.3);
  margin-bottom: 12px;
}

.paper-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* Demo Sandbox Terminal */
.demo-terminal {
  background: #0B1120;
  border: 1px solid #1E293B;
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.8), 0 0 40px rgba(20, 184, 166, 0.15);
  overflow: hidden;
}

.terminal-header {
  background: #070B14;
  padding: 14px 22px;
  border-bottom: 1px solid #1E293B;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.terminal-dots {
  display: flex;
  align-items: center;
  gap: 6px;
}

.terminal-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #334155;
  display: inline-block;
  flex-shrink: 0;
}

.terminal-body {
  padding: 28px;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 28px;
}

@media(max-width: 860px) {
  .terminal-body { grid-template-columns: 1fr; }
}

.terminal-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 22px;
}

.terminal-stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.terminal-stat-row:last-child {
  border-bottom: none;
}

.terminal-stat-val {
  font-weight: 700;
  font-family: var(--font-mono);
  font-size: 15px;
}

.form-group {
  margin-bottom: 14px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.form-control-custom {
  width: 100%;
  background: #070B14;
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 11px 14px;
  color: #FFF;
  font-family: inherit;
  font-size: 14px;
}

.form-control-custom:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.2);
}

/* Faculty Cards */
.faculty-card {
  text-align: center;
  padding: 28px 18px;
}

.faculty-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  margin: 0 auto 14px;
  background: linear-gradient(135deg, var(--teal), #38BDF8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 24px;
  color: #042F2E;
  box-shadow: 0 0 20px rgba(20, 184, 166, 0.3);
}

/* Footer */
.site-footer {
  background: #030712;
  border-top: 1px solid var(--border-subtle);
  padding: 60px 0 30px;
  margin-top: 80px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 36px;
  margin-bottom: 36px;
}

@media(max-width: 860px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media(max-width: 540px) {
  .footer-grid { grid-template-columns: 1fr; }
}

.footer-col h4 {
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 16px;
  color: #FFF;
}

.footer-col ul li {
  margin-bottom: 9px;
}

.footer-col ul li a {
  color: var(--text-muted);
  font-size: 13.5px;
}

.footer-col ul li a:hover {
  color: var(--teal-bright);
}

.footer-bottom {
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--text-dim);
  flex-wrap: wrap;
  gap: 12px;
}

/* Modal Overlay & Box */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(3, 7, 18, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease;
}

.modal-overlay.show {
  opacity: 1;
  visibility: visible;
}

.modal-box {
  background: #0B1120;
  border: 1px solid #1E293B;
  border-radius: var(--radius-lg);
  max-width: 540px;
  width: 100%;
  padding: 30px;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.9), 0 0 35px rgba(20, 184, 166, 0.2);
  transform: scale(0.95);
  transition: transform 0.25s ease;
}

.modal-overlay.show .modal-box {
  transform: scale(1);
}

.modal-header-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-subtle);
}

.modal-close-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  color: var(--coral);
}

.copy-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #070B14;
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 10px 14px;
  margin-top: 6px;
}
