/* ==========================================================================
   Esme Ray — Official Site Design System & Stylesheet
   Faithfully crafted to match the design reference mockup with high precision.
   ========================================================================== */

:root {
  --accent: #FF5B4A;
  --bg-dark: #0B0A09;
  --bg-elevated: #110F0E;
  --bg-card: #1A1714;
  --text-main: #F3EEE8;
  --text-muted: #A39C94;
  --text-dim: #CFC7BE;
  --text-subtle: #E4DDD5;
  --border-light: rgba(243, 238, 232, 0.12);
  --border-medium: rgba(243, 238, 232, 0.25);
  --border-strong: rgba(243, 238, 232, 0.4);
  --font-sans: 'Archivo', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-serif: 'Instrument Serif', Georgia, 'Times New Roman', serif;
  --font-script: 'Mr Dafoe', 'Brush Script MT', cursive;
  --ease-spring: cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Color Themes */
[data-theme="coral"] { --accent: #FF5B4A; }
[data-theme="lime"] { --accent: #E4FF3C; }
[data-theme="pink"] { --accent: #FF5FA8; }
[data-theme="amber"] { --accent: #F5B640; }

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-sans);
  text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  padding: 0;
  background: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-sans);
  overflow-x: hidden;
  min-width: 0;
}

/* Typography Utility Classes */
.x {
  font-family: 'Archivo', 'Arial Black', system-ui, sans-serif;
  font-stretch: 125%;
}

.xc {
  font-family: 'Archivo', 'Arial Narrow', system-ui, sans-serif;
  font-stretch: 80%;
}

.serif {
  font-family: var(--font-serif);
}

.script {
  font-family: var(--font-script);
}

/* Links & Focus States */
a {
  color: var(--text-main);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--accent);
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.on-accent :focus-visible {
  outline-color: var(--bg-dark);
}

/* Keyframes & Intro Animations */
@keyframes rise {
  from {
    transform: translateY(105%);
  }
  to {
    transform: translateY(0);
  }
}

.rise {
  display: block;
  animation: rise 1s var(--ease-spring) both;
}

.d1 {
  animation-delay: 0.12s;
}

.d2 {
  animation-delay: 0.24s;
}

@keyframes ink {
  from {
    opacity: 0;
    transform: rotate(-9deg) translateY(20px) scale(0.85);
  }
  to {
    opacity: 1;
    transform: rotate(-9deg) translateY(0) scale(1);
  }
}

.ink {
  display: inline-block;
  animation: ink 1.1s 0.7s var(--ease-spring) both;
}

@keyframes fadeup {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.fade {
  animation: fadeup 0.9s 0.9s ease both;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 currentColor;
  }
  100% {
    box-shadow: 0 0 0 12px transparent;
  }
}

.pulse {
  animation: pulse 1.8s ease-out infinite;
}

/* Marquee Tracks */
@keyframes marquee {
  to {
    transform: translateX(-50%);
  }
}

.marquee-track {
  display: flex;
  align-items: center;
  width: max-content;
  animation: marquee 32s linear infinite;
  user-select: none;
}

.marquee-track.rev {
  animation-direction: reverse;
  animation-duration: 40s;
}

.marquee-track:hover {
  animation-play-state: paused;
}

/* Equalizer Bars */
@keyframes eq {
  0%, 100% {
    transform: scaleY(0.25);
  }
  50% {
    transform: scaleY(1);
  }
}

.eq span {
  transform-origin: bottom;
  transform: scaleY(0.3);
  transition: transform 0.2s ease;
}

.eq.on span {
  animation: eq 0.9s ease-in-out infinite;
}

.eq.on span:nth-child(2) {
  animation-delay: -0.45s;
}

.eq.on span:nth-child(3) {
  animation-delay: -0.2s;
}

.eq.on span:nth-child(4) {
  animation-delay: -0.65s;
}

/* Progress Bar */
@keyframes prog {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

.prog {
  animation: prog 30s linear infinite;
  animation-play-state: paused;
}

.prog.on {
  animation-play-state: running;
}

/* Vinyl Spin & Slide */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.vinyl {
  animation: spin 5s linear infinite;
  animation-play-state: paused;
}

.vinyl.on {
  animation-play-state: running;
}

.vin-wrap {
  transition: transform 0.8s var(--ease-spring);
}

.vin-wrap.on {
  transform: translateX(14%);
}

/* Buttons */
.btn-primary {
  transition: transform 0.25s ease, filter 0.25s ease, background-color 0.3s ease;
}

.btn-primary:hover {
  color: #0B0A09;
  transform: translateY(-2px);
  filter: brightness(1.08);
}

.btn-ghost {
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.btn-ghost:hover {
  background: var(--text-main);
  color: #0B0A09;
  border-color: var(--text-main);
}

.on-accent .btn-ghost:hover {
  background: #0B0A09;
  color: var(--text-main);
}

.brand-logo {
  height: clamp(85px, 8.5vw, 120px);
  width: auto;
  max-width: 100%;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 4px 14px rgba(0, 0, 0, 0.8));
  transition: transform 0.25s var(--ease-spring), filter 0.25s ease;
}

.brand-logo:hover {
  transform: scale(1.08);
  filter: drop-shadow(0 6px 20px rgba(255, 91, 74, 0.5));
}

.play-btn {
  transition: transform 0.2s ease, filter 0.2s ease;
}

.play-btn:hover {
  transform: scale(1.06);
  filter: brightness(1.1);
}

/* Visuals Lookbook Cards */
.look-img img {
  transition: transform 1s var(--ease-spring), filter 0.6s ease;
  filter: grayscale(0.35) contrast(1.05) brightness(0.92);
}

.look:hover .look-img img {
  transform: scale(1.07);
  filter: none;
}

.notch {
  transition: background 0.3s ease, color 0.3s ease;
  cursor: pointer;
}

.notch svg {
  transition: transform 0.3s ease;
}

.look:hover .notch,
.notch:hover {
  background: var(--accent) !important;
  color: #0B0A09 !important;
}

.look:hover .notch svg {
  transform: translate(2px, -2px);
}

.looks {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(14px, 2.2vw, 30px);
  align-items: start;
  margin-top: clamp(56px, 7vw, 100px);
}

.looks > *:nth-child(2) {
  margin-top: 96px;
}

.looks > *:nth-child(3) {
  margin-top: 184px;
}

.looks > *:nth-child(4) {
  margin-top: 64px;
}

/* Track rows */
.track {
  transition: background 0.25s ease, padding 0.25s ease;
}

.track:hover {
  background: rgba(243, 238, 232, 0.05);
}

/* Tour rows */
.tour-row {
  transition: background 0.3s ease, padding 0.3s ease;
}

.tour-row:hover {
  background: rgba(243, 238, 232, 0.04);
  padding-left: 16px !important;
  padding-right: 16px !important;
}

.inp::placeholder {
  color: rgba(11, 10, 9, 0.62);
}

/* Mobile Navigation */
.menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
}

.mobile-menu {
  display: none;
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.mobile-menu.open {
  display: flex !important;
  opacity: 1 !important;
  transform: translateY(0) !important;
  pointer-events: auto !important;
}

/* Theme Picker Pill */
.theme-picker {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(243, 238, 232, 0.06);
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(243, 238, 232, 0.15);
}

.theme-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease;
  padding: 0;
}

.theme-dot:hover {
  transform: scale(1.25);
}

.theme-dot.active {
  border-color: #F3EEE8;
  transform: scale(1.15);
}

/* Lightbox Modal */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(11, 10, 9, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.lightbox.active {
  display: flex;
  opacity: 1;
}

.lightbox-content {
  position: relative;
  max-width: 900px;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  background: #171513;
  border: 1px solid var(--border-medium);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.8);
}

.lightbox-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #000;
}

.lightbox-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lightbox-details {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 36px 36px 36px 0;
}

.lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(243, 238, 232, 0.1);
  border: 1px solid rgba(243, 238, 232, 0.2);
  color: #F3EEE8;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: background 0.2s, transform 0.2s;
}

.lightbox-close:hover {
  background: var(--accent);
  color: #0B0A09;
  transform: scale(1.05);
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  background: #1B1917;
  color: #F3EEE8;
  border: 1px solid var(--accent);
  border-radius: 12px;
  padding: 14px 20px;
  font-size: 14px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  gap: 12px;
  pointer-events: auto;
  animation: toastIn 0.35s var(--ease-spring) forwards;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes toastOut {
  to {
    opacity: 0;
    transform: translateY(10px) scale(0.95);
  }
}

/* Responsive Styles */
@media (max-width: 900px) {
  .nav-links,
  .nav-social,
  .theme-picker {
    display: none !important;
  }

  .menu-btn {
    display: inline-flex !important;
  }

  .brand-logo {
    height: clamp(75px, 16vw, 95px);
  }





  .looks {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 20px 14px !important;
  }

  .looks > * {
    margin-top: 0 !important;
  }

  .looks > *:nth-child(even) {
    margin-top: 28px !important;
  }

  .look-img {
    aspect-ratio: 3 / 4.1 !important;
    border-radius: 6px;
  }

  .look-img .x {
    font-size: 11px !important;
    left: 10px !important;
    bottom: 8px !important;
  }

  .notch {
    width: 38px !important;
    height: 38px !important;
  }

  .notch svg {
    width: 15px !important;
    height: 15px !important;
  }

  .look figcaption {
    padding-top: 8px !important;
  }

  .look figcaption .serif {
    font-size: 18px !important;
  }

  .look figcaption .xc {
    font-size: 10px !important;
  }

  .tour-row {
    grid-template-columns: 1fr auto !important;
    row-gap: 6px !important;
  }

  .tour-venue {
    display: none !important;
  }

  .tour-date {
    grid-column: 1 / -1;
  }

  .lightbox-content {
    grid-template-columns: 1fr;
    max-height: 90vh;
    overflow-y: auto;
  }

  .lightbox-details {
    padding: 0 24px 24px;
  }
}

@media (max-width: 480px) {
  .brand-logo {
    height: 76px;
  }

  .looks {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 16px 10px !important;
  }

  .looks > *:nth-child(even) {
    margin-top: 16px !important;
  }

  .look-img {
    aspect-ratio: 3 / 4 !important;
  }

  .notch {
    width: 34px !important;
    height: 34px !important;
  }

  .notch svg {
    width: 14px !important;
    height: 14px !important;
  }

  .look figcaption .serif {
    font-size: 16px !important;
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
