/* ==========================================================================
   OPD CREATIVE STUDIO — RESPONSIVENESS & ACCESSIBILITY STYLESHEET
   Breakpoints:
   - 1440px+ (Large desktop / 4K)
   - 1024px - 1366px (Laptops & Desktops)
   - 769px - 1023px (Tablets / iPads)
   - 481px - 768px (Large mobile phones & compact tablets)
   - 361px - 480px (Standard mobile phones)
   - <= 360px (Tiny mobile phones / Galaxy Fold / iPhone SE)
   ========================================================================== */

/* Prevent horizontal scroll globally across all devices */
html {
  overflow-x: hidden;
  max-width: 100vw;
  width: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  overflow-x: hidden;
  max-width: 100vw;
  width: 100%;
}

img, svg, video, iframe {
  max-width: 100%;
  height: auto;
}

/* ==========================================================================
   1. LAPTOPS & SMALL SCREENS (<= 1200px)
   ========================================================================== */
@media (max-width: 1200px) {
  .why-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .pipeline-flow {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }

  .pipeline-flow::before {
    display: none;
  }

  .trust-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
  }
}

/* ==========================================================================
   2. TABLETS & COMPACT LAPTOPS (<= 992px)
   ========================================================================== */
@media (max-width: 992px) {
  .nav-menu {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .hero-simple-card {
    max-width: 520px;
    margin: 0 auto;
  }

  .services-explorer {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .service-showcase-panel {
    order: 2;
  }

  .services-list {
    order: 1;
  }

  .process-stepper {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .process-nav {
    position: static;
    flex-direction: row;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.75rem;
    scrollbar-width: none;
  }

  .process-nav::-webkit-scrollbar {
    display: none;
  }

  .process-step-btn {
    white-space: nowrap;
    padding: 0.85rem 1.25rem;
    flex-shrink: 0;
  }

  .dash-split-grid {
    grid-template-columns: 1fr;
  }

  .dash-overview-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .portfolio-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .span-7, .span-5, .span-6, .span-4, .span-8 {
    grid-column: span 1;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
}

/* ==========================================================================
   3. MOBILE PHONES & COMPACT TABLETS (<= 768px)
   ========================================================================== */
@media (max-width: 768px) {
  :root {
    --section-pad-y: 3.5rem;
    --container-pad: 1.25rem;
  }

  .site-header {
    padding: 0.75rem 0;
  }

  .nav-logo-img {
    height: 38px;
  }

  .nav-actions .btn-primary {
    display: none; /* Accessible directly in mobile drawer */
  }

  /* Full Mobile Navigation Drawer */
  .mobile-drawer {
    padding: 5.5rem 1.5rem 2rem;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }

  .mobile-nav-links {
    gap: 1.15rem;
    margin-bottom: 2rem;
  }

  .mobile-nav-link {
    font-size: 1.25rem;
    padding: 0.35rem 0;
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  /* Hero Section */
  .hero-section {
    padding-top: 5.5rem;
    padding-bottom: 3rem;
    min-height: auto;
  }

  .eyebrow {
    font-size: 0.7rem;
    letter-spacing: 0.04em;
    padding: 0.25rem 0.65rem;
    max-width: 100%;
    white-space: normal;
  }

  .hero-headline {
    font-size: clamp(1.85rem, 7.5vw, 2.45rem);
    line-height: 1.14;
    word-break: break-word;
  }

  .hero-desc {
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.75rem;
  }

  .hero-cta-group {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    margin-bottom: 2rem;
  }

  .hero-cta-group .btn {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .hero-trust-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.85rem;
    padding-top: 1.5rem;
  }

  .hero-trust-item {
    gap: 0.15rem;
  }

  .hero-trust-number {
    font-size: 1.3rem;
  }

  /* Hero Studio Showreel & Metrics Card */
  .hero-visual-wrapper {
    width: 100%;
    min-width: 0;
  }

  .hero-simple-card {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .simple-rating-badge {
    font-size: 0.75rem;
    padding: 0.35rem 0.75rem;
    margin-bottom: 0.75rem;
    max-width: 100%;
    white-space: normal;
  }

  .showreel-preview-card {
    padding: 1.25rem 1rem;
    min-height: auto;
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
  }

  .showreel-ambient-glow {
    display: none;
  }

  .showreel-top-bar {
    gap: 0.5rem;
  }

  .brand-subtext {
    font-size: 0.65rem;
  }

  .showreel-status {
    font-size: 0.65rem;
    padding: 0.2rem 0.45rem;
  }

  .showreel-center-stage {
    margin: 1.25rem 0 1rem;
    width: 100%;
  }

  .showreel-title {
    font-size: 1rem;
    line-height: 1.35;
    word-break: break-word;
    width: 100%;
  }

  .showreel-subtitle {
    font-size: 0.75rem;
    line-height: 1.4;
    width: 100%;
  }

  .showreel-play-btn {
    width: 52px;
    height: 52px;
    margin-bottom: 0.85rem;
  }

  .play-btn-core {
    width: 46px;
    height: 46px;
  }

  .play-btn-core svg {
    width: 17px;
    height: 17px;
  }

  .showreel-specs-bar {
    gap: 0.35rem;
    flex-wrap: wrap;
    width: 100%;
  }

  .spec-tag {
    font-size: 0.625rem;
    padding: 0.15rem 0.45rem;
  }

  .simple-metrics-strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    padding: 0.85rem 0.5rem;
    gap: 0.35rem;
    margin-top: 0.75rem;
    width: 100%;
    box-sizing: border-box;
  }

  .simple-metric-col {
    padding: 0 0.15rem;
    text-align: center;
  }

  .simple-metric-num {
    font-size: 1.1rem;
  }

  .simple-metric-label {
    font-size: 0.62rem;
    line-height: 1.25;
  }

  .simple-metric-divider {
    display: none;
  }

  /* Why OPD */
  .why-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .why-card {
    min-height: auto;
    padding: 1.5rem 1.25rem;
  }

  .why-num {
    font-size: 2rem;
    margin-bottom: 0.75rem;
  }

  /* Services Section */
  .service-showcase-panel {
    padding: 1.25rem 1rem;
  }

  .showcase-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .showcase-num {
    font-size: 2rem;
  }

  .showcase-title {
    font-size: 1.3rem;
  }

  .showcase-desc {
    font-size: 0.9rem;
  }

  .visual-metric-grid {
    grid-template-columns: 1fr;
    gap: 0.65rem;
  }

  .visual-metric-box {
    padding: 0.65rem;
  }

  .service-item-btn {
    padding: 0.85rem 1rem;
  }

  .service-item-title {
    font-size: 0.95rem;
  }

  .service-tag {
    display: none; /* Keep service list clean and uncrowded on mobile */
  }

  /* Growth Pipeline */
  .pipeline-flow {
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-top: 1.5rem;
  }

  /* Platform Workspace */
  .platform-header-bar {
    padding: 0.65rem 0.85rem;
    gap: 0.5rem;
    flex-wrap: wrap;
  }

  .platform-workspace-label {
    font-size: 0.68rem;
    width: 100%;
    order: 3;
    justify-content: center;
    margin-top: 0.2rem;
  }

  .platform-tabs {
    padding: 0.35rem 0.65rem 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .platform-tabs::-webkit-scrollbar {
    display: none;
  }

  .platform-tab-btn {
    padding: 0.6rem 0.85rem;
    font-size: 0.78rem;
    flex-shrink: 0;
  }

  .platform-body {
    padding: 1.25rem 0.85rem;
    min-height: auto;
  }

  .dash-overview-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .dash-widget {
    padding: 1.15rem 0.85rem;
  }

  .schedule-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .platform-closed-state {
    padding: 1.75rem 1rem;
    min-height: 220px;
  }

  /* Creative Process */
  .process-content-card {
    padding: 1.5rem 1.25rem;
    min-height: auto;
  }

  .process-stage-heading {
    font-size: 1.45rem;
  }

  .process-stage-desc {
    font-size: 0.9rem;
  }

  .process-deliverables-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  /* Trust Section */
  .trust-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .trust-card {
    padding: 1.5rem 1.25rem;
  }

  /* Portfolio / Work Section */
  .portfolio-card {
    border-radius: var(--radius-sm);
  }

  .portfolio-preview-frame {
    width: 95%;
    padding: 0.65rem;
  }

  .portfolio-body {
    padding: 1.25rem;
  }

  .portfolio-title {
    font-size: 1.15rem;
  }

  /* Final CTA Banner */
  .final-cta-box {
    padding: 2.25rem 1.25rem;
    border-radius: var(--radius-lg);
  }

  .final-cta-box h2 {
    font-size: clamp(1.75rem, 5.5vw, 2.25rem) !important;
  }

  .final-cta-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

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

  /* Contact Section */
  .contact-form-card {
    padding: 1.5rem 1rem;
  }

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

  .form-input, .form-select, .form-textarea {
    font-size: 1rem; /* 16px prevents iOS Safari auto-zoom on focus */
    min-height: 46px;
  }

  .contact-card-item {
    padding: 1rem;
  }

  .contact-card-val {
    font-size: 0.92rem;
  }

  /* Footer */
  .footer-top {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding-bottom: 2.5rem;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
}

/* ==========================================================================
   4. COMPACT PHONES (<= 480px / iPhone 12/13/14/15, Androids)
   ========================================================================== */
@media (max-width: 480px) {
  :root {
    --container-pad: 1rem;
  }

  .heading-display {
    font-size: 2rem;
  }

  .heading-section {
    font-size: 1.6rem;
  }

  .lead-text {
    font-size: 0.9rem;
  }

  .showreel-title {
    font-size: 0.95rem;
  }

  .showreel-subtitle {
    font-size: 0.72rem;
  }

  .showreel-play-btn {
    width: 48px;
    height: 48px;
    margin-bottom: 0.75rem;
  }

  .play-btn-core {
    width: 42px;
    height: 42px;
  }

  .play-btn-core svg {
    width: 15px;
    height: 15px;
  }

  .simple-metric-num {
    font-size: 1.05rem;
  }

  .simple-metric-label {
    font-size: 0.6rem;
  }

  .contact-card-val {
    font-size: 0.875rem;
  }
}

/* ==========================================================================
   5. TINY SCREENS (<= 360px / Galaxy Fold outer / iPhone SE 1st Gen)
   ========================================================================== */
@media (max-width: 360px) {
  :root {
    --container-pad: 0.75rem;
  }

  .hero-headline {
    font-size: 1.65rem;
  }

  .showreel-preview-card {
    padding: 1rem 0.75rem;
  }

  .showreel-title {
    font-size: 0.875rem;
  }

  .simple-metrics-strip {
    grid-template-columns: 1fr;
    gap: 0.65rem;
    padding: 0.75rem;
  }

  .contact-form-card {
    padding: 1.25rem 0.75rem;
  }

  .contact-card-item {
    padding: 0.75rem;
  }
}

/* ==========================================================================
   6. PREFERS-REDUCED-MOTION SUPPORT (ACCESSIBILITY)
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .play-btn-ripple,
  .pulse-dot {
    animation: none !important;
  }
}
