/* ==========================================================================
   PulseTelemetry - Fluid Interaction & Design System
   Domain: https://pulsetelemetry.pw | Base API: https://pulsetelemetry.pw/v1/api
   ========================================================================== */

:root {
  /* Curated Palette */
  --bg-main: #ffffff;
  --bg-subtle: #f8fafc;
  --bg-surface: #ffffff;
  --bg-banner: #eff6ff;

  --border-color: #e2e8f0;
  --border-subtle: #f1f5f9;
  --border-hover: #cbd5e1;
  --border-focus: #2563eb;

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;

  --accent-blue: #2563eb;
  --accent-blue-hover: #1d4ed8;
  --accent-blue-glow: rgba(37, 99, 235, 0.15);
  --accent-light-blue: #dbeafe;
  --accent-green: #10b981;
  --accent-green-light: #ecfdf5;
  --accent-amber: #f59e0b;
  --accent-amber-light: #fffbeb;
  --accent-purple: #8b5cf6;
  --accent-purple-light: #f5f3ff;
  --accent-red: #ef4444;

  /* Typography */
  --font-sans: "Plus Jakarta Sans", system-ui, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  /* Geometry */
  --container-max: 1140px;
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Layered Elevation Shadows */
  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.05), 0 1px 2px -1px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px -2px rgba(15, 23, 42, 0.06), 0 2px 6px -1px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 12px 24px -4px rgba(15, 23, 42, 0.08), 0 4px 8px -2px rgba(15, 23, 42, 0.03);
  --shadow-xl: 0 24px 48px -12px rgba(15, 23, 42, 0.12), 0 8px 16px -4px rgba(15, 23, 42, 0.04);

  /* Fluid Spring Physics Curves */
  --spring-default: cubic-bezier(0.16, 1, 0.3, 1);
  --spring-snappy: cubic-bezier(0.32, 0.72, 0, 1);
  --spring-bouncy: cubic-bezier(0.34, 1.56, 0.64, 1);
  --transition: 0.22s var(--spring-default);
}

/* Reset & Atmospheric Background */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-sans);
  background-color: var(--bg-main);
  color: var(--text-primary);
  line-height: 1.5;
  height: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-main);
  color: var(--text-primary);
  position: relative;
  overflow-x: hidden;
}

/* Atmospheric Glow */
.ambient-glow {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 1200px;
  height: 520px;
  background: radial-gradient(ellipse 70% 60% at 50% 0%, rgba(37, 99, 235, 0.12), transparent 75%);
  pointer-events: none;
  z-index: 0;
}

main {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
}

footer {
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

a {
  color: inherit;
  text-decoration: none;
}

img, svg {
  vertical-align: middle;
}

/* Top Announcement Banner */
.top-banner {
  background: linear-gradient(90deg, #eff6ff 0%, #f0fdf4 100%);
  border-bottom: 1px solid rgba(219, 234, 254, 0.8);
  padding: 0.45rem 1rem;
  font-size: 0.825rem;
  color: #1e40af;
  text-align: center;
  font-weight: 500;
  position: relative;
  z-index: 10;
}

.top-banner-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
}

.top-banner-pill {
  background: #2563eb;
  color: #ffffff;
  font-size: 0.675rem;
  font-weight: 700;
  font-family: var(--font-mono);
  padding: 0.1rem 0.5rem;
  border-radius: var(--radius-full);
  letter-spacing: 0.04em;
}

/* Container */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Translucent Glass Header */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(226, 232, 240, 0.75);
  transition: background var(--transition), border-color var(--transition);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: opacity var(--transition), transform var(--transition);
}

.logo-link:active {
  transform: scale(0.98);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.nav-link {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: color var(--transition);
  position: relative;
  padding: 0.35rem 0;
}

.nav-link:hover, .nav-link.active {
  color: var(--accent-blue);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent-blue);
  border-radius: var(--radius-full);
  animation: navIndicatorIn 0.25s var(--spring-default);
}

@keyframes navIndicatorIn {
  from { transform: scaleX(0); opacity: 0; }
  to { transform: scaleX(1); opacity: 1; }
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.mobile-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.6rem;
  cursor: pointer;
  color: var(--text-primary);
}

.mobile-nav {
  display: none;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 1.5rem;
  gap: 0.85rem;
}

.mobile-nav.is-active {
  display: flex;
}

/* SPA Views & Fluid Screen Transitions */
.spa-view {
  transition: opacity 0.25s var(--spring-default), transform 0.25s var(--spring-default);
  width: 100%;
}

/* Sections */
.section {
  padding: 5rem 0;
}

.section-alt {
  background-color: var(--bg-subtle);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  background-image: radial-gradient(rgba(226, 232, 240, 0.6) 1px, transparent 1px);
  background-size: 24px 24px;
}

.section-header {
  text-align: center;
  max-width: 660px;
  margin: 0 auto 3.5rem auto;
}

.section-header.text-left {
  text-align: left;
  margin-left: 0;
  max-width: 100%;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-blue);
  background: var(--accent-light-blue);
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-full);
  margin-bottom: 0.85rem;
}

.section-title {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.03em;
  line-height: 1.18;
  margin-bottom: 0.65rem;
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ==========================================================================
   HERO SECTION (Fluid Staggered Entrance)
   ========================================================================== */
.hero-section {
  min-height: calc(100vh - 104px);
  display: flex;
  align-items: center;
  background: transparent;
  border-bottom: 1px solid var(--border-color);
  padding: 4rem 0;
  position: relative;
}

.hero-container {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 3.5rem;
  align-items: center;
}

.hero-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #065f46;
  background: #ecfdf5;
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius-full);
  margin-bottom: 1.5rem;
  box-shadow: 0 1px 2px rgba(16, 185, 129, 0.08);
  animation: heroFadeIn 0.5s var(--spring-default) backwards;
  animation-delay: 0.05s;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: var(--accent-green);
  border-radius: 50%;
  position: relative;
}

.pulse-dot::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.4);
  animation: sonarPulse 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes sonarPulse {
  0% { transform: scale(0.8); opacity: 0.9; }
  100% { transform: scale(2.6); opacity: 0; }
}

.hero-title {
  font-size: clamp(2.4rem, 4.5vw, 3.4rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.035em;
  color: var(--text-primary);
  margin-bottom: 1.35rem;
  animation: heroFadeIn 0.55s var(--spring-default) backwards;
  animation-delay: 0.12s;
}

.hero-title span {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-style: italic;
}

.hero-description {
  font-size: 1.075rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 2.25rem;
  max-width: 540px;
  animation: heroFadeIn 0.6s var(--spring-default) backwards;
  animation-delay: 0.18s;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  animation: heroFadeIn 0.65s var(--spring-default) backwards;
  animation-delay: 0.24s;
}

@keyframes heroFadeIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Bento Hero Cards & Pointer Spotlight */
.hero-bento {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.bento-stat-card {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius-lg);
  padding: 1.35rem 1.6rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 1), 0 4px 20px -4px rgba(15, 23, 42, 0.06);
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
  position: relative;
  overflow: hidden;
  animation: heroFadeIn 0.65s var(--spring-default) backwards;
}

.hero-bento .bento-stat-card:nth-child(1) { animation-delay: 0.15s; }
.hero-bento .bento-stat-card:nth-child(2) { animation-delay: 0.25s; }
.hero-bento .bento-stat-card:nth-child(3) { animation-delay: 0.35s; }

/* Pointer Spotlight Dynamic Glow */
.bento-stat-card::before,
.bento-card::before,
.price-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(400px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(37, 99, 235, 0.09), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.bento-stat-card:hover::before,
.bento-card:hover::before,
.price-card:hover::before {
  opacity: 1;
}

.bento-stat-card:hover {
  transform: translateY(-3px);
  border-color: rgba(37, 99, 235, 0.35);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 1), 0 14px 30px -6px rgba(37, 99, 235, 0.12);
}

.bento-stat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.4rem;
}

.bento-badge {
  font-size: 0.725rem;
  font-weight: 700;
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-full);
}

.bento-badge.ok {
  background: #ecfdf5;
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.bento-badge.info {
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid rgba(37, 99, 235, 0.25);
}

.bento-badge.active {
  background: #f5f3ff;
  color: #7c3aed;
  border: 1px solid rgba(124, 58, 237, 0.25);
}

.bento-tag {
  font-size: 0.7rem;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--text-muted);
  letter-spacing: 0.06em;
}

.bento-val {
  font-family: var(--font-mono);
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 0.2rem;
}

.bento-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Bento Features Grid & Scroll Reveals */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.bento-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 1), var(--shadow-sm);
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.bento-card:hover {
  transform: translateY(-4px);
  border-color: rgba(37, 99, 235, 0.35);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 1), var(--shadow-lg);
}

.bento-icon-box {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: #eff6ff;
  color: var(--accent-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.35rem;
  border: 1px solid rgba(37, 99, 235, 0.15);
  transition: transform var(--transition);
}

.bento-card:hover .bento-icon-box {
  transform: scale(1.08);
}

.bento-icon-box.tg { background: #e0f2fe; color: #0284c7; border-color: rgba(2, 132, 199, 0.2); }
.bento-icon-box.green { background: #ecfdf5; color: #059669; border-color: rgba(16, 185, 129, 0.2); }
.bento-icon-box.purple { background: #f5f3ff; color: #7c3aed; border-color: rgba(124, 58, 237, 0.2); }
.bento-icon-box.orange { background: #fff7ed; color: #ea580c; border-color: rgba(234, 88, 12, 0.2); }
.bento-icon-box.teal { background: #f0fdfa; color: #0d9488; border-color: rgba(13, 148, 136, 0.2); }

.bento-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.015em;
  margin-bottom: 0.45rem;
}

.bento-card-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Scroll Reveal Classes */
.reveal-item {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.5s var(--spring-default), transform 0.5s var(--spring-default);
}

.reveal-item.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Footer (Dark) */
.footer {
  background: #0b1120;
  color: #94a3b8;
  border-top: 1px solid #1e293b;
  padding: 4rem 0 2rem 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.2fr;
  gap: 3rem;
  margin-bottom: 3.5rem;
}

.footer-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: #f8fafc;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1.25rem;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links a {
  font-size: 0.875rem;
  color: #94a3b8;
  transition: color var(--transition);
}

.footer-links a:hover {
  color: #ffffff;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 2rem;
  border-top: 1px solid #1e293b;
  font-size: 0.825rem;
  color: #64748b;
  flex-wrap: wrap;
  gap: 1rem;
}

@media (max-width: 992px) {
  .hero-container {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .bento-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  .mobile-toggle {
    display: block;
  }
  .hero-title {
    font-size: 2.3rem;
  }
  .bento-grid {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
}