/* ============================================================
   Interactive Model Studio — dark, media-led theme.
   Loaded after vendor/bootstrap.min.css so these win.
   ============================================================ */

:root {
  --bg:        #08090c;
  --bg-elev:   #0e1016;
  --bg-elev-2: #14171f;
  --line:      rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);

  --text:   #eef1f6;
  --muted:  #9aa3b2;
  --muted-2:#6b7688;

  /* One restrained accent, from the portiekflat LED glow (cool purple/blue). */
  --accent:      #7d6cff;
  --accent-2:    #58d6ff;
  --accent-ink:  #0a0a14;
  --accent-glow: rgba(125, 108, 255, 0.35);

  --wrap: 1180px;
  --nav-h: 66px;

  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;

  --radius: 16px;
  --radius-sm: 11px;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---- base ---- */
* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Ambient glow washes so the near-black never reads as flat/empty. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(1200px 600px at 15% -10%, rgba(125, 108, 255, 0.10), transparent 60%),
    radial-gradient(1000px 700px at 100% 20%, rgba(88, 214, 255, 0.06), transparent 55%);
}

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

a { color: var(--accent); text-decoration: none; }
a:hover { color: #a396ff; }

h1, h2, h3 {
  line-height: 1.08;
  letter-spacing: -0.02em;
  font-weight: 650;
  margin: 0;
}

em { font-style: normal; color: #fff; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: 22px;
}

.muted { color: var(--muted); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  margin: 0 0 18px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: linear-gradient(90deg, var(--accent), transparent);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 10px 16px;
  border-radius: 0 0 10px 0;
  font-weight: 600;
}
.skip-link:focus { left: 0; }

/* ---- buttons ---- */
.btn {
  --_pad-y: 0.72rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  padding: var(--_pad-y) 1.35rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 0.98rem;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform 0.18s var(--ease), box-shadow 0.25s var(--ease),
              background 0.2s var(--ease), border-color 0.2s var(--ease);
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-lg { --_pad-y: 0.95rem; padding-inline: 1.7rem; font-size: 1.05rem; }

.btn-cta {
  background: linear-gradient(180deg, #8a7bff, var(--accent));
  color: #fff;
  box-shadow: 0 8px 24px -8px var(--accent-glow), inset 0 1px 0 rgba(255,255,255,0.25);
}
.btn-cta:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 14px 34px -8px var(--accent-glow), inset 0 1px 0 rgba(255,255,255,0.3);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--line-strong);
  color: var(--text);
  backdrop-filter: blur(4px);
}
.btn-ghost:hover {
  color: #fff;
  border-color: rgba(125, 108, 255, 0.6);
  background: rgba(125, 108, 255, 0.08);
  transform: translateY(-2px);
}

/* ============================ NAV ============================ */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid transparent;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease);
}
.site-nav.is-stuck {
  background: rgba(8, 9, 12, 0.72);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--line);
}
.site-nav__inner {
  max-width: var(--wrap);
  margin-inline: auto;
  height: var(--nav-h);
  padding-inline: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: grid;
  grid-template-columns: auto auto;
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 10px;
  color: var(--text);
  line-height: 1.05;
}
.brand:hover { color: var(--text); }
.brand__mark {
  grid-row: 1 / span 2;
  width: 14px; height: 14px;
  border-radius: 4px;
  background: linear-gradient(150deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 14px var(--accent-glow);
}
.brand__name { font-weight: 650; letter-spacing: -0.01em; }
.brand__role { font-size: 0.72rem; color: var(--muted-2); grid-column: 2; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav-links > a {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 10px;
  transition: color 0.2s, background 0.2s;
}
.nav-links > a:hover { color: var(--text); background: rgba(255,255,255,0.05); }
.nav-links > a.is-current { color: var(--text); }
.nav-cta { margin-left: 8px; padding: 8px 18px !important; color: #fff !important; border-radius: 999px; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 42px; height: 42px;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line);
  border-radius: 11px;
  cursor: pointer;
}
.nav-toggle span {
  width: 18px; height: 2px; border-radius: 2px;
  background: var(--text);
  transition: transform 0.25s var(--ease), opacity 0.2s;
}

/* ============================ HERO ============================ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  padding-bottom: clamp(48px, 9vh, 110px);
  padding-top: calc(var(--nav-h) + 24px);
  margin-top: calc(var(--nav-h) * -1);   /* pull under the transparent nav */
  overflow: hidden;
}
.hero__media { position: absolute; inset: 0; z-index: 0; }
.hero__video {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: saturate(1.05) contrast(1.03);
}
.hero__scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(8,9,12,0.62) 0%, rgba(8,9,12,0.25) 34%, rgba(8,9,12,0.72) 78%, var(--bg) 100%),
    radial-gradient(120% 90% at 20% 90%, rgba(8,9,12,0.55), transparent 60%);
}
.hero__content { position: relative; z-index: 2; max-width: 900px; }
.hero__title {
  font-size: clamp(2.35rem, 6vw, 4.3rem);
  font-weight: 700;
  margin-bottom: 22px;
  text-wrap: balance;
  text-shadow: 0 2px 40px rgba(0,0,0,0.5);
}
.hero__sub {
  font-size: clamp(1.05rem, 1.7vw, 1.3rem);
  color: #d3d8e2;
  max-width: 42em;
  margin: 0 0 32px;
}
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; }

.hero__scroll {
  position: absolute;
  left: 50%; bottom: 22px;
  transform: translateX(-50%);
  z-index: 2;
  width: 26px; height: 42px;
  border: 1.5px solid var(--line-strong);
  border-radius: 14px;
}
.hero__scroll span {
  position: absolute; left: 50%; top: 9px;
  width: 3px; height: 8px; border-radius: 3px;
  background: var(--accent);
  transform: translateX(-50%);
  animation: scrolldot 1.8s var(--ease) infinite;
}
@keyframes scrolldot { 0%{opacity:0;transform:translate(-50%,0)} 30%{opacity:1} 70%{opacity:1} 100%{opacity:0;transform:translate(-50%,14px)} }

/* ========================= SECTIONS ========================= */
.section { padding-block: clamp(72px, 12vh, 140px); position: relative; }
[id] { scroll-margin-top: calc(var(--nav-h) + 14px); }

.section__head { max-width: 900px; margin-bottom: clamp(38px, 5vw, 60px); }
.section__title { font-size: clamp(1.7rem, 3.4vw, 2.7rem); text-wrap: balance; }
.section__closer {
  margin-top: clamp(34px, 4vw, 52px);
  max-width: 60ch;
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
  color: var(--muted);
}
.section--work { background: linear-gradient(180deg, transparent, rgba(255,255,255,0.012) 40%, transparent); }

/* ---- pillars ---- */
.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.pillar {
  background: linear-gradient(180deg, var(--bg-elev), var(--bg-elev-2));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 28px 32px;
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.pillar:hover {
  transform: translateY(-4px);
  border-color: rgba(125,108,255,0.4);
  box-shadow: 0 22px 50px -30px var(--accent-glow);
}
.pillar__icon {
  display: inline-flex;
  width: 50px; height: 50px;
  align-items: center; justify-content: center;
  border-radius: 13px;
  margin-bottom: 20px;
  color: var(--accent);
  background: rgba(125,108,255,0.12);
  border: 1px solid rgba(125,108,255,0.25);
}
.pillar__icon svg { width: 26px; height: 26px; }
.pillar h3 { font-size: 1.28rem; margin-bottom: 10px; }
.pillar p { color: var(--muted); margin: 0; font-size: 0.99rem; }

/* ============================ WORK ============================ */
.work { display: flex; flex-direction: column; gap: clamp(56px, 8vw, 104px); }

.work-item__media { position: relative; }
.media {
  position: relative;
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: #05060a;
  border: 1px solid var(--line);
  box-shadow: 0 40px 90px -50px rgba(0,0,0,0.9);
  aspect-ratio: 16 / 9;
}
.media__el, .media--still img:first-child {
  width: 100%; height: 100%;
  object-fit: cover;
}
.media--still { display: block; }

.media__inset {
  position: absolute;
  right: 4%; bottom: 6%;
  width: 42%;
  max-width: 360px;
  aspect-ratio: auto;
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  box-shadow: 0 26px 60px -22px rgba(0,0,0,0.85);
}

.media__play {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 78px; height: 78px;
  display: flex; align-items: center; justify-content: center;
  border: none;
  border-radius: 50%;
  background: rgba(125,108,255,0.9);
  box-shadow: 0 10px 40px -6px var(--accent-glow);
  color: #fff;
  cursor: pointer;
  transition: transform 0.2s var(--ease), background 0.2s, opacity 0.25s;
}
.media__play svg { width: 34px; height: 34px; fill: currentColor; margin-left: 3px; }
.media__play:hover { transform: scale(1.07); background: var(--accent); }
.media.is-playing .media__play { opacity: 0; pointer-events: none; }

.work-item__caption { margin-top: 22px; max-width: 62ch; }
.work-item__tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.chip {
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 5px 12px;
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line);
}
.chip--accent {
  color: #cfc7ff;
  background: rgba(125,108,255,0.14);
  border-color: rgba(125,108,255,0.35);
}
.work-item__title { font-size: clamp(1.35rem, 2.4vw, 1.9rem); margin-bottom: 10px; }
.work-item__body { color: var(--muted); margin: 0; }

/* Featured project: give the demo more presence on wide screens. */
@media (min-width: 900px) {
  .work-item--feature .work-item__caption {
    max-width: none;
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 8px 48px;
    align-items: start;
  }
  .work-item--feature .work-item__tags { grid-row: 1; }
  .work-item--feature .work-item__title { grid-column: 1; margin: 0; }
  .work-item--feature .work-item__body { grid-column: 2; grid-row: 1 / span 2; font-size: 1.08rem; }
}

/* ============================ HOW ============================ */
.steps {
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  gap: 2px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
}
.step {
  display: flex;
  gap: 22px;
  align-items: baseline;
  padding: 26px clamp(20px, 3vw, 34px);
  background: linear-gradient(180deg, var(--bg-elev), var(--bg-elev-2));
}
.step p { margin: 0; font-size: clamp(1.05rem, 1.7vw, 1.28rem); color: var(--text); }
.step__n {
  flex: none;
  font-size: 1.1rem;
  font-weight: 700;
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 11px;
  color: var(--accent);
  background: rgba(125,108,255,0.1);
  border: 1px solid rgba(125,108,255,0.28);
  translate: 0 -3px;
}

/* ============================ ABOUT ========================== */
.section--about .wrap { max-width: 860px; }
.about__lede {
  font-size: clamp(1.3rem, 2.6vw, 1.9rem);
  line-height: 1.4;
  letter-spacing: -0.01em;
  color: #dfe3ec;
  margin: 0;
  text-wrap: pretty;
}

/* ========================== CONTACT ========================== */
.section--contact {
  text-align: center;
  background:
    radial-gradient(70% 120% at 50% 0%, rgba(125,108,255,0.14), transparent 60%);
}
.section--contact .wrap { max-width: 820px; }
.contact__title { font-size: clamp(1.9rem, 4.4vw, 3.1rem); margin-bottom: 34px; text-wrap: balance; }
.contact__actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}
.contact__email {
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--text);
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 3px;
}
.contact__email:hover { color: var(--accent); border-color: var(--accent); }

/* ========================== FOOTER ========================== */
.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 34px;
  color: var(--muted-2);
  font-size: 0.9rem;
}
.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 24px;
  justify-content: space-between;
}

/* ===================== REVEAL ON SCROLL ===================== */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  will-change: opacity, transform;
}
.reveal.is-visible { opacity: 1; transform: none; }

/* stagger children in a grid/flow when the container is revealed */
.pillars .pillar { transition-delay: calc(var(--i, 0) * 90ms); }

/* ========================= RESPONSIVE ======================= */
@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .brand__role { display: none; }

  .nav-links {
    position: fixed;
    top: var(--nav-h);
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 14px 18px calc(18px + env(safe-area-inset-bottom));
    background: rgba(8,9,12,0.96);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--line);
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
  }
  .site-nav.is-open .nav-links { opacity: 1; transform: none; pointer-events: auto; }
  .site-nav.is-open { background: rgba(8,9,12,0.9); backdrop-filter: blur(14px); border-bottom-color: var(--line); }
  .nav-links > a { padding: 13px 14px; font-size: 1.05rem; }
  .nav-cta { margin: 8px 0 0 !important; text-align: center; }

  .site-nav.is-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .site-nav.is-open .nav-toggle span:nth-child(2) { opacity: 0; }
  .site-nav.is-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .pillars { grid-template-columns: 1fr; }
  .media__play { width: 62px; height: 62px; }
  .media__play svg { width: 27px; height: 27px; }
}

@media (max-width: 520px) {
  .hero { padding-bottom: 42px; }
  .media__inset { width: 46%; right: 3%; bottom: 4%; }
}

/* ===================== MOTION / A11Y ======================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero__scroll span { animation: none; }
  * { transition-duration: 0.001ms !important; }
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}
