@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

@tailwind base;
@tailwind components;
@tailwind utilities;

:root {
  --glow-primary: rgba(37, 99, 235, 0.2);
  --glow-secondary: rgba(168, 85, 247, 0.16);
  --panel: rgba(255, 255, 255, 0.7);
  --border: rgba(148, 163, 184, 0.35);
  --shadow-soft: 0 25px 80px rgba(15, 23, 42, 0.12);
  --ink: #0b1220;
  --surface-0: #ffffff;
  --surface-1: #fbfbfc;
  --surface-2: #f6f7f9;
  --surface-apple: #f5f5f7;
  --wayv-blue: 59, 130, 246;
  --wayv-purple: 168, 85, 247;
}

body {
  font-family: 'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif;
  background: radial-gradient(circle at 15% 10%, rgba(110, 231, 255, 0.18), transparent 32%),
    radial-gradient(circle at 80% 0%, rgba(168, 85, 247, 0.12), transparent 30%),
    linear-gradient(180deg, #f8fafc 0%, #ffffff 50%, #eef2ff 100%);
  color: #0f172a;
  background-size: 135% 135%;
  animation: canvasDrift 26s ease-in-out infinite alternate;
  transition: background 0.4s ease, background-position 2s ease;
}

.page-fade {
  opacity: 0;
  transform: translateY(16px);
  filter: blur(12px);
  transition:
    opacity 900ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 1100ms cubic-bezier(0.22, 1, 0.36, 1),
    filter 1000ms cubic-bezier(0.22, 1, 0.36, 1);
}

html.page-ready .page-fade {
  opacity: 1;
  transform: none;
  filter: none;
}

@media (prefers-reduced-motion: reduce) {
  .page-fade {
    opacity: 1;
    transform: none;
    filter: none;
    animation: none;
  }
}

/* =========================================
   ANIMATION & UTILS
   ========================================= */

a, button, .interactive-panel, .soft-card, .product-panel {
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.6s ease, border-color 0.4s ease, background 0.6s ease;
}

.hover-lift:hover {
  transform: translateY(-6px) scale(1.005);
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.18);
}

.fade-up {
  opacity: 0;
  transform: translateY(28px);
  animation: fadeUp 1s ease forwards;
  animation-play-state: paused;
}
.fade-up.delay-1 { animation-delay: 0.12s; }
.fade-up.delay-2 { animation-delay: 0.24s; }
.fade-up.delay-3 { animation-delay: 0.36s; }

html.page-ready .fade-up {
  animation-play-state: running;
}

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

@keyframes canvasDrift {
  0% { background-position: 0% 0%, 100% 0%, 50% 0%; }
  50% { background-position: 30% 20%, 80% 10%, 50% 50%; }
  100% { background-position: 60% 20%, 60% 8%, 50% 100%; }
}

/* =========================================
   NAVIGATION (UPDATED FOR PERFECT SWITCH)
   ========================================= */

.nav-shell {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

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

.nav-bar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.brand-mark {
  height: 32px;
  width: auto;
}

/* NAVIGATION LINKS - Desktop */
.nav-links {
  display: none; /* Hidden by default on mobile/tablet */
  align-items: center;
  justify-content: center;
  gap: 24px;
}

.nav-links .nav-link {
  font-size: 14px;
  font-weight: 500;
  color: #1f2937;
  transition: color 0.2s ease;
}

.nav-links .nav-link:hover {
  color: #0071E3; /* Apple Blue */
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  justify-content: flex-end;
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border-radius: 99px;
  font-weight: 500;
  font-size: 13px;
  transition: all 0.2s ease;
}

.nav-cta--ghost {
  background: rgba(0,0,0,0.05);
  color: #0f172a;
}

.nav-cta--ghost:hover {
  background: rgba(0,0,0,0.1);
}

/* HAMBURGER MENU */
.menu-toggle {
  display: flex; /* Visible by default on mobile/tablet */
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: transparent;
  border: none;
  cursor: pointer;
}

.menu-toggle__bar {
  width: 18px;
  height: 2px;
  background: #0f172a;
  border-radius: 999px;
  transition: all 0.3s ease;
}

/* Open State Animation */
.menu-toggle.is-open .menu-toggle__bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.is-open .menu-toggle__bar:nth-child(2) { opacity: 0; }
.menu-toggle.is-open .menu-toggle__bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* MOBILE DRAWER */
.nav-drawer {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-drawer.is-active {
  max-height: 500px;
  opacity: 1;
  transform: translateY(0);
  padding-bottom: 20px;
}

.nav-drawer__panel {
  background: #ffffff;
  border: 1px solid rgba(0,0,0,0.05);
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.nav-drawer__links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.nav-drawer__link {
  font-size: 16px;
  font-weight: 600;
  padding: 10px;
  color: #1d1d1f;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}

.nav-drawer__cta {
  display: block;
  margin-top: 20px;
  text-align: center;
  background: #0071E3;
  color: white;
  padding: 12px;
  border-radius: 12px;
  font-weight: 600;
}

/* BREAKPOINT: 1024px (The Perfect Switch) */
@media (min-width: 1024px) {
  .nav-links { display: flex; } /* Show desktop links */
  .menu-toggle { display: none; } /* Hide hamburger */
  .nav-drawer { display: none; } /* Ensure drawer is gone */
}

/* =========================================
   CARDS & PANELS
   ========================================= */

.halo-card {
  position: relative;
  border-radius: 32px;
  overflow: hidden;
  background: #FFFFFF;
  border: 1px solid rgba(0,0,0,0.05);
  box-shadow: 0 20px 40px rgba(0,0,0,0.05);
}

.soft-card {
  position: relative;
  border-radius: 24px;
  background: #FFFFFF;
  border: 1px solid rgba(0,0,0,0.05);
  box-shadow: 0 10px 30px rgba(0,0,0,0.04);
}

.badge {
  display: inline-flex;
  padding: 6px 12px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #0071E3;
  background: rgba(0, 113, 227, 0.1);
}

.grid-lux { display: grid; gap: 24px; }
@media (min-width: 768px) { .grid-lux.two { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .grid-lux.three { grid-template-columns: 1fr 1fr 1fr; } }

/* =========================================
   FOOTER (PERFECT DARK MODE)
   ========================================= */

.site-footer {
  margin-top: 80px;
  background: #000000; /* Deep black */
  color: #86868b; /* Apple Grey */
  padding-top: 64px;
  padding-bottom: 40px;
  font-size: 12px;
}

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

.site-footer__top {
  display: grid;
  gap: 40px;
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .site-footer__top {
    grid-template-columns: 300px 1fr;
  }
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.footer-title {
  color: #F5F5F7;
  font-weight: 600;
  margin-bottom: 16px;
  font-size: 12px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-link {
  color: #86868b;
  transition: color 0.2s ease;
  text-decoration: none;
}

.footer-link:hover {
  color: #FFFFFF;
  text-decoration: underline;
}

.footer-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: rgba(255,255,255,0.1);
  border-radius: 99px;
  color: #F5F5F7;
  font-size: 11px;
  font-weight: 500;
}

.footer-note {
  margin-top: 60px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  flex-direction: column;
  gap: 12px;
  justify-content: space-between;
}

@media (min-width: 768px) {
  .footer-note {
    flex-direction: row;
    align-items: center;
  }
}