/* ══════════════════════════════════════════════════════════
   Z3CONNECT — RESPONSIVE STYLES
   Primary: 9:16 portrait (mobile / Instagram Reel)
   Secondary: 16:9 desktop
   ══════════════════════════════════════════════════════════ */

/* ── MOBILE FIRST (default: portrait 390px) ─────────────── */
@media (max-width: 480px) {

  .scene-inner {
    padding: 60px 24px;
    gap: 24px;
  }

  .s01-headline {
    font-size: clamp(2.4rem, 10vw, 3.5rem);
  }

  .s01-brand-name {
    font-size: 1.6rem;
    letter-spacing: 0.1em;
  }

  .s02-headline {
    font-size: clamp(2.4rem, 10vw, 3.5rem);
  }

  .s03-headline {
    font-size: clamp(1.8rem, 7vw, 2.8rem);
  }

  .s05-statement {
    font-size: clamp(1.6rem, 6.5vw, 2.5rem);
  }

  .cta-headline {
    font-size: clamp(2rem, 9vw, 3rem);
  }

  .ecosystem {
    width: 260px;
    height: 260px;
  }

  .eco-node {
    transform: rotate(var(--angle)) translateX(105px) rotate(calc(-1 * var(--angle)));
    width: 48px;
    height: 48px;
    margin: -24px;
  }

  .eco-node-icon {
    width: 38px;
    height: 38px;
    font-size: 1rem;
    border-radius: 10px;
  }

  .problem-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .problem-node:nth-child(5) { grid-column: span 1; }

  .cap-item {
    padding: 14px 0;
    gap: 14px;
  }

  .cap-icon-wrap {
    width: 44px;
    height: 44px;
    border-radius: 12px;
  }

  .cap-content {
    gap: 12px;
  }

  .cap-text h3 {
    font-size: 0.95rem;
  }

  .cap-text p {
    font-size: 0.78rem;
  }

  .float-tags {
    gap: 8px;
  }

  .ftag {
    font-size: 0.72rem;
    padding: 6px 14px;
  }

  .scene-nav {
    right: 12px;
  }

  .mega-logo-svg {
    width: 100px;
    height: 100px;
  }

  .pres-brand {
    font-size: 2rem;
  }

  .cta-brand {
    font-size: 1.4rem;
  }
}

/* ── TABLET PORTRAIT (481px – 768px) ───────────────────── */
@media (min-width: 481px) and (max-width: 768px) {

  .scene-inner {
    padding: 72px 36px;
  }

  .s01-headline {
    font-size: clamp(3rem, 9vw, 4.5rem);
  }

  .problem-grid {
    grid-template-columns: 1fr 1fr;
  }

  .ecosystem {
    width: 300px;
    height: 300px;
  }
}

/* ── DESKTOP (769px+) ──────────────────────────────────── */
@media (min-width: 769px) {

  .scene-inner {
    padding: 100px 60px;
    max-width: 1000px;
  }

  /* Side-by-side layout for intro on desktop */
  .scene-01 .scene-inner {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    grid-template-rows: auto auto auto auto;
    gap: 24px 48px;
    align-items: center;
  }

  .s01-logo-wrap {
    grid-column: 1;
    grid-row: 1 / 3;
    align-items: flex-start;
  }

  .s01-headline {
    grid-column: 2;
    grid-row: 1;
    text-align: left;
  }

  .s01-sub {
    grid-column: 2;
    grid-row: 2;
    text-align: left;
  }

  .scroll-cue {
    grid-column: 1 / 3;
    grid-row: 4;
  }

  .grid-perspective {
    background-size: 80px 80px;
  }

  /* Scene 02 */
  .s02-headline {
    font-size: clamp(3.5rem, 7vw, 6rem);
  }

  /* Scene 04 capabilities */
  .capabilities-list {
    gap: 0;
  }

  .cap-item {
    padding: 28px 0;
  }

  /* Scene 05 */
  .scene-05 .scene-inner {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 48px;
  }

  .s05-logo-mega {
    flex-shrink: 0;
  }

  .s05-statement {
    text-align: left;
    flex: 1;
    min-width: 300px;
  }

  .float-tags {
    justify-content: flex-start;
  }

  /* CTA scene */
  .cta-headline {
    font-size: clamp(3.5rem, 6vw, 5.5rem);
  }
}

/* ── ULTRA-WIDE (1400px+) ──────────────────────────────── */
@media (min-width: 1400px) {
  .scene-inner {
    max-width: 1200px;
  }
}

/* ── INSTAGRAM REEL PORTRAIT SAFE AREA ──────────────────── */
/* 9:16 container for screen-recording preview */
@media (max-aspect-ratio: 9/16) {
  .scene-inner {
    justify-content: center;
    min-height: 100svh;
  }
}

/* ── SAFE AREA INSETS (notch devices) ──────────────────── */
@supports (padding: env(safe-area-inset-top)) {
  .scene-inner {
    padding-top: calc(60px + env(safe-area-inset-top));
    padding-bottom: calc(60px + env(safe-area-inset-bottom));
  }
}

/* ── PRINT (hide experience) ───────────────────────────── */
@media print {
  .bg-canvas,
  .scene-nav,
  .playback-controls,
  .presentation-overlay { display: none !important; }
}
