:root {
  --bg: #0a0a0a;
  --bg-elevated: #141414;
  --border: #262626;
  --text: #f2f2f2;
  --text-dim: #a3a3a3;
  --accent: #ffffff;
  --max-width: 1180px;
  --font: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

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

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

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo-link img { height: 26px; width: auto; }

.main-nav ul {
  list-style: none;
  display: flex;
  gap: 32px;
  margin: 0;
  padding: 0;
}

.main-nav a {
  text-decoration: none;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  color: var(--text-dim);
  transition: color 0.15s ease;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--text);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.6rem;
  cursor: pointer;
}

@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .main-nav {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
  }
  .main-nav.open { display: block; }
  .main-nav ul {
    flex-direction: column;
    gap: 0;
    padding: 8px 24px 24px;
  }
  .main-nav li { padding: 12px 0; border-bottom: 1px solid var(--border); }
}

/* Page hero with video background (non-homepage pages) */
.page-hero {
  position: relative;
  height: 360px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.page-hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.page-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.45) 50%, rgba(10,10,10,0.85) 100%);
  z-index: 1;
}

.page-hero-content {
  position: relative;
  z-index: 2;
  padding: 0 24px;
}

.page-hero-content h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  margin: 0 0 12px;
  font-weight: 700;
  text-shadow: 0 2px 24px rgba(0,0,0,0.6);
}

.page-hero-content p {
  color: #e5e5e5;
  font-size: 1.05rem;
  max-width: 600px;
  margin: 0 auto;
}

@media (max-width: 720px) {
  .page-hero { height: 300px; }
}

/* Full-bleed hero reel (homepage) */
.hero-reel {
  position: relative;
  height: calc(100vh - 72px);
  min-height: 480px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.hero-reel-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.hero-reel-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.35) 40%, rgba(0,0,0,0.75) 100%);
  z-index: 1;
}

.hero-reel-content {
  position: relative;
  z-index: 2;
  max-width: 760px;
  padding: 0 24px;
}

.hero-reel-content h1 {
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  margin: 0 0 16px;
  font-weight: 700;
  text-shadow: 0 2px 24px rgba(0,0,0,0.6);
}

.hero-reel-content p {
  color: #e5e5e5;
  font-size: 1.15rem;
  margin: 0 auto 32px;
  max-width: 620px;
}

.hero-reel-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-play,
.btn-outline {
  font-family: var(--font);
  font-size: 1rem;
  padding: 14px 28px;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.btn-play {
  background: var(--accent);
  color: #0a0a0a;
  border: none;
  font-weight: 600;
}

.btn-play-icon { font-size: 0.75em; margin-right: 4px; }

.btn-outline {
  background: rgba(255,255,255,0.08);
  color: var(--text);
  border: 1px solid rgba(255,255,255,0.4);
}

.btn-play:hover,
.btn-outline:hover {
  transform: translateY(-2px);
  opacity: 0.9;
}

.mute-toggle {
  position: absolute;
  bottom: 24px;
  right: 24px;
  z-index: 2;
  background: rgba(0,0,0,0.5);
  border: 1px solid rgba(255,255,255,0.3);
  color: var(--text);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.1rem;
  cursor: pointer;
}

@media (max-width: 720px) {
  .hero-reel { height: calc(100vh - 72px); min-height: 560px; }
  .mute-toggle { bottom: 16px; right: 16px; }
}

/* Section headings */
.section {
  padding: 56px 0;
  border-top: 1px solid var(--border);
}

.section h2 {
  font-size: 1.6rem;
  margin: 0 0 8px;
}

.section .section-sub {
  color: var(--text-dim);
  margin: 0 0 32px;
}

/* Reels */
.reel-tabs {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

.reel-tab {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-dim);
  padding: 8px 20px;
  border-radius: 999px;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.reel-tab.active,
.reel-tab:hover {
  color: var(--text);
  border-color: var(--text);
}

.video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.video-frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.reel-video { display: none; }
.reel-video.active { display: block; }

/* Tech modules grid */
.modules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.module-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.module-card:hover {
  border-color: var(--text-dim);
  transform: translateY(-2px);
}

.module-card .video-frame {
  aspect-ratio: 4 / 3;
  border-radius: 0;
  border: none;
  border-bottom: 1px solid var(--border);
}

.module-card .module-name {
  padding: 10px 14px;
  font-size: 0.9rem;
  color: var(--text-dim);
  text-transform: capitalize;
}

/* Lightbox — full-frame, edge-to-edge like the ambient background reels */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 100;
  align-items: center;
  justify-content: center;
}

.lightbox.open { display: flex; }

.lightbox-content {
  width: 100vw;
  height: 100vh;
}

.lightbox-content video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 32px;
  z-index: 101;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: var(--text);
  font-size: 1.6rem;
  cursor: pointer;
  line-height: 1;
}

/* Poster marquee */
.poster-marquee {
  overflow: hidden;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 24px 0;
  background: var(--bg-elevated);
}

.poster-track {
  display: flex;
  gap: 16px;
  width: max-content;
  animation: marquee-scroll 50s linear infinite;
}

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

.poster-track img {
  height: 160px;
  width: auto;
  border-radius: 8px;
  flex-shrink: 0;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@media (max-width: 600px) {
  .poster-track img { height: 110px; }
}

/* Portfolio */
.credit-group {
  margin-bottom: 40px;
}

.credit-group.hidden { display: none; }

.portfolio-filters { flex-wrap: wrap; margin-bottom: 40px; }

.credit-group h3 {
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
  margin-bottom: 16px;
}

.credit-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2px;
}

.credit-item {
  display: grid;
  grid-template-columns: 48px 56px 1fr auto;
  gap: 16px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  align-items: center;
}

.credit-item .thumb {
  width: 48px;
  height: 32px;
  border-radius: 4px;
  overflow: hidden;
  background: transparent;
}

.credit-item .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.credit-item .year { color: var(--text-dim); font-variant-numeric: tabular-nums; }
.credit-item .title { font-weight: 500; }
.credit-item .role { color: var(--text-dim); font-size: 0.9rem; text-align: right; }

@media (max-width: 600px) {
  .credit-item { grid-template-columns: 40px 1fr; gap: 2px 12px; }
  .credit-item .year { grid-column: 2; }
  .credit-item .title { grid-column: 2; }
  .credit-item .role { grid-column: 2; text-align: left; }
  .credit-item .thumb { grid-row: 1 / 4; width: 40px; height: 40px; }
}

/* Services grid (about) */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}

.service-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px;
}

.service-card--image {
  padding-top: 0;
  overflow: hidden;
}

.service-image {
  width: calc(100% + 48px);
  margin: 0 -24px 18px;
  height: 160px;
  object-fit: cover;
  display: block;
}

.service-card h3 {
  margin: 0 0 10px;
  font-size: 1.05rem;
}

.service-card p {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.92rem;
}

.service-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

.service-icon svg { width: 24px; height: 24px; }

.icon-teal    { color: #2dd4bf; background: rgba(45, 212, 191, 0.12); }
.icon-amber   { color: #fbbf24; background: rgba(251, 191, 36, 0.12); }
.icon-violet  { color: #a78bfa; background: rgba(167, 139, 250, 0.12); }
.icon-emerald { color: #34d399; background: rgba(52, 211, 153, 0.12); }
.icon-pink    { color: #f472b6; background: rgba(244, 114, 182, 0.12); }
.icon-blue    { color: #60a5fa; background: rgba(96, 165, 250, 0.12); }

.badge {
  display: inline-block;
  margin-top: 24px;
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.85rem;
  color: var(--text-dim);
}

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
}

.contact-card h3 {
  margin: 0 0 12px;
  font-size: 1.1rem;
}

.contact-card p {
  margin: 0 0 6px;
  color: var(--text-dim);
}

.contact-card a { color: var(--text); text-decoration: underline; }

/* Homepage "Fun" teaser */
.fun-teaser-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.fun-teaser-inner h2 { margin: 0 0 8px; }
.fun-teaser-inner .section-sub { margin: 0; }
.fun-teaser-inner .btn-play { white-space: nowrap; text-decoration: none; display: inline-block; }

/* Contact forms */
.hidden-field { display: none; }

.contact-form {
  display: none;
  flex-direction: column;
  gap: 16px;
  max-width: 560px;
}

.contact-form.active { display: flex; }

.contact-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.contact-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.9rem;
  color: var(--text-dim);
}

.contact-form input,
.contact-form textarea {
  font-family: var(--font);
  font-size: 0.95rem;
  color: var(--text);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--text-dim);
}

.contact-form .btn-play {
  align-self: flex-start;
  border: none;
}

@media (max-width: 600px) {
  .contact-form .form-row { grid-template-columns: 1fr; }
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  color: var(--text-dim);
  font-size: 0.85rem;
  text-align: center;
}
