/* ──────────────────────────────────────────────────────────────
   FITOUT — landing-page styles
   - Solid warm-grey header chrome (.glass-bar) — Frontify-inspired tone
   - FT logo as a black chip on the light bar; mix-blend on dark surfaces
   - Hero underline + fade-in-up + click-bounce animations
   - Coming-Soon modal with three.js light-beam background and a glassy card
   - Reduced-motion guard
   ────────────────────────────────────────────────────────────── */

:root {
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);

  /* Solid header surface — warm light grey, Frontify-like */
  --frost-bg: #dcdcd6;
  --frost-border: rgba(0, 0, 0, 0.10);
  --frost-text: #0b0d10;
  --frost-shadow:
    0 12px 28px -12px rgba(0, 0, 0, 0.65),
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    inset 0 -1px 0 rgba(0, 0, 0, 0.05);
}

html,
body {
  scroll-behavior: auto;
  background-color: #000;
}

body {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ── Solid surface for header bar / mobile panel / mega panel ── */
.glass-bar {
  background-color: var(--frost-bg);
  border: 1px solid var(--frost-border);
  color: var(--frost-text);
  box-shadow: var(--frost-shadow);
}

/* ── Logo: black chip with a slightly rounded edge on the light bar.
     Footer / dark surfaces use .logo-on-dark to drop the black background. ── */
.logo-mark-img {
  display: block;
  object-fit: contain;
  border-radius: 10px;
  user-select: none;
  -webkit-user-drag: none;
}
.logo-on-dark {
  border-radius: 0;
  mix-blend-mode: screen;
}

/* ── Header behaviour ── */
#site-header {
  transition: padding 0.3s var(--ease-out-quart);
}
#header-shell.is-scrolled {
  box-shadow:
    0 18px 40px -14px rgba(0, 0, 0, 0.78),
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    inset 0 -1px 0 rgba(0, 0, 0, 0.05);
}

/* ── Nav trigger active state ── */
.nav-trigger.is-active {
  background: rgba(0, 0, 0, 0.08);
  color: #000;
}
.nav-trigger.is-active .nav-caret {
  transform: rotate(180deg);
}

/* ── Mega About panel — same surface as the header ── */
.mega-panel {
  background-color: var(--frost-bg);
  border: 1px solid var(--frost-border);
  color: var(--frost-text);
  box-shadow: var(--frost-shadow);
  transform-origin: top center;
  transform: translateY(-8px) scale(0.99);
  opacity: 0;
  transition:
    opacity 0.22s var(--ease-out-quart),
    transform 0.28s var(--ease-out-quart);
}
.mega-panel.is-open {
  display: block;
  transform: translateY(0) scale(1);
  opacity: 1;
}

#page-backdrop.is-visible {
  opacity: 1;
}
body.menu-open {
  overflow: hidden;
}

/* ── Mobile panel reveal ── */
#mobile-panel.is-open {
  display: block;
  animation: panel-down 0.32s var(--ease-out-quart);
}
@keyframes panel-down {
  from { transform: translateY(-12px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* ── Hero underline ── */
.hero-underline {
  position: absolute;
  left: 0;
  width: 100%;
  top: 100%;
  margin-top: -10px;
  pointer-events: none;
  color: rgba(255, 255, 255, 0.85);
}

/* ── Hero entrance ── */
@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.animate-fade-in-up { animation: fade-in-up 0.6s ease-out both; }
.animate-fade-in-up-delay-1 { animation-delay: 0.2s; }
.animate-fade-in-up-delay-2 { animation-delay: 0.4s; }

/* ── Click bounce (applied via JS to .js-bounce) ── */
@keyframes btn-bounce {
  0%   { transform: scale(1); }
  50%  { transform: scale(0.95); }
  100% { transform: scale(1); }
}
.btn-bounce-anim {
  animation: btn-bounce 0.3s cubic-bezier(0.36, 0, 0.66, -0.56);
}

/* ── Coming-Soon modal ────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  transition: opacity 0.25s var(--ease-out-quart);
  background: linear-gradient(180deg, #f6fbff 0%, #eef4fb 100%);
}
.modal-overlay.is-open { display: flex; opacity: 1; }

/* Three.js scene mount — sits behind the card, covers full viewport */
.modal-three-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.modal-three-bg canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

/* Subtle clickable scrim above three.js, beneath the card */
.modal-scrim {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.04);
  border: 0;
  cursor: pointer;
}

.modal-card {
  position: relative;
  z-index: 1;
  transform: translateY(8px) scale(0.985);
  transition: transform 0.28s var(--ease-out-quart);
}
.modal-overlay.is-open .modal-card {
  transform: translateY(0) scale(1);
}

/* Stagger animation for success card children */
.card-stagger {
  opacity: 0;
  transform: translateY(14px);
  animation: card-stagger-in 0.5s var(--ease-out-quart) forwards;
}
.card-stagger:nth-child(1) { animation-delay: 0s; }
.card-stagger:nth-child(2) { animation-delay: 0.15s; }
.card-stagger:nth-child(3) { animation-delay: 0.30s; }
@keyframes card-stagger-in {
  to { opacity: 1; transform: translateY(0); }
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}
