/*
 * creative.css — editorial nav, ink cursor, hero interactivity, film layer.
 * IMPORTANT: html base is 62.5% so 1rem = 10px.
 * All font-sizes use rem with 10px base in mind.
 * Loaded after monochrome.css.
 */

/* ── Z-INDEX SCALE (defined here as reference) ──────────────────────────── */
/* shader-bg:  0               */
/* page-wrapper: 1             */
/* sections:   auto (within 1) */
/* hud:        9900            */
/* page-ui:    9800            */
/* cursor:     99999           */
/* overlays:   99995-99996     */

/* ── CURSOR ─────────────────────────────────────────────────────────────── */
/* Custom ink cursor removed — use native OS cursor. */
#ink-cursor-dot,
#ink-cursor-ring { display: none !important; }

/* ── HUD — remove pill, go editorial ───────────────────────────────────── */
.hud {
  background: transparent !important;
  border-bottom: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  padding: 2.2rem 3.2rem !important;
  z-index: 9900 !important;
  /* keep position:fixed and pointer-events:none from pager.css */
}

/* Thin bottom hairline on HUD */
.hud::after {
  content: '';
  position: absolute;
  bottom: 0; left: 3.2rem; right: 3.2rem;
  height: 1px;
  background: rgba(255,255,255,0.06);
}

.hud-logo {
  font-family: 'Fira Code', ui-monospace, monospace !important;
  font-size: 1.15rem !important;   /* 11.5px — compact but legible label */
  letter-spacing: 0.18em !important;
  text-transform: uppercase !important;
  color: rgba(255,255,255,0.85) !important;
  opacity: 1 !important;
  text-decoration: none;
}

/* Gutted pill → plain editorial labels */
.hud-nav {
  background: none !important;
  border: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
  gap: 0 !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  display: flex;
  align-items: center;
}

.hud-nav-link {
  font-family: 'Fira Code', ui-monospace, monospace !important;
  font-size: 1.05rem !important;   /* ~10.5px — uppercase label */
  letter-spacing: 0.17em !important;
  text-transform: uppercase !important;
  color: rgba(255,255,255,0.36) !important;
  padding: 0.6rem 1.0rem !important;
  min-height: 4.4rem !important;   /* 44px touch target */
  min-width: 4.4rem !important;
  display: inline-flex !important;
  align-items: center !important;
  border-radius: 0 !important;
  background: none !important;
  position: relative;
  transition: color .18s ease !important;
  white-space: nowrap;
}

/* thin vertical divider between items */
.hud-nav-link + .hud-nav-link::before {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 1px; height: 1.0em;
  background: rgba(255,255,255,0.16);
}

.hud-nav-link:hover {
  color: rgba(255,255,255,0.82) !important;
  background: none !important;
}

/* Active: white underline rule */
.hud-nav-link.active {
  color: #ffffff !important;
  background: none !important;
}
.hud-nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0.3rem;
  left: 1.0rem; right: 1.0rem;
  height: 1px;
  background: #fff;
}

/* ── Page counter / dots / arrows — all need high z-index ──────────────── */
.page-indicator,
.page-arrows,
.page-counter,
.edge-zone {
  z-index: 9800 !important;
}
.page-counter {
  font-family: 'Fira Code', monospace;
  font-size: 1.05rem !important;   /* 10.5px — decorative label */
  letter-spacing: 0.14em;
  color: rgba(255,255,255,0.32) !important;
}
.page-dot { background: rgba(255,255,255,0.28) !important; }
.page-dot.active {
  background: #fff !important;
  transform: scale(1.5) !important;
}

/* Arrow buttons — 44px touch target */
.page-arrow-btn {
  width: 4.4rem !important;
  height: 4.4rem !important;
  min-width: 4.4rem !important;
  border-color: rgba(255,255,255,0.20) !important;
  color: rgba(255,255,255,0.45) !important;
  background: rgba(0,0,0,0.25) !important;
  backdrop-filter: blur(6px);
  transition: border-color .18s ease, color .18s ease !important;
}
.page-arrow-btn:hover:not(:disabled) {
  border-color: rgba(255,255,255,0.65) !important;
  color: #fff !important;
}
.page-arrow-btn:disabled { opacity: 0.18 !important; }

/* ── Hero scroll-line → functional next-page button ────────────────────── */
.cine-scroll-wrap,
.gallery-hint {
  position: absolute;
  bottom: 3.2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 2;
}
.cine-next-btn {
  background: none;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  color: rgba(255,255,255,0.42);
  font-family: 'Fira Code', monospace;
  font-size: 1.0rem !important;    /* 10px decorative label */
  letter-spacing: 0.26em;
  text-transform: uppercase;
  padding: 0.8rem 1.6rem;
  min-height: 4.4rem;              /* 44px touch target */
  transition: color .25s ease;
}
.cine-next-btn:hover { color: rgba(255,255,255,0.85); }
.cine-next-btn .next-line {
  width: 1px;
  height: 32px;
  background: rgba(255,255,255,0.4);
  animation: scrollPulse 2s ease-in-out infinite;
}
.cine-next-btn:hover .next-line { background: rgba(255,255,255,0.8); }
@keyframes scrollPulse {
  0%, 100% { transform: scaleY(1); opacity: 0.4; }
  50%       { transform: scaleY(0.45); opacity: 0.9; }
}

/* ── Hero title perspective container ──────────────────────────────────── */
#hero { perspective: 900px; }

/* ── Section typography & rhythm ───────────────────────────────────────── */
.section-title {
  color: #ffffff !important;
  letter-spacing: 0.12em;
}
.section-line { background: rgba(255,255,255,0.32) !important; }

.cine-sub {
  color: rgba(255,255,255,0.48) !important;
  letter-spacing: 0.2em;
}
.cine-link {
  color: rgba(255,255,255,0.78) !important;
  border-bottom: 1px solid rgba(255,255,255,0.28) !important;
  text-decoration: none;
  transition: color .18s, border-color .18s;
}
.cine-link:hover {
  color: #fff !important;
  border-bottom-color: #fff !important;
}

/* ── Stagger entrance animation ─────────────────────────────────────────── */
@keyframes staggerIn {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.stagger-item {
  animation: staggerIn 0.55s cubic-bezier(0.16, 1, 0.3, 1) both;
}
/* Delay tiers */
.stagger-item:nth-child(1) { animation-delay: 0.06s; }
.stagger-item:nth-child(2) { animation-delay: 0.13s; }
.stagger-item:nth-child(3) { animation-delay: 0.20s; }
.stagger-item:nth-child(4) { animation-delay: 0.27s; }
.stagger-item:nth-child(5) { animation-delay: 0.34s; }
.stagger-item:nth-child(6) { animation-delay: 0.41s; }

/* ── AI FAB and misc ─────────────────────────────────────────────────────── */
[class*="ai-fab"], [class*="ai-btn"], .round-fab, .ai-toggle {
  background: #ffffff !important;
  color: #000 !important;
  border: 1px solid #fff !important;
  z-index: 9800 !important;
}

/* ── Film overlays (injected by creative.js) ────────────────────────────── */
#grain-overlay {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 99996;
  opacity: 0.052;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix type='matrix' values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.6 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
#vignette-overlay {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 99995;
  background: radial-gradient(ellipse at center, transparent 32%, rgba(0,0,0,0.62) 100%);
}

/* ── Mobile ─────────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .hud { padding: 1.4rem 1.8rem !important; }
  .hud::after { left: 1.8rem; right: 1.8rem; }
  .hud-logo { font-size: 1.05rem !important; }
  .hud-nav-link {
    font-size: 0.95rem !important;
    padding: 0.5rem 0.7rem !important;
    min-height: 4.4rem !important;
  }
}
