/* Responsive styles and reduced motion */

@media (max-width: 1024px) {
  .nav-links,
  .nav-cta-wrap {
    display: none;
  }

  .menu-toggle {
    display: flex;
  }

  .mobile-menu {
    display: flex;
  }

  .about-intro__grid,
  .ai-section__grid,
  .contact-grid,
  .service-detail__grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .services__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .process-steps {
    grid-template-columns: repeat(2, 1fr);
  }

  .service-discipline--wibify .service-discipline__delivery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stats-band__grid,
  .results__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stats-band__item:nth-child(2) {
    border-right: none;
  }

  .site-footer__grid {
    grid-template-columns: 1fr 1fr;
  }

  .process-steps {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .site-nav {
    padding: 0 16px;
  }

  .hero {
    min-height: 100svh;
  }

  .hero__content {
    padding: calc(var(--nav-height) + 1.5rem) 1.25rem 5rem;
  }

  .hero__badge-text {
    letter-spacing: 0.22em;
    font-size: 0.62rem;
  }

  .hero__scroll {
    display: none;
  }

  .hero__nebula--1 {
    width: min(520px, 140vw);
    height: min(520px, 140vw);
  }

  .hero__nebula--2 {
    width: min(460px, 120vw);
    height: min(460px, 120vw);
  }

  .hero__comet {
    display: none;
  }

  .hero__orbs {
    display: block;
  }

  .hero__orb {
    opacity: 0.9;
  }

  .hero__orb--featured .hero__orb-sphere {
    box-shadow: 0 0 0 2px var(--color-teal), 0 0 28px rgba(0, 181, 181, 0.35);
  }

  .hero__orb-label,
  .hero__orb-tooltip {
    display: none;
  }

  .hero__vignette {
    background: radial-gradient(ellipse 85% 65% at 42% 48%, rgba(245, 245, 240, 0.28) 0%, transparent 82%);
  }

  .future__cta-btn {
    letter-spacing: 0.18em;
    font-size: 0.62rem;
    padding: 0.95rem 1.75rem;
    width: 100%;
    justify-content: center;
  }

  .future__secondary-btn {
    letter-spacing: 0.2em;
    width: 100%;
    justify-content: center;
  }

  .about-intro {
    min-height: auto;
    padding: 4rem 0 3.5rem;
  }

  .about-intro__headline {
    font-size: clamp(2.2rem, 11vw, 3.5rem);
  }

  .about-intro__actions {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }

  .about-intro__actions .btn-dark {
    width: 100%;
    justify-content: center;
  }

  .services--disciplines {
    padding: 4rem 0;
  }

  .service-discipline--wibify {
    padding: 2.5rem 0;
  }

  .service-discipline--wibify .service-discipline__title {
    font-size: clamp(1.85rem, 8vw, 2.5rem);
  }

  .service-discipline--wibify .service-discipline__cta-btn {
    width: 100%;
    justify-content: center;
  }

  .services__more-btn {
    width: 100%;
    justify-content: center;
  }

  .portfolio {
    min-height: auto;
    padding: 2.5rem 0 4rem;
  }

  .portfolio__bg-text {
    font-size: clamp(4rem, 18vw, 8rem);
  }

  .portfolio-pod-stage {
    min-height: auto;
    padding: 1.5rem 16px 2rem;
  }

  .portfolio-pod-capsule__viewport {
    min-height: 220px;
    padding: 1.75rem 1rem;
  }

  .portfolio-pod-capsule__planet-wrap {
    width: 140px;
    height: 140px;
  }

  .portfolio__rail-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0 16px;
    margin-bottom: 1.25rem;
  }

  .portfolio__web-header {
    margin-bottom: 1rem;
  }

  .portfolio__category-block {
    margin-bottom: 2.5rem;
  }

  .portfolio__category-title {
    font-size: clamp(1rem, 4.5vw, 1.25rem);
    margin-bottom: 1rem;
  }

  .portfolio__grid {
    gap: 1.25rem;
  }

  .portfolio__web-title {
    font-size: clamp(1.5rem, 7vw, 2rem);
  }

  .portfolio-web-card__head {
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  .portfolio-web-card__score {
    margin-left: auto;
  }

  .portfolio-embed--card {
    max-width: 100%;
    height: 320px;
  }

  .portfolio-embed__iframe--card {
    width: 100%;
    height: 320px;
  }

  .portfolio-embed.is-fallback {
    max-width: 100%;
    height: 320px;
  }

  .portfolio__rail-hint {
    letter-spacing: 0.12em;
  }

  .portfolio__rail-mask::before,
  .portfolio__rail-mask::after {
    width: 40px;
  }

  .portfolio__rail {
    padding: 1rem 16px 1.5rem;
    gap: 1rem;
  }

  .portfolio-card {
    width: min(300px, calc(100vw - 48px));
  }

  .differentiators {
    padding: 4rem 0 5rem;
  }

  .differentiators__title {
    font-size: clamp(2rem, 10vw, 3.5rem);
  }

  .ai-section {
    padding: 4rem 0;
  }

  .final-cta__headline {
    font-size: clamp(2.2rem, 11vw, 3.5rem);
  }

  .final-cta__actions {
    flex-direction: column;
    align-items: center;
  }

  .final-cta__btn {
    width: 100%;
    justify-content: center;
  }

  .final-cta__sticker {
    display: none;
  }

  .scali-widget {
    bottom: 1rem;
    right: 1rem;
  }

  .scali-launcher__text {
    display: none;
  }

  .back-to-top {
    bottom: 1rem;
    left: 1rem;
    width: 42px;
    height: 42px;
  }

  body[data-page="services"] .services-page-hero {
    padding: calc(var(--nav-height) + 2.5rem) 0 3rem;
  }

  body[data-page="services"] .services-page-hero__title {
    font-size: clamp(2.2rem, 10vw, 3.5rem);
  }

  body[data-page="services"] .process-section {
    padding: 4rem 0;
  }

  body[data-page="services"] .process-section__title {
    margin-bottom: 2rem;
  }

  body[data-page="services"] .services-page-cta {
    padding: 4rem 0 5rem;
    text-align: center;
  }

  body[data-page="services"] .services-page-cta__title,
  body[data-page="services"] .services-page-cta__text {
    text-align: center;
  }

  .page-hero {
    padding: calc(var(--nav-height) + 2.5rem) 0 3rem;
  }

  .page-hero__title {
    font-size: clamp(2rem, 10vw, 3rem);
  }

  .contact-section,
  .service-detail,
  .about-content,
  .about-process {
    padding: 3rem 0 4rem;
  }

  .hero__line-text {
    font-size: clamp(2.5rem, 10vw, 4rem);
  }

  .future__sphere-title-text {
    font-size: clamp(2.5rem, 10vw, 4rem);
  }

  .services__grid,
  .about-values {
    grid-template-columns: 1fr;
  }

  .service-discipline__cols {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .service-discipline__footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .process-steps {
    grid-template-columns: 1fr;
  }

  body[data-page="services"] .process-steps {
    grid-template-columns: 1fr;
    border: none;
  }

  body[data-page="services"] .process-step {
    border-right: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  }

  body[data-page="services"] .process-step:last-child {
    border-bottom: none;
  }

  body[data-page="services"] .service-discipline__cols {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .service-discipline--wibify .service-discipline__layout,
  .service-discipline--wibify:not(.service-discipline--alt) .service-discipline__layout,
  .service-discipline--wibify.service-discipline--alt .service-discipline__layout {
    flex-direction: column;
    justify-content: flex-start;
    gap: 1.75rem;
  }

  .service-discipline--wibify .service-discipline__main {
    flex: 1 1 auto;
    max-width: 100%;
  }

  .service-discipline--wibify .service-discipline__aside,
  .service-discipline--wibify.service-discipline--alt .service-discipline__aside {
    position: static;
    flex-direction: row;
    align-items: center;
    gap: 1.5rem;
    width: auto;
  }

  .service-discipline--wibify .service-discipline__num {
    font-size: clamp(3rem, 12vw, 5rem);
  }

  .service-discipline--wibify .service-discipline__delivery-grid {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .service-discipline--wibify .service-discipline__footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .services-page-hero {
    padding-top: calc(var(--nav-height) + 2.5rem);
  }

  .stats-band__grid,
  .results__grid {
    grid-template-columns: 1fr;
  }

  .stats-band__item {
    border-right: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  }

  .stats-band__item:last-child {
    border-bottom: none;
  }

  .portfolio__pods {
    gap: 1rem;
  }

  .portfolio-pod {
    width: 110px;
    height: 150px;
  }

  .site-footer__grid {
    grid-template-columns: 1fr;
  }

  .site-footer__bottom {
    flex-direction: column;
    text-align: center;
  }

  .process-steps {
    grid-template-columns: 1fr;
  }

  .final-cta {
    padding: 5rem 0;
  }

  .final-cta__grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    text-align: center;
  }

  .final-cta__content {
    text-align: center;
  }

  .final-cta__actions {
    justify-content: center;
  }

  .final-cta__mascot {
    width: 200px;
  }

  .final-cta__decor {
    display: none;
  }

  .future {
    padding: 60px 0 80px;
  }

  .about-intro__decor,
  .about-intro__grid-lines {
    display: none;
  }

  .about-intro__mascot-icon {
    width: 70px;
    height: 70px;
  }

  .diff-spine {
    left: 28px;
    transform: none;
  }

  .diff-spine__rocket {
    transform: translate(-50%, 0);
  }

  .diff-step {
    grid-template-columns: 40px 1fr;
    min-height: auto;
    padding: 2rem 0;
  }

  .diff-step--left .diff-card,
  .diff-step--right .diff-card {
    grid-column: 2;
    justify-self: start;
    margin: 0 0 0 1rem;
    width: 100%;
    max-width: none;
  }

  .diff-step__node {
    grid-column: 1;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  .site-nav {
    padding: 0 16px;
  }

  .site-logo img {
    height: 42px;
    max-width: min(170px, 44vw);
  }

  .hero__content {
    padding: calc(var(--nav-height) + 1.25rem) 1rem 4rem;
  }

  .hero__line-text {
    font-size: clamp(2.1rem, 11vw, 3.2rem);
    line-height: 0.92;
  }

  .future__sphere-title-text {
    font-size: clamp(2.1rem, 11vw, 3.2rem);
    line-height: 0.92;
  }

  .hero__subtext {
    font-size: 0.95rem;
  }

  .hero__actions {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }

  .btn-link {
    text-align: center;
    width: 100%;
  }

  .mobile-menu a {
    font-size: 1.25rem;
  }

  .mobile-menu .btn {
    width: min(100%, 320px);
  }

  .marquee-section__fade-left,
  .marquee-section__fade-right {
    width: 60px;
  }

  .marquee-item {
    margin: 0 1.5rem;
    font-size: 0.95rem;
  }

  .stats-band__value {
    font-size: clamp(2rem, 12vw, 3rem);
  }

  .portfolio-pod-dot {
    width: 32px;
    height: 32px;
    font-size: 0.5rem;
  }

  .diff-step--left .diff-card,
  .diff-step--right .diff-card {
    margin-left: 0.75rem;
  }

  .diff-card {
    padding: 1.25rem 1rem;
  }

  .scali-panel {
    width: calc(100vw - 2rem);
    right: -0.25rem;
  }
}

@media (hover: none), (pointer: coarse) {
  .portfolio-pod-capsule,
  .portfolio-pod-dot,
  .portfolio__rail,
  .portfolio-card,
  .portfolio-web-card,
  .hero__orb {
    cursor: pointer !important;
  }

  .portfolio__rail-mask {
    overflow-x: auto;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .portfolio__rail-mask::-webkit-scrollbar {
    display: none;
  }

  .portfolio__rail {
    cursor: default;
  }

  .portfolio-card {
    scroll-snap-align: start;
  }

  .portfolio-pod-capsule .portfolio-pod-capsule__info {
    max-height: 220px;
    opacity: 1;
    padding: 0 1.25rem 1.25rem;
  }

  .portfolio-pod-capsule .portfolio-pod-capsule__line {
    height: 140px;
    opacity: 1;
  }

  .portfolio-pod-capsule .portfolio-pod-capsule__planet {
    transform: scale(1.05);
  }

  .portfolio__rail-hint {
    font-size: 0;
  }

  .portfolio__rail-hint::after {
    content: 'Auto-playing · swipe to explore';
    font-size: 0.65rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
  }

  .portfolio-pod-stage__hint {
    font-size: 0;
  }

  .portfolio-pod-stage__hint::after {
    content: 'Tap to explore ↓';
    font-size: 0.65rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }

  .marquee-track {
    animation: none;
  }

  [data-animate] {
    opacity: 1 !important;
    transform: none !important;
  }
}
