:root {
  --blue: #2643EB;
  --bg: #FAFAF8;
  --ink: #12120F;
  --ink-dim: #6E6E68;
  --line: rgba(18, 18, 15, 0.022);
  --hairline: rgba(18, 18, 15, 0.16);
  --grid-size: 10px;
}

* { box-sizing: border-box; }

button { font: inherit; color: inherit; }

html, body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

body {
  background-color: var(--bg);
  background-image:
    linear-gradient(to right, var(--line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line) 1px, transparent 1px);
  background-size: var(--grid-size) var(--grid-size);
  color: var(--ink);
  font-family: 'Instrument Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  min-height: 100vh;
}

/* Stage: centered on load, condenses to a top bar once a role is picked */

.stage {
  min-height: 100vh;
  transition: min-height 0.5s ease, padding 0.5s ease;
}

.stage.is-active {
  min-height: 0;
  padding: 22px 0 40px;
}

/* Landing: three even vertical thirds — name / pills / tagline */

.hero {
  display: grid;
  grid-template-rows: 1fr 1fr 1fr;
  gap: 26px;
  height: 100vh;
  width: 100%;
  min-width: 0;
}

.hero-top,
.hero-mid,
.hero-bottom {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

.hero-mid {
  position: relative;
}

.hero-top {
  align-items: flex-end;
  padding-bottom: 13px;
}

.hero-bottom {
  align-items: flex-start;
  padding-top: 13px;
}

/* Condensed top bar once a role is picked — name pinned far left, aligned
   with the video grid below; pills centered independently in the bar */

.stage.is-active .hero {
  display: flex;
  align-items: center;
  position: relative;
  height: auto;
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}

.stage.is-active .hero-top {
  flex-shrink: 0;
  padding-bottom: 0;
}

.stage.is-active .hero-mid {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.stage.is-active .hero-bottom {
  display: none;
}

/* Header */

.wordmark {
  font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
  font-size: clamp(32px, 5.2vw, 52px);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #000;
  margin: 0;
  line-height: 1;
  white-space: nowrap;
  transition: font-size 0.4s ease;
}

.stage.is-active .wordmark {
  font-size: 20px;
}

.wordmark .letter {
  color: inherit;
  transition: color 0.2s ease;
}

.wordmark:hover .letter {
  color: var(--c, inherit);
}

.tagline .letter,
.tagline-footer .letter {
  color: inherit;
  transition: color 0.2s ease;
}

.tagline:hover .letter,
.tagline-footer:hover .letter {
  color: var(--c, inherit);
}

.tagline {
  font-family: 'Instrument Sans', sans-serif;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: #000;
  margin: 0;
  white-space: nowrap;
  transform: translateZ(0);
  backface-visibility: hidden;
}

.stage.is-active .tagline {
  display: none;
}

.tagline-footer {
  display: none;
  font-family: 'Instrument Sans', sans-serif;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: #000;
  margin: 0 0 8px;
  transform: translateZ(0);
  backface-visibility: hidden;
}

.stage.is-active ~ footer .tagline-footer {
  display: block;
}

.footer-email {
  display: none;
}

.stage.is-active ~ footer .footer-email {
  display: block;
}

/* Tabs */

.tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  justify-content: center;
}

@keyframes pill-drop-a {
  0% { transform: translateY(-90px) rotate(-12deg); opacity: 0; }
  55% { transform: translateY(8px) rotate(4deg); opacity: 1; }
  75% { transform: translateY(-4px) rotate(-1.5deg); }
  90% { transform: translateY(2px) rotate(0.5deg); }
  100% { transform: translateY(0) rotate(0deg); opacity: 1; }
}

@keyframes pill-drop-b {
  0% { transform: translateY(-130px) rotate(14deg); opacity: 0; }
  60% { transform: translateY(6px) rotate(-5deg); opacity: 1; }
  78% { transform: translateY(-6px) rotate(2deg); }
  92% { transform: translateY(2px) rotate(-0.5deg); }
  100% { transform: translateY(0) rotate(0deg); opacity: 1; }
}

@keyframes pill-drop-c {
  0% { transform: translateY(-70px) translateX(-14px) rotate(-6deg); opacity: 0; }
  50% { transform: translateY(10px) translateX(4px) rotate(5deg); opacity: 1; }
  72% { transform: translateY(-5px) translateX(-2px) rotate(-2deg); }
  100% { transform: translateY(0) translateX(0) rotate(0deg); opacity: 1; }
}

@keyframes pill-drop-d {
  0% { transform: translateY(-160px) rotate(-18deg); opacity: 0; }
  58% { transform: translateY(4px) rotate(6deg); opacity: 1; }
  76% { transform: translateY(-8px) rotate(-3deg); }
  88% { transform: translateY(3px) rotate(1deg); }
  100% { transform: translateY(0) rotate(0deg); opacity: 1; }
}

.tab.drop-a { animation: pill-drop-a 0.65s cubic-bezier(0.34, 1.56, 0.64, 1) backwards; }
.tab.drop-b { animation: pill-drop-b 0.8s cubic-bezier(0.3, 1.7, 0.6, 1) backwards; }
.tab.drop-c { animation: pill-drop-c 0.6s cubic-bezier(0.36, 1.4, 0.6, 1) backwards; }
.tab.drop-d { animation: pill-drop-d 0.9s cubic-bezier(0.32, 1.8, 0.55, 1) backwards; }

.tab[data-role="all"] {
  display: none;
}

.stage.is-active .tab[data-role="all"] {
  display: inline-flex;
}

.tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 5px 13px;
  background: var(--ink);
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  font-family: 'Instrument Sans', sans-serif;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.01em;
  text-transform: lowercase;
  color: #fff;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, padding 0.3s ease, font-size 0.3s ease, transform 0.15s ease;
}

.stage:not(.is-active) .tab::after {
  content: "you can select one, or stack multiple";
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) rotate(-2deg);
  font-family: 'Caveat', cursive;
  font-weight: 600;
  font-size: 19px;
  line-height: 1;
  letter-spacing: 0.01em;
  color: var(--ink);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.stage:not(.is-active) .tab:hover::after {
  opacity: 1;
}

.stage.is-active .tab {
  padding: 4px 11px;
  font-size: 10px;
}

.tab:hover,
.tab.active {
  background: var(--role-color, var(--blue));
  border-color: var(--role-color, var(--blue));
  color: #fff;
}

.tab.active {
  transform: translateY(-1px);
}

@keyframes pill-poke {
  0% { transform: scale(1) rotate(0deg); }
  25% { transform: scale(0.96, 1.04) rotate(-1.6deg) translateY(-1px); }
  50% { transform: scale(1.03, 0.97) rotate(1.2deg) translateY(-1px); }
  75% { transform: scale(0.985, 1.015) rotate(-0.6deg) translateY(-0.5px); }
  100% { transform: scale(1) rotate(0deg) translateY(-0.5px); }
}

.tab:hover {
  animation: pill-poke 0.18s cubic-bezier(0.36, 1.4, 0.6, 1);
}

/* Colours lifted directly from the LUCERNA title card, one letter per role,
   in letter order: L U C E R N A */
.tab[data-role="director"] { --role-color: #7C3AED; }
.tab[data-role="editor"] { --role-color: #22C55E; }
.tab[data-role="dop"] { --role-color: #EF4444; }
.tab[data-role="producer"] { --role-color: #E0459C; }
.tab[data-role="creative"] { --role-color: #2E7DF5; }
.tab[data-role="colourist"] { --role-color: #FACC15; }
.tab[data-role="all"] { --role-color: #A855F7; }

/* Reel */

.reel-wrap {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px 100px;
  display: none;
}

.reel-wrap.visible {
  display: block;
}

.reel {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.reel-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1 1 0;
  min-width: 0;
}

.card {
  background: transparent;
}

.card .frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  cursor: pointer;
  overflow: hidden;
  border-radius: 10px;
}

.card .frame .poster {
  position: absolute;
  inset: 0;
  background: #000 center / cover no-repeat;
  transform: scale(1);
  transition: transform 0.5s ease;
}

.card .frame:hover .poster {
  transform: scale(1.035);
}

.card .frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.card .frame .play {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0;
}

.card .frame .play::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 13px solid rgba(255, 255, 255, 0.92);
  transform: translate(-50%, -50%);
  transition: border-left-color 0.15s ease, transform 0.15s ease;
}

.card .frame:hover .play::before {
  border-left-color: var(--blue);
  transform: translate(-50%, -50%) scale(1.12);
}

.card .meta {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  padding: 0 2px;
  transition: max-height 0.3s ease, opacity 0.25s ease, padding 0.3s ease;
}

.card:hover .meta {
  max-height: 60px;
  opacity: 1;
  padding: 10px 2px 0;
}

.card .title {
  font-family: 'Instrument Sans', sans-serif;
  font-weight: 500;
  font-size: 12px;
  color: var(--ink);
  margin: 0 0 5px;
}

.card .chips {
  font-family: 'Instrument Sans', sans-serif;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--ink-dim);
}

.chip:not(:last-child)::after {
  content: " · ";
}

.empty {
  text-align: center;
  font-family: 'Instrument Sans', sans-serif;
  font-weight: 400;
  color: var(--ink-dim);
  padding: 60px 0;
}

/* Footer */

.site-footer {
  text-align: center;
  padding: 28px 24px 56px;
  font-family: 'Instrument Sans', sans-serif;
  font-size: 12px;
  font-weight: 400;
  color: var(--ink-dim);
}

.site-footer a {
  color: #000;
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--ink);
}

@media (max-width: 560px) {
  .stage.is-active .hero { flex-direction: column; align-items: flex-start; gap: 10px; }
}
