/*
  Jinn Host — supplementary stylesheet.
  Tailwind (via CDN) handles almost all layout/utility styling directly in index.html.
  This file only covers what a plain <script src="cdn.tailwindcss.com"> build can't express:
  reusable component classes, keyframe animations, and the hero's non-JS fallback background.
  No @apply here — the Play CDN doesn't process linked stylesheets, only inline
  <style type="text/tailwindcss"> blocks, so everything below is plain CSS.
*/

/* :not(.lenis) matters here — Lenis hijacks scrolling with its own rAF-driven interpolation,
   and native `scroll-behavior: smooth` racing against that second interpolation is a
   well-documented source of scroll jank (https://github.com/darkroomengineering/lenis).
   Lenis adds the `lenis` class to <html> synchronously in its constructor, before the user
   can scroll, so this rule only ever applies as the no-JS/pre-init fallback it was meant to be. */
html:not(.lenis) {
  scroll-behavior: smooth;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: #040414;
}

::selection {
  background: rgba(139, 92, 246, 0.35);
}

/* ---------- Hero ---------- */

#hero {
  background-color: #040414;
  height: 100vh; /* fallback for browsers without dvh support */
}

/* Mobile browsers compute 100vh against the viewport with their chrome (address bar, etc.)
   collapsed, which isn't the box that's actually on screen on first load — one of the two
   causes behind the lamp animation reading as skewed on mobile. dvh tracks the chrome's
   real, current state instead; app.js's ResizeObserver repaints the canvas at its correct
   size whenever this value changes (which window's own 'resize' event won't reliably fire). */
@supports (height: 100dvh) {
  #hero {
    height: 100dvh;
  }
}

/* hero-visual is the 2/3 lamp column — the fallback frame lives here now, not on #hero,
   so it only ever fills the lamp's own box instead of bleeding in behind the text column. */
#hero-visual {
  background-color: #040414;
  /* Static fallback frame — shows through the transparent canvas before app.js draws the
     first real frame, and stays visible for no-JS visitors since the canvas never paints. */
  background-image:
    radial-gradient(70% 60% at 50% 40%, rgba(124, 58, 237, 0.18), transparent 70%),
    url('video_sequence/seq_150.webp');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

canvas#hero-canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* ---------- Reusable components ---------- */

.glass-panel {
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.5rem;
  border-radius: 9999px;
  background: linear-gradient(135deg, #7c3aed, #4f46e5);
  color: #fff;
  font-weight: 600;
  font-size: 0.875rem;
  box-shadow: 0 8px 30px -8px rgba(124, 58, 237, 0.6);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 34px -6px rgba(124, 58, 237, 0.75);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.4rem;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #e2e8f0;
  font-weight: 600;
  font-size: 0.875rem;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.3);
}

/* Neumorphic/glass card used for feature tiles, WP checklist, and pricing cards */
.price-card {
  position: relative;
  border-radius: 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015));
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.05) inset,
    0 20px 40px -24px rgba(0, 0, 0, 0.6);
}

.price-card--popular {
  border-color: rgba(139, 92, 246, 0.5);
  box-shadow:
    0 0 0 1px rgba(139, 92, 246, 0.4),
    0 25px 60px -20px rgba(124, 58, 237, 0.45);
}

.term-btn {
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #94a3b8;
  transition: background 0.2s ease, color 0.2s ease;
}
.term-btn.is-active {
  background: #fff;
  color: #0a0a1f;
}

/* ---------- FAQ (native <details>, custom chevron) ---------- */

details > summary {
  list-style: none;
}
details > summary::-webkit-details-marker {
  display: none;
}
.jh-chevron {
  transition: transform 0.2s ease;
}
details[open] .jh-chevron {
  transform: rotate(180deg);
}

/* ---------- Comparison table scroll shadow (mobile) ---------- */

.table-scroll {
  scrollbar-width: thin;
}
.table-scroll::-webkit-scrollbar {
  height: 6px;
}
.table-scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 9999px;
}

/* ---------- Keyframes ---------- */

@keyframes jh-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}
#preloader .jh-logo {
  animation: jh-pulse 1.6s ease-in-out infinite;
}

@keyframes jh-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}
#scroll-indicator svg {
  animation: jh-bounce 1.8s ease-in-out infinite;
}

@keyframes jh-slide-up {
  from { transform: translateY(100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
#cookie-banner.jh-visible {
  animation: jh-slide-up 0.4s ease-out;
}

/* ---------- Accessibility: prefers-reduced-motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  #preloader .jh-logo,
  #scroll-indicator svg {
    animation: none !important;
  }
}
