/* ============================================================
   OLLTRAC — style.css
   Design system: dark, minimal, industrial, motion-driven
   ============================================================ */

/* ——— RESET & BASE ——— */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  /* Palette */
  --bg:        #0a0a0a;
  --bg-alt:    #111111;
  --surface:   #161616;
  --surface-2: #1c1c1c;
  --border:    #2a2a2a;
  --text:      #e0e0e0;
  --text-dim:  #888888;
  --text-muted:#555555;
  --accent:    #00e0ff;
  --accent-2:  #00b4cc;
  --accent-glow: rgba(0, 224, 255, .15);
  --white:     #ffffff;
  --kw:        #00e0ff;
  --hi:        #00e0ff;

  /* Spacing */
  --section-py: clamp(4rem, 10vh, 8rem);
  --content-max: 1100px;

  /* Typography */
  --font-display: 'Orbitron', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Transitions */
  --ease: cubic-bezier(.22, 1, .36, 1);
  --t-fast: .2s;
  --t-med:  .4s;
  --t-slow: .7s;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
  cursor: default;
}

::selection {
  background: var(--accent);
  color: var(--bg);
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

/* ——— LOADER ——— */
.loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity .6s var(--ease), visibility .6s;
}
.loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.loader-inner { text-align: center; }
.loader-logo {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 700;
  letter-spacing: .3em;
  color: var(--white);
  display: block;
  margin-bottom: 1.5rem;
}
.loader-bar {
  width: 160px;
  height: 2px;
  background: var(--border);
  border-radius: 1px;
  overflow: hidden;
  margin: 0 auto;
}
.loader-bar-fill {
  width: 0%;
  height: 100%;
  background: var(--accent);
  border-radius: 1px;
  animation: loaderFill 1.2s var(--ease) forwards;
}
@keyframes loaderFill {
  to { width: 100%; }
}

/* ——— CUSTOM CURSOR (desktop) ——— */
.cursor-dot, .cursor-ring {
  display: none;
  pointer-events: none;
  position: fixed;
  border-radius: 50%;
  z-index: 10000;
  mix-blend-mode: difference;
  transition: transform .15s var(--ease);
}
@media (hover: hover) and (pointer: fine) {
  body { cursor: none; }
  a, button, [role="button"], input[type="range"] { cursor: none; }
  .cursor-dot {
    display: block;
    width: 6px; height: 6px;
    background: var(--white);
    transform: translate(-50%, -50%);
  }
  .cursor-ring {
    display: block;
    width: 36px; height: 36px;
    border: 1.5px solid rgba(255,255,255,.4);
    transform: translate(-50%, -50%);
    transition: width .3s var(--ease), height .3s var(--ease), border-color .3s;
  }
  .cursor-ring.hover {
    width: 56px; height: 56px;
    border-color: var(--accent);
  }
}

/* ——— BACKGROUND CANVAS ——— */
#bg-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: .35;
}

/* ——— HEADER ——— */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  background: transparent;
  transition: background var(--t-med) var(--ease), box-shadow var(--t-med);
}
.site-header.scrolled {
  background: rgba(10, 10, 10, .92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--border);
}
.header-logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: .25em;
  color: var(--white);
  transition: color var(--t-fast);
}
.header-logo:hover { color: var(--accent); }

.nav-list {
  display: flex;
  gap: 2rem;
  list-style: none;
}
.nav-link {
  font-size: .8rem;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-dim);
  position: relative;
  padding-bottom: 4px;
  transition: color var(--t-fast);
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 1px;
  background: var(--accent);
  transition: width var(--t-med) var(--ease);
}
.nav-link:hover, .nav-link.active {
  color: var(--white);
}
.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 28px;
  padding: 4px 0;
  z-index: 200;
}
.hamburger-line {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform var(--t-med) var(--ease), opacity var(--t-fast);
}
.nav-toggle.open .hamburger-line:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open .hamburger-line:nth-child(2) { opacity: 0; }
.nav-toggle.open .hamburger-line:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 768px) {
  .main-nav { display: none; }
  .nav-toggle { display: flex; }
}

/* Mobile overlay */
.mobile-nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 150;
  background: rgba(10, 10, 10, .97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--t-med) var(--ease), visibility var(--t-med);
}
.mobile-nav-overlay.open {
  opacity: 1;
  visibility: visible;
}
.mobile-nav-list {
  list-style: none;
  text-align: center;
}
.mobile-nav-link {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 5vw, 2rem);
  font-weight: 600;
  letter-spacing: .15em;
  color: var(--text);
  padding: 1rem 0;
  transition: color var(--t-fast);
}
.mobile-nav-link:hover { color: var(--accent); }

/* ——— SECTIONS ——— */
.section {
  position: relative;
  z-index: 1;
  padding: var(--section-py) 2rem;
  max-width: var(--content-max);
  margin: 0 auto;
}

.section-header {
  margin-bottom: 3rem;
}
.section-label {
  font-family: var(--font-display);
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .3em;
  color: var(--accent);
  display: block;
  margin-bottom: .5rem;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--white);
}
.section-subtitle {
  font-size: .95rem;
  color: var(--text-dim);
  margin-top: .75rem;
  max-width: 600px;
}

/* ——— REVEAL ANIMATION ——— */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity var(--t-slow) var(--ease), transform var(--t-slow) var(--ease);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ——— TEXT STYLES ——— */
.kw {
  font-family: var(--font-display);
  font-size: .75em;
  font-weight: 600;
  letter-spacing: .15em;
  color: var(--kw);
}
.hi {
  color: var(--hi);
  font-weight: 500;
}
.ul {
  text-decoration-line: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.muted { color: var(--text-muted); }

/* ——— HERO ——— */
.hero-section {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding-top: 6rem;
  position: relative;
}
.hero-content {
  max-width: 720px;
}
.hero-eyebrow {
  margin-bottom: 1.5rem;
}
.tag {
  font-family: var(--font-display);
  font-size: .65rem;
  font-weight: 600;
  letter-spacing: .25em;
  color: var(--accent);
  text-transform: uppercase;
}
.tag-sep {
  color: var(--text-muted);
  margin: 0 .5rem;
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 7vw, 5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: .04em;
  color: var(--white);
  margin-bottom: 1.5rem;
}
.hero-line {
  display: block;
}
.accent-line {
  color: var(--accent);
  text-shadow: 0 0 40px rgba(0, 224, 255, .25);
}
.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  color: var(--text-dim);
  margin-bottom: 2rem;
  line-height: 1.8;
}
.hero-subtitle em {
  color: var(--accent);
  font-style: normal;
  font-weight: 500;
}
.hero-manifesto {
  border-left: 2px solid var(--accent);
  padding-left: 1.5rem;
  margin-bottom: 2.5rem;
  color: var(--text);
  font-size: .95rem;
  line-height: 1.8;
}

/* CTAs */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--font-display);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .15em;
  text-transform: uppercase;
  padding: .85rem 2rem;
  border-radius: 2px;
  transition: all var(--t-med) var(--ease);
}
.btn-primary {
  background: var(--accent);
  color: var(--bg);
}
.btn-primary:hover {
  background: var(--white);
  box-shadow: 0 0 30px rgba(0, 224, 255, .3);
}
.btn-ghost {
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.btn-sm { padding: .6rem 1.4rem; font-size: .7rem; }
.hero-ctas { display: flex; gap: 1rem; flex-wrap: wrap; }

/* Scroll hint */
.hero-scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  color: var(--text-muted);
  font-size: .7rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  animation: fadeInUp 1s var(--ease) 1.5s both;
}
.scroll-arrow {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  margin: .8rem auto 0;
  animation: scrollPulse 2s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%, 100% { opacity: .3; transform: scaleY(.6); }
  50%      { opacity: 1;  transform: scaleY(1); }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateX(-50%) translateY(20px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ——— ABOUT ——— */
.about-grid {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.about-lead {
  margin-bottom: 1rem;
}
.lead-text {
  font-size: clamp(1.1rem, 2.5vw, 1.35rem);
  line-height: 1.8;
  color: var(--text);
}
.about-block p {
  font-size: .95rem;
  line-height: 1.9;
  color: var(--text);
}
.about-divider {
  width: 60px;
  height: 1px;
  background: var(--border);
  margin: 1rem 0;
}
.about-closing p {
  font-size: 1.05rem;
  line-height: 1.8;
  margin-bottom: .5rem;
}

/* ——— PORTFOLIO ——— */
.tracks-grid {
  display: flex;
  flex-direction: column;
  gap: .75rem;
}

.track-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  transition: border-color var(--t-med) var(--ease), background var(--t-med), box-shadow var(--t-med);
  position: relative;
}
.track-card:hover, .track-card:focus-visible {
  border-color: var(--accent);
  background: var(--surface-2);
  outline: none;
}
.track-card[aria-pressed="true"] {
  border-color: var(--accent);
  box-shadow: 0 0 20px rgba(0, 224, 255, .08);
}
.track-card-inner {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  padding: 1rem 1.5rem;
}
.track-index {
  font-family: var(--font-display);
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .15em;
  color: var(--text-muted);
  min-width: 28px;
}
.track-card[aria-pressed="true"] .track-index {
  color: var(--accent);
}
.track-info { flex: 1; min-width: 0; }
.track-name {
  font-family: var(--font-display);
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .1em;
  color: var(--white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.track-desc {
  font-size: .75rem;
  color: var(--text-muted);
  margin-top: .15rem;
}
.track-duration {
  font-family: var(--font-display);
  font-size: .7rem;
  color: var(--text-muted);
  letter-spacing: .05em;
}

/* Mini EQ */
.track-eq {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 20px;
  opacity: 0;
  transition: opacity var(--t-fast);
}
.track-card[aria-pressed="true"] .track-eq { opacity: 1; }
.eq-bar {
  display: block;
  width: 3px;
  background: var(--accent);
  border-radius: 1px;
  height: 4px;
}
.track-card[aria-pressed="true"].playing .eq-bar {
  animation: eqBounce .6s ease-in-out infinite alternate;
}
.track-card[aria-pressed="true"].playing .eq-bar:nth-child(1) { animation-delay: 0s; }
.track-card[aria-pressed="true"].playing .eq-bar:nth-child(2) { animation-delay: .15s; }
.track-card[aria-pressed="true"].playing .eq-bar:nth-child(3) { animation-delay: .3s; }
.track-card[aria-pressed="true"].playing .eq-bar:nth-child(4) { animation-delay: .1s; }
@keyframes eqBounce {
  0%   { height: 4px; }
  100% { height: 18px; }
}

/* Track progress */
.track-progress {
  height: 2px;
  background: rgba(255,255,255,.05);
}
.track-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width .25s linear;
}

/* ——— ARCHIVE REVERIE ——— */
.archive-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
.archive-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2rem;
}
.archive-card-wide {
  grid-column: 1 / -1;
}
.archive-card-audio {
  grid-column: 1 / -1;
}
.archive-card-title {
  font-family: var(--font-display);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}
.archive-card p {
  font-size: .9rem;
  line-height: 1.8;
  color: var(--text);
  margin-bottom: .75rem;
}
.archive-card p:last-child { margin-bottom: 0; }

.track-card-archive {
  margin-top: 1rem;
}
.track-card-archive .track-card-inner {
  padding: .8rem 1rem;
}

@media (max-width: 640px) {
  .archive-grid {
    grid-template-columns: 1fr;
  }
}

/* ——— CONTATTI ——— */
.contact-content {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}
.contact-text {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text);
  margin-bottom: 2rem;
}
.contact-email {
  font-family: var(--font-display);
  font-size: clamp(1rem, 3vw, 1.5rem);
  font-weight: 600;
  letter-spacing: .1em;
  color: var(--accent);
  position: relative;
  display: inline-block;
  padding-bottom: 4px;
  transition: color var(--t-fast);
}
.contact-email::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform var(--t-med) var(--ease);
}
.contact-email:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}
.contact-email:hover {
  color: var(--white);
}

/* ——— FIXED PLAYER ——— */
.player {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: rgba(14, 14, 14, .96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border);
  transform: translateY(0);
  transition: transform var(--t-med) var(--ease), opacity var(--t-med);
}
.player.hidden {
  transform: translateY(100%);
  opacity: 0;
  pointer-events: none;
}

/* Seekbar */
.player-progress {
  position: relative;
  height: 4px;
  cursor: pointer;
}
.player-seekbar {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  background: var(--border);
  outline: none;
  display: block;
  cursor: pointer;
}
.player-seekbar::-webkit-slider-runnable-track {
  height: 4px;
  background: transparent;
}
.player-seekbar::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  margin-top: -4px;
  cursor: pointer;
  opacity: 0;
  transition: opacity var(--t-fast);
}
.player-progress:hover .player-seekbar::-webkit-slider-thumb {
  opacity: 1;
}
.player-seekbar::-moz-range-track {
  height: 4px;
  background: transparent;
}
.player-seekbar::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  border: 0;
  cursor: pointer;
}
/* Filled portion (via JS inline style on seekbar) */

.player-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .5rem 1.5rem;
  gap: 1rem;
}
.player-left {
  flex: 1;
  min-width: 0;
}
.player-track-name {
  font-family: var(--font-display);
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .1em;
  color: var(--white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}
.player-controls {
  display: flex;
  align-items: center;
  gap: .75rem;
}
.player-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  color: var(--text);
  transition: color var(--t-fast), transform var(--t-fast);
  border-radius: 50%;
}
.player-btn:hover {
  color: var(--accent);
  transform: scale(1.1);
}
.player-btn-play {
  width: 44px;
  height: 44px;
  border: 1.5px solid var(--accent);
  color: var(--accent);
}
.player-btn-play:hover {
  background: var(--accent);
  color: var(--bg);
}
.player-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.player-time {
  font-family: var(--font-display);
  font-size: .65rem;
  color: var(--text-muted);
  letter-spacing: .05em;
  white-space: nowrap;
}

@media (max-width: 480px) {
  .player-body { padding: .4rem .75rem; gap: .5rem; }
  .player-track-name { font-size: .65rem; }
  .player-time { display: none; }
}

/* ——— FOOTER ——— */
.site-footer {
  text-align: center;
  padding: 2rem;
  padding-bottom: calc(2rem + 70px); /* space for player */
  color: var(--text-muted);
  font-size: .75rem;
  letter-spacing: .1em;
  border-top: 1px solid var(--border);
  position: relative;
  z-index: 1;
}
.footer-credit {
  margin-top: .5rem;
  font-size: .7rem;
  color: var(--text-muted);
}
.footer-credit a {
  color: var(--accent);
  transition: color var(--t-fast);
}
.footer-credit a:hover {
  color: var(--white);
}

/* ——— SCROLLBAR ——— */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ——— RESPONSIVE ——— */
@media (max-width: 768px) {
  .section { padding-left: 1.25rem; padding-right: 1.25rem; }
  .hero-title { font-size: clamp(2rem, 9vw, 3.5rem); }
  .site-header { padding: .8rem 1.25rem; }
  .archive-grid { grid-template-columns: 1fr; }
  .hero-ctas { flex-direction: column; }
  .hero-ctas .btn { text-align: center; justify-content: center; }
  .hero-scroll-hint { display: none; }
}

/* ——— UTILITY ——— */
.hidden { display: none !important; }
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
