/* ─────────────────────────────────────────────
   DESIGN TOKENS
   ───────────────────────────────────────────── */
:root {
  --color-bg:        #0a0a0a;
  --color-surface:   #141414;
  --color-border:    #2a2a2a;
  --color-accent:    #e85c1a;
  --color-text:      #ffffff;
  --color-muted:     #888888;
  --color-tag-bg:    #1e1e1e;

  --font-display:    'Barlow Condensed', sans-serif;
  --font-body:       'Barlow', sans-serif;

  --radius:          4px;
  --gap:             24px;
  --max-width:       1600px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

img { display: block; max-width: 100%; }

/* ─────────────────────────────────────────────
   NAV
   ───────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 10, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
}

.nav__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gap);
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__logo {
  height: 28px;
  width: auto;
}

.nav__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav__login {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text);
  border: 1px solid var(--color-border);
  padding: 8px 16px;
  border-radius: 2px;
  transition: border-color 0.2s, color 0.2s;
}

.nav__login:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

/* Buy/free CTA shown at the bottom of each card */
.card__buy {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-bg);
  background: var(--color-accent);
  padding: 6px 14px;
  border-radius: 2px;
  margin-left: auto;
}

.card__free {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-muted);
  border: 1px solid var(--color-border);
  padding: 6px 14px;
  border-radius: 2px;
  margin-left: auto;
}
.card__download {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text);
  background: transparent;
  border: 1px solid var(--color-border);
  padding: 6px 10px;
  border-radius: 2px;
  margin-left: auto;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.card__download:hover {
  color: var(--color-accent);
  border-color: var(--color-accent);
}
.card__download:disabled {
  color: var(--color-muted);
  cursor: wait;
}
.card__download + .card__buy {
  margin-left: 0;
}

.card__delivery {
  margin-left: auto;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-muted);
}

.catalogue-state {
  grid-column: 1 / -1;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  padding: 28px;
  color: var(--color-muted);
  font-size: 14px;
}
.catalogue-state--loading::before { content: '◌'; color: var(--color-accent); margin-right: 10px; }
.catalogue-state--error { border-color: rgba(232, 92, 26, 0.45); color: #d3b3a2; }

.modal__email-download { margin-top: 14px; }
.modal__email-download label { display: block; margin-bottom: 7px; font-size: 13px; font-weight: 600; }
.modal__email-download div { display: flex; gap: 8px; }
.modal__email-download input { min-width: 0; flex: 1; border: 1px solid rgba(255,255,255,.22); background: #111; color: #fff; padding: 10px 12px; border-radius: 3px; }
.modal__email-download small { display: block; margin-top: 7px; color: #aaa; }

/* Buy button inside the shared modal */
.modal__buy {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-bg);
  background: var(--color-accent);
  padding: 12px 22px;
  border-radius: 2px;
}
.modal__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 8px;
}

/* ─────────────────────────────────────────────
   HERO
   ───────────────────────────────────────────── */
.hero {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 80px var(--gap) 64px;
  border-bottom: 1px solid var(--color-border);
}

.hero__eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 20px;
}

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(42px, 7vw, 80px);
  font-weight: 700;
  line-height: 1.0;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  max-width: 700px;
  margin-bottom: 24px;
}

.hero__sub {
  font-size: 16px;
  color: var(--color-muted);
  max-width: 540px;
  line-height: 1.7;
}

/* ─────────────────────────────────────────────
   GRID SECTION
   ───────────────────────────────────────────── */
.releases {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 64px var(--gap) 100px;
}

.releases__header {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 40px;
}

.releases__label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-muted);
}

/* ─────────────────────────────────────────────
   CARD GRID
   ───────────────────────────────────────────── */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(480px, 1fr));
  gap: var(--gap);
}

/* ─────────────────────────────────────────────
   RELEASE CARD
   ───────────────────────────────────────────── */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  opacity: 0;
  transform: translateY(16px) translateZ(0);
  transition:
    opacity 0.4s ease,
    transform 0.4s ease,
    border-color 0.2s;
}

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

.card.is-visible:hover {
  border-color: var(--color-accent);
  transform: translateY(-3px);
}

.card__thumb {
  aspect-ratio: 16 / 9;
  background: #1a1a1a;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: opacity 0.3s;
}
.card__thumb--placeholder {
  background:
    linear-gradient(rgba(232,92,26,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(232,92,26,0.06) 1px, transparent 1px),
    radial-gradient(circle at 50% 50%, #272727 0, #111 70%);
  background-size: 32px 32px, 32px 32px, auto;
}
.timecode-placeholder {
  display: grid;
  width: min(82%, 560px);
  padding: clamp(20px, 4vw, 42px);
  gap: 8px;
  border: 1px solid rgba(232,92,26,0.36);
  background: rgba(10,10,10,0.78);
  box-shadow: 0 24px 60px rgba(0,0,0,0.35);
  text-align: center;
}
.timecode-placeholder__label,
.timecode-placeholder__meta,
.timecode-placeholder small {
  color: var(--color-muted);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.timecode-placeholder strong {
  color: var(--color-text);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: clamp(24px, 5vw, 58px);
  font-weight: 400;
  letter-spacing: 0.05em;
  line-height: 1.1;
}
.timecode-placeholder__meta { color: var(--color-accent); }
.timecode-placeholder small {
  margin-top: 8px;
  font-size: 8px;
  opacity: 0.7;
}

.card:hover .card__thumb img { opacity: 0.85; }

.card__thumb-icon {
  font-size: 48px;
  opacity: 0.15;
  user-select: none;
}

.card__accent {
  height: 3px;
  background: var(--color-accent);
  width: 0;
  transition: width 0.3s ease;
}

.card:hover .card__accent { width: 100%; }

.card__body {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.card__tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-accent);
  background: var(--color-tag-bg);
  border: 1px solid rgba(232, 92, 26, 0.25);
  padding: 3px 10px;
  border-radius: 2px;
  align-self: flex-start;
}

.card__name {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  line-height: 1.15;
}

.card__desc {
  font-size: 14px;
  color: var(--color-muted);
  line-height: 1.65;
  flex: 1;
}

.card__footer {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.card__cta {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-accent);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap 0.2s;
  font-family: var(--font-body);
}

.card__cta:hover { gap: 10px; }
.card__cta::after { content: '→'; }

/* ─────────────────────────────────────────────
   MODAL — overlay
   ───────────────────────────────────────────── */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.85);
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal.is-open {
  display: flex;
}

/* ─────────────────────────────────────────────
   MODAL BOX — base (landscape / no image default)
   Single column: image on top, content below
   ───────────────────────────────────────────── */
.modal__box {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  max-width: 1000px;
  width: 100%;
  padding: 40px;
  position: relative;
  max-height: 95vh;
  overflow-y: auto;
  /* Single column by default */
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ─────────────────────────────────────────────
   MODAL BOX — landscape layout
   Image fills full width on top, content below
   ───────────────────────────────────────────── */
.modal__box--landscape .modal__image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius);
}

/* ─────────────────────────────────────────────
   MODAL BOX — portrait layout
   Two columns: image left (~40%), content right
   ───────────────────────────────────────────── */
.modal__box--portrait {
  display: grid;
  grid-template-columns: 280px 1fr;
  grid-template-rows: auto 1fr;
  gap: 0 32px;
  align-items: start;
}

/* Close button spans across both columns in portrait */
.modal__box--portrait .modal__close {
  grid-column: 1 / -1;
}

/* Image fills the left column and stretches to content height */
.modal__box--portrait .modal__image {
  grid-column: 1;
  grid-row: 2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius);
}

/* Content fills the right column */
.modal__box--portrait .modal__content {
  grid-column: 2;
  grid-row: 2;
}

/* ─────────────────────────────────────────────
   MODAL CONTENT (text block)
   ───────────────────────────────────────────── */
.modal__content {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  color: var(--color-muted);
  font-size: 18px;
  cursor: pointer;
  line-height: 1;
  padding: 4px 8px;
  transition: color 0.2s;
}

/* In portrait the close is in grid flow, not absolute */
.modal__box--portrait .modal__close {
  position: static;
  align-self: end;
  justify-self: end;
  margin-bottom: 8px;
}

.modal__close:hover { color: var(--color-text); }

.modal__title {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  line-height: 1.1;
}

.modal__subtitle {
  font-size: 15px;
  color: var(--color-muted);
  line-height: 1.6;
}

.modal__body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.modal__body p {
  font-size: 15px;
  color: var(--color-muted);
  line-height: 1.7;
}

.modal__download {
  display: inline-block;
  padding: 12px 28px;
  background: var(--color-accent);
  color: #fff;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  align-self: flex-start;
  transition: opacity 0.2s;
}

.modal__download:hover { opacity: 0.85; }
.modal__download:disabled {
  color: var(--color-muted);
  background: var(--color-tag-bg);
  border: 1px solid var(--color-border);
  cursor: not-allowed;
  opacity: 1;
}

/* ─────────────────────────────────────────────
   FOOTER
   ───────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--color-border);
}

.footer__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 32px var(--gap);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer__copy {
  font-size: 13px;
  color: var(--color-muted);
}

.footer__back {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-muted);
  transition: color 0.2s;
}

.footer__back:hover { color: var(--color-text); }

/* ─────────────────────────────────────────────
   RESPONSIVE
   ───────────────────────────────────────────── */
@media (max-width: 640px) {
  .hero { padding: 48px var(--gap) 40px; }
  .grid { grid-template-columns: 1fr; }
  .modal__box { padding: 24px; }

  /* Collapse portrait to single column on small screens */
  .modal__box--portrait {
    display: flex;
    flex-direction: column;
  }

  .modal__box--portrait .modal__close {
    position: absolute;
    top: 16px;
    right: 16px;
  }

  .modal__box--portrait .modal__image {
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 4;
  }
}

/* Secondary section: "Outside the Booth" */
.releases--secondary {
  margin-top: 64px;
  padding-top: 48px;
  border-top: 1px solid rgba(255, 255, 255, 0.1); /* adjust if your theme isn't dark */
}

.releases__intro {
  max-width: 560px;
  margin: 8px 0 32px;
  font-size: 15px;
  opacity: 0.75;
  line-height: 1.5;
}

/* ─────────────────────────────────────────────
   REDUCED MOTION
   ───────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .card {
    opacity: 1;
    transform: none;
    transition: border-color 0.2s;
  }
}
