/* ============================================
   Oceantics — Custom Styles
   ============================================ */

/* --- CSS Custom Properties --- */
:root {
  --navy: #1a2744;
  --navy-light: #2d3f62;
  --navy-dark: #0f1a2e;
  --accent: #4a6fa5;
  --accent-light: #6b8fc0;
  --text-light: #f0f2f5;
  --text-muted: #94a3b8;
  --transition-smooth: cubic-bezier(0.32, 0.72, 0, 1);
}

/* --- Satoshi Font Face (fallback if CDN fails) --- */
body {
  font-family: 'Satoshi', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* --- Scroll Behavior --- */
html {
  scroll-padding-top: 5rem;
}

/* --- Mesh Gradient Background --- */
.mesh-gradient {
  background:
    radial-gradient(ellipse 80% 60% at 10% 80%, rgba(74, 111, 165, 0.15) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 90% 20%, rgba(45, 63, 98, 0.2) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 50% 50%, rgba(74, 111, 165, 0.08) 0%, transparent 50%),
    var(--navy-dark);
}

/* --- Nav Delayed Entrance --- */
.nav-entrance {
  opacity: 0;
  transform: translateY(-1rem);
  animation: navIn 0.8s var(--transition-smooth) 2.2s forwards;
}

@keyframes navIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Hero Words Staggered Entrance --- */
.hero-word {
  opacity: 0;
  transform: translateY(1.5rem);
  filter: blur(8px);
  animation: heroWordIn 0.8s var(--transition-smooth) forwards;
}

.hero-word:nth-child(1) { animation-delay: 0.3s; }
.hero-word:nth-child(2) { animation-delay: 0.8s; }
.hero-word:nth-child(3) { animation-delay: 1.3s; }

@keyframes heroWordIn {
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

/* --- Scroll-triggered Reveal Animations --- */
.reveal {
  opacity: 0;
  transform: translateY(2.5rem);
  filter: blur(6px);
  transition:
    opacity 0.8s var(--transition-smooth),
    transform 0.8s var(--transition-smooth),
    filter 0.8s var(--transition-smooth);
}

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

/* Stagger children */
.reveal-stagger > .reveal:nth-child(1) { transition-delay: 0ms; }
.reveal-stagger > .reveal:nth-child(2) { transition-delay: 120ms; }
.reveal-stagger > .reveal:nth-child(3) { transition-delay: 240ms; }
.reveal-stagger > .reveal:nth-child(4) { transition-delay: 360ms; }

/* --- Floating Navbar Glass --- */
.nav-glass {
  background: rgba(200, 215, 230, 0.45);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

/* --- Liquid Glass Card --- */
.glass-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 20px 40px -15px rgba(0, 0, 0, 0.15);
}

/* --- Double Bezel (Doppelrand) --- */
.double-bezel {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 0.375rem;
  border-radius: 2rem;
}

.double-bezel-inner {
  background: rgba(255, 255, 255, 0.02);
  border-radius: calc(2rem - 0.375rem);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

/* --- Button Hover Physics --- */
.btn-primary {
  transition: all 0.5s var(--transition-smooth);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px -8px rgba(74, 111, 165, 0.4);
}

.btn-primary:active {
  transform: translateY(0) scale(0.98);
}

/* --- Nav link underline animation --- */
.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: rgba(255, 255, 255, 0.6);
  transition: width 0.4s var(--transition-smooth);
}

.nav-link:hover::after {
  width: 100%;
}

/* --- Mobile Menu Overlay --- */
.mobile-menu {
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.5s var(--transition-smooth),
    visibility 0.5s;
}

.mobile-menu.is-open {
  opacity: 1;
  visibility: visible;
}

.mobile-menu .menu-item {
  opacity: 0;
  transform: translateY(1.5rem);
  transition:
    opacity 0.5s var(--transition-smooth),
    transform 0.5s var(--transition-smooth);
}

.mobile-menu.is-open .menu-item:nth-child(1) { opacity: 1; transform: translateY(0); transition-delay: 100ms; }
.mobile-menu.is-open .menu-item:nth-child(2) { opacity: 1; transform: translateY(0); transition-delay: 170ms; }
.mobile-menu.is-open .menu-item:nth-child(3) { opacity: 1; transform: translateY(0); transition-delay: 240ms; }
.mobile-menu.is-open .menu-item:nth-child(4) { opacity: 1; transform: translateY(0); transition-delay: 310ms; }
.mobile-menu.is-open .menu-item:nth-child(5) { opacity: 1; transform: translateY(0); transition-delay: 380ms; }

/* --- Hamburger animation --- */
.hamburger span {
  display: block;
  width: 1.25rem;
  height: 1.5px;
  background: var(--text-light);
  transition: all 0.4s var(--transition-smooth);
}

.hamburger.is-open span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.hamburger.is-open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.hamburger.is-open span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* --- Eyebrow Badge --- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.875rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  border-radius: 9999px;
  background: rgba(74, 111, 165, 0.12);
  color: var(--accent-light);
  border: 1px solid rgba(74, 111, 165, 0.15);
}

/* --- Section Divider Gradient --- */
.section-divider {
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(74, 111, 165, 0.2) 30%,
    rgba(74, 111, 165, 0.2) 70%,
    transparent
  );
}

/* --- Feature list icons --- */
.feature-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.75rem;
  background: rgba(74, 111, 165, 0.1);
  color: var(--accent-light);
  flex-shrink: 0;
}

/* --- Platform Mockup Frames --- */
.mockup-browser {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1rem;
  overflow: hidden;
}

.mockup-browser-bar {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.mockup-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
}

.mockup-phone {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 2rem;
  padding: 0.5rem;
}

.mockup-phone-inner {
  background: rgba(74, 111, 165, 0.06);
  border-radius: 1.625rem;
  overflow: hidden;
}

/* --- Noise overlay (fixed, pointer-events-none) --- */
.noise-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

/* --- Selection color --- */
::selection {
  background: rgba(74, 111, 165, 0.3);
  color: var(--text-light);
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--navy-dark);
}

::-webkit-scrollbar-thumb {
  background: var(--navy-light);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}
