/*
 Theme Name: Frank Enright Core
 Theme URI: http://frank-enright.local
 Description: Premium Minimalist Editorial Portfolio for Frank Enright / Ansidis
 Version: 4.0.0
 Author: Antigravity AI
 Text Domain: frank-enright-core
 */

:root {
  --color-bg: #000000;
  --color-text: #e5e5e5;
  --color-text-dim: #7f7f7f;
  --color-accent: #c5a880; /* Muted Champagne Gold */
  --font-serif: 'Cormorant Garamond', serif;
  --font-sans: 'Inter', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;
}

body {
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 1.6;
  overflow: hidden;
  height: 100vh;
  height: 100dvh;
  width: 100vw;
}

/* ── Typography Elements ── */
.serif-display {
  font-family: var(--font-serif);
  font-weight: 300;
  letter-spacing: 0.03em;
}

.sans-hud {
  font-family: var(--font-sans);
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--color-text-dim);
}

/* ── Custom Cursor: Crosshair Reticle ── */
.cursor-crosshair-h,
.cursor-crosshair-v {
  background-color: var(--color-accent);
  transition: background-color 0.3s ease;
}

.cursor-hover .cursor-crosshair-h,
.cursor-hover .cursor-crosshair-v {
  background-color: #ffffff;
}

#custom-cursor {
  transition: transform 0.3s ease;
}

.cursor-hover #custom-cursor {
  transform: translate(-50%, -50%) scale(1.6);
}

.cursor-ring-spin {
  border: 1px dashed rgba(197, 168, 128, 0.35);
  animation: cursor-ring-spin 6s linear infinite;
}

.cursor-hover #cursor-trail {
  transform: translate(-50%, -50%) scale(1.4);
}

.cursor-hover .cursor-ring-spin {
  border-style: solid;
  border-color: rgba(197, 168, 128, 0.7);
}

@keyframes cursor-ring-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ── Sliding Overlay Cards ── */
.sliding-card {
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  background-color: #070708;
  border-left: 1px solid rgba(255, 255, 255, 0.05);
  transform: translateX(100%);
  transition: transform 0.75s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 30;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
}

.sliding-card.active {
  transform: translateX(0);
}

/* Navigation Button Styling */
header button {
  position: relative;
  outline: none;
}

header button::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background-color: var(--color-accent);
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

header button.active-nav {
  color: #ffffff !important;
}

header button.active-nav::after {
  width: 100%;
}

/* ── Custom Scrollbars ── */
.custom-scroll::-webkit-scrollbar {
  width: 2px;
  height: 2px;
}

.custom-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.custom-scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.05);
}

.custom-scroll::-webkit-scrollbar-thumb:hover {
  background: var(--color-accent);
}

/* ── Elegant Interactive Cards ── */
.work-grid {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 24px;
}

@media (min-width: 640px) {
  .work-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1280px) {
  .work-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.release-card-container {
  position: relative;
  width: 100%;
  perspective: 1000px;
}

.release-card {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background-color: #080809;
  border: 1px solid rgba(255, 255, 255, 0.03);
  overflow: hidden;
  transition: border-color 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 10;
}

.release-card-container:hover .release-card {
  border-color: rgba(197, 168, 128, 0.3);
  transform: translateY(-4px);
}

.vinyl-disc {
  position: absolute;
  top: 5%;
  right: 5%;
  width: 90%;
  height: 90%;
  background: radial-gradient(circle, #050506 8%, #111 10%, #171719 35%, #050506 38%, #111 40%, #0d0d0e 70%);
  border-radius: 50%;
  z-index: 5;
  box-shadow: -10px 10px 30px rgba(0, 0, 0, 0.7);
  transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1), right 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  transform: rotate(0deg);
  pointer-events: none;
}

.vinyl-label {
  position: absolute;
  top: 36%;
  left: 36%;
  width: 28%;
  height: 28%;
  background: #0d0d0e;
  border-radius: 50%;
  border: 1px solid rgba(197, 168, 128, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.vinyl-label-center {
  width: 12%;
  height: 12%;
  background: #000000;
  border-radius: 50%;
}

.release-card-container:hover .vinyl-disc {
  right: -25%;
  transform: rotate(120deg);
}

.sleeve-cover {
  position: relative;
  width: 100%;
  height: 100%;
  z-index: 10;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px;
  background: #080809;
}

/* Play Icon Overlay */
.play-trigger {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 12;
}

.release-card-container:hover .play-trigger {
  opacity: 1;
}

/* ── Minimal Range Sliders ── */
input[type="range"].console-slider {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  width: 100%;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  outline: none;
  cursor: pointer;
}

input[type="range"].console-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 6px;
  height: 6px;
  background: var(--color-accent);
  border-radius: 50%;
  border: none;
  box-shadow: none;
  transition: transform 0.2s ease;
}

input[type="range"].console-slider::-moz-range-thumb {
  width: 6px;
  height: 6px;
  background: var(--color-accent);
  border-radius: 50%;
  border: none;
  box-shadow: none;
  transition: transform 0.2s ease;
}

input[type="range"].console-slider::-moz-range-track {
  background: rgba(255, 255, 255, 0.08);
  height: 1px;
  border: none;
}

input[type="range"].console-slider::-moz-range-progress {
  background: rgba(255, 255, 255, 0.08);
  height: 1px;
}

input[type="range"].console-slider:hover::-webkit-slider-thumb {
  transform: scale(1.8);
}

input[type="range"].console-slider:hover::-moz-range-thumb {
  transform: scale(1.8);
}

/* Archive curated-section players (Sections 01/02/03) — blue thumb to match the header's particle visualizer */
input[type="range"].console-slider.now-playing-timeline::-webkit-slider-thumb,
input[type="range"].console-slider.now-playing-volume::-webkit-slider-thumb {
  background: #83a8d8;
}

input[type="range"].console-slider.now-playing-timeline::-moz-range-thumb,
input[type="range"].console-slider.now-playing-volume::-moz-range-thumb {
  background: #83a8d8;
}

/* ── Sound Art Visual Wave String ── */
.wave-string-container {
  position: relative;
  width: 100%;
  height: 160px;
  background-color: rgba(255, 255, 255, 0.01);
  border: 1px solid rgba(255, 255, 255, 0.02);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

#wave-string-canvas {
  width: 100%;
  height: 100%;
}

/* ── Mobile/Tablet Navigation & Panel Swap ──
   Everything below is scoped to max-width: 1023.98px (Tailwind's `lg` breakpoint),
   so none of it can ever apply at lg: and up — desktop layout is untouched. */
@media (max-width: 1023.98px) {
  /* Hamburger-triggered full-screen nav overlay (#main-nav gets .mobile-nav-open via JS) */
  #main-nav.mobile-nav-open {
    display: flex !important;
    position: fixed;
    inset: 0;
    z-index: 60;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    background: rgba(0, 0, 0, 0.98);
  }

  #main-nav.mobile-nav-open button {
    font-size: 12px;
    letter-spacing: 0.25em;
  }

  /* Single-panel-at-a-time swap — fixes the right panel (Reel/Archive/Resonator/
     Modmotif/Modmotif Studios) being unreachable below the left panel's natural
     content height, since the page itself doesn't scroll (body has overflow:hidden). */
  .mobile-right-panel {
    display: none;
  }

  body.mobile-card-active .mobile-left-panel {
    display: none;
  }

  body.mobile-card-active .mobile-right-panel {
    display: block;
    height: 100%;
  }
}

/* Hide the desktop-oriented custom cursor on touch devices — there's no persistent
   pointer position to follow, so it was sitting frozen mid-content instead. Scoped by
   input capability, not screen width, so a touch laptop docked to a desktop monitor
   still correctly gets no fake cursor, while normal mouse/trackpad use is unaffected. */
@media (pointer: coarse) {
  #custom-cursor,
  #cursor-trail {
    display: none !important;
  }
}

/* ── Resonator: real synth gated on width, same as before ──
   iPad in landscape clears 1024px and gets the real synth; phones and portrait-iPad
   get the simplified teaser. The knob-strip layout itself adapts its spacing for
   touch devices specifically (see resonance-synth.js's isTouchDevice check) so it
   isn't cramped on iPad — that check is pointer-capability-based, not width-based,
   so it can never affect a desktop/laptop with a real mouse or trackpad. */
#resonator-desktop {
  display: none;
}

#resonator-mobile-teaser {
  display: block;
}

@media (min-width: 1024px) {
  #resonator-desktop {
    display: block;
  }

  #resonator-mobile-teaser {
    display: none;
  }
}

/* ── Reel toolbar: gate on real pointer precision, not screen width ──
   An iPad is wide enough to clear the 1024px breakpoint above while still being
   touch-primary, which left its hover-only toolbar never appearing at all. Gating on
   (hover: hover) and (pointer: fine) instead correctly catches every iPad/touchscreen
   regardless of width, while leaving any desktop/laptop with a mouse or trackpad —
   at any window size — completely unaffected. */
.reel-toolbar {
  opacity: 1;
}

@media (hover: hover) and (pointer: fine) {
  .reel-toolbar {
    opacity: 0;
  }

  .group:hover .reel-toolbar {
    opacity: 1;
  }
}

