/* ============================================================
   Idealistic Info. global styles
   ============================================================ */
html, body { background: #000; color: #fff; margin: 0; }
body {
  font-family: 'Barlow', sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ============================================================
   Skip-to-content link. Visually hidden until focused, then
   pops into the top-left so keyboard / screen-reader users can
   jump past the nav into the page body.
   ============================================================ */
.skip-link {
  position: fixed;
  top: -100px;
  left: 12px;
  z-index: 2000;
  padding: 10px 18px;
  background: #fff;
  color: #000;
  border-radius: 9999px;
  font-family: 'Barlow', sans-serif;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: top 0.2s ease;
}
.skip-link:focus,
.skip-link:focus-visible {
  top: 12px;
  outline: 2px solid rgba(0, 212, 255, 0.6);
  outline-offset: 2px;
}
#main-content:focus { outline: none; }

/* TOC drawer item reveal - subtle stagger when contents open. */
@keyframes toc-reveal {
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   Apple-style motion tokens. Used by the nav and any other
   element that wants the same hover / open / press quality.
   Curves: ease-apple is the workhorse (in-out, snappy),
   ease-apple-out is for things that should settle (springy).
   ============================================================ */
:root {
  --ease-apple:     cubic-bezier(0.32, 0.72, 0, 1);
  --ease-apple-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast: 0.18s;
  --dur-base: 0.28s;
  --dur-slow: 0.42s;
}
@media (prefers-reduced-motion: reduce) {
  :root {
    --dur-fast: 0.001s;
    --dur-base: 0.001s;
    --dur-slow: 0.001s;
  }
}

/* Top-level nav buttons (Home, EPIC Files, Studio, Search) */
.nav-btn {
  transition:
    color      var(--dur-base) var(--ease-apple),
    background var(--dur-base) var(--ease-apple),
    transform  var(--dur-fast) var(--ease-apple);
  will-change: transform, background, color;
}
.nav-btn:hover  { background: rgba(255,255,255,0.08); transform: scale(1.03); }
.nav-btn:active { transform: scale(0.97); }
.nav-btn:focus-visible {
  outline: 1px solid rgba(255,255,255,0.55);
  outline-offset: 2px;
}

/* Top-right CTA "Watch Latest" */
.nav-cta {
  transition:
    transform  var(--dur-fast) var(--ease-apple),
    box-shadow var(--dur-base) var(--ease-apple),
    filter     var(--dur-base) var(--ease-apple);
  will-change: transform, box-shadow;
}
.nav-cta:hover  { transform: scale(1.04); box-shadow: 0 10px 28px rgba(255,255,255,0.18); filter: brightness(1.04); }
.nav-cta:active { transform: scale(0.97); }

/* Dropdown panel: springy reveal. Always rendered; .open toggles. */
.nav-dropdown-panel {
  opacity: 0;
  transform: translateX(-50%) translateY(-8px) scale(0.96);
  transform-origin: top center;
  pointer-events: none;
  transition:
    opacity   var(--dur-base) var(--ease-apple-out),
    transform var(--dur-base) var(--ease-apple-out);
  will-change: opacity, transform;
}
.nav-dropdown-panel.open {
  opacity: 1;
  transform: translateX(-50%) translateY(0) scale(1);
  pointer-events: auto;
}

/* Items inside the dropdown */
.nav-dd-item {
  position: relative;
  transition:
    background var(--dur-fast) var(--ease-apple),
    color      var(--dur-fast) var(--ease-apple),
    transform  var(--dur-fast) var(--ease-apple);
}
.nav-dd-item:hover  { background: rgba(255,255,255,0.09); transform: translateX(3px); }
.nav-dd-item:active { transform: translateX(2px) scale(0.99); }

/* Mobile drawer items: stagger in when the drawer opens */
@keyframes mobileNavIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
.mobile-nav-item {
  opacity: 0;
  animation: mobileNavIn var(--dur-slow) var(--ease-apple-out) forwards;
  transition: color var(--dur-fast) var(--ease-apple), background var(--dur-fast) var(--ease-apple);
}
.mobile-nav-item:hover { color: #fff; background: rgba(255,255,255,0.04); }

/* The hamburger / search / logo icon buttons in the corner */
.nav-icon-btn {
  transition:
    transform  var(--dur-fast) var(--ease-apple),
    background var(--dur-base) var(--ease-apple),
    color      var(--dur-base) var(--ease-apple);
}
.nav-icon-btn:hover  { transform: scale(1.06); }
.nav-icon-btn:active { transform: scale(0.94); }


/* Liquid-glass utilities (subtle) */
.liquid-glass {
  background: rgba(255,255,255,0.01);
  background-blend-mode: luminosity;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: none;
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.1);
  position: relative;
  overflow: hidden;
}
.liquid-glass::before {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  padding: 1.4px;
  background: linear-gradient(180deg,
    rgba(255,255,255,0.45) 0%,
    rgba(255,255,255,0.15) 20%,
    rgba(255,255,255,0) 40%,
    rgba(255,255,255,0) 60%,
    rgba(255,255,255,0.15) 80%,
    rgba(255,255,255,0.45) 100%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* Liquid-glass utilities (strong, for primary CTA) */
.liquid-glass-strong {
  background: rgba(255,255,255,0.01);
  background-blend-mode: luminosity;
  backdrop-filter: blur(50px);
  -webkit-backdrop-filter: blur(50px);
  border: none;
  box-shadow: 4px 4px 4px rgba(0,0,0,0.05), inset 0 1px 1px rgba(255,255,255,0.15);
  position: relative;
  overflow: hidden;
}
.liquid-glass-strong::before {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  padding: 1.4px;
  background: linear-gradient(180deg,
    rgba(255,255,255,0.5) 0%,
    rgba(255,255,255,0.2) 20%,
    rgba(255,255,255,0) 40%,
    rgba(255,255,255,0) 60%,
    rgba(255,255,255,0.2) 80%,
    rgba(255,255,255,0.5) 100%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* Trailer modal. used by Hero "View Trailer" link */
.trailer-modal-backdrop {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.35s ease;
}
.trailer-modal-backdrop.open { opacity: 1; pointer-events: auto; }
.trailer-modal-frame {
  width: min(960px, 100%);
  aspect-ratio: 16 / 9;
  border-radius: 1rem;
  overflow: hidden;
  background: #000;
  box-shadow: 0 24px 80px rgba(0,0,0,0.6);
  position: relative;
}
.trailer-modal-close {
  position: absolute; top: -44px; right: 0;
  width: 40px; height: 40px; border-radius: 9999px;
  background: rgba(255,255,255,0.1);
  color: #fff; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}
