/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */

/* ==========================================================================
   Max 1280px - Large Desktop Adjustments
   ========================================================================== */

@media (max-width: 1280px) {
  .container {
    padding-left: var(--space-xl);
    padding-right: var(--space-xl);
  }

  .header__inner {
    padding: 0 var(--space-xl);
  }

  .footer__grid {
    grid-template-columns: 1.5fr 1fr 1fr 1fr 1fr;
    gap: var(--space-xl);
  }

  .mega-menu--products .mega-menu__inner {
    gap: var(--space-md);
  }

  .stats-grid__number {
    font-size: var(--text-3xl);
  }

  .logo-wall {
    grid-template-columns: repeat(5, 1fr);
  }

  .price-card--featured {
    transform: scale(1.02);
  }

  .hero--home {
    min-height: 80vh;
  }

  .references-grid {
    gap: var(--space-md);
  }
}

/* ==========================================================================
   Max 1024px - Tablet / Hide Desktop Nav, Show Mobile Nav
   ========================================================================== */

@media (max-width: 1024px) {
  /* Typography scaling */
  h1, .hero__title {
    font-size: var(--text-4xl);
  }

  h2 {
    font-size: var(--text-3xl);
  }

  h3 {
    font-size: var(--text-2xl);
  }

  /* Section spacing */
  .section {
    padding-top: var(--space-2xl);
    padding-bottom: var(--space-2xl);
  }

  .section--lg {
    padding-top: var(--space-3xl);
    padding-bottom: var(--space-3xl);
  }

  /* Navigation: hide desktop, show mobile */
  .header__nav {
    display: none;
  }

  .header__cta {
    display: none;
  }

  .mobile-toggle {
    display: flex;
  }

  /* Mega menu hidden on tablet/mobile */
  .mega-menu {
    display: none !important;
  }

  .mega-menu-overlay {
    display: none;
  }

  /* Grids */
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }

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

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

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

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

  .grid-sidebar--reverse {
    grid-template-columns: 1fr;
  }

  .grid-content {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

  .grid-content--reverse {
    direction: ltr;
  }

  .split-layout {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

  .split-layout--reverse {
    direction: ltr;
  }

  .split-layout--60-40,
  .split-layout--40-60 {
    grid-template-columns: 1fr;
  }

  /* Hero */
  .hero {
    min-height: 60vh;
  }

  .hero--home {
    min-height: 65vh;
  }

  .hero__content {
    padding: var(--space-2xl) 0;
  }

  .hero__title {
    font-size: var(--text-4xl);
  }

  .hero__subtitle {
    font-size: var(--text-lg);
  }

  .hero--product {
    min-height: 40vh;
  }

  .hero--product .hero__title {
    font-size: var(--text-3xl);
  }

  /* Stats */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stats-grid--bordered .stats-grid__item {
    border-right: none;
  }

  .stats-grid--bordered .stats-grid__item:nth-child(odd) {
    border-right: 1px solid var(--border);
  }

  /* Trust bar */
  .trust-bar {
    gap: 0;
    padding: var(--space-xs) var(--space-sm);
  }

  .trust-bar__item {
    padding: var(--space-xs) var(--space-md);
  }

  /* Product detail */
  .product-detail {
    grid-template-columns: 1fr;
  }

  .product-detail__sidebar {
    position: static;
  }

  /* Blog */
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .blog-featured {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  /* Teams */
  .teams-feature-grid {
    grid-template-columns: 1fr;
  }

  /* Contact */
  .contact-grid {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

  /* Footer */
  .footer__grid {
    grid-template-columns: 1fr 1fr 1fr;
    gap: var(--space-xl);
  }

  .footer__brand {
    grid-column: 1 / -1;
    padding-right: 0;
  }

  /* Logo wall */
  .logo-wall {
    grid-template-columns: repeat(4, 1fr);
  }

  /* Team grid */
  .team-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-xl);
  }

  /* CTA Banner */
  .cta-banner {
    padding: var(--space-2xl) var(--space-lg);
  }

  .cta-banner__title {
    font-size: var(--text-2xl);
  }

  /* Section header */
  .section-header__title {
    font-size: var(--text-3xl);
  }

  /* Process */
  .process__step {
    grid-template-columns: 48px 1fr;
    gap: var(--space-sm);
  }

  .process__number {
    width: 48px;
    height: 48px;
    font-size: var(--text-base);
  }

  .process__line {
    left: 23px;
    top: 48px;
    height: calc(100% - 48px);
  }

  /* Service pages */
  .service-overview {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

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

  /* About values */
  .about-values {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Career */
  .career-intro {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

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

  /* References */
  .references-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Price cards */
  .price-card--featured {
    transform: none;
  }

  /* Channel vis */
  .channel-vis {
    flex-wrap: wrap;
    padding: var(--space-lg);
  }

  /* Desktop/Mobile visibility */
  .visible-desktop {
    display: none;
  }

  .visible-mobile {
    display: block;
  }

  /* Product bento */
  .product-bento {
    grid-template-columns: repeat(2, 1fr);
  }
  .product-bento__featured {
    grid-column: 1 / -1;
  }

  /* USPs grid */
  .usps-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Testimonials featured */
  .testimonials-featured {
    grid-template-columns: 1fr;
  }
  .testimonials-featured .testimonial-card:first-child {
    grid-row: auto;
  }

  /* Blog featured */
  .blog-featured-card {
    grid-template-columns: 1fr;
  }
  .blog-featured-card__image {
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    min-height: 200px;
  }

  /* Services clip-path */
  .section--services {
    clip-path: polygon(0 20px, 100% 0, 100% 100%, 0 100%);
    padding-top: calc(var(--space-2xl) + 20px);
  }

  /* Section decorations */
  .section-deco {
    display: none;
  }

  .glow-orb {
    display: none;
  }

  .hero__aurora-band {
    filter: blur(100px);
  }
}

/* ==========================================================================
   Max 768px - Small Tablet / Large Phone
   ========================================================================== */

@media (max-width: 768px) {
  /* Container */
  .container {
    padding-left: var(--space-md);
    padding-right: var(--space-md);
  }

  .header__inner {
    padding: 0 var(--space-md);
  }

  /* Typography */
  h1, .hero__title {
    font-size: var(--text-3xl);
  }

  h2 {
    font-size: var(--text-2xl);
  }

  h3 {
    font-size: var(--text-xl);
  }

  /* Hero */
  .hero {
    min-height: auto;
    padding-top: var(--header-height);
  }

  .hero--home {
    min-height: auto;
  }

  .hero__content {
    padding: var(--space-xl) 0;
  }

  .hero__subtitle {
    font-size: var(--text-base);
  }

  .hero__actions {
    flex-direction: column;
    align-items: stretch;
  }

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

  /* Grids become single column */
  .grid-2,
  .grid-3,
  .grid-4,
  .grid-5,
  .grid-6 {
    grid-template-columns: 1fr;
  }

  /* Stats */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-sm);
  }

  .stats-grid__item {
    padding: var(--space-sm);
  }

  .stats-grid__number {
    font-size: var(--text-2xl);
  }

  /* Trust bar */
  .trust-bar {
    gap: 0;
    padding: var(--space-xs);
    border-radius: var(--radius-lg);
  }

  .trust-bar__item {
    padding: var(--space-xs) var(--space-sm);
    font-size: var(--text-xs);
  }

  .trust-bar__item:not(:last-child)::after {
    display: none;
  }

  .trust-bar__item:nth-child(n+4) {
    display: none;
  }

  .trust-bar__icon {
    width: 36px;
    height: 36px;
  }

  .trust-bar__icon svg {
    width: 16px;
    height: 16px;
  }

  /* Blog */
  .blog-grid {
    grid-template-columns: 1fr;
  }

  /* Logo wall */
  .logo-wall {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-sm);
  }

  /* Footer */
  .footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
  }

  .footer__bottom {
    flex-direction: column;
    text-align: center;
  }

  .footer__legal {
    justify-content: center;
  }

  /* Form row */
  .form-row {
    grid-template-columns: 1fr;
  }

  /* Section header */
  .section-header__title {
    font-size: var(--text-2xl);
  }

  .section-header__desc {
    font-size: var(--text-base);
  }

  /* CTA Banner */
  .cta-banner__title {
    font-size: var(--text-xl);
  }

  .cta-banner__text {
    font-size: var(--text-base);
  }

  .cta-banner__actions {
    flex-direction: column;
  }

  .cta-banner__actions .btn {
    width: 100%;
  }

  .cta-banner__deco-ring-1,
  .cta-banner__deco-ring-2,
  .cta-banner__dot-grid {
    display: none;
  }

  /* Accordion */
  .accordion__trigger {
    padding: var(--space-sm) var(--space-md);
    font-size: var(--text-sm);
  }

  .accordion__body {
    padding: 0 var(--space-md) var(--space-md);
    font-size: var(--text-sm);
  }

  /* Team grid */
  .team-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
  }

  .team-card__image {
    width: 120px;
    height: 120px;
  }

  /* Comparison table */
  .teams-comparison {
    margin-left: calc(-1 * var(--space-md));
    margin-right: calc(-1 * var(--space-md));
    border-radius: 0;
  }

  /* Process */
  .process__step {
    grid-template-columns: 40px 1fr;
  }

  .process__number {
    width: 40px;
    height: 40px;
    font-size: var(--text-sm);
  }

  .process__line {
    left: 19px;
    top: 40px;
    height: calc(100% - 40px);
  }

  .process__title {
    font-size: var(--text-lg);
  }

  /* Timeline */
  .timeline {
    padding-left: var(--space-xl);
  }

  .timeline__dot {
    left: calc(-1 * var(--space-xl) + 8px);
    width: 12px;
    height: 12px;
  }

  /* Hardware */
  .hardware-catalog__header {
    flex-direction: column;
    align-items: stretch;
  }

  /* Filter tabs */
  .filter-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: var(--space-xs);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

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

  /* Service benefits */
  .service-benefits {
    grid-template-columns: 1fr;
  }

  /* About values */
  .about-values {
    grid-template-columns: 1fr;
  }

  /* Benefits grid */
  .benefits-grid {
    grid-template-columns: 1fr;
  }

  /* References */
  .references-grid {
    grid-template-columns: 1fr;
  }

  /* Job card stack */
  .job-card {
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-sm);
  }

  .job-card__action {
    width: 100%;
  }

  .job-card__action .btn {
    width: 100%;
  }

  /* Price cards */
  .price-card {
    max-width: 400px;
    margin: 0 auto;
  }

  /* Error page */
  .error-page__code {
    font-size: 5rem;
  }

  /* Author box */
  .author-box {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }

  /* Tabs */
  .tabs {
    gap: 0;
  }

  .tab-btn {
    padding: var(--space-xs) var(--space-sm);
    font-size: var(--text-xs);
  }

  /* Channel vis */
  .channel-vis__connector {
    display: none;
  }

  .channel-vis {
    gap: var(--space-sm);
  }

  /* Pagination */
  .pagination {
    gap: 0.25rem;
  }

  .pagination__btn {
    min-width: 36px;
    height: 36px;
    padding: 0 0.5rem;
    font-size: var(--text-xs);
  }

  /* Search input */
  .search-input {
    max-width: 100%;
  }

  /* Contact map */
  .contact-map {
    height: 220px;
  }

  /* Marquee fade edges */
  .marquee::before,
  .marquee::after {
    width: 40px;
  }

  /* Product bento */
  .product-bento {
    grid-template-columns: 1fr;
  }
  .product-bento__featured {
    grid-column: 1;
  }

  /* USPs grid */
  .usps-grid {
    grid-template-columns: 1fr;
  }

  /* Blog featured */
  .blog-featured-grid {
    grid-template-columns: 1fr;
  }

  /* Services clip-path */
  .section--services {
    clip-path: none;
    padding-top: var(--space-2xl);
  }

  /* Wave divider */
  .section-wave svg {
    height: 30px;
  }
}

/* ==========================================================================
   Max 480px - Mobile Phone
   ========================================================================== */

@media (max-width: 480px) {
  /* Further container tightening */
  .container {
    padding-left: var(--space-sm);
    padding-right: var(--space-sm);
  }

  .header__inner {
    padding: 0 var(--space-sm);
  }

  /* Section spacing */
  .section {
    padding-top: var(--space-xl);
    padding-bottom: var(--space-xl);
  }

  .section--sm {
    padding-top: var(--space-lg);
    padding-bottom: var(--space-lg);
  }

  /* Typography */
  h1, .hero__title {
    font-size: var(--text-2xl);
    letter-spacing: -0.02em;
  }

  h2 {
    font-size: var(--text-xl);
  }

  h3 {
    font-size: var(--text-lg);
  }

  .lead {
    font-size: var(--text-base);
  }

  /* Hero */
  .hero__title {
    font-size: var(--text-2xl);
  }

  .hero__subtitle {
    font-size: var(--text-sm);
  }

  .hero__content {
    padding: var(--space-lg) 0;
  }

  /* Buttons */
  .btn {
    padding: 0.625rem 1.25rem;
    font-size: var(--text-sm);
  }

  .btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: var(--text-sm);
  }

  /* Cards */
  .card {
    padding: var(--space-md);
  }

  .card__icon {
    width: 48px;
    height: 48px;
  }

  .card__icon svg {
    width: 24px;
    height: 24px;
  }

  /* Stats */
  .stats-grid {
    gap: var(--space-xs);
  }

  .stats-grid__number {
    font-size: var(--text-xl);
  }

  .stats-grid__label {
    font-size: var(--text-xs);
  }

  /* Trust bar */
  .trust-bar {
    flex-direction: column;
    align-items: stretch;
    padding: var(--space-xs);
  }

  .trust-bar__item {
    justify-content: center;
  }

  .trust-bar__item:nth-child(n+3) {
    display: none;
  }

  /* Logo wall */
  .logo-wall {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Footer */
  .footer {
    padding-top: var(--space-2xl);
  }

  .footer__grid {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  /* CTA Banner */
  .cta-banner {
    padding: var(--space-xl) var(--space-sm);
    border-radius: var(--radius-lg);
  }

  .cta-banner__title {
    font-size: var(--text-lg);
  }

  .cta-banner__text {
    font-size: var(--text-sm);
  }

  /* Section header */
  .section-header {
    margin-bottom: var(--space-xl);
  }

  .section-header__title {
    font-size: var(--text-xl);
  }

  .section-header__desc {
    font-size: var(--text-sm);
  }

  /* Feature items */
  .feature-item {
    padding: var(--space-sm);
  }

  .feature-item__icon {
    width: 52px;
    height: 52px;
  }

  .feature-item__icon svg {
    width: 26px;
    height: 26px;
  }

  /* Testimonials */
  .testimonial-card {
    padding: var(--space-md);
  }

  .testimonial-card__quote {
    font-size: var(--text-sm);
  }

  /* Breadcrumb */
  .breadcrumb {
    font-size: var(--text-xs);
  }

  /* Mobile nav full width */
  .mobile-nav {
    max-width: 100%;
  }

  /* Team grid */
  .team-grid {
    grid-template-columns: 1fr;
  }

  .team-card__image {
    width: 100px;
    height: 100px;
  }

  /* Error page */
  .error-page__code {
    font-size: 4rem;
  }

  .error-page__title {
    font-size: var(--text-xl);
  }

  .error-page__text {
    font-size: var(--text-base);
  }

  /* Blog card */
  .blog-card__image {
    height: 160px;
  }

  /* Comparison table */
  .comparison-table thead th {
    padding: var(--space-sm);
    font-size: var(--text-xs);
  }

  .comparison-table tbody td {
    padding: var(--space-xs) var(--space-sm);
    font-size: var(--text-xs);
  }

  /* Price card */
  .price-card {
    max-width: none;
    padding: var(--space-md);
  }

  .price-card__amount {
    font-size: var(--text-3xl);
  }

  /* Success message */
  .success-message {
    padding: var(--space-xl) var(--space-sm);
  }

  .success-message__icon {
    width: 52px;
    height: 52px;
  }

  .success-message__title {
    font-size: var(--text-xl);
  }

  /* Contact form */
  .contact-form-wrapper {
    padding: var(--space-md);
  }

  /* Benefit cards */
  .benefit-card {
    padding: var(--space-md);
  }

  /* Legal page */
  .legal-page {
    padding: var(--space-lg) 0;
  }

  /* Article */
  .article-header__title {
    font-size: var(--text-xl);
  }

  .article-cover {
    margin-left: calc(-1 * var(--space-sm));
    margin-right: calc(-1 * var(--space-sm));
    border-radius: 0;
  }

  /* Article share */
  .article-share {
    flex-direction: column;
    gap: var(--space-xs);
  }

  /* Pagination on tiny screens */
  .pagination__btn:not(.is-active):not(:first-child):not(:last-child) {
    display: none;
  }

  .pagination__ellipsis {
    display: none;
  }

  /* Product featured card */
  .product-bento__featured .card__title {
    font-size: var(--text-xl);
  }
}

/* ==========================================================================
   Prefers Reduced Motion
   ========================================================================== */

@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;
  }

  .btn:hover {
    transform: none;
  }

  .card--hover:hover {
    transform: none;
  }

  .hardware-card:hover {
    transform: none;
  }

  .blog-card:hover {
    transform: none;
  }

  .blog-card:hover .blog-card__image img {
    transform: none;
  }

  .reference-card:hover {
    transform: none;
  }

  .benefit-card:hover {
    transform: none;
  }

  .product-card:hover {
    transform: none;
  }

  .price-card--featured {
    transform: none;
  }

  .trust-bar__item:hover {
    transform: none;
  }

  .trust-bar__item:hover .trust-bar__icon {
    transform: none;
  }

  .usps-grid .feature-item:hover {
    transform: none;
  }

  .usps-grid .feature-item:hover .feature-item__icon {
    transform: none;
  }

  [class*="card--border-"]:hover {
    transform: none;
  }

  .hero__aurora-band,
  .glow-orb {
    animation: none !important;
    opacity: 0.5;
  }

  .hero__title .text-gradient,
  .hero__trust-value {
    animation: none !important;
  }

  .cta-banner {
    animation: none !important;
  }

  .cta-banner .btn-primary,
  .hero__cta .btn-primary {
    animation: none !important;
  }

  .product-bento__featured,
  .product-bento__highlight {
    animation: none !important;
  }

  .product-bento .card--hover:hover {
    transform: none;
  }

  .ai-bento__card:hover {
    transform: none;
  }

  .hero--home .hero__content,
  .hero--home .hero__illustration {
    animation: none !important;
    opacity: 1;
  }

  .ai-mockup__window {
    animation: none !important;
  }

  .animate {
    opacity: 1;
    transform: none;
    transition: none !important;
  }

  .animate-in .product-bento > *,
  .animate-in .usps-grid > *,
  .animate-in .blog-featured-grid > *,
  .animate-in .testimonials-featured > * {
    animation: none !important;
    opacity: 1;
    transform: none;
  }

  .marquee__track {
    animation: none;
  }

  .team-card:hover .team-card__image {
    transform: none;
  }
}

/* ==========================================================================
   Prefers Color Scheme - Dark (future-proofing)
   ========================================================================== */

/* @media (prefers-color-scheme: dark) {
  Uncomment and implement when dark mode is needed
} */

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
  .header,
  .footer,
  .mobile-nav,
  .mega-menu-overlay,
  .mobile-toggle,
  .cta-banner,
  .btn,
  .filter-tabs,
  .pagination,
  .search-input,
  .article-share {
    display: none !important;
  }

  body {
    color: #000;
    background: #fff;
    font-size: 12pt;
  }

  .hero {
    min-height: auto;
    background: none !important;
    padding: 1rem 0;
  }

  .hero::before,
  .hero::after {
    display: none;
  }

  .hero__title,
  .hero__subtitle {
    color: #000;
  }

  .section {
    padding: 1rem 0;
  }

  .container {
    max-width: 100%;
    padding: 0;
  }

  .card {
    box-shadow: none;
    border: 1px solid #ddd;
    break-inside: avoid;
  }

  a[href]::after {
    content: ' (' attr(href) ')';
    font-size: 0.8em;
    color: #666;
  }

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr 1fr;
  }
}
