/* =========================================================
   Core Variables
   ========================================================= */
:root {
  --bg: #000;
  --bg-alt: #121212;
  --text: #fff;
  --text-dim: #b5b5b5;
  --accent: #2f7fed;
  --accent-hover: #418fff;
  --accent-soft: #173e72;

  --radius-sm: 4px;
  --radius: 8px;
  --radius-lg: 20px;

  --focus-color: #ffffff;
  --focus: 2px solid var(--focus-color);

  --font-stack: "Inter", system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans",
    "Droid Sans", "Helvetica Neue", Arial, sans-serif;

  --transition-fast: 0.25s;
  --transition-med: 0.45s;
  --easing-standard: cubic-bezier(.4,.8,.2,1);
  --easing-spring: cubic-bezier(.19,1,.22,1);
}

/* =========================================================
   Base / Reset
   ========================================================= */
* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font-stack);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--accent); color: #fff; }

main.main-screen {
  flex: 1;
  display: grid;
  place-items: center;
  padding: clamp(2rem, 5vw, 6rem) 1.25rem 8rem;
  position: relative;
}

.center-wrapper {
  text-align: center;
  max-width: 1200px;
  animation: fadeInUp .9s cubic-bezier(.25,.8,.25,1) both;
}

.center-step .center-intro {
  max-width: 60ch;
  margin: 0 auto 2.4rem;
  font-size: 1.05rem;
  line-height: 1.45;
  color: #d6d6d6;
}

/* (Retained for future optional icon use) */
.icon-circle {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  margin: 0 auto 2.5rem;
  background: #fff;
  display: grid;
  place-items: center;
  color: #000;
  position: relative;
  box-shadow: 0 4px 24px -4px rgba(255,255,255,.25),
              0 0 0 1px #111;
  animation: scalePop .6s cubic-bezier(.22,1.25,.36,1) .15s both;
}

.check-icon { display: block; width: 44px; height: 44px; }

.headline {
  font-size: clamp(2.2rem, 5.2vw, 6rem);
  font-weight: 500;
  letter-spacing: .02em;
  margin: 0 0 2.75rem;
  line-height: 1.05;
}

/* =========================================================
   Buttons
   ========================================================= */
.btn-primary,
.btn-nav,
.btn-cta {
  --btn-pad-x: 2.75rem;
  --btn-pad-y: .85rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: var(--btn-pad-y) var(--btn-pad-x);
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  gap: .65rem;
  align-items: center;
  letter-spacing: .5px;
  position: relative;
  box-shadow: 0 6px 16px -6px rgba(47,127,237,.55),
              0 0 0 1px rgba(255,255,255,.07);
  text-decoration: none;
  transition: background var(--transition-fast),
              transform var(--transition-fast),
              box-shadow var(--transition-fast);
}

.btn-primary .arrow, .btn-nav .arrow {
  display: inline-block;
  transition: transform .35s var(--easing-standard);
}

.btn-primary:hover,
.btn-primary:focus-visible,
.btn-nav-primary:hover,
.btn-nav-primary:focus-visible { background: var(--accent-hover); }

.btn-primary:hover .arrow,
.btn-nav-primary:hover .arrow,
.btn-primary:focus-visible .arrow,
.btn-nav-primary:focus-visible .arrow { transform: translateX(6px); }

.btn-primary:active, .btn-nav-primary:active { transform: translateY(1px); }

.btn-primary:focus-visible, .btn-nav-primary:focus-visible {
  outline: var(--focus);
  outline-offset: 2px;
}

.flow-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

.btn-nav {
  --btn-pad-x: 2.1rem;
  font-size: .95rem;
  background: #1d1d1d;
  box-shadow: 0 0 0 1px #292929;
  color: #fff;
  font-weight: 500;
  transition: background var(--transition-fast);
}

.btn-nav:hover, .btn-nav:focus-visible { background: #2a2a2a; }

.btn-nav.disabled, .btn-nav[aria-disabled="true"] { opacity: .4; pointer-events: none; }

.btn-nav-primary {
  background: var(--accent);
  box-shadow: 0 6px 16px -6px rgba(47,127,237,.55),
              0 0 0 1px rgba(255,255,255,.07);
}

.btn-cta {
  --btn-pad-x: 1.3rem;
  font-size: .9rem;
  font-weight: 600;
  padding: .7rem 1.3rem;
  background: #1d1d1d;
  box-shadow: 0 0 0 1px #2b2b2b;
  gap: .55rem;
  transition: background var(--transition-fast),
              color var(--transition-fast);
}

.btn-cta-primary {
  background: linear-gradient(135deg,#2f7fed,#4da4ff);
  box-shadow: 0 4px 16px -6px rgba(56,135,237,.6);
}
.btn-cta-primary:hover, .btn-cta-primary:focus-visible {
  background: linear-gradient(135deg,#3b89f5,#62aeff);
}

.btn-cta-secondary { background: #1d1d1d; }
.btn-cta-secondary:hover, .btn-cta-secondary:focus-visible { background: #272727; }

.btn-cta-icon { font-size: 1rem; line-height: 1; }

.flow-actions.feature-nav-buttons { justify-content: flex-start; margin-top: 2.3rem; }

/* =========================================================
   Feature Slides (Steps 2–6)
   ========================================================= */
.feature-step { padding-top: clamp(2rem, 4vw, 4.5rem); align-items: start; }

.feature-wrapper { width: 100%; max-width: 1900px; margin: 0 auto; animation: fadeInUp .7s ease both; }

.feature-grid {
  display: grid;
  grid-template-columns: minmax(320px,640px) minmax(420px,1fr);
  gap: clamp(3rem, 5vw, 6rem);
  align-items: center;
  width: 100%;
  padding: 0 clamp(1rem,3vw,3.5rem);
}

.feature-text { max-width: 640px; }

.badge {
  display: inline-block;
  background: #ffe28a;
  color: #222;
  font-size: .62rem;
  font-weight: 700;
  padding: .35rem .6rem;
  border-radius: 6px;
  letter-spacing: .75px;
  margin-bottom: 1.2rem;
  vertical-align: middle;
}

.feature-headline {
  font-size: clamp(2.2rem,4.6vw,3.8rem);
  line-height: 1.05;
  margin: 0 0 1.25rem;
  font-weight: 500;
  letter-spacing: .015em;
}
.feature-headline strong { font-weight: 700; }

.feature-body {
  margin: 0 0 1.85rem;
  font-size: 1rem;
  line-height: 1.5;
  color: #d5d5d5;
  max-width: 58ch;
}

.feature-cta { margin: 0 0 1.2rem; }

.feature-media { width: 100%; position: relative; min-height: 320px; }

/* =========================================================
   Single Media Frame
   ========================================================= */
.media-frame {
  position: relative;
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  background: #0f0f0f;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 0 0 1px #252525,
              0 30px 60px -25px rgba(0,0,0,.6),
              0 8px 18px -8px rgba(0,0,0,.8);
  isolation: isolate;
}
.media-frame::before {
  content: "";
  display: block;
  padding-top: var(--media-ratio-padding, 56.25%);
  background: linear-gradient(135deg,#101010,#1a1a1a);
}
.media-el {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block;
  transition: opacity .6s ease, transform 1.2s var(--easing-spring);
  opacity: 0; transform: scale(1.04);
}
.media-frame.is-visible .media-el { opacity: 1; transform: scale(1); }

.media-placeholder {
  width: 100%;
  aspect-ratio: 16/9;
  border: 2px dashed #333;
  border-radius: var(--radius-lg);
  display: grid;
  place-items: center;
  font-size: .9rem;
  color: #666;
}

/* =========================================================
   Client Logo Grid (fixed 140x100 cells, snug & left-aligned)
   ========================================================= */
.client-grid{
  display: grid;
  grid-template-columns: repeat(5, 140px);  /* 5 columns, fixed width */
  grid-auto-rows: 100px;                    /* fixed row height */
  gap: 10px;                                /* spacing between boxes */

  /* Snug and left-aligned */
  width: max-content;                       /* fallback */
  width: fit-content;                       /* preferred */
  max-width: none;
  margin: 0;                                /* remove centering */
  padding: 8px;                             /* slim frame */

  background: #0f0f0f;
  border-radius: var(--radius-lg);
  box-shadow: 0 0 0 1px #252525,
              0 30px 60px -25px rgba(0,0,0,.6),
              0 8px 18px -8px rgba(0,0,0,.8);
}

.client-grid .client-slot{
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 12px;
  background: #161616;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 1px #1f1f1f;
  transition: background .25s, transform .35s var(--easing-spring), box-shadow .25s;
}
.client-grid .client-slot.is-active{
  box-shadow: 0 0 0 2px var(--accent), 0 0 0 1px #1f1f1f inset;
}

.client-grid .client-slot img{
  max-width: 80%;
  max-height: 70%;
  object-fit: contain;
  filter: grayscale(35%) brightness(1.1);
  transition: filter .35s var(--easing-standard), transform .45s var(--easing-spring);
  min-height: 18px;
}
.client-grid .client-slot:hover{ background:#1f1f1f; transform:translateY(-4px); }
.client-grid .client-slot:hover img{ filter:grayscale(0) brightness(1); transform:scale(1.07); }

/* Focus ring (if logos later become links) */
.client-grid .client-slot:focus-within,
.client-grid .client-slot:focus-visible{ outline: 2px solid var(--accent); outline-offset: 3px; }

/* Responsive: keep 140x100 cells; reduce columns */
@media (max-width: 900px){ .client-grid{ grid-template-columns: repeat(4, 140px); } }
@media (max-width: 650px){ .client-grid{ grid-template-columns: repeat(3, 140px); } }
@media (max-width: 460px){ .client-grid{ grid-template-columns: repeat(2, 140px); } }

/* =========================================================
   Client Showcase layout (grid + details panel)
   ========================================================= */
.client-showcase{
  display: flex;
  align-items: flex-start;
  gap: 16px;
  justify-content: flex-start;   /* left-align the row */
}
.client-info{
  flex: 0 0 320px;               /* panel width */
  background: #0f0f0f;
  border-radius: var(--radius-lg);
  box-shadow: 0 0 0 1px #252525,
              0 30px 60px -25px rgba(0,0,0,.6),
              0 8px 18px -8px rgba(0,0,0,.8);
  padding: 16px 18px;
  color: #eaeaea;
}
.client-info .ci-eyebrow{
  font-size: .7rem; letter-spacing: .12em; font-weight: 700; color:#bdbdbd; text-transform: uppercase;
  margin: 2px 0 8px;
}
.client-info .ci-name{ font-size: 1.2rem; font-weight: 700; margin: 0 0 6px; }
.client-info .ci-desc{ font-size: .95rem; color:#cfcfcf; line-height: 1.5; margin: 0 0 12px; }
.client-info .ci-link{ display:inline-flex; align-items:center; gap:.45rem; color:#8fbaff; text-decoration:none; font-weight:600; }
.client-info .ci-link:hover{ color:#b8d3ff; }

/* Stack on narrow viewports: grid above, details below */
@media (max-width: 1100px){
  .client-showcase{ flex-direction: column; align-items: flex-start; }
  .client-info{ width: 100%; max-width: 520px; }
}

/* =========================================================
   Footer & Progress Navigation
   ========================================================= */
.bottom-bar {
  position: relative;
  width: 100%;
  min-height: 80px;
  background: linear-gradient(to bottom,transparent,#111 50%,#0d0d0d);
  border-top: 1px solid #1e1e1e;
  padding: .75rem clamp(1rem,3vw,3rem);
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  font-size: .82rem;
}
.bottom-left, .bottom-right { display: flex; align-items: flex-start; gap: 1.5rem; }

.feature-link {
  --link-pad: .45rem .75rem;
  display: inline-flex; align-items: center; gap: .55rem;
  color: var(--text); text-decoration: none; font-weight: 500;
  padding: var(--link-pad); border-radius: var(--radius); line-height: 1.15;
  transition: background var(--transition-fast);
}
.feature-link:hover, .feature-link:focus-visible { background: #1c1c1c; outline: none; }

.feature-icon {
  display: inline-flex; width: 34px; height: 34px; border-radius: 50%;
  position: relative; background: radial-gradient(circle at 35% 35%, #3ae0ff, #0561b5 70%);
  box-shadow: 0 0 0 1px #0d4d80, 0 0 10px -1px #1da7ff; overflow: hidden;
}
.edge-logo-circle { width: 100%; height: 100%; position: relative; display: block; }
.edge-logo-seg {
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 70% 70%, rgba(255,255,255,.25), transparent 70%),
    radial-gradient(circle at 40% 35%, rgba(255,255,255,.35), transparent 60%);
  mix-blend-mode: overlay;
}

.progress-nav { flex: 1 1 auto; display: flex; justify-content: center; min-width: 320px; }

.progress-nav ol {
  list-style: none; display: flex; gap: clamp(.75rem,3vw,4rem);
  padding: .35rem 1rem 0; margin: 0;
}

.progress-nav li { position: relative; display: flex; flex-direction: column; align-items: center; font-size: .85rem; min-width: 1ch; }

.progress-nav a {
  color: var(--text-dim); text-decoration: none; padding: .25rem .35rem; transition: color var(--transition-fast);
  font-variant-numeric: tabular-nums; border-radius: 6px;
}
.progress-nav a:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px; color: #fff; background: #1f1f1f;
}
.progress-nav li.current a { color: var(--text); font-weight: 600; }
.progress-nav a:hover { color: #fff; }

.progress-nav .underline {
  display: inline-block; width: 82px; max-width: 18vw; height: 2px; background: #2a2a2a;
  margin-top: .3rem; position: relative; overflow: hidden;
}
.progress-nav li.current .underline::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg,var(--accent),#7fb9ff);
  animation: progressStroke 1.2s ease-in-out infinite alternate;
}

.progress-nav li .sub-label { display: none; }
.progress-nav li.current .sub-label {
  display: block; font-size: .7rem; letter-spacing: .5px; margin-top: .55rem;
  color: #00b7ff; font-weight: 600; text-transform: uppercase; white-space: nowrap;
}

.search-form {
  display: flex; align-items: center; gap: .25rem; background: var(--bg-alt); border-radius: 1.25rem;
  padding: .35rem .65rem; border: 1px solid #232323; position: relative; width: clamp(210px,22vw,300px);
  transition: border-color var(--transition-fast), background var(--transition-fast);
}
.search-form:focus-within { border-color: var(--accent); background: #1b1b1b; }
.search-form input {
  flex: 1; background: transparent; border: none; color: var(--text); font: inherit; padding: .35rem .4rem; outline: none; min-width: 0;
}
.search-form input::placeholder { color: #6d6d6d; }
.search-form button {
  background: none; border: none; padding: .25rem; display: grid; place-items: center; cursor: pointer; color: #8a8a8a; transition: color var(--transition-fast);
}
.search-form button:hover, .search-form button:focus-visible { color: #fff; outline: none; }

.legal-links { list-style: none; padding: 0; margin: .25rem 0 0; display: flex; gap: 1rem; flex-wrap: wrap; font-size: .72rem; color: var(--text-dim); }
.legal-links a {
  color: inherit; text-decoration: none; position: relative; padding: .2rem .4rem; border-radius: var(--radius-sm);
  transition: color var(--transition-fast), background var(--transition-fast);
}
.legal-links a:hover, .legal-links a:focus-visible { color: #fff; background: #1e1e1e; outline: none; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* =========================================================
   Responsive Adjustments
   ========================================================= */
@media (max-width: 1400px) {
  .feature-grid { grid-template-columns: minmax(320px,560px) minmax(380px,1fr); }
}
@media (max-width: 1100px) {
  .feature-grid { grid-template-columns: 1fr; gap: 3rem; }
  .feature-media { order: -1; }
  .flow-actions.feature-nav-buttons { justify-content: flex-start; }
}
@media (max-width: 920px) {
  .headline { margin-bottom: 2.2rem; }
  .bottom-bar { flex-direction: column; align-items: stretch; gap: 1.25rem; }
  .progress-nav { order: 3; }
  .bottom-right { flex-direction: column; align-items: stretch; gap: .65rem; }
  .legal-links { order: 4; padding-left: .3rem; }
  .progress-nav ol { gap: 1.4rem; }
  .progress-nav .underline { width: 54px; }
  .feature-grid { padding: 0 1rem; }
}
@media (max-width: 520px) {
  .icon-circle { width: 78px; height: 78px; }
  .check-icon { width: 38px; height: 38px; }
  .btn-primary { --btn-pad-x: 2.1rem; }
  .progress-nav {
    justify-content: flex-start; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: thin;
  }
  .progress-nav ol { padding-left: 0; }
  .feature-headline { font-size: clamp(2.1rem,8vw,3rem); }
  .feature-body { font-size: .95rem; }
}

/* =========================================================
   Animations
   (Disabled in prefers-reduced-motion below)
   ========================================================= */
@keyframes fadeInUp { 0% { opacity: 0; transform: translate3d(0,18px,0); } 100% { opacity: 1; transform: translate3d(0,0,0); } }
@keyframes scalePop { 0% { transform: scale(.6); opacity: 0; } 60% { transform: scale(1.05); opacity: 1; } 100% { transform: scale(1); } }
@keyframes progressStroke { 0% { transform: translateX(-35%); } 100% { transform: translateX(35%); } }

/* =========================================================
   Reduced Motion
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .media-el { opacity: 1 !important; transform: none !important; }
  .progress-nav li.current .underline::after { animation: none !important; }
}

/* =========================================================
   Custom Cursor – Soft Fill Ring (Brighter Variant)
   ========================================================= */
@media (any-pointer: fine) {
  :root {
    --cursor-accent: var(--accent, #2f7fed);
    --cursor-dot-size: 3px;
    --cursor-ring-size: 22px;
    --cursor-ring-interactive-scale: 1.45;
    --cursor-ring-active-scale: 0.55;
    /* Tuning knobs */
    --cursor-base-opacity: 0.68;
    --cursor-hover-opacity: 0.78;
    --cursor-active-opacity: 0.62;
  }

  body:not([data-no-custom-cursor]) {
    cursor: none;
  }

  .cursor-root {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
  }

  .cursor-dot,
  .cursor-ring {
    position: fixed;
    top: 0;
    left: 0;
    transform: translate3d(-50%, -50%, 0);
    pointer-events: none;
    z-index: 9999;
    will-change: transform, opacity, background;
  }

  /* Central dot */
  .cursor-dot {
    width: var(--cursor-dot-size);
    height: var(--cursor-dot-size);
    border-radius: 50%;
    background: radial-gradient(circle at 45% 45%, #ffffff 10%, var(--cursor-accent) 70%);
    box-shadow:
      0 0 4px 1px rgba(47,127,237,.55),
      0 0 9px 4px rgba(47,127,237,.35);
    transition:
      transform .28s cubic-bezier(.19,1,.22,1),
      background .28s,
      box-shadow .4s;
  }

  /* Soft filled ring (brighter, layered radial gradients) */
  .cursor-ring {
    width: var(--cursor-ring-size);
    height: var(--cursor-ring-size);
    border-radius: 50%;
    /* Two stacked gradients for richer center without harsh outer glow */
    background:
      radial-gradient(circle at 50% 50%, rgba(255,255,255,.75) 0%, rgba(255,255,255,0) 52%),
      radial-gradient(circle at 50% 50%, rgba(47,127,237,.60) 0%, rgba(47,127,237,0) 72%);
    mix-blend-mode: screen;
    opacity: var(--cursor-base-opacity);
    transition:
      transform .55s cubic-bezier(.19,1,.22,1),
      opacity .4s,
      background .5s;
  }

  /* Hover / interactive targets */
  body.cursor-interactive .cursor-ring {
    transform: translate3d(var(--cx,0), var(--cy,0), 0) scale(var(--cursor-ring-interactive-scale));
    opacity: var(--cursor-hover-opacity);
    background:
      radial-gradient(circle at 50% 50%, rgba(255,255,255,.85) 0%, rgba(255,255,255,0) 56%),
      radial-gradient(circle at 50% 50%, rgba(47,127,237,.75) 0%, rgba(47,127,237,0) 75%);
  }
  body.cursor-interactive .cursor-dot {
    background: radial-gradient(circle at 50% 50%, #ffffff 15%, var(--cursor-accent) 78%);
    transform: translate3d(var(--cx,0), var(--cy,0), 0) scale(.95);
    box-shadow:
      0 0 5px 2px rgba(255,255,255,.85),
      0 0 14px 6px rgba(47,127,237,.50);
  }

  /* Active press state */
  body.cursor-active .cursor-ring {
    transform: translate3d(var(--cx,0), var(--cy,0), 0) scale(var(--cursor-ring-active-scale));
    opacity: var(--cursor-active-opacity);
    background:
      radial-gradient(circle at 50% 50%, rgba(255,255,255,.70) 0%, rgba(255,255,255,0) 48%),
      radial-gradient(circle at 50% 50%, rgba(47,127,237,.55) 0%, rgba(47,127,237,0) 70%);
  }
  body.cursor-active .cursor-dot {
    transform: translate3d(var(--cx,0), var(--cy,0), 0) scale(.55);
    box-shadow:
      0 0 3px 1px rgba(255,255,255,.9),
      0 0 8px 3px rgba(47,127,237,.45);
  }

  /* Optional soft pulse (very subtle) */
  @keyframes cursorSoftPulse {
    0%,100% { transform: translate3d(var(--cx,0), var(--cy,0), 0) scale(1); opacity: var(--cursor-base-opacity); }
    50%     { transform: translate3d(var(--cx,0), var(--cy,0), 0) scale(1.10); opacity: calc(var(--cursor-base-opacity) + .06); }
  }
  .cursor-ring {
    animation: cursorSoftPulse 2.1s ease-in-out infinite;
  }
}

@media (any-pointer: fine) and (prefers-reduced-motion: reduce) {
  .cursor-ring {
    animation: none !important;
    transform: translate3d(var(--cx,0), var(--cy,0), 0) scale(1) !important;
  }
}
@media (any-pointer: fine) {
  body:not([data-no-custom-cursor]) a,
  body:not([data-no-custom-cursor]) button,
  body:not([data-no-custom-cursor]) .btn-primary,
  body:not([data-no-custom-cursor]) .btn-cta,
  body:not([data-no-custom-cursor]) .btn-nav,
  body:not([data-no-custom-cursor]) .client-slot {
    cursor: none !important;
  }
}

/* ================================
   2x2 Video Grid (Step 4)
   ================================ */
.video-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(.75rem, 1.2vw, 1.4rem);
  align-items: stretch;
}

.video-card {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  position: relative;
}

.video-frame {
  position: relative;
  width: 100%;
  background: #0c1e33;
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  box-shadow: 0 3px 10px -2px rgba(0,0,0,.4);
  isolation: isolate;
}

.video-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient( to bottom, rgba(0,0,0,.15), rgba(0,0,0,.4) 90%);
  opacity: 0;
  transition: opacity .4s;
  pointer-events: none;
}

.video-frame:hover::after,
.video-frame:focus-within::after {
  opacity: .55;
}

.showcase-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(1.05) contrast(1.05);
  transition: transform .65s cubic-bezier(.19,1,.22,1), filter .5s;
}

.video-frame:hover .showcase-video,
.video-frame:focus-within .showcase-video {
  transform: scale(1.035);
  filter: saturate(1.15) contrast(1.08);
}

.video-meta {
  display: flex;
  flex-direction: column;
  font-size: .8rem;
  line-height: 1.35;
  color: var(--text-dim, #8da3bb);
}

.video-label {
  font-weight: 600;
  color: var(--text-strong, #e7eef7);
  font-size: .82rem;
  letter-spacing: .25px;
}

.video-desc {
  font-weight: 400;
  opacity: .9;
}

.video-toggle {
  position: absolute;
  bottom: .55rem;
  left: .55rem;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.5);
  backdrop-filter: blur(5px);
  background: linear-gradient(140deg, rgba(255,255,255,.18), rgba(255,255,255,.05));
  display: grid;
  place-items: center;
  cursor: pointer;
  color: #fff;
  font-size: 0;
  transition: border-color .35s, background .35s, transform .35s;
}

.video-toggle::before {
  content: "▶";
  font-size: 14px;
  transform: translateX(1px);
}

.video-frame.is-playing .video-toggle::before {
  content: "❚❚";
  font-size: 15px;
  transform: translateX(0);
}

.video-frame.is-playing .video-toggle {
  border-color: rgba(255,255,255,.85);
}

.video-toggle:hover,
.video-toggle:focus-visible {
  border-color: #fff;
  background: linear-gradient(140deg, rgba(255,255,255,.3), rgba(255,255,255,.07));
  outline: none;
}

.video-toggle:active {
  transform: scale(.9);
}

@media (max-width: 680px) {
  .video-grid {
    grid-template-columns: 1fr;
  }
  .video-frame {
    aspect-ratio: 16 / 9;
  }
}

/* Respect reduced motion: no scale hover */
@media (prefers-reduced-motion: reduce) {
  .showcase-video {
    transition: filter .35s;
  }
  .video-frame:hover .showcase-video,
  .video-frame:focus-within .showcase-video {
    transform: none;
  }
}
/* NEW */
/* Shared tooltip for screenshot-3d */
.screenshot-3d-wrap {
    position: relative;
    min-height: 44vh;
    margin: 1.5rem auto 2rem;
    width: 100%;
    max-width: 900px;
    display: block;
}

/* Existing groups (unchanged from your working state) */
.screenshot-3d-img-group {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    pointer-events: none;
    transition: opacity .7s cubic-bezier(.77,0,.175,1);
    z-index: 1;
}
.screenshot-3d-img-group.active {
    opacity: 1;
    pointer-events: auto;
    z-index: 2;
}

.screenshot-3d-img {
    max-width: 92vw;
    max-height: 64vh;
    border-radius: 18px;
    display: block;
}

/* NEW: detached tooltip */
.screenshot-3d-tooltip {
    --tooltip-offset-x: -420px; /* Horizontal shift from image center */
    --tooltip-top: 5%;         /* Vertical placement (relative to wrap) */
    position: absolute;
    top: var(--tooltip-top);
    left: 50%;
    transform: translate(calc(-50% + var(--tooltip-offset-x)), 0);
    background: #1d1d1d;
    color: #fff;
    padding: 0.55em 1em;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 6px;
    min-width: 90px;
    text-align: center;
    box-shadow: 0 2px 8px -2px #0005;
    opacity: 0.96;
    transition: opacity .35s ease;
    pointer-events: none;
    z-index: 10;
    white-space: nowrap;
}

.screenshot-3d-tooltip.is-fading {
    opacity: 0;
}

@media (max-width: 1200px) {
    .screenshot-3d-tooltip {
        --tooltip-offset-x: -360px;
    }
}
@media (max-width: 1050px) {
    /* When layout stacks, keep tooltip near image */
    .screenshot-3d-tooltip {
        --tooltip-offset-x: -50%;
        transform: translate(-50%, 0);
        top: 6%;
    }
}
@media (max-width: 680px) {
    .screenshot-3d-img {
        max-width: 98vw;
        max-height: 38vh;
    }
    .screenshot-3d-tooltip {
        font-size: 0.82rem;
        padding: 0.45em 0.75em;
    }
}

/* Step 6 raw video style (remove frame, let video size naturally) */
main[data-step="6"] .media-frame {
  background: transparent;
  box-shadow: none;
  border-radius: 0;
/*  max-width: 740px;          Adjust: increase or remove cap */
  margin: 0 auto;
  padding: 0;
  position: relative;
}

/* Kill the aspect-ratio pseudo element so the container collapses to video */
main[data-step="6"] .media-frame::before {
  display: none;
}

/* Let the video define its own size */
main[data-step="6"] .media-frame .media-el {
  position: static;
  width: 100%;
  height: auto;
  object-fit: contain;       /* Use 'cover' if you want to fill and crop */
  border-radius: 18px;       /* Keep a soft radius (remove if you want square) */
  box-shadow: 0 10px 32px -12px rgba(0,0,0,.55);
  background: #000;
  opacity: 1;                /* Skip the fade-in transform since we removed frame animation */
  transform: none;
}

/* Center the media column content vertically still */
main[data-step="6"] .feature-media {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: auto;
}
/***** Contact Modal (fixed version) *****/
.contact-modal {
  position: fixed;
  inset: 0;
  z-index: 1500;
  display: none;
  font-family: inherit;
}
.contact-modal.is-open { display: block; }

.contact-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(6px);
  animation: cmFade .25s forwards;
  opacity: 0;
}
@keyframes cmFade { to { opacity: 1; } }

.contact-modal__dialog {
  position: relative;
  width: min(560px, 92vw);
  background: #111;
  border: 1px solid #222;
  border-radius: 20px;
  margin: 6vh auto 0;
  padding: 1.75rem 1.85rem 2.1rem;
  box-shadow: 0 20px 48px -18px rgba(0,0,0,.7);
  opacity: 0;
  transform: translateY(18px);
  animation: cmSlide .35s .05s forwards cubic-bezier(.4,.8,.2,1);
}
@keyframes cmSlide { to { opacity: 1; transform: translateY(0); } }

.contact-modal__close {
  position: absolute;
  top: 10px; right: 12px;
  background: #1d1d1d;
  color: #fff;
  border: 0;
  padding: .45rem .7rem;
  font-size: 1.15rem;
  line-height: 1;
  border-radius: 10px;
  cursor: pointer;
}
.contact-modal__close:hover { background:#272727; }

.contact-modal__title {
  margin: 0 0 1rem;
  font-size: clamp(1.55rem,2.2vw,2.05rem);
  font-weight: 600;
  letter-spacing: .5px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: .4rem;
  margin-bottom: 1.05rem;
}
.form-field label {
  font-size: .72rem;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: .12em;
  color: #8d8d8d;
}
.form-field input,
.form-field textarea {
  background: #181818;
  border: 1px solid #262626;
  color: #f5f5f5;
  border-radius: 12px;
  padding: .75rem .9rem;
  font: inherit;
  line-height: 1.35;
  resize: vertical;
  transition: border-color .25s, background .25s;
}
.form-field input:focus,
.form-field textarea:focus {
  outline: 2px solid #2f7fed;
  background: #1e1e1e;
  border-color: #2f7fed;
}

.contact-submit-btn {
  background: linear-gradient(135deg,#2f7fed,#4da4ff);
  border: none;
  color: #fff;
  padding: .85rem 1.5rem;
  border-radius: 14px;
  font-weight: 600;
  cursor: pointer;
  font-size: .95rem;
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  position: relative;
  box-shadow: 0 6px 18px -6px rgba(47,127,237,.55);
  transition: background .3s;
}
.contact-submit-btn:hover,
.contact-submit-btn:focus-visible {
  background: linear-gradient(135deg,#3b89f5,#62aeff);
  outline: none;
}
.contact-submit-btn.is-loading { pointer-events: none; opacity: .8; }

.btn-spinner {
  width: 0; height: 0;
  border: 3px solid transparent;
  border-top-color: #fff;
  border-right-color: #fff;
  border-radius: 50%;
  opacity: 0;
  animation: spin 0.75s linear infinite;
}
.contact-submit-btn.is-loading .btn-spinner {
  width: 18px; height: 18px;
  opacity: 1;
}
@keyframes spin { to { transform: rotate(360deg); } }

.contact-status {
  margin-top: .85rem;
  font-size: .8rem;
  min-height: 1.2em;
  font-weight: 500;
  color: #8bb4ff;
}
.contact-status.error { color: #ff6161; }
.contact-status.success { color: #3ddc74; }

/* BLUR STRATEGY:
   Target only main & footer & header wrappers, not every body child.
   Preserve custom cursor & allow internal layout scripts to function. */
body.modal-open .main-screen,
body.modal-open header,
body.modal-open .bottom-bar {
  filter: blur(6px) brightness(.65);
  transition: filter .35s;
}

/* Keep cursor system working */
body.modal-open .cursor-root { filter: none !important; }

/* Do NOT remove pointer events globally; let underlying be inert by stacking order */
.contact-modal { pointer-events: none; }
.contact-modal__backdrop,
.contact-modal__dialog,
.contact-modal__close,
#contactForm { pointer-events: auto; }

@media (max-width: 620px) {
  .contact-modal__dialog {
    margin-top: 4vh;
    padding: 1.4rem 1.35rem 1.85rem;
    border-radius: 16px;
  }
  .contact-modal__title { font-size: clamp(1.45rem,6.2vw,1.9rem); }
}