/* =====================================
   RESPONSIVE STYLES - MOBILE FIRST
   ===================================== */

/* === TABLET & MOBILE (1024px and below) === */
@media (max-width: 1024px) {

  /* Process Steps - 2 column grid */
  .process-steps {
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
  }

  .process-step {
    grid-column: span 1 !important;
  }

  .process-connector {
    display: none;
  }
}

/* === TABLET (768px and below) === */
@media (max-width: 768px) {

  /* Container */
  .container {
    padding: 0 20px;
  }

  /* Navigation */
  .nav-container {
    padding: 12px 20px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
  }

  .hamburger {
    order: -1;
    justify-self: start;
    z-index: 999;
  }

  .logo {
    order: 0;
    justify-self: center;
    z-index: 999;
    position: relative;
  }

  .nav-controls {
    order: 1;
    justify-self: end;
    z-index: 999;
  }

  .nav-links {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    flex-direction: column;
    background: var(--bg);
    padding: 100px 40px 40px;
    gap: 32px;
    z-index: 998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
    justify-content: center;
    align-items: center;
  }

  .nav-links.active {
    opacity: 1;
    pointer-events: all;
  }

  .nav-links li {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
  }

  .nav-links.active li {
    opacity: 1;
    transform: translateY(0);
  }

  .nav-links.active li:nth-child(1) { transition-delay: 0.1s; }
  .nav-links.active li:nth-child(2) { transition-delay: 0.2s; }
  .nav-links.active li:nth-child(3) { transition-delay: 0.3s; }
  .nav-links.active li:nth-child(4) { transition-delay: 0.4s; }

  .nav-links a {
    font-size: 2rem;
    font-weight: 600;
    padding: 0;
    position: relative;
  }

  .nav-links a::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--accent);
    transition: width 0.3s ease;
  }

  .nav-links a:hover::after {
    width: 100%;
  }

  .hamburger {
    display: flex;
  }

  .nav-controls {
    gap: 6px;
  }

  .contact-btn,
  .theme-toggle {
    width: 36px;
    height: 36px;
  }

  .contact-btn svg {
    width: 16px;
    height: 16px;
  }

  /* Hero */
  .hero {
    min-height: calc(100vh - 60px);
    padding: 100px 20px 60px;
  }

  .gradient-orb {
    filter: blur(60px);
  }

  .orb-1 {
    width: 400px;
    height: 400px;
  }

  .orb-2 {
    width: 350px;
    height: 350px;
  }

  .orb-3 {
    width: 300px;
    height: 300px;
  }

  .hero-stats {
    gap: 32px;
    flex-wrap: wrap;
  }

  /* Sections */
  .services-section,
  .projects-section,
  .process-section,
  .contact-section {
    padding: 80px 0;
  }

  .section-header {
    margin-bottom: 60px;
  }

  /* Services */
  .services-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  /* Projects */
  .projects-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .project-card {
    max-width: 100%;
  }

  .projects-bottom-row {
    grid-template-columns: 1fr;
    max-width: 100%;
  }

  /* Process */
  .process-steps {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .step-number {
    font-size: 2.5rem;
  }

  /* Contact */
  .contact-wrapper {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .contact-info {
    text-align: center;
  }

  .contact-info .section-tag {
    display: inline-block;
  }

  .contact-items {
    align-items: center;
  }

  /* Footer */
  .footer-main {
    grid-template-columns: 1fr;
    gap: 48px;
    text-align: left;
  }

  .footer-brand .logo {
    margin: 0 0 20px 0;
  }

  .footer-tagline {
    max-width: 100%;
    margin: 0 0 32px 0;
  }

  .footer-social {
    justify-content: flex-start;
  }

  .footer-columns {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer-column {
    text-align: left;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 20px;
    align-items: flex-start;
  }

  .footer-links {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .footer-divider {
    display: none;
  }
}

/* === MOBILE (480px and below) === */
@media (max-width: 480px) {

  /* Container */
  .container {
    padding: 0 16px;
  }

  /* Navigation */
  .logo img {
    height: 38px;
  }

  .footer-brand .logo img {
    height: 45px;
  }

  .nav-links a {
    font-size: 1.75rem;
  }

  /* Hero */
  .hero {
    padding: 100px 16px 48px;
  }

  .hero-badge {
    font-size: 0.8125rem;
    padding: 6px 16px;
  }

  .hero-subtitle {
    font-size: 1.125rem;
  }

  .hero-ctas {
    flex-direction: column;
    width: 100%;
  }

  .hero-ctas .btn {
    width: 100%;
    justify-content: center;
  }

  .hero-stats {
    gap: 24px;
  }

  .stat-number {
    font-size: 1.75rem;
  }

  /* Sections */
  .services-section,
  .projects-section,
  .process-section,
  .contact-section {
    padding: 60px 0;
  }

  .section-header {
    margin-bottom: 48px;
  }

  .section-header h2 {
    font-size: 2rem;
  }

  /* Services */
  .service-card {
    padding: 32px 24px;
  }

  .service-card h3 {
    height: auto;
  }

  .service-card p {
    height: auto;
  }

  .service-icon {
    width: 64px;
    height: 64px;
  }

  /* Projects */
  .projects-grid {
    gap: 24px;
  }

  .project-card {
    border-radius: 12px;
  }

  .project-image {
    aspect-ratio: 4 / 3;
  }

  .project-overlay {
    padding: 24px;
  }

  .project-tags {
    padding: 12px;
  }

  /* Process */
  .step-icon {
    width: 56px;
    height: 56px;
  }

  .step-number {
    font-size: 2rem;
  }

  /* Contact */
  .contact-form {
    padding: 32px 24px;
  }

  .contact-item {
    padding: 16px;
  }

  .contact-icon {
    width: 40px;
    height: 40px;
  }

  /* Footer */
  .footer {
    padding: 48px 0 32px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }

  .footer-social {
    justify-content: center;
  }
}

/* === LANDSCAPE MOBILE === */
@media (max-height: 600px) and (orientation: landscape) {
  .hero {
    min-height: auto;
    padding: 100px 24px 60px;
  }

  .scroll-indicator {
    display: none;
  }

  .nav-links {
    height: calc(100vh - 65px);
    overflow-y: auto;
  }
}

/* === LARGE DESKTOP (1440px and above) === */
@media (min-width: 1440px) {
  .container {
    max-width: 1320px;
    padding: 0 32px;
  }

  .nav-container {
    max-width: 1320px;
    padding: 20px 32px;
  }

  .hero {
    padding: 140px 32px 100px;
  }

  .services-section,
  .projects-section,
  .process-section,
  .contact-section {
    padding: 140px 0;
  }

  .section-header {
    margin-bottom: 100px;
  }

  .projects-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 48px;
  }

  .projects-bottom-row {
    gap: 48px;
    max-width: 980px;
  }
}

/* === TOUCH DEVICES === */
@media (hover: none) and (pointer: coarse) {

  /* Show project overlay by default on touch */
  .project-overlay {
    opacity: 1;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.3) 100%);
  }

  /* Larger tap targets */
  .nav-links a {
    padding: 16px 0;
    min-height: 48px;
  }

  .theme-toggle {
    min-width: 44px;
    min-height: 44px;
  }

  .hamburger {
    min-width: 44px;
    min-height: 44px;
  }

  /* No hover transform on cards */
  .service-card:hover,
  .project-card:hover {
    transform: none;
  }
}

/* === REDUCED MOTION === */
@media (prefers-reduced-motion: reduce) {
  .gradient-orb {
    animation: none;
  }

  .badge-dot {
    animation: none;
  }

  .scroll-indicator span {
    animation: none;
  }

  .hero-badge,
  .hero-title,
  .hero-subtitle,
  .hero-ctas,
  .hero-stats {
    opacity: 1;
    transform: none;
    animation: none;
  }

  .service-card:hover,
  .project-card:hover,
  .btn:hover {
    transform: none;
  }
}

/* === HIGH CONTRAST MODE === */
@media (prefers-contrast: high) {
  :root[data-theme="light"] {
    --bg: #FFFFFF;
    --text: #000000;
    --border: #000000;
  }

  :root[data-theme="dark"] {
    --bg: #000000;
    --text: #FFFFFF;
    --border: #FFFFFF;
  }

  .service-card,
  .project-card,
  .contact-item,
  .theme-toggle {
    border-width: 2px;
  }
}

/* === PRINT === */
@media print {
  .navbar,
  .theme-toggle,
  .hamburger,
  .hero-ctas,
  .scroll-indicator,
  .contact-form,
  .hero-bg {
    display: none !important;
  }

  body {
    background: white;
    color: black;
  }

  .hero {
    min-height: auto;
    padding: 40px 20px;
  }

  section {
    page-break-inside: avoid;
  }
}
