/* ──────────────────────────────────────────────────────────────
   menu.css — overrides for menu.html
   Dark sticky header + full-bleed carousel + Pirata One categories
   Loaded after style.css — only overrides what changes.
   ────────────────────────────────────────────────────────────── */

@font-face {
  font-family: 'Pirata One';
  src: url('fonts/pirata-one-latin-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ── Sticky footer height token (consumed by Phase 5) ── */
:root {
  --sticky-footer-h: 48px;
}

/* ── Header: dark, sticky, Pirata One wordmark ── */

.site-header {
  position: sticky;
  top: 0;
  background: #000;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  height: auto;
  padding: 14px var(--page-x);
}

.site-name {
  font-family: 'Pirata One', serif;
  font-weight: 400;
  font-size: clamp(1.6rem, 3.2vw, 2.8rem);
  text-transform: none;
  letter-spacing: 0;
  color: #fff;
  line-height: 1;
}

.site-name:hover { opacity: 0.65; }

.site-nav {
  color: rgba(255, 255, 255, 0.45);
  font-size: clamp(0.7rem, 0.85vw, 0.8rem);
  letter-spacing: 0.12em;
}

.site-nav a { color: inherit; }
.site-nav a:hover { color: #fff; }

/* Header is now sticky (in flow) — remove top padding on main */
main { padding-top: 0; }

main {
  padding-bottom: calc(var(--sticky-footer-h) + env(safe-area-inset-bottom));
}

/* ══════════════════════════════════════════════════════════════
   CAROUSEL — full-bleed, 1/3 viewport, dark
   ══════════════════════════════════════════════════════════════ */

.feature-carousel {
  position: relative;
  width: 100%;
  height: clamp(240px, 34vh, 520px);
  overflow: hidden;
  background: #080808;
  user-select: none;
}

.carousel-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 440ms cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}

.carousel-slide {
  flex: 0 0 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}

/* Slide backgrounds */
.carousel-slide--poelove {
  background:
    linear-gradient(to top, rgba(0,0,0,0.72) 0%, rgba(0,0,0,0.10) 65%),
    url('assets/images/projects/poelove_hero.png') center / cover no-repeat;
}

.carousel-slide--diorama {
  background:
    linear-gradient(to top, rgba(0,0,0,0.72) 0%, rgba(0,0,0,0.10) 65%),
    url('assets/images/projects/dioramaxr_hero.png') center / cover no-repeat;
}

.carousel-slide--conference {
  background: linear-gradient(135deg, #0b0f1a 0%, #151e36 55%, #0d1117 100%);
}

/* Full-slide clickable link */
.carousel-link {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  width: 100%;
  height: 100%;
  padding: clamp(20px, 3vw, 44px) clamp(20px, 5vw, 64px);
  text-decoration: none;
  color: #fff;
}

/* Caption */
.carousel-caption {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.carousel-eyebrow {
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 600;
  font-size: clamp(0.65rem, 0.9vw, 0.8rem);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
}

.carousel-title {
  font-family: 'Pirata One', serif;
  font-weight: 400;
  font-size: clamp(2.5rem, 7vw, 7rem);
  line-height: 0.92;
  letter-spacing: -0.01em;
  color: #fff;
}

/* ↗ arrow top-right */
.carousel-arrow {
  position: absolute;
  top: clamp(16px, 2.5vw, 36px);
  right: clamp(20px, 3vw, 52px);
  font-size: clamp(1rem, 1.4vw, 1.4rem);
  color: rgba(255, 255, 255, 0.35);
  transition: color 200ms ease, transform 200ms ease;
  pointer-events: none;
}

.carousel-link:hover .carousel-arrow {
  color: rgba(255, 255, 255, 0.9);
  transform: translate(3px, -3px);
}

/* Prev / next buttons */
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.40);
  border: 1px solid rgba(255, 255, 255, 0.10);
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.95rem;
  padding: 10px 14px;
  cursor: pointer;
  line-height: 1;
  transition: background 160ms ease, color 160ms ease;
  z-index: 2;
}

.carousel-btn:hover {
  background: rgba(0, 0, 0, 0.70);
  color: #fff;
}

.carousel-btn--prev { left: clamp(12px, 2vw, 28px); }
.carousel-btn--next { right: clamp(12px, 2vw, 28px); }

/* Dots */
.carousel-dots {
  position: absolute;
  bottom: clamp(12px, 2vw, 22px);
  right: clamp(20px, 3vw, 52px);
  display: flex;
  gap: 7px;
  z-index: 2;
}

.carousel-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background 180ms ease;
}

.carousel-dot--active { background: rgba(255, 255, 255, 0.9); }

/* ══════════════════════════════════════════════════════════════
   CATEGORY ACCORDION — Pirata One labels, collapse/expand rows
   ══════════════════════════════════════════════════════════════ */

.cat-section {
  margin-top: 0;
  border-top: 1px solid var(--border);
}

/* Button reset + Pirata One, large, editorial */
.cat-label {
  appearance: none;
  background: none;
  border: none;
  border-radius: 0;
  text-align: left;
  width: 100%;

  display: flex;
  align-items: baseline;
  justify-content: space-between;

  font-family: 'Pirata One', serif;
  font-size: clamp(2.5rem, 7vw, 7rem);
  font-weight: 400;
  text-transform: lowercase;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--text);
  padding: clamp(12px, 2vw, 20px) var(--page-x);
  cursor: pointer;
  transition: opacity 160ms ease;
}

.cat-label:hover { opacity: 0.55; }

/* + / × indicator */
.cat-label::after {
  content: '+';
  font-family: 'Inter', system-ui, sans-serif;
  font-size: clamp(1rem, 2vw, 1.5rem);
  font-weight: 300;
  letter-spacing: 0;
  color: var(--text-faint);
  transition: transform 320ms cubic-bezier(0.16, 1, 0.3, 1), color 160ms ease;
  flex-shrink: 0;
  margin-left: 1rem;
}

.cat-section.is-open .cat-label::after {
  content: '×';
  transform: rotate(90deg);
  color: var(--text-muted);
}

/* Cat row: hidden by default, expands on .is-open */
.cat-row {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition:
    max-height 560ms cubic-bezier(0.16, 1, 0.3, 1),
    opacity    320ms ease;
  padding-left: var(--page-x);
  padding-right: var(--page-x);
  padding-bottom: 0;
}

.cat-section.is-open .cat-row {
  max-height: 80vh;
  overflow-y: auto;   /* was: inherited hidden — prevents silent clipping of stacked tiles */
  opacity: 1;
  padding-bottom: clamp(24px, 3vw, 40px);
}

/* .cat-tile base height is set in style.css — do not remove that rule.
   menu.css only overrides height in the open (expanded) state. */
.cat-section.is-open .cat-tile {
  height: clamp(320px, 60vh, 680px);
}

/* Focus mode: collapse carousel + hide other sections */
body.cat-open .feature-carousel {
  display: none;
}

body.cat-open .cat-section:not(.is-open) {
  display: none;
}

body.cat-open .site-footer-sticky {
  display: none;
}

/* ── Sticky footer ── */
.site-footer-sticky {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--sticky-footer-h);
  background: #000;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  padding: 0 var(--page-x);
  padding-bottom: env(safe-area-inset-bottom);
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 150;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: clamp(0.75rem, 0.8vw, 0.875rem);
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.55);
}

.footer-sticky-link {
  color: rgba(255, 255, 255, 0.55);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.08em;
  min-height: 44px;
  display: flex;
  align-items: center;
  transition: color 0.15s ease;
}

.footer-sticky-link:hover,
.footer-sticky-link:focus {
  color: rgba(255, 255, 255, 0.90);
}

/* ── Work grid top margin ── */
.work-grid {
  margin-top: 48px;
}

/* ── About breathing room ── */
.about-section {
  margin-top: 48px;
}

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════ */

@media (max-width: 640px) {
  .carousel-btn { display: none; }

  .cat-label {
    font-size: clamp(2rem, 12vw, 3.5rem);
    padding-left: 20px;
    padding-right: 20px;
  }

  .cat-row {
    padding-left: 20px;
    padding-right: 20px;
  }

  .cat-section.is-open .cat-tile {
    height: 55vh;
  }
}

@media (prefers-reduced-motion: reduce) {
  .carousel-track { transition: none; }
  html { scroll-behavior: auto; }
  .footer-sticky-link { transition: none; }
}
