/* ==========================================================================
   NÓRIA STUDIO — Responsividade, Acessibilidade Mobile e Movimento Reduzido
   ========================================================================== */

/* Telas Grandes (Desktops Amplos >= 1440px) */
@media (min-width: 1440px) {
  :root {
    --container-max: 1420px;
  }
}

/* Tablets e Laptops Compactos (<= 1024px) */
@media (max-width: 1024px) {
  .header-status {
    display: none;
  }

  .header-inner {
    grid-template-columns: auto auto;
    justify-content: space-between;
  }

  .hero-headline-col {
    grid-column: 1 / 13;
  }

  .hero-aside-col {
    grid-column: 1 / 13;
    padding-right: 0;
    margin-bottom: 2rem;
  }

  .hero-showcase-col {
    grid-column: 1 / 13;
  }

  /* Projetos Selecionados empilhados com elegância */
  .project-showcase .project-info-col,
  .project-showcase.is-reversed .project-info-col {
    grid-column: 1 / 13;
    grid-row: auto;
  }

  .project-showcase .project-visual-col,
  .project-showcase.is-reversed .project-visual-col {
    grid-column: 1 / 13;
    grid-row: auto;
    margin-top: 1.5rem;
  }

  /* Serviços: desativa sticky em tablets/mobile para fluidez vertical */
  .services-sticky-col {
    grid-column: 1 / 13;
    position: static;
    padding-right: 0;
    margin-bottom: 2.25rem;
  }

  .services-list-col {
    grid-column: 1 / 13;
  }

  /* Planos em 1 coluna com espaçamento claro */
  .plans-matrix {
    grid-template-columns: 1fr;
  }

  .plan-panel {
    border-right: none;
    border-bottom: 1px solid var(--hairline-dark);
  }

  .plan-panel:last-child {
    border-bottom: none;
  }

  /* Processo em 2x2 no Tablet */
  .process-timeline-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .process-step:nth-child(2) {
    border-right: none;
  }

  .process-step:nth-child(1),
  .process-step:nth-child(2) {
    border-bottom: 1px solid var(--hairline-light);
  }

  /* Contato empilhado */
  .contact-direct-col {
    grid-column: 1 / 13;
    margin-bottom: 2.5rem;
  }

  .contact-form-col {
    grid-column: 1 / 13;
  }

  /* Modal Simulador em 1 coluna no Tablet */
  .demo-modal-body {
    grid-template-columns: 1fr;
  }
}

/* Smartphones e Dispositivos Móveis (<= 768px) */
@media (max-width: 768px) {
  :root {
    --header-height: 70px;
    --header-height-compact: 60px;
    --section-py: 4.25rem;
  }

  .primary-nav,
  .header-cta {
    display: none;
  }

  .mobile-menu-toggle {
    display: inline-flex;
  }

  .section-header-left,
  .section-header-right {
    grid-column: 1 / 13;
  }

  .section-header-right {
    margin-top: 1rem;
  }

  .showreel-ui-overlay {
    position: static;
    margin-top: 0.75rem;
  }

  .showreel-floating-card {
    max-width: 100%;
    width: 100%;
  }

  .service-trigger {
    grid-template-columns: 36px 1fr auto;
    gap: 0.75rem;
    padding: 1.5rem 0;
  }

  .service-details-inner {
    padding-left: 0;
    padding-right: 0;
  }

  /* Processo em 1 coluna no celular */
  .process-timeline-grid {
    grid-template-columns: 1fr;
  }

  .process-step {
    border-right: none;
    border-bottom: 1px solid var(--hairline-light);
    padding: 1.75rem 0.5rem;
  }

  .process-step:last-child {
    border-bottom: none;
  }

  .form-row-2 {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }

  .project-actions .btn {
    width: 100%;
  }

  .demo-modal-topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .demo-close-btn {
    width: 100%;
    text-align: center;
  }

  /* Otimização de desempenho da cena 2.5D/3D em celulares */
  .ambient-item-3d {
    transform: scale(0.75);
  }

  .ambient-item-3d.depth-far {
    display: none;
  }
}

/* Smartphones Pequenos (<= 480px) */
@media (max-width: 480px) {
  .hero-meta-specs {
    grid-template-columns: 1fr;
  }

  .chip-option {
    flex: 1 1 calc(50% - 0.6rem);
    text-align: center;
  }
}

/* ==========================================================================
   Preferência do Sistema por Movimento Reduzido (Acessibilidade WCAG)
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }

  [data-reveal-line] {
    transform: scaleX(1) !important;
  }

  .ambient-item-3d {
    animation: none !important;
  }
}
