/*
 * EchoShift Website V0.3 — Guided narrative journey
 * Additive interaction layer only. The approved hero visual CSS remains untouched.
 */

@layer components {
  .hero__secondary-action--mobile {
    display: none;
  }

  .hero__demo-column {
    min-width: 0;
    display: grid;
    align-content: start;
    gap: clamp(1rem, 1.4vw, 1.35rem);
  }

  #demonstration,
  #why,
  #capability,
  #how,
  #who,
  #process,
  #pilot {
    scroll-margin-top: 96px;
  }

  #demonstration:focus:not(:focus-visible) {
    outline: none;
  }

  .section-handoff {
    --handoff-border: rgba(16, 24, 40, 0.16);
    --handoff-background: rgba(255, 255, 255, 0.64);
    --handoff-label: var(--steel);
    --handoff-title: var(--ink);
    --handoff-copy: var(--muted);
    --handoff-arrow-bg: rgba(39, 68, 107, 0.08);
    --handoff-arrow: var(--steel);

    width: min(100%, 40rem);
    min-width: 0;
    min-height: 78px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: clamp(0.9rem, 2vw, 1.35rem);
    margin-top: clamp(2.75rem, 5vw, 4.75rem);
    padding: 0.9rem 1rem 0.9rem 1.1rem;
    border: 1px solid var(--handoff-border);
    border-radius: 14px;
    color: var(--handoff-title);
    background: var(--handoff-background);
    text-decoration: none;
    box-shadow: 0 16px 38px rgba(20, 36, 58, 0.06);
    transition:
      border-color 220ms var(--ease-standard),
      background-color 220ms var(--ease-standard),
      box-shadow 220ms var(--ease-standard);
  }

  .section-handoff:hover {
    border-color: rgba(39, 68, 107, 0.34);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 20px 48px rgba(20, 36, 58, 0.11);
  }

  .section-handoff__label {
    color: var(--handoff-label);
    font-family: var(--font-mono);
    font-size: 0.59rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    line-height: 1;
    text-transform: uppercase;
  }

  .section-handoff__copy {
    min-width: 0;
    display: grid;
    gap: 0.18rem;
  }

  .section-handoff__copy strong {
    color: var(--handoff-title);
    font-size: clamp(0.98rem, 1.2vw, 1.12rem);
    font-weight: 650;
    letter-spacing: -0.022em;
    line-height: 1.25;
  }

  .section-handoff__copy small {
    color: var(--handoff-copy);
    font-size: clamp(0.7rem, 0.82vw, 0.78rem);
    line-height: 1.4;
  }

  .section-handoff__arrow {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 50%;
    color: var(--handoff-arrow);
    background: var(--handoff-arrow-bg);
    font-family: var(--font-mono);
    font-size: 1rem;
    line-height: 1;
    transition: transform 220ms var(--ease-standard), background-color 220ms ease;
  }

  .section-handoff:hover .section-handoff__arrow {
    transform: translateY(3px);
  }

  .section-handoff--dark {
    --handoff-border: rgba(255, 255, 255, 0.16);
    --handoff-background: rgba(255, 255, 255, 0.035);
    --handoff-label: var(--signal-gold);
    --handoff-title: var(--white);
    --handoff-copy: #94a8bb;
    --handoff-arrow-bg: rgba(212, 160, 55, 0.11);
    --handoff-arrow: var(--signal-gold);
    box-shadow: none;
  }

  .section-handoff--dark:hover {
    border-color: rgba(212, 160, 55, 0.38);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: none;
  }

  .section-handoff--demo {
    width: min(100%, 34rem);
    margin-top: 0;
    opacity: 0.76;
  }

  .section-handoff--demo.is-ready {
    opacity: 1;
    border-color: rgba(212, 160, 55, 0.32);
    background: rgba(255, 255, 255, 0.052);
  }

  .section-handoff--wide {
    grid-column: 1 / -1;
  }
}

@layer responsive {
  @media (max-width: 1120px) {
    .hero__demo-column {
      width: min(920px, 100%);
    }
  }

  @media (max-width: 820px) {
    .hero__secondary-action--desktop {
      display: none;
    }

    .hero__secondary-action--mobile {
      display: inline-flex;
    }

    #demonstration,
    #why,
    #capability,
    #how,
    #who,
    #process,
    #pilot {
      scroll-margin-top: 86px;
    }

    .section-handoff {
      margin-top: clamp(2.25rem, 8vw, 3.5rem);
    }

    .section-handoff--demo {
      margin-top: 0;
    }
  }

  @media (max-width: 600px) {
    .section-handoff {
      width: 100%;
      min-height: 74px;
      grid-template-columns: minmax(0, 1fr) auto;
      gap: 0.85rem;
      padding: 0.9rem 0.85rem 0.9rem 1rem;
      border-radius: 12px;
    }

    .section-handoff__label {
      grid-column: 1;
      align-self: end;
      margin-bottom: 0.08rem;
    }

    .section-handoff__copy {
      grid-column: 1;
      align-self: start;
    }

    .section-handoff__arrow {
      grid-column: 2;
      grid-row: 1 / 3;
      width: 40px;
      height: 40px;
    }

    .section-handoff__copy strong {
      font-size: 1rem;
    }

    .section-handoff__copy small {
      font-size: 0.72rem;
    }
  }
}

@layer motion {
  @media (prefers-reduced-motion: reduce) {
    .section-handoff,
    .section-handoff__arrow {
      transition: none;
    }

    .section-handoff:hover .section-handoff__arrow {
      transform: none;
    }
  }
}
