:root {
  --color-bg: #05070d;
  --color-bg-alt: #0b0f1a;
  --color-surface: #10141f;
  --color-border: rgba(255, 255, 255, 0.08);
  --color-text: #eef1f7;
  --color-text-muted: #93a0b4;
  --color-accent: #0b4975;
  --color-accent-2: #06304f;
  --color-accent-light: #4a86ab;
  --gradient-accent: linear-gradient(120deg, #06304f 0%, #0b4975 55%, #4a86ab 100%);
  --font-sans: "Segoe UI", "Hind", system-ui, -apple-system, sans-serif;
  --container: 1200px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  line-height: 1.5;
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(60% 50% at 15% 10%, rgba(11, 73, 117, 0.30), transparent 60%),
    radial-gradient(50% 40% at 90% 15%, rgba(74, 134, 171, 0.18), transparent 60%),
    radial-gradient(70% 60% at 50% 100%, rgba(11, 73, 117, 0.15), transparent 60%);
  pointer-events: none;
  z-index: 0;
}

body.light-theme {
  --color-bg: #ffffff;
  --color-surface: #f2f5f8;
  --color-border: rgba(11, 73, 117, 0.14);
  --color-text: #0b2536;
  --color-text-muted: #5c7285;
}

body.light-theme::before {
  background:
    radial-gradient(55% 45% at 12% 8%, rgba(11, 73, 117, 0.07), transparent 60%),
    radial-gradient(50% 40% at 92% 20%, rgba(74, 134, 171, 0.09), transparent 60%);
}

body.light-theme .eyebrow { border-color: var(--color-border); }

body.light-theme .socials a { color: var(--color-text-muted); }
body.light-theme .socials a:hover { color: var(--color-accent); background: rgba(11, 73, 117, 0.06); }

/* Several base rules hardcode #fff because they were written for a dark page.
   On white they'd vanish, so they get remapped to the navy accent here. */
body.light-theme .btn-outline:hover { color: var(--color-accent); }
body.light-theme .nav-links a:hover,
body.light-theme .nav-links a.active { color: var(--color-accent); }
body.light-theme .filter-btn:hover { color: var(--color-accent); }

/* The inverse case: these sit on deliberately dark surfaces that do NOT follow
   the page theme — the card's image gradient and the lightbox backdrop — so
   their text has to stay light even though the page is white. */
body.light-theme .portfolio-card .title { color: #fff; }
body.light-theme .lightbox__caption { color: #eef1f7; }
body.light-theme .lightbox__close { color: #b9c6d4; }

/* ---------- Services list ---------- */

.services {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  max-width: 780px;
  margin: 8px 0 40px;
  padding: 0;
  list-style: none;
}

.services li {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 18px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  color: var(--color-accent);
  font-size: 0.85rem;
  font-weight: 500;
}

.services svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (max-width: 640px) {
  .services { gap: 8px; }
  .services li { padding: 8px 14px; font-size: 0.78rem; gap: 7px; }
  .services svg { width: 16px; height: 16px; }
}

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

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

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

/* ---------- Header ---------- */

.site-header {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.04em;
}

.brand img { height: 32px; width: auto; }

.brand-studio {
  color: var(--color-text-muted);
  font-weight: 400;
  font-size: 0.85rem;
  line-height: 1;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  margin-left: 6px;
  padding-left: 10px;
  border-left: 1px solid var(--color-border);
}

.nav-links {
  display: flex;
  gap: 28px;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.nav-links a { transition: color 0.2s ease; }
.nav-links a:hover, .nav-links a.active { color: #fff; }

/* ---------- Coming soon ---------- */

.hero {
  position: relative;
  z-index: 1;
  min-height: calc(100vh - 84px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 40px 24px 80px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
  padding: 8px 18px;
  border-radius: 999px;
  margin-bottom: 32px;
}

.eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-accent-light);
  box-shadow: 0 0 10px 2px rgba(74, 134, 171, 0.7);
}

.hero h1 {
  font-size: clamp(2.4rem, 6vw, 4.6rem);
  line-height: 1.05;
  margin: 0 0 20px;
  font-weight: 800;
  max-width: 16ch;
}

.hero h1 .accent {
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p.lede {
  max-width: 640px;
  color: var(--color-text-muted);
  font-size: clamp(1rem, 2vw, 1.15rem);
  margin: 0 0 44px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: 10px;
  border: none;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--gradient-accent);
  color: #fff;
  box-shadow: 0 8px 24px rgba(11, 73, 117, 0.35);
}

.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 28px rgba(11, 73, 117, 0.45); }

.btn-outline {
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

.btn-outline:hover { border-color: var(--color-accent); color: #fff; }

.cta-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
}

.socials {
  display: flex;
  gap: 16px;
  margin-top: 56px;
}

.socials a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  transition: all 0.2s ease;
}

.socials a:hover {
  color: #fff;
  border-color: var(--color-accent);
  background: rgba(26, 128, 182, 0.12);
}

.socials svg { width: 18px; height: 18px; fill: currentColor; }

.site-footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 24px 0 36px;
  color: var(--color-text-muted);
  font-size: 0.8rem;
}

/* ---------- Portfolio page ---------- */

.page-header {
  position: relative;
  z-index: 1;
  padding: 20px 0 40px;
  text-align: center;
}

.page-header h1 {
  font-size: clamp(2rem, 4.5vw, 3rem);
  margin: 12px 0 12px;
  font-weight: 800;
}

.page-header p {
  color: var(--color-text-muted);
  max-width: 620px;
  margin: 0 auto;
}

.filters {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  padding: 0 24px 40px;
}

.filter-btn {
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-muted);
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-btn:hover { color: #fff; border-color: var(--color-accent); }

.filter-btn.active {
  background: var(--gradient-accent);
  color: #fff;
  border-color: transparent;
}

.portfolio-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 22px;
  padding-bottom: 80px;
}

/* Cards are <button>s: they open the in-page lightbox rather than navigating. */
.portfolio-card {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  aspect-ratio: 4 / 3;
  display: block;
  width: 100%;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.portfolio-card:focus-visible {
  outline: 2px solid var(--color-accent-light);
  outline-offset: 3px;
}

/* Showreel hero: centered above the filters, outside the grid. The descendant
   selectors here are (0,2,0)+, so they outrank the base .portfolio-card rules
   further down the file regardless of source order. */
.showreel {
  position: relative;
  z-index: 1;
  max-width: 880px;
  margin: 0 auto;
  padding: 0 24px 44px;
}

.showreel .portfolio-card {
  aspect-ratio: 16 / 9;
  border-color: var(--color-accent);
}

.showreel .portfolio-card .title { font-size: 1.15rem; }

.showreel .portfolio-card .play-icon {
  opacity: 1;
  transform: scale(1);
  width: 46px;
  height: 46px;
}

.showreel .portfolio-card .play-icon svg { width: 18px; height: 18px; }

.portfolio-card:hover { transform: translateY(-4px); border-color: var(--color-accent); }

.portfolio-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.portfolio-card:hover img { transform: scale(1.06); }

.portfolio-card .overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 18px;
  background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,0.85) 100%);
}

.portfolio-card .cat-tag {
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent-light);
  margin-bottom: 6px;
  font-weight: 600;
}

.portfolio-card .title {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.3;
}

.portfolio-card .play-icon {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.2s ease;
}

.portfolio-card:hover .play-icon,
.portfolio-card:focus-visible .play-icon { opacity: 1; transform: scale(1); }
.portfolio-card .play-icon svg { width: 14px; height: 14px; fill: #fff; }

.empty-state {
  text-align: center;
  color: var(--color-text-muted);
  padding: 60px 0;
  display: none;
}

/* ---------- Lightbox ---------- */

body.no-scroll { overflow: hidden; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
}

.lightbox[hidden] { display: none; }

.lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 5, 10, 0.9);
}

.lightbox__dialog {
  position: relative;
  width: 100%;
  max-width: 1000px;
}

.lightbox__close {
  position: absolute;
  top: -42px;
  right: 0;
  width: 34px;
  height: 34px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-border);
  border-radius: 50%;
  background: transparent;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.lightbox__close:hover { color: #fff; border-color: var(--color-accent-light); }
.lightbox__close svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

/* 16:9 shell so the iframe/video has a size before its metadata arrives. */
.lightbox__frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
}

.lightbox__frame iframe,
.lightbox__frame video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.lightbox__still {
  width: 100%;
  max-height: 78vh;
  object-fit: contain;
  border-radius: 12px;
  background: #000;
}

.lightbox__caption {
  margin: 14px 0 0;
  font-size: 0.9rem;
  color: var(--color-text);
}

.lightbox__cat {
  display: block;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent-light);
  margin-bottom: 4px;
}

@media (max-width: 640px) {
  .lightbox { padding: 20px 14px; }
  .lightbox__close { top: -38px; }
}

@media (max-width: 640px) {
  .site-header { flex-direction: column; gap: 16px; }
  .brand-studio { display: none; }
}
