/* =============================================================
   KayakFit landing page — custom styles
   Tailwind (CDN) handles utilities; this file holds the
   component classes, animations and things Tailwind's CDN
   build can't express (keyframes, glassmorphism, custom hero scrim).
   ============================================================= */

:root {
  --brand-600: #0284c7;
  --brand-700: #0369a1;
  --brand-500: #0ca0e9;
  --brand-navy: #082f49;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* Smooth in-page scrolling with a small offset for the sticky nav */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
}

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1 !important; transform: none !important; }
}

/* -------------------------------------------------------------
   Accessibility: skip link
   ------------------------------------------------------------- */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 100;
  padding: 0.75rem 1.25rem;
  background: var(--brand-600);
  color: #fff;
  border-radius: 0 0 0.5rem 0;
  font-weight: 600;
}
.skip-link:focus { left: 0; }

/* -------------------------------------------------------------
   Sticky navigation — subtle glassmorphism once scrolled
   ------------------------------------------------------------- */
#navbar.scrolled {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: 0 1px 20px rgba(15, 23, 42, 0.04);
}

/* Two-color "KF" wordmark logo */
.logo-kf {
  font-size: 1.6rem;
  line-height: 1;
  letter-spacing: -0.03em;
}
.logo-kf span { transition: opacity 0.2s ease; }
.logo-kf:hover span { opacity: 0.85; }
.logo-kf-sm { font-size: 1.35rem; }

.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: #475569;
  transition: color 0.2s ease;
}
.nav-link:hover { color: var(--brand-700); }

/* At the top of the page the nav floats over the dark video hero —
   switch its text to light until the glass background kicks in on scroll. */
#navbar:not(.scrolled) .nav-link { color: rgba(255, 255, 255, 0.82); }
#navbar:not(.scrolled) .nav-link:hover { color: #fff; }
#navbar:not(.scrolled) .logo-kf span:first-child { color: #7cd0fd; }
#navbar:not(.scrolled) .logo-kf span:last-child { color: #fff; }
#navbar:not(.scrolled) #menu-toggle { color: #fff; }
#navbar:not(.scrolled) #menu-toggle:hover { background: rgba(255, 255, 255, 0.14); }

.mobile-link {
  display: block;
  padding: 0.75rem 0.5rem;
  border-radius: 0.5rem;
  font-weight: 500;
  color: #334155;
  transition: background 0.2s ease, color 0.2s ease;
}
.mobile-link:hover { background: #f1f5f9; color: var(--brand-700); }

/* -------------------------------------------------------------
   Buttons
   ------------------------------------------------------------- */
.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.6rem;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 1rem;
  transition: transform 0.2s var(--ease-out), box-shadow 0.2s ease, background 0.2s ease;
  will-change: transform;
}

.btn-primary {
  background: var(--brand-600);
  color: #fff;
  box-shadow: 0 6px 20px rgba(2, 132, 199, 0.28);
}
.btn-primary:hover {
  background: var(--brand-700);
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(2, 132, 199, 0.35);
}

.btn-secondary {
  background: #fff;
  color: #0f172a;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.btn-secondary:hover {
  transform: translateY(-2px);
  border-color: #cbd5e1;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
}

/* -------------------------------------------------------------
   "Coming soon" disabled buttons/links (repo not public yet)
   ------------------------------------------------------------- */
.btn-soon,
.btn-soon-dark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  border-radius: 9999px;
  padding: 0.85rem 1.6rem;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: not-allowed;
  user-select: none;
  opacity: 0.6;
}
.btn-soon {
  background: #e2e8f0;
  color: #94a3b8;
  border: 1px dashed #cbd5e1;
}
.btn-soon-dark {
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.5);
  border: 1px dashed rgba(255, 255, 255, 0.3);
}
/* Small "Soon" pill appended to a label */
.soon-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 9999px;
  padding: 0.1rem 0.5rem;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid currentColor;
  opacity: 0.75;
}
/* Footer / inline text links that aren't live yet */
.link-soon {
  color: #94a3b8;
  cursor: not-allowed;
}
.link-soon .soon-tag {
  margin-left: 0.35rem;
  font-size: 0.7rem;
  font-style: italic;
  opacity: 0.8;
}

/* -------------------------------------------------------------
   Immersive video hero
   ------------------------------------------------------------- */
.hero-immersive { background: #081423; }

/* Full-bleed background media */
.hero-media { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* slow cinematic drift so a short loop still feels alive */
  animation: heroZoom 26s ease-in-out infinite alternate;
  transform-origin: 55% 45%;
}
@keyframes heroZoom {
  from { transform: scale(1.05); }
  to   { transform: scale(1.16); }
}

/* Readability scrim + brand tint, with a fade into the light page below */
.hero-scrim {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 85% at 50% 32%, rgba(2, 132, 199, 0.30), transparent 68%),
    linear-gradient(180deg, rgba(6, 16, 28, 0.80) 0%, rgba(6, 16, 28, 0.62) 40%, rgba(6, 16, 28, 0.82) 82%, #ffffff 100%);
}

.hero-content { z-index: 2; }
.hero-content h1,
.hero-content p { text-shadow: 0 2px 22px rgba(3, 12, 24, 0.45); }

/* Glassy badge on the dark hero */
.hero-badge {
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.10);
  color: #eaf7ff;
  backdrop-filter: saturate(160%) blur(8px);
  -webkit-backdrop-filter: saturate(160%) blur(8px);
}

/* Scroll-down cue */
.hero-scroll {
  position: absolute;
  left: 50%;
  bottom: 1.75rem;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  justify-content: center;
  width: 26px;
  height: 42px;
  padding-top: 7px;
  border: 2px solid rgba(255, 255, 255, 0.55);
  border-radius: 9999px;
  transition: border-color 0.2s ease;
}
.hero-scroll:hover { border-color: rgba(255, 255, 255, 0.9); }
.hero-scroll-dot {
  width: 4px;
  height: 8px;
  border-radius: 9999px;
  background: #fff;
  animation: scrollDot 1.6s ease-in-out infinite;
}
@keyframes scrollDot {
  0%   { opacity: 0; transform: translateY(0); }
  30%  { opacity: 1; }
  100% { opacity: 0; transform: translateY(13px); }
}

/* Transparent app-window screenshots — no frame, just a soft drop shadow
   that follows the window's rounded silhouette (works with the alpha PNGs). */
.app-shot {
  position: relative;
  line-height: 0;
  filter:
    drop-shadow(0 26px 50px rgba(15, 23, 42, 0.22))
    drop-shadow(0 8px 16px rgba(15, 23, 42, 0.10));
  transition: filter 0.3s ease, transform 0.4s var(--ease-out);
}
.app-shot img { display: block; width: 100%; }
.app-shot video { display: block; width: 100%; border-radius: 0.75rem; }

/* Combined-data visualization card */
.dataflow-card {
  border-radius: 1.5rem;
  padding: 1.5rem;
  background: linear-gradient(180deg, #ffffff 0%, #f6fbff 100%);
  border: 1px solid rgba(2, 132, 199, 0.10);
  box-shadow: 0 24px 55px -30px rgba(15, 23, 42, 0.28);
}
.dataflow-svg { display: block; width: 100%; height: auto; }

/* KayakFirst Bull product cutout — soft grounded shadow */
.bull-img {
  filter:
    drop-shadow(0 24px 34px rgba(15, 23, 42, 0.18))
    drop-shadow(0 6px 12px rgba(15, 23, 42, 0.10));
}

/* Gentle floating animation for the hero screenshot */
.float-slow { animation: float 7s ease-in-out infinite; }
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-12px); }
}

/* -------------------------------------------------------------
   Feature highlights
   ------------------------------------------------------------- */
.feature-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 0.9rem;
  background: #eff9ff;
  color: var(--brand-600);
  border: 1px solid #b9e4fe;
}

.feat-check {
  position: relative;
  padding-left: 1.9rem;
  line-height: 1.5;
}
.feat-check::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.15rem;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 9999px;
  background: #eff9ff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230284c7' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E") center / 0.8rem no-repeat;
  border: 1px solid #b9e4fe;
}

/* -------------------------------------------------------------
   Small feature cards
   ------------------------------------------------------------- */
.card {
  padding: 1.75rem;
  border-radius: 1.25rem;
  background: #fff;
  border: 1px solid #eef2f6;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s ease, border-color 0.3s ease;
}
.card:hover {
  transform: translateY(-6px);
  border-color: #cfeafe;
  box-shadow: 0 20px 40px -18px rgba(15, 23, 42, 0.18);
}
.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 0.9rem;
  background: #eff9ff;
  color: var(--brand-600);
  margin-bottom: 1.1rem;
}
.card-title { font-size: 1.15rem; font-weight: 700; color: #0f172a; }
.card-text  { margin-top: 0.5rem; color: #64748b; line-height: 1.6; }

/* -------------------------------------------------------------
   Open source section
   ------------------------------------------------------------- */
.os-item {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  padding: 1rem 1.1rem;
  border-radius: 0.9rem;
  background: #f8fafc;
  border: 1px solid #eef2f6;
}
.os-check {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 9999px;
  background: var(--brand-600);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
}

.compat-card {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  padding: 1.75rem;
  border-radius: 1.25rem;
  background: #fff;
  border: 1px solid #eef2f6;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s ease;
}
.compat-card:hover { transform: translateY(-4px); box-shadow: 0 18px 36px -18px rgba(15, 23, 42, 0.18); }

/* -------------------------------------------------------------
   CTA panel
   ------------------------------------------------------------- */
.cta-panel {
  position: relative;
  overflow: hidden;
  border-radius: 2rem;
  padding: 4rem 2rem;
  background: linear-gradient(135deg, #082f49 0%, #0369a1 55%, #0ca0e9 100%);
  box-shadow: 0 30px 60px -25px rgba(3, 105, 161, 0.55);
}
@media (min-width: 768px) { .cta-panel { padding: 5.5rem 3rem; } }
.cta-glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.18), transparent 40%),
    radial-gradient(circle at 85% 90%, rgba(255, 255, 255, 0.12), transparent 45%);
  pointer-events: none;
}

/* -------------------------------------------------------------
   Footer
   ------------------------------------------------------------- */
.footer-link { transition: color 0.2s ease; }
.footer-link:hover { color: var(--brand-700); }

/* -------------------------------------------------------------
   Scroll reveal animation (driven by IntersectionObserver in JS)
   ------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}
