/* ============================================================
   material.codes — Landing Page Custom Styles
   ============================================================ */

/* ---- Custom properties ------------------------------------------- */
:root {
  --landing-bg: #0a0f1e;
  --landing-surface: #0f1628;
  --landing-surface-2: #141d35;
  --landing-border: rgba(255, 255, 255, 0.08);

  --accent-blue: #3b82f6;
  --accent-cyan: #06b6d4;
  --accent-amber: #f59e0b;
  --accent-green: #10b981;

  --glow-blue: rgba(59, 130, 246, 0.4);
  --glow-cyan: rgba(6, 182, 212, 0.4);
  --glow-amber: rgba(245, 158, 11, 0.3);
  --glow-green: rgba(16, 185, 129, 0.35);
}

/* ---- Font overrides ---------------------------------------------- */
body {
  font-family: 'IBM Plex Sans', 'Inter', ui-sans-serif, system-ui, sans-serif;
  background-color: var(--landing-bg);
  color: rgba(255, 255, 255, 0.9);
}

.font-mono,
code,
pre,
.landing-mono {
  font-family: 'JetBrains Mono', 'Fira Code', ui-monospace, 'Courier New', monospace;
}

/* ---- Animated gradient headline text ----------------------------- */
.science-gradient-text {
  background: linear-gradient(
    135deg,
    #3b82f6 0%,
    #06b6d4 30%,
    #10b981 60%,
    #3b82f6 100%
  );
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradientShift 5s ease-in-out infinite;
}

@keyframes gradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ---- Glass morphism cards ---------------------------------------- */
.glass-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--landing-border);
  border-radius: 1rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.glass-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

.glass-card--blue  { border-top: 3px solid var(--accent-blue);  }
.glass-card--cyan  { border-top: 3px solid var(--accent-cyan);  }
.glass-card--amber { border-top: 3px solid var(--accent-amber); }
.glass-card--green { border-top: 3px solid var(--accent-green); }

.glass-card--blue:hover  { border-color: var(--accent-blue);  box-shadow: 0 8px 32px var(--glow-blue);  }
.glass-card--cyan:hover  { border-color: var(--accent-cyan);  box-shadow: 0 8px 32px var(--glow-cyan);  }
.glass-card--amber:hover { border-color: var(--accent-amber); box-shadow: 0 8px 32px var(--glow-amber); }
.glass-card--green:hover { border-color: var(--accent-green); box-shadow: 0 8px 32px var(--glow-green); }

/* ---- Terminal ---------------------------------------------------- */
.terminal {
  background: #0d1117;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.75rem;
  overflow: hidden;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.875rem;
}

.terminal-header {
  background: #161b22;
  padding: 0.65rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.terminal-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.terminal-dot--red    { background: #ff5f57; }
.terminal-dot--yellow { background: #febc2e; }
.terminal-dot--green  { background: #28c840; }

.terminal-title {
  flex: 1;
  text-align: center;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.4);
  font-family: 'JetBrains Mono', monospace;
}

.terminal-body {
  padding: 1.25rem 1.5rem;
}

/* ---- Typewriter cursor ------------------------------------------- */
.cursor-blink {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  background: #10b981;
  vertical-align: text-bottom;
  animation: cursorBlink 1s step-end infinite;
}

@keyframes cursorBlink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* ---- Scroll fade-up animation ------------------------------------ */
.fade-up {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-up.delay-100 { transition-delay: 0.1s; }
.fade-up.delay-200 { transition-delay: 0.2s; }
.fade-up.delay-300 { transition-delay: 0.3s; }
.fade-up.delay-400 { transition-delay: 0.4s; }

/* ---- Grainy dark overlay ----------------------------------------- */
.grainy-dark::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  opacity: 0.03;
  border-radius: inherit;
  z-index: 0;
}

/* ---- Decorative glow orbs --------------------------------------- */
.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  opacity: 0.35;
}

.glow-orb--blue  { background: var(--accent-blue);  }
.glow-orb--cyan  { background: var(--accent-cyan);  }
.glow-orb--amber { background: var(--accent-amber); }
.glow-orb--green { background: var(--accent-green); }

/* ---- Navbar specific -------------------------------------------- */
#landing-topbar {
  transition: top 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  background: transparent;
}

#landing-topbar[data-scrolling="down"] {
  top: -100px;
}

#landing-topbar:not([data-scrolling="down"]) {
  top: 0;
}

@media (min-width: 640px) {
  #landing-topbar:not([data-scrolling="down"]) {
    top: 1rem;
  }
}

.landing-topbar-inner {
  background: transparent;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.landing-topbar-inner.scrolled {
  width: 800px;
  max-width: 100%;
  background: rgba(15, 22, 40, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 4px 24px rgba(0,0,0,0.35);
}

/* ---- Section spacing -------------------------------------------- */
.landing-section {
  padding: 5rem 0;
}

@media (min-width: 1024px) {
  .landing-section {
    padding: 7rem 0;
  }
}

/* ---- Data source grid ------------------------------------------- */
.datasource-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.85rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 9999px;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.7);
  transition: background 0.2s, border-color 0.2s;
}

.datasource-chip:hover {
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(59, 130, 246, 0.4);
  color: rgba(255, 255, 255, 0.95);
}

/* ---- Stats bar -------------------------------------------------- */
.stats-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  margin-top: 2.5rem;
}

.stats-bar-item {
  text-align: center;
}

.stats-bar-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1;
  background: linear-gradient(135deg, #3b82f6, #06b6d4);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stats-bar-label {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.45);
  margin-top: 0.2rem;
}

/* ---- Use case tabs ---------------------------------------------- */
.usecase-tab {
  cursor: pointer;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.55);
  transition: background 0.2s, color 0.2s;
}

.usecase-tab.active,
.usecase-tab:hover {
  background: rgba(59, 130, 246, 0.15);
  color: rgba(255, 255, 255, 0.9);
}

/* ---- Footer ----------------------------------------------------- */
.landing-footer {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #091525 0%, #07111d 100%);
}

/* ---- Hero section ------------------------------------------------ */
#hero {
  min-height: calc(100vh - 4rem);
}

/* ---- Hero canvas ------------------------------------------------- */
#crystal-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.55;
}

/* ---- Problem section tool icons ---------------------------------- */
.tool-icon-cluster {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 0.75;
}

.tool-icon-item {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  font-size: 1.4rem;
}

/* ---- MCP code block --------------------------------------------- */
.mcp-code {
  background: #0d1117;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.75rem;
  padding: 1.5rem;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.82rem;
  line-height: 1.7;
  color: #e6edf3;
  overflow-x: auto;
}

.mcp-code .json-key   { color: #79c0ff; }
.mcp-code .json-str   { color: #a5d6ff; }
.mcp-code .json-punct { color: #8b949e; }

/* ---- Waitlist form ---------------------------------------------- */
.waitlist-form {
  display: flex;
  gap: 0.75rem;
  max-width: 28rem;
  margin: 0 auto;
  flex-wrap: wrap;
  justify-content: center;
}

.waitlist-input {
  flex: 1;
  min-width: 14rem;
  padding: 0.65rem 1rem;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 0.5rem;
  color: white;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
}

.waitlist-input:focus {
  border-color: var(--accent-blue);
  background: rgba(59, 130, 246, 0.08);
}

.waitlist-input::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

/* ---- Missing Lucide icons --------------------------------------- */
.lucide--atom {
  --svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cg fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='1'/%3E%3Cpath d='M20.2 20.2c-2.04 2.04-7.64.87-12.57-4.06S2.74 5.84 4.78 3.8c2.04-2.04 7.64-.87 12.57 4.06s6.91 10.37 4.87 12.41'/%3E%3C/g%3E%3C/svg%3E");
}
.lucide--play-circle {
  --svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cg fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpolygon points='10 8 16 12 10 16 10 8'/%3E%3C/g%3E%3C/svg%3E");
}
.lucide--check-circle {
  --svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cg fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'%3E%3Cpath d='M22 11.08V12a10 10 0 1 1-5.93-9.14'/%3E%3Cpath d='m9 11 3 3L22 4'/%3E%3C/g%3E%3C/svg%3E");
}
.lucide--graduation-cap {
  --svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cg fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'%3E%3Cpath d='M22 10v6M2 10l10-5 10 5-10 5z'/%3E%3Cpath d='M6 12v5c3 3 9 3 12 0v-5'/%3E%3C/g%3E%3C/svg%3E");
}
.lucide--table-2 {
  --svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cpath fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M9 3H5a2 2 0 0 0-2 2v4m6-6h10a2 2 0 0 1 2 2v4M9 3v18m0 0h10a2 2 0 0 0 2-2V9M9 21H5a2 2 0 0 1-2-2V9m0 0h18'/%3E%3C/svg%3E");
}
.lucide--battery-charging {
  --svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cg fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'%3E%3Cpath d='M15 7h1a2 2 0 0 1 2 2v6a2 2 0 0 1-2 2h-2m-4 0H7a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1'/%3E%3Cpath d='M11 7l-3 5h4l-3 5'/%3E%3Cline x1='22' x2='22' y1='11' y2='13'/%3E%3C/g%3E%3C/svg%3E");
}
.lucide--plug-zap {
  --svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cg fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'%3E%3Cpath d='M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4z'/%3E%3Cpath d='m2 22 3-3'/%3E%3Cpath d='M7.5 13.5 10 11'/%3E%3Cpath d='M10.5 16.5 13 14'/%3E%3Cpath d='m18 3-4 4h6l-4 4'/%3E%3C/g%3E%3C/svg%3E");
}
.lucide--circle-check {
  --svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cg fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='m9 12 2 2 4-4'/%3E%3C/g%3E%3C/svg%3E");
}
.lucide--building-2 {
  --svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cg fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'%3E%3Cpath d='M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z'/%3E%3Cpath d='M6 12H4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h2'/%3E%3Cpath d='M18 9h2a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2h-2'/%3E%3Cpath d='M10 6h4'/%3E%3Cpath d='M10 10h4'/%3E%3Cpath d='M10 14h4'/%3E%3Cpath d='M10 18h4'/%3E%3C/g%3E%3C/svg%3E");
}
.lucide--loader-circle {
  --svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cpath fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M21 12a9 9 0 1 1-6.219-8.56'/%3E%3C/svg%3E");
}

/* ---- Animated topbar gradient button ---------------------------- */
.btn-primary-glow {
  position: relative;
  overflow: hidden;
}

.btn-primary-glow::after {
  content: '';
  position: absolute;
  inset-x: 0;
  top: 2px;
  height: 100%;
  background: linear-gradient(to right, var(--accent-blue), var(--accent-cyan));
  opacity: 0.35;
  filter: blur(10px);
  z-index: -1;
  transition: opacity 0.3s, filter 0.3s;
}

.btn-primary-glow:hover::after {
  opacity: 0.55;
  filter: blur(16px);
}
