@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=Space+Mono:ital,wght@0,400;0,700&display=swap&font-display=swap');

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

:root {
  --bg:       #07090F;
  --bg2:      #0E1120;
  --bg3:      #151929;
  --glass:    rgba(255,255,255,0.04);
  --glass2:   rgba(255,255,255,0.07);
  --blue:     #4F8EF7;
  --blue2:    #7AAEFF;
  --violet:   #9B6BFF;
  --teal:     #2DD4BF;
  --fg:       #F1F3F9;
  --fg2:      #8B95B0;
  --fg3:      #4A5270;
  --border:   rgba(255,255,255,0.08);
  --border2:  rgba(79,142,247,0.35);
  --glow:     rgba(79,142,247,0.15);
  --mono:     'Space Mono', monospace;
  --sans:     'Space Grotesk', sans-serif;
}

html { scroll-behavior: smooth; }

/* ── GLOBAL TYPOGRAPHY DEFAULTS ── */
h1, h2, h3, h4, h5 {
  font-family: var(--sans);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.1;
  -webkit-font-smoothing: antialiased;
}
p, li, span, a {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body {
  background: var(--bg); color: var(--fg); font-family: var(--sans); overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: 'kern' 1, 'liga' 1, 'calt' 1;
}

/* scrollbar */
::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--fg3); border-radius: 2px; }
::selection { background: rgba(79,142,247,0.3); }

/* ── NAV ── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 500;
  display: flex; justify-content: space-between; align-items: center;
  padding: 0 3rem; height: 68px;
  border-bottom: 1px solid var(--border);
  background: rgba(7,9,15,0.85);
  backdrop-filter: blur(24px);
  transition: background 0.3s;
}
nav.scrolled { background: rgba(7,9,15,0.97); }
.nav-logo {
  font-family: var(--sans); font-size: 0.88rem; font-weight: 700;
  color: var(--fg); text-decoration: none; letter-spacing: 0.04em;
  display: flex; align-items: center; gap: 0.55rem;
  white-space: nowrap;
}
.nav-logo-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--blue); }
.nav-links { display: flex; gap: 0.25rem; list-style: none; }
.nav-links a {
  font-family: var(--sans); font-size: 0.875rem; font-weight: 500;
  color: var(--fg2); text-decoration: none;
  padding: 0.45rem 0.9rem; border-radius: 6px;
  transition: color 0.2s cubic-bezier(0.4,0,0.2,1), background 0.2s cubic-bezier(0.4,0,0.2,1);
  letter-spacing: 0.01em;
}
.nav-links a:hover { color: var(--fg); background: var(--glass2); }
.nav-links a.active { color: var(--blue2); background: rgba(79,142,247,0.1); }
.nav-cta {
  font-family: var(--sans); font-size: 0.88rem; font-weight: 600;
  background: var(--blue); color: #fff;
  padding: 0.55rem 1.4rem; border-radius: 8px;
  text-decoration: none; border: none; cursor: pointer;
  transition: all 0.2s; letter-spacing: 0.01em;
  box-shadow: 0 0 20px rgba(79,142,247,0.3);
}
.nav-cta:hover { background: var(--blue2); box-shadow: 0 0 32px rgba(79,142,247,0.5); transform: translateY(-1px); }
.nav-hamburger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 4px;
}
.nav-hamburger span { display: block; height: 1.5px; width: 24px; background: var(--fg2); border-radius: 2px; transition: 0.3s; }
.nav-hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
.mobile-menu {
  display: none; position: fixed; inset: 0; z-index: 490;
  background: rgba(7,9,15,0.97); flex-direction: column;
  justify-content: center; align-items: center; gap: 2rem;
  opacity: 0; pointer-events: none; transition: opacity 0.3s;
}
.mobile-menu.open { opacity: 1; pointer-events: all; }
.mobile-menu a { font-size: 2.2rem; font-weight: 700; color: var(--fg2); text-decoration: none; transition: color 0.2s; }
.mobile-menu a:hover { color: var(--fg); }
.mobile-menu .m-cta { font-size: 1rem; background: var(--blue); color: #fff; padding: 0.75rem 2.5rem; border-radius: 8px; margin-top: 1rem; }

/* ── SECTION HELPERS ── */
.section { padding: 6rem 3rem; }
.section-sm { padding: 4rem 3rem; }
.container { max-width: 1100px; margin: 0 auto; }

.label {
  font-family: var(--mono); font-size: 0.72rem; font-weight: 400;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--blue2); margin-bottom: 1.2rem;
  display: flex; align-items: center; gap: 0.6rem;
}
.label::before { content: ''; width: 20px; height: 1px; background: var(--blue); }

h1.hero-h { font-size: clamp(3rem, 7vw, 6rem); font-weight: 700; line-height: 1.05; letter-spacing: -0.02em; }
h2.section-h { font-size: clamp(2rem, 4vw, 3.2rem); font-weight: 700; line-height: 1.1; letter-spacing: -0.02em; }
.text-grad { background: linear-gradient(135deg, var(--fg) 0%, var(--blue2) 60%, var(--violet) 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.sub { font-size: 1.05rem; color: var(--fg2); line-height: 1.8; font-weight: 400; max-width: 560px; letter-spacing: 0.005em; }

/* ── BUTTONS ── */
.btn { display: inline-flex; align-items: center; gap: 0.5rem; font-family: var(--sans); font-weight: 600; font-size: 0.92rem; text-decoration: none; border: none; cursor: pointer; transition: all 0.22s cubic-bezier(0.4,0,0.2,1); border-radius: 8px; letter-spacing: 0.02em; }
.btn-primary { background: var(--blue); color: #fff; padding: 0.8rem 1.8rem; box-shadow: 0 0 24px rgba(79,142,247,0.3); }
.btn-primary:hover { background: var(--blue2); box-shadow: 0 0 40px rgba(79,142,247,0.5); transform: translateY(-2px); }
.btn-ghost { background: var(--glass2); color: var(--fg); padding: 0.8rem 1.8rem; border: 1px solid var(--border); }
.btn-ghost:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.15); }

/* ── GLASS CARDS ── */
.card {
  background: var(--glass); border: 1px solid var(--border);
  border-radius: 16px; padding: 2rem;
  transition: border-color 0.22s cubic-bezier(0.4,0,0.2,1), background 0.22s cubic-bezier(0.4,0,0.2,1);
}
.card:hover { background: var(--glass2); border-color: var(--border2); }

/* ── TAGS ── */
.tech-tag {
  display: inline-block; font-family: var(--mono); font-size: 0.68rem;
  color: var(--blue2); background: rgba(79,142,247,0.1);
  border: 1px solid rgba(79,142,247,0.2); border-radius: 4px;
  padding: 0.22rem 0.65rem; letter-spacing: 0.06em;
}

/* ── TICKER ── */
.ticker-wrap { overflow: hidden; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 1rem 0; background: var(--glass); }
.ticker-track { display: flex; gap: 3.5rem; animation: ticker 32s linear infinite; white-space: nowrap; }
.ticker-track span { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg3); }
.ticker-track .sep { color: var(--blue); opacity: 0.5; }
@keyframes ticker { 0%{transform:translateX(0)} 100%{transform:translateX(-50%)} }

/* ── REVEAL ANIM ── */
[data-reveal] { opacity: 0; transform: translateY(20px); transition: opacity 0.55s cubic-bezier(0.4,0,0.2,1), transform 0.55s cubic-bezier(0.4,0,0.2,1); }
[data-reveal].visible { opacity: 1; transform: none; }
[data-delay="1"] { transition-delay: 0.1s; }
[data-delay="2"] { transition-delay: 0.2s; }
[data-delay="3"] { transition-delay: 0.3s; }
[data-delay="4"] { transition-delay: 0.4s; }

/* ── FOOTER ── */
footer { background: var(--bg2); border-top: 1px solid var(--border); padding: 4rem 3rem 2rem; }
.footer-grid { max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: 1.8fr 1fr 1fr 1fr; gap: 3rem; margin-bottom: 3rem; }
.footer-brand p { font-size: 0.88rem; color: var(--fg2); line-height: 1.7; margin-top: 0.75rem; max-width: 260px; }
.footer-col h5 { font-family: var(--mono); font-size: 0.65rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--fg3); margin-bottom: 1.2rem; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 0.65rem; }
.footer-col ul a { font-size: 0.88rem; color: var(--fg2); text-decoration: none; transition: color 0.2s; }
.footer-col ul a:hover { color: var(--fg); }
.footer-bottom { max-width: 1100px; margin: 0 auto; border-top: 1px solid var(--border); padding-top: 1.8rem; display: flex; justify-content: space-between; align-items: center; font-family: var(--mono); font-size: 0.65rem; color: var(--fg3); letter-spacing: 0.08em; }
.status-pill { display: flex; align-items: center; gap: 0.5rem; }
.pulse-dot { width: 6px; height: 6px; border-radius: 50%; background: #34D399; animation: blink 2s infinite; }
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0.3} }

/* ── FORMS ── */
.field { display: flex; flex-direction: column; gap: 0.5rem; }
.field label { font-size: 0.82rem; font-weight: 500; color: var(--fg2); }
.field input, .field textarea, .field select {
  background: var(--glass); border: 1px solid var(--border);
  border-radius: 8px; padding: 0.85rem 1rem;
  color: var(--fg); font-family: var(--sans); font-size: 0.95rem;
  outline: none; transition: border-color 0.2s, box-shadow 0.2s; width: 100%;
}
.field input::placeholder, .field textarea::placeholder { color: var(--fg3); }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(79,142,247,0.15); }
.field select option { background: var(--bg2); }
.field textarea { resize: vertical; min-height: 130px; }

/* ── TOAST ── */
#toast { position: fixed; bottom: 2rem; left: 50%; transform: translateX(-50%) translateY(16px); z-index: 9000; background: var(--bg2); border: 1px solid var(--border2); border-radius: 10px; padding: 1rem 1.8rem; font-size: 0.88rem; color: var(--fg); opacity: 0; transition: opacity 0.3s, transform 0.3s; white-space: nowrap; box-shadow: 0 8px 32px rgba(0,0,0,0.4); }
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
#toast.error { border-color: rgba(255,90,90,0.4); }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  nav { padding: 0 1.5rem; }
  .nav-links, .nav-cta { display: none; }
  .nav-hamburger { display: flex; }
  .mobile-menu { display: flex; }
  .section { padding: 4rem 1.5rem; }
  .section-sm { padding: 2.5rem 1.5rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .footer-bottom { flex-direction: column; gap: 1rem; text-align: center; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
}
