/*
  components.css — Buttons, interactive elements, shared components
  All interactive elements have smooth 150–250ms hover transitions
*/

/* =====================================================
   BUTTONS
   ===================================================== */

/* Primary CTA — lime on violet */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  padding: var(--space-4) var(--space-7);
  clip-path: var(--clip-wedge-right);
  cursor: pointer;
  transition:
    background-color var(--transition-base),
    color var(--transition-base),
    transform 200ms ease,
    clip-path var(--transition-base);
  position: relative;
  overflow: visible;
  border: none;
  outline: none;
}

.btn:focus-visible {
  outline: 2px solid var(--brand-accent);
  outline-offset: 3px;
}

/* Primary — lime bg, violet text */
.btn--primary {
  background-color: var(--brand-accent);
  color: var(--brand-primary);
}

.btn--primary:hover {
  background-color: var(--lime-muted);
  color: var(--brand-primary);
  transform: translateY(-2px);
}

.btn--primary:active {
  transform: translateY(0);
}

/* Inverse — white bg on dark sections */
.btn--inverse {
  background-color: var(--text-inverse);
  color: var(--brand-primary);
}

.btn--inverse:hover {
  background-color: var(--brand-accent);
  color: var(--brand-primary);
  transform: translateY(-2px);
}

/* Ghost — bordered, transparent */
.btn--ghost {
  background-color: transparent;
  color: var(--text-inverse);
  border: 1.5px solid rgba(245, 242, 251, 0.5);
  padding: calc(var(--space-4) - 1.5px) calc(var(--space-7) - 1.5px);
}

.btn--ghost:hover {
  border-color: var(--brand-accent);
  color: var(--brand-accent);
  transform: translateY(-2px);
}

/* Button arrow icon */
.btn__arrow {
  width: 1em;
  height: 1em;
  transition: transform var(--transition-base);
}

.btn:hover .btn__arrow {
  transform: translateX(4px);
}

/* =====================================================
   CTA BUTTON — the main outbrain CTA
   Large, full-width on mobile, auto on desktop
   ===================================================== */

.cta-btn-main {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  font-family: var(--font-body);
  font-size: clamp(0.875rem, 1.2vw, 1rem);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  background-color: var(--brand-accent);
  color: var(--brand-primary);
  padding: var(--space-5) var(--space-9);
  clip-path: var(--clip-wedge-right);
  cursor: pointer;
  transition:
    background-color var(--transition-base),
    transform 200ms ease;
  border: none;
}

.cta-btn-main:hover {
  background-color: var(--lime-muted);
  color: var(--brand-primary);
  transform: translateY(-3px);
}

.cta-btn-main:active {
  transform: translateY(-1px);
}

@media (max-width: 480px) {
  .cta-btn-main {
    width: 100%;
    clip-path: none;
  }
}

/* =====================================================
   INLINE LINK
   ===================================================== */

.link-inline {
  color: var(--brand-secondary);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: color var(--transition-fast), text-decoration-color var(--transition-fast);
}

.link-inline:hover {
  color: var(--brand-primary);
}

/* =====================================================
   SCROLL REVEAL — .reveal class
   Added by IntersectionObserver in motion.js
   ===================================================== */

.reveal {
  opacity: 0;
  transform: translateY(2rem);
  transition:
    opacity 0.65s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    transform 0.65s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal--delay-1 { transition-delay: 0.1s; }
.reveal--delay-2 { transition-delay: 0.2s; }
.reveal--delay-3 { transition-delay: 0.3s; }
.reveal--delay-4 { transition-delay: 0.4s; }

/* Clip wipe — for headings */
.reveal-clip {
  clip-path: inset(0 100% 0 0);
  transition: clip-path 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal-clip.is-visible {
  clip-path: inset(0 0% 0 0);
}

/* =====================================================
   DIVIDER
   ===================================================== */

.divider {
  width: 100%;
  height: 1px;
  background-color: var(--border-subtle);
  margin: var(--space-7) 0;
}

.divider--bold {
  height: 2px;
  background-color: var(--border-strong);
}

/* Short decorative divider */
.divider--short {
  width: 3rem;
  height: 2px;
  background-color: var(--brand-accent);
  margin: var(--space-5) 0;
}

/* =====================================================
   NOISE OVERLAY — atmospheric depth via SVG filter
   Applied to specific sections via class
   ===================================================== */

.noise-overlay {
  position: relative;
}

.noise-overlay::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  opacity: 0.03;
  pointer-events: none;
  z-index: 1;
  mix-blend-mode: multiply;
}

/* =====================================================
   IMAGE WRAPPER — consistent treatment
   ===================================================== */

.img-wrap {
  overflow: hidden;
  position: relative;
}

.img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
  filter: contrast(1.08) brightness(0.93) saturate(0.85);
}

.img-wrap:hover img {
  transform: scale(1.04);
}

/* =====================================================
   IMAGE CAPTION
   ===================================================== */

.img-caption {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  color: var(--text-secondary);
  font-style: italic;
  margin-top: var(--space-2);
  line-height: 1.5;
}

/* =====================================================
   INLINE TEXT HIGHLIGHTS
   ===================================================== */

.text-accent {
  color: var(--brand-secondary);
  font-style: italic;
}

.text-highlight {
  background-color: var(--brand-accent);
  color: var(--brand-primary);
  padding: 0.05em 0.2em;
  font-style: normal;
}

/* =====================================================
   GHOST NAV TRIGGER ZONE
   Invisible 60px strip at top of viewport
   ===================================================== */

.nav-trigger-zone {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  z-index: calc(var(--z-nav) - 1);
  pointer-events: none; /* JS handles hover detection via mousemove */
}
