/* Second Arc — Memphis Pop on Black */

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

::selection { background: #FFE066; color: #0A0A0A; }

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #0A0A0A; }
::-webkit-scrollbar-thumb { background: #FF8C42; border-radius: 8px; border: 2px solid #0A0A0A; }
::-webkit-scrollbar-thumb:hover { background: #FFE066; }

/* ---------- Hard shadows (Neubrutalist signature) ---------- */
.shadow-hard {
  box-shadow: 6px 6px 0 #FFE066;
}
.shadow-hard-sm {
  box-shadow: 3px 3px 0 #FFE066;
}
.shadow-hard-hover {
  box-shadow: 3px 3px 0 #FFE066;
  transform: translate(3px, 3px);
}
.btn-hard:active {
  transform: translate(6px, 6px);
  box-shadow: 0 0 0 #FFE066;
}

/* ---------- Reveal animations ---------- */
.reveal-line {
  transform: translateY(28px);
  transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1), transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal-line.is-visible {
  opacity: 1 !important;
  transform: translateY(0);
}
.reveal-line:nth-child(1).is-visible { transition-delay: 0.05s; }
.reveal-line:nth-child(2).is-visible { transition-delay: 0.18s; }
.reveal-line:nth-child(3).is-visible { transition-delay: 0.32s; }
.reveal-line:nth-child(4).is-visible { transition-delay: 0.46s; }
.reveal-line:nth-child(5).is-visible { transition-delay: 0.6s; }
.reveal-line:nth-child(6).is-visible { transition-delay: 0.74s; }

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1), transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.stagger-1.is-visible { transition-delay: 0.08s; }
.stagger-2.is-visible { transition-delay: 0.18s; }
.stagger-3.is-visible { transition-delay: 0.28s; }
.stagger-4.is-visible { transition-delay: 0.38s; }

/* ---------- Header scroll state ---------- */
#site-header {
  background: transparent;
  backdrop-filter: blur(0);
  -webkit-backdrop-filter: blur(0);
  border-bottom: 1px solid transparent;
}
#site-header.scrolled {
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border-bottom-color: rgba(240, 240, 240, 0.08);
}

/* ---------- Nav link ---------- */
.nav-link {
  position: relative;
  color: #AAAAAA;
  transition: color 0.3s ease;
  border-radius: 6px;
}
.nav-link:hover { color: #F0F0F0; }
.nav-link::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 6px;
  background: rgba(255, 224, 102, 0.08);
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: -1;
}
.nav-link:hover::before {
  opacity: 1;
  transform: scale(1);
}
.nav-link.active {
  color: #FFE066;
}
.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #FFE066;
}

/* ---------- Mobile menu ---------- */
#mobile-menu.is-open {
  opacity: 1;
  pointer-events: auto;
}
#mobile-menu .mobile-link {
  opacity: 0;
  transform: translateX(-24px);
  transition: opacity 0.5s cubic-bezier(0.22, 1, 0.36, 1), transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
#mobile-menu.is-open .mobile-link {
  opacity: 1;
  transform: translateX(0);
}
#mobile-menu.is-open .mobile-link:nth-child(1) { transition-delay: 0.1s; }
#mobile-menu.is-open .mobile-link:nth-child(2) { transition-delay: 0.16s; }
#mobile-menu.is-open .mobile-link:nth-child(3) { transition-delay: 0.22s; }
#mobile-menu.is-open .mobile-link:nth-child(4) { transition-delay: 0.28s; }
#mobile-menu.is-open .mobile-link:nth-child(5) { transition-delay: 0.34s; }

#mobile-toggle.is-open span:nth-child(1) {
  transform: translateY(4px) rotate(45deg);
  width: 1.5rem;
  background: #FF8C42;
}
#mobile-toggle.is-open span:nth-child(2) {
  transform: translateY(-3px) rotate(-45deg);
  width: 1.5rem;
  background: #FF8C42;
}

/* ---------- Card hover (lift + accent border) ---------- */
.cap-card {
  position: relative;
  will-change: transform;
}
.cap-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 140, 66, 0.5);
}

.principle-card {
  position: relative;
  will-change: transform;
}
.principle-card:hover {
  transform: translateY(-3px);
  border-color: rgba(240, 240, 240, 0.18);
  background: #1A1A1A;
}

.step-row {
  position: relative;
  will-change: transform;
}
.step-row:hover {
  transform: translateY(-2px);
}

/* ---------- Confetti opacity tuning ---------- */
.confetti {
  pointer-events: none;
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal, .reveal-line {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ---------- Focus visible ---------- */
*:focus-visible {
  outline: 2px solid #FFE066;
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Marquee edge fade ---------- */
.marquee-mask {
  -webkit-mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
  mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
}

/* ---------- Brand caret (terminal-style blinking underscore in the wordmark) ---------- */
.brand-caret {
  display: inline-block;
  width: 0.5em;
  height: 0.08em;
  background: #FF8C42;
  vertical-align: 0.05em;
  margin-left: 4px;
  animation: brand-blink 1.1s steps(2) infinite;
}
@keyframes brand-blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .brand-caret { animation: none; }
}

/* ---------- Mobile adjustments ---------- */
@media (max-width: 768px) {
  .shadow-hard { box-shadow: 4px 4px 0 #FFE066; }
  .shadow-hard-sm { box-shadow: 2px 2px 0 #FFE066; }
  .shadow-hard-hover { box-shadow: 2px 2px 0 #FFE066; transform: translate(2px, 2px); }
}

