:root {
  --bg: #0a0d12;
  --bg-elev: #11151c;
  --bg-elev-2: #181d26;
  --text: #e8eaed;
  --text-dim: #9aa3b2;
  --accent: #09aadf;
  --accent-2: #3fc4f0;
  --accent-soft: rgba(9, 170, 223, 0.12);
  --accent-border: rgba(9, 170, 223, 0.35);
  --border: #1f2530;
  --max: 1180px;
  --radius: 14px;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--accent); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--accent-2); }

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

h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: #fff;
  overflow-wrap: break-word;
  word-wrap: break-word;
}
h1 { font-size: clamp(1.8rem, 5vw, 4rem); }
h2 { font-size: clamp(1.35rem, 3.2vw, 2.4rem); margin-bottom: 1rem; }
h3 { font-size: 1.25rem; margin-bottom: .5rem; }

p { margin-bottom: 1rem; color: var(--text-dim); }
p strong, li strong { color: var(--text); }

ul { margin: 0 0 1rem 1.2rem; color: var(--text-dim); }
li { margin-bottom: .35rem; }

/* ------- Layout ------- */
.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

section { padding: 5rem 0; }
section.tight { padding: 3rem 0; }
section.tight-top { padding-top: 1rem; padding-bottom: 1rem; }
section.tight-top + section { padding-top: 2.5rem; }
.section-elev { background: var(--bg-elev); }
.container.narrow { max-width: 820px; }
.clients-list {
  text-align: center;
  max-width: 920px;
  margin: 0 auto 3rem;
  color: var(--text);
  font-size: 1.05rem;
  line-height: 1.9;
}

/* ------- Header ------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11,13,16,0.85);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  max-width: var(--max);
  margin: 0 auto;
}

.logo {
  display: inline-flex;
  align-items: center;
  height: 52px;
}
.logo img {
  height: 52px;
  width: auto;
  display: block;
}
@media (max-width: 480px) {
  .logo, .logo img { height: 40px; }
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  padding: .25rem;
  cursor: pointer;
  line-height: 0;
}
.nav-toggle svg { display: block; }

.nav {
  display: flex;
  gap: 1.4rem;
  align-items: center;
}
.nav a {
  color: var(--text-dim);
  font-size: 0.95rem;
  font-weight: 500;
}
.nav a:hover, .nav a.active { color: #fff; }
.nav a.cta {
  background: var(--accent);
  color: #fff;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  font-weight: 600;
}
.nav a.cta:hover { background: var(--accent-2); color: #03212d; }

/* dropdown */
.has-sub { position: relative; }
.has-sub > a::after { content: " ▾"; font-size: 0.7em; opacity: 0.7; }
.submenu {
  position: absolute;
  top: 100%;
  left: -1rem;
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.5rem;
  min-width: 220px;
  display: none;
  flex-direction: column;
  gap: 0;
}
.submenu a {
  padding: 0.55rem 0.9rem;
  border-radius: 6px;
  display: block;
}
.submenu a:hover { background: var(--bg-elev); }
.has-sub:hover .submenu { display: flex; }

@media (max-width: 880px) {
  .nav-toggle { display: block; }
  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    flex-direction: column;
    background: var(--bg-elev);
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
    align-items: stretch;
    gap: 0.25rem;
  }
  .nav.open { display: flex; }
  .nav a { padding: 0.65rem 0; }
  .submenu { position: static; display: flex; box-shadow: none; border: none; background: transparent; padding: 0 0 0 1rem; }
  .has-sub:hover .submenu { display: flex; }
}

/* ------- Hero ------- */
.hero {
  padding: 7rem 0 5rem;
  text-align: center;
  background:
    radial-gradient(ellipse at 20% 20%, rgba(9,170,223,0.18), transparent 55%),
    radial-gradient(ellipse at 80% 70%, rgba(63,196,240,0.10), transparent 55%),
    var(--bg);
}
.hero .eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--accent);
  margin-bottom: 1.25rem;
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--accent-border);
  border-radius: 999px;
}
.hero p.lead {
  font-size: 1.15rem;
  max-width: 720px;
  margin: 1.25rem auto 2rem;
  color: var(--text-dim);
}

.btns { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-block;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, background .2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-2); color: #03212d; }
.btn-ghost { background: transparent; color: #fff; border-color: var(--border); }
.btn-ghost:hover { border-color: var(--text-dim); }

/* ------- Page header (smaller) ------- */
.page-head {
  padding: 5rem 0 3rem;
  text-align: center;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(to bottom, rgba(9,170,223,0.08), transparent);
}
.page-head .eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent);
}
.page-head p.lead {
  max-width: 640px;
  margin: 1rem auto 0;
  color: var(--text-dim);
}

/* ------- Sections ------- */
.section-title {
  text-align: center;
  margin-bottom: 3rem;
}
.eyebrow {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent);
}
.section-title .eyebrow { margin-bottom: 0.5rem; }

/* ------- Grid / cards ------- */
.grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
@media (max-width: 480px) {
  .grid { grid-template-columns: 1fr; }
  .container { padding: 0 1.1rem; }
}
.card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: transform .2s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-3px); border-color: var(--accent-border); }
.card h3 { color: #fff; margin-bottom: 0.75rem; }
.card .icon {
  display: inline-flex;
  width: 44px; height: 44px;
  align-items: center; justify-content: center;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 10px;
  font-size: 1.4rem;
  margin-bottom: 1rem;
}
.card a.more {
  display: inline-block;
  margin-top: 0.75rem;
  font-weight: 600;
  font-size: 0.9rem;
}
.card a.more::after { content: " →"; transition: transform .2s ease; display: inline-block; }
.card a.more:hover::after { transform: translateX(3px); }

/* ------- Prose article ------- */
.prose {
  max-width: 760px;
  margin: 0 auto;
}
.prose h2 { margin-top: 2.5rem; }
.prose h3 { margin-top: 1.75rem; }
.prose p, .prose li { font-size: 1.02rem; }
.prose ul { margin-bottom: 1.25rem; }

/* ------- Two-col layout ------- */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}
@media (max-width: 760px) { .two-col { grid-template-columns: 1fr; } }

/* ------- Testimonials ------- */
.quote {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.75rem 2rem;
  margin-bottom: 1.25rem;
}
.quote p { color: var(--text); font-style: italic; margin-bottom: 0.75rem; }
.quote cite { color: var(--text-dim); font-style: normal; font-size: 0.9rem; font-weight: 600; }

/* ------- Stat strip ------- */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1.5rem;
  text-align: center;
  padding: 3rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.stat .num { font-size: 2.4rem; font-weight: 800; color: #fff; }
.stat .lbl { font-size: 0.85rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.1em; }

/* ------- CTA strip ------- */
.cta-strip {
  background: linear-gradient(135deg, rgba(9,170,223,0.20), rgba(63,196,240,0.08));
  border: 1px solid var(--accent-border);
  border-radius: var(--radius);
  padding: 3rem 2rem;
  text-align: center;
  margin: 4rem 0;
}
.cta-strip h2 { color: #fff; }

/* ------- Contact form ------- */
.form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 560px;
  margin: 0 auto;
}
.form input, .form textarea {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.85rem 1rem;
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
}
.form input:focus, .form textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.form textarea { min-height: 140px; resize: vertical; }
.form button { align-self: flex-start; }

.contact-info {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
  margin-top: 2.5rem;
  text-align: center;
}
.contact-info div { min-width: 200px; }
.contact-info .label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-dim);
  margin-bottom: 0.4rem;
}
.contact-info .value {
  font-size: 1.05rem;
  color: #fff;
  font-weight: 600;
}

/* ------- Footer ------- */
.site-footer {
  background: #06080b;
  border-top: 1px solid var(--border);
  padding: 3rem 0 2rem;
  margin-top: 3rem;
  font-size: 0.9rem;
}
.foot-cols {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}
@media (max-width: 760px) { .foot-cols { grid-template-columns: 1fr 1fr; } }
.foot-cols h4 { color: #fff; font-size: 0.9rem; margin-bottom: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; }
.foot-cols a { color: var(--text-dim); display: block; padding: 0.2rem 0; }
.foot-cols a:hover { color: #fff; }
.foot-cols p { color: var(--text-dim); font-size: 0.9rem; }
.foot-cols .logo + p { margin-top: 1rem; }
.site-footer .logo { margin-bottom: 1rem; }
.site-footer .logo img { height: 36px; }
.foot-cta { color: var(--accent); font-weight: 600; }
.foot-sub { font-size: 0.9rem; }
.foot-bottom {
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.85rem;
}

/* ------- Service list (in-page) ------- */
.kit-list {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 2rem;
  margin: 1.5rem 0;
}
.kit-list h3 { margin-top: 0; color: #fff; }
.kit-list ul { margin-left: 1.2rem; }

.tag {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--accent);
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-right: 0.4rem;
  margin-bottom: 0.4rem;
}

/* ------- Work gallery ------- */
.work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.25rem;
}
.work-item {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: #000;
  transition: transform .2s ease, border-color .2s ease;
}
.work-item:hover {
  transform: translateY(-3px);
  border-color: var(--accent-border);
}
.work-item picture, .work-item img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.work-item img {
  object-fit: cover;
  transition: transform .4s ease;
}
.work-item:hover img { transform: scale(1.03); }
.work-item .caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 5.5rem;
  padding: 0 1rem 1rem;
  background: linear-gradient(to top,
    rgba(0,0,0,0.95) 0%,
    rgba(0,0,0,0.75) 40%,
    rgba(0,0,0,0) 100%);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.3;
  text-shadow: 0 2px 6px rgba(0,0,0,0.85), 0 0 2px rgba(0,0,0,0.6);
  text-align: left;
  z-index: 2;
  box-sizing: border-box;
  overflow: hidden;
}
.work-item .caption small {
  display: block;
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  font-weight: 700;
  font-size: 0.78rem;
  color: var(--accent-2);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-shadow: 0 1px 3px rgba(0,0,0,0.85);
}

.feature-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  margin: 1.5rem 0 2rem;
  background: #000;
}
.feature-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.feature-image.natural { aspect-ratio: auto; }
.feature-image.natural img { height: auto; }

/* ------- Video embed ------- */
.video-frame {
  position: relative;
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 30px 80px -20px rgba(9,170,223,0.25), 0 0 0 1px rgba(9,170,223,0.15);
  background: #000;
  aspect-ratio: 16 / 9;
}
.video-frame iframe,
.video-frame .vimeo-facade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.vimeo-facade {
  display: block;
  padding: 0;
  margin: 0;
  background: #000;
  cursor: pointer;
  overflow: hidden;
  font: inherit;
  color: inherit;
}
.vimeo-facade picture,
.vimeo-facade img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.vimeo-facade .vimeo-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
}
.vimeo-facade .vimeo-play::after {
  content: '';
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: rgba(9, 170, 223, 0.92) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23fff'%3E%3Cpath d='M8 5v14l11-7z'/%3E%3C/svg%3E") 56% 50%/40% no-repeat;
  box-shadow: 0 12px 40px rgba(0,0,0,0.55);
  transition: transform .2s ease, background-color .2s ease;
}
.vimeo-facade:hover .vimeo-play::after,
.vimeo-facade:focus-visible .vimeo-play::after {
  transform: scale(1.08);
  background-color: var(--accent-2);
}
.vimeo-facade.is-loading .vimeo-play::after {
  animation: vimeo-pulse 1s ease-in-out infinite;
}
@keyframes vimeo-pulse {
  50% { transform: scale(1.12); opacity: .7; }
}
.video-caption {
  text-align: center;
  margin-top: 0.85rem;
  font-size: 0.95rem;
  color: var(--text-dim);
}

/* ------- Video collections ------- */
.video-collections {
  display: grid;
  gap: 2rem;
  margin: 2.5rem 0 0;
}

.video-collection {
  background: linear-gradient(180deg, rgba(9,170,223,0.08), rgba(9,170,223,0.02));
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  padding: 1.4rem;
}

.video-collection-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  align-items: end;
}

.video-collection-head h3 {
  margin: 0.35rem 0 0;
  font-size: clamp(1.2rem, 2.8vw, 1.8rem);
}

.video-collection-head p {
  margin: 0.45rem 0 0;
  max-width: 46rem;
}

.video-collection-count {
  color: var(--accent-2);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.video-collection-body {
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(260px, 1fr);
  gap: 1.1rem;
}

.video-stage {
  position: relative;
  min-height: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: #050608;
}

.video-stage-media {
  position: relative;
  aspect-ratio: 16 / 9;
  background:
    radial-gradient(circle at top left, rgba(9,170,223,0.22), transparent 40%),
    linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0)),
    #050608;
}

.video-stage-media iframe,
.video-stage-media img,
.video-stage-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.video-stage-media iframe {
  border: 0;
  z-index: 3;
}

.video-stage-media img {
  object-fit: cover;
}

.video-stage-overlay {
  display: flex;
  align-items: end;
  padding: 1.2rem;
  background: linear-gradient(to top, rgba(0,0,0,0.84), rgba(0,0,0,0.10) 55%, rgba(0,0,0,0));
  z-index: 2;
}

.video-stage-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.6rem 0.85rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.video-stage-badge::before {
  content: "";
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 0.25rem rgba(9,170,223,0.18);
}

.video-stage-content {
  padding: 1.25rem 1.25rem 1.35rem;
}

.video-stage-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 0.8rem;
}

.video-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.32rem 0.68rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-2);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.video-stage-content h4 {
  font-size: clamp(1.12rem, 2.2vw, 1.55rem);
  margin-bottom: 0.55rem;
}

.video-stage-content p {
  margin: 0;
}

.video-stage-note {
  margin-top: 0.95rem;
  color: var(--text);
  font-size: 0.93rem;
}

.video-stage-note a {
  font-weight: 600;
}

.video-thumbs {
  display: grid;
  gap: 0.8rem;
  align-content: start;
  max-height: 48rem;
  overflow: auto;
  padding-right: 0.2rem;
}

.video-thumb {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 0.9rem;
  align-items: center;
  width: 100%;
  padding: 0.65rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255,255,255,0.02);
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.video-thumb:hover {
  transform: translateY(-2px);
  border-color: var(--accent-border);
  background: rgba(255,255,255,0.04);
}

.video-thumb.is-active {
  border-color: var(--accent-border);
  background: rgba(9,170,223,0.10);
  box-shadow: inset 0 0 0 1px rgba(9,170,223,0.22);
}

.video-thumb-poster {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  overflow: hidden;
  background: #000;
}

.video-thumb-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-thumb-poster::after {
  content: "Play";
  position: absolute;
  left: 0.55rem;
  bottom: 0.55rem;
  padding: 0.25rem 0.48rem;
  border-radius: 999px;
  background: rgba(0,0,0,0.72);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.video-thumb-text small {
  display: block;
  margin-bottom: 0.2rem;
  color: var(--accent-2);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.video-thumb-text strong {
  display: block;
  color: #fff;
  line-height: 1.35;
  margin-bottom: 0.18rem;
  font-size: 0.98rem;
  white-space: pre-line;
}

.video-thumb-text span {
  display: block;
  color: var(--text-dim);
  font-size: 0.9rem;
  line-height: 1.45;
}

.portfolio-intro {
  max-width: 860px;
  margin: 0 auto 2.5rem;
  text-align: center;
}

.jump-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  margin: 1.5rem 0 0;
}

.jump-links .tag {
  margin: 0;
}

/* ------- Studio mode ------- */
body.studio-mode {
  padding-top: 4.5rem;
}

.studio-toolbar {
  position: sticky;
  top: 0;
  z-index: 250;
  background: rgba(6, 8, 11, 0.95);
  border-bottom: 1px solid var(--accent-border);
  backdrop-filter: blur(12px);
}

.studio-toolbar-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex;
  gap: 0.75rem;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.studio-toolbar-copy {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.studio-toolbar-copy strong {
  color: #fff;
  font-size: 0.92rem;
}

.studio-toolbar-copy span {
  color: var(--text-dim);
  font-size: 0.82rem;
}

.studio-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.studio-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 0.95rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-elev);
  color: #fff;
  font: inherit;
  cursor: pointer;
}

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

.studio-btn.primary {
  background: var(--accent);
  border-color: var(--accent);
}

.studio-btn.primary:hover {
  background: var(--accent-2);
  color: #03212d;
}

.studio-editable {
  outline: 1px dashed transparent;
  outline-offset: 4px;
  transition: outline-color .15s ease, background .15s ease;
}

.studio-editable:hover,
.studio-editable:focus {
  outline-color: var(--accent-border);
  background: rgba(9,170,223,0.08);
}

.studio-editable[contenteditable="true"] {
  cursor: text;
}

.studio-hint {
  display: block;
  color: var(--text-dim);
  font-size: 0.76rem;
  margin-top: 0.35rem;
}

.studio-panel {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  width: min(380px, calc(100vw - 2rem));
  max-height: calc(100vh - 6rem);
  overflow: auto;
  z-index: 260;
  background: rgba(17, 21, 28, 0.98);
  border: 1px solid var(--accent-border);
  border-radius: 16px;
  box-shadow: 0 25px 80px rgba(0,0,0,0.45);
  padding: 1rem;
}

.studio-panel h3 {
  margin-bottom: 0.35rem;
}

.studio-panel p {
  font-size: 0.92rem;
}

.studio-panel-form {
  display: grid;
  gap: 0.8rem;
  margin-top: 1rem;
}

.studio-field {
  display: grid;
  gap: 0.35rem;
}

.studio-field label {
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.studio-field input,
.studio-field textarea {
  width: 100%;
  background: #0b1016;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 10px;
  padding: 0.75rem 0.85rem;
  font: inherit;
}

.studio-field textarea {
  min-height: 96px;
  resize: vertical;
}

.studio-panel-links {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-top: 0.9rem;
}

.studio-panel-playlist {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.studio-section-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.9rem;
  padding-top: 0.9rem;
  border-top: 1px dashed var(--border);
}

.studio-section-controls-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-right: 0.25rem;
}

.studio-panel-playlist h4 {
  margin: 0 0 0.6rem;
  font-size: 0.95rem;
}

.studio-login-wrap {
  max-width: 620px;
  margin: 0 auto;
}

.studio-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem;
}

.studio-card + .studio-card {
  margin-top: 1rem;
}

@media (max-width: 900px) {
  .studio-panel {
    position: static;
    width: auto;
    max-height: none;
    margin: 1rem auto 0;
  }
}

@media (max-width: 920px) {
  .video-collection-body {
    grid-template-columns: 1fr;
  }

  .video-thumbs {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  }
}

@media (max-width: 640px) {
  .video-collection {
    padding: 1rem;
  }

  .video-stage-content {
    padding: 1rem 1rem 1.1rem;
  }

  .video-thumb {
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 0.75rem;
    padding: 0.55rem;
  }
}

@media (max-width: 920px) {
  .video-thumbs {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    overflow-y: visible;
    max-height: none;
    gap: 0.75rem;
    padding: 0.25rem 0.25rem 0.75rem;
    grid-template-columns: none;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }

  .video-thumb {
    display: block;
    flex: 0 0 220px;
    padding: 0;
    gap: 0;
    grid-template-columns: none;
    scroll-snap-align: start;
    overflow: hidden;
  }

  .video-thumb-poster {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 0;
  }

  .video-thumb-text {
    padding: 0.55rem 0.7rem 0.7rem;
  }

  .video-thumb-text span {
    display: none;
  }

  [data-video-description] {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  [data-video-description].is-expanded {
    display: block;
    -webkit-line-clamp: unset;
    overflow: visible;
  }

  .video-desc-toggle {
    appearance: none;
    background: transparent;
    border: none;
    padding: 0;
    margin-top: 0.4rem;
    color: var(--accent);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    text-decoration: underline;
  }
}

/* ------- FAQ ------- */
.faq { display: flex; flex-direction: column; gap: 0.75rem; }
.faq-item {
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.faq-item summary {
  padding: 1.1rem 1.3rem;
  cursor: pointer;
  font-weight: 600;
  color: #fff;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  color: var(--accent);
  font-size: 1.5rem;
  font-weight: 400;
  flex-shrink: 0;
  transition: transform .2s ease;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item summary:hover { background: rgba(255,255,255,0.02); }
.faq-answer {
  padding: 0 1.3rem 1.1rem;
  color: var(--text-dim);
}
.faq-answer p { margin-bottom: 0.5rem; }
.faq-answer p:last-child { margin-bottom: 0; }

/* ------- Form status ------- */
.form-status {
  padding: 1rem;
  border-radius: 8px;
  text-align: center;
  display: none;
}
.form-status.success {
  display: block;
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  color: #fff;
}
.form-status.error {
  display: block;
  background: rgba(255, 80, 80, 0.1);
  border: 1px solid rgba(255, 80, 80, 0.4);
  color: #ffb0b0;
}

/* ------- Portfolio v2 (prototype) ------- */
.portfolio-v2 {
  overflow-x: hidden;
}

.portfolio-v2 .v2-hero {
  padding: 2rem 0 1rem;
  scroll-margin-top: 100px;
}

.portfolio-v2.is-filtered .v2-hero {
  scroll-margin-top: calc(var(--filtered-desc-height, 160px) + 16px);
}

.portfolio-v2 .v2-stage {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 0.85fr);
  gap: 1.25rem;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.portfolio-v2 .v2-stage-media {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #050608;
  width: 100%;
}

.portfolio-v2 .v2-stage-media img,
.portfolio-v2 .v2-stage-media iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.portfolio-v2 .v2-stage-media iframe {
  border: 0;
  z-index: 2;
  background: #050608;
}

.portfolio-v2 .v2-stage-media img {
  object-fit: cover;
  z-index: 1;
}

.portfolio-v2 .v2-stage-media.poster-only iframe {
  visibility: hidden;
  pointer-events: none;
}

.portfolio-v2 .v2-unmute-cta {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.85rem;
  border: 0;
  border-radius: 999px;
  background: rgba(9,170,223,0.95);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0,0,0,0.4);
  animation: v2-unmute-pulse 1.6s ease-out 1;
}

.portfolio-v2 .v2-unmute-cta[hidden] {
  display: none;
}

.portfolio-v2 .v2-unmute-icon {
  font-size: 1.05rem;
  line-height: 1;
}

@keyframes v2-unmute-pulse {
  0% { transform: scale(0.94); opacity: 0; }
  40% { transform: scale(1.04); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

.portfolio-v2 .v2-stage-col {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  align-self: start;
  min-width: 0;
}

.portfolio-v2 .v2-stage-play {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.55rem 0.9rem;
  margin: 0;
  border: 1px solid var(--accent-border);
  border-radius: 10px;
  background: var(--bg-elev-2);
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
  width: 100%;
}

.portfolio-v2 .v2-stage-play[hidden] {
  display: none;
}

.portfolio-v2 .v2-stage-scrubs {
  display: flex;
  gap: 0.5rem;
}

.portfolio-v2 .v2-stage-scrubs[hidden] {
  display: none;
}

.portfolio-v2 .v2-stage-scrub {
  flex: 1 1 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.45rem 0.6rem;
  margin: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-elev-2);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}

.portfolio-v2 .v2-stage-scrub:hover {
  border-color: var(--accent-border);
  color: var(--accent);
}

.portfolio-v2 .v2-scrub-arrows {
  font-size: 1rem;
  line-height: 1;
  color: var(--accent);
  font-weight: 700;
}

.portfolio-v2 .v2-stage-play:hover {
  background: rgba(9,170,223,0.12);
  border-color: var(--accent);
}

.portfolio-v2 .v2-play-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent);
  position: relative;
  flex: 0 0 auto;
}

.portfolio-v2 .v2-play-icon::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 56%;
  transform: translate(-50%, -50%);
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 7px solid #fff;
}

.portfolio-v2 .v2-stage-content {
  padding: 1.25rem 1.25rem 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  align-self: stretch;
  min-height: 0;
}

.portfolio-v2 .v2-stage-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.portfolio-v2 .v2-stage-title {
  margin: 0;
  font-size: clamp(1.1rem, 1.8vw, 1.45rem);
  line-height: 1.25;
  white-space: pre-line;
}

.portfolio-v2 .v2-stage-description {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.95rem;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 7.125rem;
  flex: 0 0 auto;
}

.portfolio-v2 .v2-stage-description.is-expanded {
  display: block;
  -webkit-line-clamp: unset;
  overflow: visible;
  height: auto;
}

.portfolio-v2 .v2-stage-read-more {
  align-self: flex-start;
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
  color: var(--accent);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.portfolio-v2 .v2-stage-read-more:hover {
  color: var(--accent-2);
}

.portfolio-v2 .v2-stage-section {
  margin: auto 0 0;
  color: var(--accent-2);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.portfolio-v2 .v2-stage-share {
  align-self: flex-start;
  margin-top: 0.25rem;
  padding: 0;
  background: transparent;
  border: 0;
  color: var(--text-dim);
  font-size: 0.78rem;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(9,170,223,0.35);
  cursor: pointer;
  transition: color .15s ease;
  display: inline-block;
}

.portfolio-v2 .v2-stage-share:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

.portfolio-v2 .v2-stage-position {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.82rem;
  letter-spacing: 0.02em;
}

.portfolio-v2 .v2-stage-position:empty {
  display: none;
}

.portfolio-v2 .v2-stage-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.portfolio-v2 .v2-stage-nav {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-elev-2);
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, transform .1s ease;
  min-width: 0;
  overflow: hidden;
  text-align: left;
}

.portfolio-v2 .v2-stage-nav-next {
  text-align: right;
}

.portfolio-v2 .v2-nav-arrow {
  flex: 0 0 auto;
  font-size: 1.4rem;
  line-height: 1;
  color: var(--accent-2);
}

.portfolio-v2 .v2-nav-body {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
}

.portfolio-v2 .v2-stage-nav-next .v2-nav-body {
  align-items: flex-end;
}

.portfolio-v2 .v2-nav-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  object-fit: cover;
  background: #050608;
  border: 1px solid var(--border);
}

.portfolio-v2 .v2-nav-thumb:not([src]),
.portfolio-v2 .v2-nav-thumb[src=""] {
  visibility: hidden;
}

.portfolio-v2 .v2-nav-kicker {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  line-height: 1;
}

.portfolio-v2 .v2-nav-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  max-width: 100%;
  word-break: normal;
  overflow-wrap: normal;
}

.portfolio-v2 .v2-stage-nav:hover {
  border-color: var(--accent-border);
  background: rgba(9,170,223,0.15);
}

.portfolio-v2 .v2-stage-nav:active {
  transform: scale(0.98);
}

.portfolio-v2 .v2-stage-nav:disabled,
.portfolio-v2 .v2-stage-nav[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.55;
  background: transparent;
}

.portfolio-v2 .v2-stage-nav:disabled:hover,
.portfolio-v2 .v2-stage-nav[aria-disabled="true"]:hover {
  background: transparent;
  border-color: var(--border);
}

.portfolio-v2 .v2-stage-nav.is-boundary {
  opacity: 0.75;
}

.portfolio-v2 .v2-stage-nav.is-boundary .v2-nav-thumb {
  visibility: hidden;
}

.portfolio-v2 .v2-stage-nav.is-boundary .v2-nav-kicker {
  color: var(--accent-2);
}

.portfolio-v2 .v2-stage-nav.is-boundary .v2-nav-title {
  -webkit-line-clamp: 2;
  font-style: italic;
  color: var(--text);
}

.portfolio-v2 .v2-autoplay {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.85rem;
  color: var(--text-dim);
  cursor: pointer;
  user-select: none;
}

.portfolio-v2 .v2-autoplay input {
  width: 1rem;
  height: 1rem;
  accent-color: var(--accent);
  cursor: pointer;
}

.portfolio-v2 .v2-controls {
  padding: 1rem 0 0.5rem;
}

.portfolio-v2 .v2-controls-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.8rem;
}

.portfolio-v2 .v2-stats {
  display: inline-flex;
  align-items: baseline;
  gap: 0.3rem;
  color: var(--text-dim);
  font-size: 0.9rem;
}

.portfolio-v2 .v2-stats strong {
  color: var(--text);
  font-size: 1.2rem;
  font-weight: 800;
}

.portfolio-v2 .v2-search {
  position: relative;
  flex: 1 1 240px;
  min-width: 200px;
  max-width: 420px;
}

.portfolio-v2 .v2-search input {
  width: 100%;
  padding: 0.6rem 2rem 0.6rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-elev-2);
  color: var(--text);
  font: inherit;
}

.portfolio-v2 .v2-search input:focus {
  outline: none;
  border-color: var(--accent-border);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.portfolio-v2 .v2-search-clear {
  position: absolute;
  right: 0.35rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.6rem;
  height: 1.6rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-dim);
  font-size: 1.1rem;
  cursor: pointer;
}

.portfolio-v2 .v2-sections-label {
  flex: 1 1 100%;
  margin-top: 0.3rem;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--accent-2);
}

.portfolio-v2 .v2-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  flex: 1 1 100%;
}

.portfolio-v2 .v2-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 0.5rem;
  padding: 0.55rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-elev-2);
  color: var(--text);
  font-size: 0.98rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease, transform .15s ease;
}

.portfolio-v2 .v2-chip:hover {
  border-color: var(--accent-border);
  transform: translateY(-1px);
}

.portfolio-v2 .v2-chip.is-active {
  background: var(--accent-soft);
  border-color: var(--accent-border);
  box-shadow: inset 0 0 0 1px var(--accent-border);
}

.portfolio-v2 .v2-chip-count {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--accent-2);
  padding: 0.1rem 0.45rem;
  background: rgba(9,170,223,0.12);
  border-radius: 999px;
}

.portfolio-v2 .v2-chip.is-active .v2-chip-count {
  background: rgba(9,170,223,0.22);
}

.portfolio-v2 .v2-section-desc {
  flex: 1 1 100%;
  margin-top: 0.35rem;
  padding: 0.65rem 0.9rem;
  background: var(--bg-elev-2);
  border: 1px dashed var(--border);
  border-radius: 10px;
  color: var(--text-dim);
  font-size: 0.92rem;
  line-height: 1.5;
  scroll-margin-top: 12px;
}

.portfolio-v2.is-filtered .video-collection-head {
  display: none;
}

@media (max-width: 720px) {
  .portfolio-v2.is-filtered .v2-controls {
    padding-bottom: 0;
  }
  .portfolio-v2.is-filtered .v2-section-desc {
    position: fixed;
    top: max(72px, var(--site-header-height, 72px));
    left: 0;
    right: 0;
    z-index: 50;
    margin: 0;
    padding: 0.7rem 0.9rem;
    background: var(--bg);
    border: 0;
    border-bottom: 1px solid var(--accent-border);
    border-radius: 0;
    color: var(--text);
    box-shadow: 0 6px 14px rgba(0,0,0,0.35);
    font-size: 0.9rem;
    line-height: 1.4;
  }
  .portfolio-v2.is-filtered .v2-section-desc-body {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .portfolio-v2.is-filtered .v2-section-desc-title {
    display: block;
    font-weight: 700;
    font-size: 1.05rem;
    color: #fff;
    margin-bottom: 0.25rem;
  }
  .portfolio-v2.is-filtered section.tight {
    padding-top: var(--filtered-desc-height, 130px);
  }
  .portfolio-v2.is-filtered section.tight {
    padding: 0 0 0.5rem;
  }
  .portfolio-v2.is-filtered .video-collections,
  .portfolio-v2.is-filtered .video-collection,
  .portfolio-v2.is-filtered .video-collection-body {
    padding: 0;
    margin: 0;
  }
  .portfolio-v2.is-filtered .video-collection + .video-collection {
    border-top: 0;
  }
  .portfolio-v2.is-filtered .v2-rail-wrap {
    margin: 0;
  }
  .portfolio-v2.is-filtered .video-thumbs {
    padding-top: 0.4rem;
    padding-bottom: 0.4rem;
  }
}

.v2-thumb-popover {
  position: fixed;
  max-width: 280px;
  padding: 0.75rem 0.9rem;
  background: var(--bg-elev-2);
  border: 1px solid var(--accent-border);
  border-radius: 10px;
  box-shadow: 0 12px 28px rgba(0,0,0,0.5);
  z-index: 300;
  pointer-events: none;
  font-size: 0.88rem;
  opacity: 1;
}

.v2-thumb-popover[hidden] {
  display: none;
}

.v2-pop-meta {
  color: var(--accent-2);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

.v2-pop-meta:empty {
  display: none;
}

.v2-pop-title {
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  margin-bottom: 0.35rem;
}

.v2-pop-desc {
  color: var(--text-dim);
  line-height: 1.4;
  font-size: 0.82rem;
}

.v2-pop-desc:empty {
  display: none;
}

@media (hover: none) and (pointer: coarse) {
  .v2-thumb-popover {
    display: none !important;
  }
}

/* Collapse per-section stage and compact each row */
.portfolio-v2 .video-collection {
  padding: 0.8rem 0;
  border: 0;
  background: transparent;
}

.portfolio-v2 .video-collection + .video-collection {
  border-top: 1px solid var(--border);
}

.portfolio-v2 .video-collection-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 0.6rem;
  padding: 0 0.2rem;
}

.portfolio-v2 .video-collection-head h3 {
  margin: 0;
  font-size: 1.05rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.portfolio-v2 .v2-section-info {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.1rem;
  height: 1.1rem;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: transparent;
  color: var(--text-dim);
  font-size: 0.72rem;
  font-weight: 700;
  font-style: italic;
  font-family: Georgia, serif;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: color .15s ease, border-color .15s ease, background .15s ease;
}

.portfolio-v2 .v2-section-info:hover,
.portfolio-v2 .v2-section-info:focus-visible,
.portfolio-v2 .v2-section-info.is-open {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(9,170,223,0.08);
  outline: none;
}

.portfolio-v2 .v2-section-popover {
  position: absolute;
  z-index: 60;
  max-width: 340px;
  padding: 0.7rem 0.9rem;
  background: var(--bg-elev-2);
  border: 1px solid var(--accent-border);
  border-radius: 10px;
  color: var(--text);
  font-size: 0.88rem;
  line-height: 1.5;
  box-shadow: 0 8px 24px rgba(0,0,0,0.45);
}

.portfolio-v2 .v2-section-popover[hidden] { display: none; }

.portfolio-v2 .video-collection-head .eyebrow,
.portfolio-v2 .video-collection-head p {
  display: none;
}

.portfolio-v2 .video-collection-head p[contenteditable="true"] {
  display: block;
  margin: 0.25rem 0 0;
  font-size: 0.88rem;
  color: var(--text-dim);
  max-width: 60ch;
}

.portfolio-v2 .video-collection-count {
  font-size: 0.8rem;
  color: var(--text-dim);
}

.portfolio-v2 .video-collection-body {
  display: block;
  padding: 0;
}

.portfolio-v2 .video-stage {
  display: none !important;
}

.portfolio-v2 .v2-rail-wrap {
  position: relative;
  min-width: 0;
  max-width: 100%;
}

.portfolio-v2 .video-collections {
  min-width: 0;
  max-width: 100%;
}

.portfolio-v2 .video-collection {
  min-width: 0;
  max-width: 100%;
}

.portfolio-v2 .video-collection-body {
  min-width: 0;
  max-width: 100%;
  overflow: visible;
}

.portfolio-v2 .v2-rail-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
  scroll-padding-inline: 1rem;
  min-width: 0;
  max-width: 100%;
}

.portfolio-v2 .v2-rail-scroll::-webkit-scrollbar {
  height: 8px;
}

.portfolio-v2 .v2-rail-scroll::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

.portfolio-v2 .v2-rail-scroll::-webkit-scrollbar-thumb:hover {
  background: var(--accent-border);
}

.portfolio-v2 .video-thumbs {
  display: inline-flex !important;
  flex-direction: row;
  flex-wrap: nowrap;
  max-height: none;
  gap: 0.6rem;
  padding: 0.25rem 1rem 0.75rem;
  grid-template-columns: none;
}

.portfolio-v2 .v2-rail-arrow {
  position: absolute;
  top: 40%;
  transform: translateY(-50%);
  z-index: 5;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid var(--accent-border);
  background: rgba(11,13,16,0.85);
  color: #fff;
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  opacity: 0.85;
  transition: opacity .15s ease, transform .15s ease, background .15s ease;
  box-shadow: 0 6px 18px rgba(0,0,0,0.5);
}

.portfolio-v2 .v2-rail-arrow[hidden] {
  display: none;
}

.portfolio-v2 .v2-rail-arrow:hover,
.portfolio-v2 .v2-rail-arrow:focus-visible {
  opacity: 1;
  background: rgba(9,170,223,0.4);
  transform: translateY(-50%) scale(1.08);
}

.portfolio-v2 .v2-rail-arrow-left { left: 0.35rem; }
.portfolio-v2 .v2-rail-arrow-right { right: 0.35rem; }

.portfolio-v2 .video-thumb {
  display: block !important;
  flex: 0 0 200px !important;
  width: 200px !important;
  min-width: 200px !important;
  max-width: 200px !important;
  padding: 0;
  gap: 0;
  grid-template-columns: none;
  scroll-snap-align: start;
  overflow: hidden;
  border-radius: 10px;
  position: relative;
  touch-action: manipulation;
}

.portfolio-v2 .video-thumb-poster {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 0;
  overflow: hidden;
  position: relative;
}

.v2-preview-card {
  position: fixed;
  z-index: 1000;
  width: 420px;
  max-width: calc(100vw - 24px);
  background: var(--bg-elev-2);
  border: 1px solid var(--accent-border);
  border-radius: 14px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.65);
  overflow: hidden;
  opacity: 0;
  transform: translateY(4px) scale(0.97);
  transform-origin: center top;
  transition: opacity .16s ease, transform .16s ease;
  pointer-events: none;
  font-family: Inter, system-ui, sans-serif;
}

.v2-preview-card.is-open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.v2-preview-card[hidden] { display: none; }

.v2-preview-card-poster {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #050608;
  display: block;
  overflow: hidden;
}

.v2-preview-card-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.v2-preview-card-body {
  padding: 0.85rem 1rem 1rem;
  color: var(--text);
}

.v2-preview-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.35rem;
  color: var(--accent-2);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.v2-preview-card-title {
  margin: 0 0 0.4rem;
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.3;
  color: #fff;
  white-space: pre-line;
}

.v2-preview-card-desc {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--text-dim);
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.v2-preview-card-close {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(0,0,0,0.55);
  color: #fff;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
  display: none;
}

.v2-preview-card-close:hover {
  background: rgba(0,0,0,0.75);
}

.v2-preview-card-play {
  margin-top: 0.7rem;
  padding: 0.55rem 0.9rem;
  border: 1px solid var(--accent-border);
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  display: none;
}

.v2-preview-card-play:hover { background: var(--accent-2); }

@media (hover: none) and (pointer: coarse), (max-width: 720px) {
  .v2-preview-card {
    position: fixed !important;
    top: auto !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 16px 16px 0 0;
    transform: translateY(12px) scale(1);
    max-height: 55vh;
    overflow-y: auto;
  }
  .v2-preview-card.is-open { transform: translateY(0) scale(1); }
  .v2-preview-card-close,
  .v2-preview-card-play { display: inline-flex; align-items: center; justify-content: center; }
  .v2-preview-card-desc {
    -webkit-line-clamp: 12;
  }
}

.portfolio-v2 .video-thumb-poster::after {
  content: none;
}

.portfolio-v2 .video-thumb-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  -webkit-user-drag: none;
  user-select: none;
  -webkit-touch-callout: none;
  display: block;
}

.portfolio-v2 .video-thumb-text {
  display: block;
  padding: 0.5rem 0.65rem 0.65rem;
}

.portfolio-v2 .video-thumb-text span {
  display: none;
}

.portfolio-v2 [hidden] {
  display: none !important;
}

@media (max-width: 720px) {
  .portfolio-v2 .v2-stage {
    grid-template-columns: 1fr;
  }
  .portfolio-v2 .v2-stage-description {
    height: auto;
    min-height: 0;
  }
  .portfolio-v2 .v2-hero {
    position: static;
  }
  .portfolio-v2 .v2-controls {
    position: static;
    backdrop-filter: none;
  }
  .portfolio-v2 .v2-filters {
    flex: 1 1 100%;
  }
  .portfolio-v2 .video-thumb {
    flex: 0 0 180px !important;
    width: 180px !important;
    min-width: 180px !important;
    max-width: 180px !important;
  }
}

/* ------- Page-edit Studio (page-edit.js) ------- */
.pe-toolbar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 10000;
  background: rgba(11,13,16,0.96);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-top: 1px solid var(--accent-border);
  font-family: var(--font-sans);
  font-size: 0.9rem;
}
.pe-toolbar-inner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 1rem;
  max-width: 1400px;
  margin: 0 auto;
  flex-wrap: wrap;
}
.pe-badge {
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 0.7rem;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.pe-page {
  color: var(--text-dim);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.8rem;
}
.pe-btn {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  padding: 0.4rem 0.85rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: background .15s ease, border-color .15s ease;
}
.pe-btn:hover:not(:disabled) {
  border-color: var(--accent);
  color: #fff;
}
.pe-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.pe-btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.pe-btn-primary:hover:not(:disabled) {
  background: var(--accent-2);
  border-color: var(--accent-2);
}
.pe-btn-active {
  background: #ffaf3a;
  border-color: #ffaf3a;
  color: #14181f;
}
.pe-btn-ghost { color: var(--text-dim); }
.pe-status {
  margin-left: auto;
  color: var(--text-dim);
  font-size: 0.8rem;
}
.pe-status-dirty { color: #ffaf3a; }
.pe-status-busy { color: var(--accent-2); }

/* Edit mode visual cues */
body.pe-editing { padding-bottom: 70px; }
body.pe-editing .pe-editable {
  outline: 1px dashed rgba(9,170,223,0.45);
  outline-offset: 4px;
  border-radius: 2px;
  cursor: text;
  transition: outline-color .15s ease, background-color .15s ease;
}
body.pe-editing picture.pe-editable { cursor: pointer; }
body.pe-editing .pe-editable:hover {
  outline-color: var(--accent);
  background-color: rgba(9,170,223,0.06);
}
body.pe-editing .pe-editable:focus {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

/* Image-swap modal */
.pe-modal {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 10001;
  display: grid;
  place-items: center;
  padding: 2rem 1rem;
  overflow-y: auto;
}
.pe-modal-content {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 12px;
  width: 100%;
  max-width: 720px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-family: var(--font-sans);
}
.pe-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}
.pe-modal-head h3 {
  margin: 0;
  font-size: 1.05rem;
  color: #fff;
}
.pe-modal-close {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}
.pe-modal-close:hover { color: #fff; }
.pe-modal-body {
  padding: 1rem 1.25rem;
  overflow-y: auto;
  flex: 1;
}
.pe-modal-row { margin-bottom: 1.25rem; }
.pe-modal-row label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.pe-modal-alt {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.6rem 0.75rem;
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
  resize: vertical;
}
.pe-modal-current {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 0.6rem;
}
.pe-modal-current code {
  background: rgba(255,255,255,0.05);
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  font-size: 0.78rem;
}
.pe-asset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.6rem;
  max-height: 350px;
  overflow-y: auto;
  padding: 0.25rem;
}
.pe-asset {
  background: transparent;
  border: 2px solid var(--border);
  border-radius: 6px;
  padding: 0;
  cursor: pointer;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color .15s ease;
}
.pe-asset:hover { border-color: var(--accent); }
.pe-asset.pe-asset-selected { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(9,170,223,0.3); }
.pe-asset img {
  display: block;
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
}
.pe-asset span {
  padding: 0.4rem 0.5rem;
  font-size: 0.7rem;
  color: var(--text-dim);
  text-align: left;
  word-break: break-word;
}
.pe-modal-foot {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 0.6rem;
  justify-content: flex-end;
}

/* ------- Portfolio section embed (portfolio-section.js) ------- */
.ps-collection {
  margin: 2.5rem 0 3rem;
}
.ps-collection-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: #fff;
  margin: 0 0 1rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.ps-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 20px 60px -25px rgba(9,170,223,0.25);
}
.ps-stage-facade,
.ps-iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.ps-stage-facade {
  display: block;
  padding: 0;
  margin: 0;
  background: #000;
  cursor: pointer;
  overflow: hidden;
  font: inherit;
  color: inherit;
}
.ps-stage-facade img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ps-stage-facade .ps-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
}
.ps-stage-facade .ps-play::after {
  content: '';
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(9, 170, 223, 0.92) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23fff'%3E%3Cpath d='M8 5v14l11-7z'/%3E%3C/svg%3E") 56% 50%/40% no-repeat;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  transition: transform .18s ease, background-color .18s ease;
}
.ps-stage-facade:hover .ps-play::after,
.ps-stage-facade:focus-visible .ps-play::after {
  transform: scale(1.08);
  background-color: var(--accent-2);
}
.ps-current {
  margin: 0.85rem 0 1rem;
  color: var(--text-dim);
  font-size: 0.95rem;
  line-height: 1.4;
}
.ps-current-title {
  color: #fff;
  font-weight: 600;
  margin-right: 0.6rem;
}
.ps-current-year {
  color: var(--accent);
  font-weight: 500;
  font-size: 0.85rem;
}
.ps-current-year:empty { display: none; }

.ps-thumbs {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(140px, 1fr);
  gap: 0.5rem;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0.25rem 0 1rem;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: var(--accent) var(--bg-elev);
}
.ps-thumbs::-webkit-scrollbar { height: 6px; }
.ps-thumbs::-webkit-scrollbar-track { background: var(--bg-elev); }
.ps-thumbs::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 3px; }

.ps-thumb {
  display: flex;
  flex-direction: column;
  background: transparent;
  border: 2px solid var(--border);
  border-radius: 8px;
  padding: 0;
  cursor: pointer;
  overflow: hidden;
  text-align: left;
  font: inherit;
  color: inherit;
  scroll-snap-align: start;
  transition: border-color .15s ease, transform .15s ease;
}
.ps-thumb:hover {
  border-color: var(--accent);
}
.ps-thumb.is-active {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(9,170,223,0.3);
}
.ps-thumb-poster {
  display: block;
  width: 100%;
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, #1a1f2a 0%, #252b38 100%);
  overflow: hidden;
}
.ps-thumb-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ps-thumb-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.45rem 0.55rem 0.55rem;
  min-height: 50px;
}
.ps-thumb-title {
  font-size: 0.78rem;
  font-weight: 600;
  color: #fff;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ps-thumb-year {
  font-size: 0.7rem;
  color: var(--text-dim);
}
.ps-empty {
  color: var(--text-dim);
  font-style: italic;
  font-size: 0.9rem;
}

/* Studio page picker (studio.html) */
.studio-pages {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.6rem;
  margin-top: 1rem;
}
.studio-page-link {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.85rem 1rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: border-color .15s ease, background .15s ease;
}
.studio-page-link:hover {
  border-color: var(--accent);
  background: rgba(9,170,223,0.08);
  color: #fff;
}
.studio-page-link small {
  font-weight: 400;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.75rem;
  color: var(--text-dim);
}
