

  /* Desktop: overlay hidden, main always visible */
#vi-overlay { display: none; }
#vi-main    { display: contents; }

@media (max-width: 768px) {

  /* ── Overlay: full viewport, above everything ── */
  #vi-overlay {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: #0a0a0a;
    overflow: hidden;
  }

  /* When overlay is gone, restore normal scroll */
  body.vi-done {
    overflow: auto;
  }

  /* While overlay active: hide main content + freeze page scroll */
  body:not(.vi-done) {
    overflow: hidden;
  }

  /* ── Video fills screen ── */
  #vi-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    z-index: 1;
    display: block;
  }

  /* ── Progress bar ── */
  #vi-progress {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 2px;
    background: rgba(245,243,239,0.1);
    z-index: 10;
  }
  #vi-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, rgba(181,242,61,0.6), #b5f23d);
    transition: width 0.25s linear;
  }

  /* ── Bottom gradient ── */
  #vi-grad {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 45%;
    background: linear-gradient(to top, rgba(10,10,10,0.78) 0%, transparent 100%);
    z-index: 2;
    pointer-events: none;
  }

  /* ── Grain overlay ── */
  #vi-grain {
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
    opacity: 0.04;
    z-index: 3;
    pointer-events: none;
  }

  /* ── Logo watermark ── */
  #vi-logo {
    position: absolute;
    top: 24px; left: 20px;
    z-index: 11;
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 800;
    font-size: 13px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: rgba(245,243,239,0.5);
    animation: viFadeIn 1s ease 0.4s both;
  }

  /* ── Sound button ── */
  #vi-sound {
    position: absolute;
    top: 20px; right: 20px;
    z-index: 11;
    background: none;
    border: none;
    padding: 6px;
    cursor: pointer;
    color: rgba(245,243,239,0.4);
    transition: color 0.2s;
    animation: viFadeIn 1s ease 0.8s both;
  }
  #vi-sound:hover { color: rgba(245,243,239,0.8); }
  #vi-sound svg { width: 18px; height: 18px; display: block; }
  #vi-sound .vi-wave { transition: opacity 0.3s; }
  #vi-sound.vi-muted .vi-wave { opacity: 0.15; }

  /* ── CTA block ── */
  #vi-cta {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    z-index: 12;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-bottom: 48px;
    opacity: 0;
    transform: translateY(18px);
    pointer-events: none;
    transition: opacity 0.7s cubic-bezier(0.22,1,0.36,1),
                transform 0.7s cubic-bezier(0.22,1,0.36,1);
  }
  #vi-cta.vi-show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  /* eyebrow text */
  #vi-eyebrow {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 9px;
    letter-spacing: 0.26em;
    text-transform: uppercase;
    color: rgba(245,243,239,0.38);
    margin-bottom: 16px;
    opacity: 0;
    transform: translateY(5px);
    transition: opacity 0.5s ease 0.2s, transform 0.5s ease 0.2s;
  }
  #vi-cta.vi-show #vi-eyebrow {
    opacity: 1;
    transform: translateY(0);
  }

  /* ── The Button ── */
  #vi-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 0 32px;
    height: 54px;
    background: transparent;
    border: 1.5px solid rgba(245,243,239,0.22);
    cursor: pointer;
    overflow: hidden;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    animation: viPulse 2.8s ease-in-out infinite;
  }

  @keyframes viPulse {
    0%,100% { border-color: rgba(245,243,239,0.22); box-shadow: 0 0 0 0 rgba(181,242,61,0); }
    50%      { border-color: rgba(181,242,61,0.45);  box-shadow: 0 0 20px 0 rgba(181,242,61,0.1); }
  }

  /* sweep fill */
  #vi-btn-fill {
    position: absolute;
    inset: 0;
    background: #f5f3ef;
    transform: translateX(-101%);
    transition: transform 0.42s cubic-bezier(0.77,0,0.18,1);
    pointer-events: none;
  }
  #vi-btn:active #vi-btn-fill { transform: translateX(0); }

  /* left accent bar */
  #vi-btn::after {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 3px;
    background: #b5f23d;
    transform: scaleY(0);
    transform-origin: bottom;
    transition: transform 0.32s cubic-bezier(0.77,0,0.18,1);
  }
  #vi-btn:active::after { transform: scaleY(1); }

  /* corner ticks */
  .vi-corner {
    position: absolute;
    width: 7px; height: 7px;
    border-color: #ffffff;
    border-style: solid;
    opacity: 0.55;
    pointer-events: none;
  }
  .vi-tl { top: -1px; left: -1px;   border-width: 1.5px 0 0 1.5px; }
  .vi-tr { top: -1px; right: -1px;  border-width: 1.5px 1.5px 0 0; }
  .vi-bl { bottom: -1px; left: -1px;  border-width: 0 0 1.5px 1.5px; }
  .vi-br { bottom: -1px; right: -1px; border-width: 0 1.5px 1.5px 0; }

  /* label */
  .vi-btn-label {
    position: relative;
    z-index: 1;
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: #f5f3ef;
    white-space: nowrap;
    transition: color 0.32s ease;
  }
  #vi-btn:active .vi-btn-label { color: #0a0a0a; }

  /* arrows */
  .vi-arrows {
    position: relative;
    z-index: 1;
    display: flex;
    gap: 2px;
    align-items: center;
  }
  .vi-arrows span {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 15px;
    color: #b5f23d;
    display: inline-block;
    transition: color 0.32s ease, transform 0.32s ease;
  }
  .vi-arrows span:nth-child(1) { opacity: 0.35; }
  .vi-arrows span:nth-child(2) { opacity: 0.65; }
  .vi-arrows span:nth-child(3) { opacity: 1; }
  #vi-btn:active .vi-arrows span { color: #0a0a0a; }
  #vi-btn:active .vi-arrows span:nth-child(3) { transform: translate(3px,-3px); }

  /* replay */
  #vi-replay {
    margin-top: 18px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 9px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(245,243,239,0.22);
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.2s;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.5s ease 0.45s, transform 0.5s ease 0.45s, color 0.2s;
  }
  #vi-cta.vi-show #vi-replay {
    opacity: 1;
    transform: translateY(0);
  }
  #vi-replay:hover { color: rgba(245,243,239,0.5); }

  /* ── Keyframes ── */
  @keyframes viFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
  }

  /* Dismiss animation */
  #vi-overlay.vi-dismissing {
    opacity: 0;
    transition: opacity 0.45s ease;
    pointer-events: none;
  }

} /* end @media (max-width: 768px) */
