:root {
  --bg: #15151f;
  --bg-2: #1c1c2a;
  --panel: #1a1a26;
  --text: #ececf3;
  --muted: #a9a9bd;
  --line: #2c2c3d;
  --accent: #6ea8ff;
  --radius: 14px;
  --wrap: 1240px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Poppins", system-ui, sans-serif;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 20% -10%, #2a2a48 0%, transparent 60%),
    radial-gradient(900px 500px at 100% 10%, #241f3a 0%, transparent 55%),
    var(--bg);
  background-attachment: fixed;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
body.locked { overflow: hidden; }
a { color: var(--accent); }
img { display: block; max-width: 100%; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

/* ---------- Hero ---------- */
.hero { padding: 96px 24px 72px; max-width: 860px; margin-left: max(24px, calc((100% - var(--wrap)) / 2)); }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .78rem; color: var(--muted); margin: 0 0 8px; font-weight: 500; }
.hero h1 { font-size: clamp(2.4rem, 6vw, 4rem); line-height: 1.1; margin: 0 0 20px; font-weight: 700; }
.hero p { color: var(--muted); font-size: 1.02rem; margin: 0 0 14px; }
.hero .lead { color: var(--text); font-size: 1.2rem; }
.hero-actions { display: flex; gap: 12px; margin-top: 28px; flex-wrap: wrap; }
.btn {
  display: inline-block; padding: 11px 22px; border-radius: 999px; font-weight: 600; font-size: .95rem;
  background: var(--accent); color: #0d1020; text-decoration: none; transition: transform .15s, background .15s;
}
.btn:hover { transform: translateY(-2px); }
.btn.ghost { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn.ghost:hover { box-shadow: inset 0 0 0 1.5px var(--muted); }

.section-title { font-size: 1.6rem; margin: 0 0 28px; font-weight: 700; }

/* ---------- Grid ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 48px 28px;
  padding-bottom: 80px;
}
@media (max-width: 1100px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 820px)  { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 20px; } }
@media (max-width: 520px)  { .grid { grid-template-columns: 1fr; } }

.card { cursor: pointer; outline: none; }
/* Cards in the same row share row tracks (cover, tags, title, summary, role),
   so titles line up even when one card has more lines of tags than another */
@supports (grid-template-rows: subgrid) {
  .card { display: grid; grid-row: span 5; grid-template-rows: subgrid; row-gap: 0; }
  .card > * { align-self: start; }
}
.card-media {
  position: relative; aspect-ratio: 4 / 5; border-radius: var(--radius); overflow: hidden;
  background: var(--bg-2); box-shadow: 0 10px 30px rgba(0,0,0,.35);
  transition: transform .25s ease, box-shadow .25s ease;
}
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.card:hover .card-media, .card:focus-visible .card-media { transform: translateY(-6px); box-shadow: 0 18px 40px rgba(0,0,0,.5); }
.card:hover .card-media img { transform: scale(1.04); }
.card:focus-visible .card-media { outline: 3px solid var(--accent); outline-offset: 3px; }
.card-media .view {
  position: absolute; inset: auto 0 0 0; padding: 14px; text-align: center; font-weight: 600; font-size: .9rem;
  background: linear-gradient(transparent, rgba(0,0,0,.75)); opacity: 0; transition: opacity .2s;
}
.card:hover .view, .card:focus-visible .view { opacity: 1; }
.title-card {
  width: 100%; height: 100%; display: grid; place-items: center; padding: 20px; text-align: center;
  font-size: clamp(1.4rem, 2.4vw, 2rem); font-weight: 700; line-height: 1.15; color: #fff;
  text-shadow: 0 2px 12px rgba(0,0,0,.35);
}
.draft-badge {
  position: absolute; top: 10px; left: 10px; font-size: .7rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  background: #ffd43b; color: #2b2300; padding: 3px 8px; border-radius: 6px;
}

.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 16px 0 10px; padding: 0; list-style: none; }
.tag { font-size: .78rem; padding: 2px 10px; border-radius: 6px; color: #fff; font-weight: 500; white-space: nowrap; }
.card h3 { font-size: 1.3rem; margin: 0 0 6px; font-weight: 700; }
.card p { margin: 0 0 8px; color: var(--muted); font-size: .94rem; }
.card .role { color: var(--text); }
.card .role b, .ov-role b { font-weight: 600; color: var(--text); }

/* tag colours */
/* muted: soft tinted background + tinted text. Change --h (hue) to recolour a tag type */
.tag { --h: 240; --s: 18%; background: hsl(var(--h) var(--s) 50% / .14); color: hsl(var(--h) calc(var(--s) + 12%) 78%); }
.t-design   { --h: 275; }
.t-level    { --h: 212; }
.t-art      { --h: 12; }
.t-lead     { --h: 35; }
.t-sound    { --h: 150; }
.t-code     { --h: 355; }
.t-writing  { --h: 320; }
.t-vfx      { --h: 335; }
.t-other    { --h: 240; --s: 8%; }

/* ---------- Contact ---------- */
.contact { border-top: 1px solid var(--line); padding-top: 64px; padding-bottom: 48px; }
.contact > p { color: var(--muted); margin: 0 0 20px; }
.contact-list { list-style: none; padding: 0; margin: 0 0 32px; display: flex; flex-wrap: wrap; gap: 12px; }
.contact-list a, .contact-list .reveal {
  font: inherit; cursor: pointer;
  display: inline-flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: 12px;
  background: var(--bg-2); color: var(--text); text-decoration: none; border: 1px solid var(--line);
  transition: border-color .15s, transform .15s;
}
.contact-list a:hover, .contact-list .reveal:hover { border-color: var(--accent); transform: translateY(-2px); }
.contact-list .reveal { color: var(--muted); }
.contact-list svg { width: 18px; height: 18px; fill: var(--accent); flex: none; }
.tools-section { padding-bottom: 80px; }
.tool-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 28px 32px; }
.tool-group h3 {
  margin: 0 0 12px; font-size: .75rem; font-weight: 500; text-transform: uppercase;
  letter-spacing: .12em; color: var(--muted);
}
.tools { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.tools li {
  padding: 8px 16px; border-radius: 10px; font-size: .92rem;
  background: var(--bg-2); border: 1px solid var(--line); color: var(--text);
}
.copy { color: #6f6f86; font-size: .85rem; margin-top: 40px; }

/* ---------- Overlay ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 50; background: rgba(8, 8, 14, .82); backdrop-filter: blur(6px);
  overflow-y: auto; padding: 40px 16px; opacity: 0; transition: opacity .2s;
}
.overlay.open { opacity: 1; }
.overlay-panel {
  position: relative; max-width: 1040px; margin: 0 auto; background: var(--panel); border-radius: 18px;
  border: 1px solid var(--line); overflow: hidden; box-shadow: 0 30px 80px rgba(0,0,0,.6);
  transform: translateY(16px); transition: transform .25s ease;
}
.overlay.open .overlay-panel { transform: none; }
.ov-close {
  position: sticky; top: 12px; float: right; margin: 12px 12px -56px 0; z-index: 2;
  width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer; font-size: 1.6rem; line-height: 1;
  background: rgba(0,0,0,.55); color: #fff; backdrop-filter: blur(4px);
}
.ov-close:hover { background: rgba(0,0,0,.8); }
.ov-head { display: grid; grid-template-columns: 220px 1fr; gap: 32px; padding: 36px; align-items: start; }
.ov-head .cover { border-radius: 12px; overflow: hidden; aspect-ratio: 4/5; background: var(--bg-2); }
.ov-head .cover img { width: 100%; height: 100%; object-fit: cover; }
.ov-head h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1.15; margin: 0 0 4px; padding-right: 48px; }
.ov-studio { color: var(--muted); margin: 0; }
.ov-role { margin: 14px 0 0; color: var(--muted); }
.ov-head .tags { margin-top: 14px; }
@media (max-width: 680px) {
  .ov-head { grid-template-columns: 1fr; padding: 24px; }
  .ov-head .cover { max-width: 180px; }
}

.ov-body { padding: 0 36px 36px; }
@media (max-width: 680px) { .ov-body { padding: 0 24px 24px; } }
.ov-cols { display: grid; grid-template-columns: 1fr 280px; gap: 40px; margin-bottom: 36px; }
@media (max-width: 820px) { .ov-cols { grid-template-columns: 1fr; gap: 20px; } }
.ov-text p { margin: 0 0 14px; color: #d3d3e0; }
.meta { margin: 0; padding: 18px 20px; background: var(--bg-2); border-radius: 12px; border: 1px solid var(--line); align-self: start; }
.meta dt { font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.meta dd { margin: 0 0 12px; font-size: .92rem; }
.meta dd:last-child { margin-bottom: 0; }

.ov-section { font-size: 1.1rem; margin: 36px 0 16px; font-weight: 600; }
.video { position: relative; aspect-ratio: 16/9; border-radius: 12px; overflow: hidden; background: #000; margin-bottom: 8px; }
.video iframe, .video video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video button { position: absolute; inset: 0; width: 100%; border: 0; padding: 0; cursor: pointer; background: #000; }
.video button img { width: 100%; height: 100%; object-fit: cover; opacity: .85; transition: opacity .2s; }
.video button:hover img { opacity: 1; }
.video .play {
  position: absolute; left: 50%; top: 50%; width: 72px; height: 72px; transform: translate(-50%, -50%);
  border-radius: 50%; background: rgba(0,0,0,.65); display: grid; place-items: center;
}
.video .play::after { content: ""; border-left: 22px solid #fff; border-top: 13px solid transparent; border-bottom: 13px solid transparent; margin-left: 6px; }
.video-caption { color: var(--muted); font-size: .88rem; margin: 0 0 24px; }

.shots { display: flex; flex-direction: column; gap: 32px; }
.shot img, .shot video { width: 100%; border-radius: 10px; background: #000; }
.shot img { cursor: zoom-in; }
.shot h4 { margin: 12px 0 2px; font-size: 1.02rem; font-weight: 600; }
.shot p { margin: 6px 0 0; color: #c4c4d4; font-size: .95rem; }
.notes { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.note { background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; }
.note h4 { margin: 0 0 6px; font-size: 1rem; font-weight: 600; }
.note p { margin: 0; color: #c4c4d4; font-size: .93rem; }

.ov-nav { display: flex; justify-content: space-between; gap: 12px; padding: 24px 36px; border-top: 1px solid var(--line); }
.ov-nav button {
  background: none; border: 1px solid var(--line); color: var(--text); padding: 10px 16px; border-radius: 10px;
  font: inherit; font-size: .9rem; cursor: pointer; max-width: 48%; text-align: left;
}
.ov-nav button:hover { border-color: var(--accent); }
.ov-nav .next { margin-left: auto; text-align: right; }
.ov-nav small { display: block; color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; }

/* ---------- Lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.94); display: grid; place-items: center; padding: 24px; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; }
.lb-btn { position: absolute; background: rgba(255,255,255,.08); border: 0; color: #fff; cursor: pointer; border-radius: 50%; width: 48px; height: 48px; font-size: 1.8rem; line-height: 1; }
.lb-btn:hover { background: rgba(255,255,255,.18); }
.lb-close { top: 16px; right: 16px; }
.lb-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 16px; top: 50%; transform: translateY(-50%); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
