/* ==========================================================================
   responsive.css
   Layout changes for smaller screens. Loaded after style.css.

   Breakpoints
     1200px  large tablet / small laptop: slightly tighter spacing
     1100px  menu becomes a hamburger
      900px  two-column layouts stack (hero, cards, slider, about)
      768px  tablet portrait: contact panels stack
      520px  phones: single-column footer, full-width buttons
   ========================================================================== */


/* --------------------------------------------------------------------------
   1200px and below
   -------------------------------------------------------------------------- */
@media (max-width: 1200px) {
  .site-header__actions .btn--outline {
    display: none; /* "Contact Us" is repeated elsewhere; keeps the bar from crowding */
  }

  .service-card__text {
    max-width: 17em;
  }
}


/* --------------------------------------------------------------------------
   1100px and below: hamburger menu
   -------------------------------------------------------------------------- */
@media (max-width: 1100px) {
  .nav-toggle {
    display: inline-flex;
    order: 3;
  }

  .site-header__actions {
    display: none; /* the menu panel carries the buttons instead */
    margin-left: auto;
  }

  /* The menu slides down from under the header */
  .main-nav {
    position: fixed;
    inset: var(--header-height) 0 auto 0;
    max-height: calc(100vh - var(--header-height));
    overflow-y: auto;
    padding: 1.2rem var(--gutter) 2rem;
    background: var(--navy-900);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transform: translateY(-110%);
    visibility: hidden;
    transition: transform 0.5s var(--ease-out), visibility 0.5s;
  }

  .main-nav.is-open {
    transform: none;
    visibility: visible;
  }

  .main-nav__list {
    flex-direction: column;
    gap: 0.2rem;
    padding: 0.5rem;
    border-radius: 24px;
  }

  .main-nav__link {
    padding: 1rem 1.3rem;
    font-size: 1.1rem;
  }

  .main-nav__mobile-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 1.4rem;
  }

  .main-nav__mobile-actions .btn {
    flex: 1 1 10rem;
  }

  /* The brand sits to the left, the hamburger to the right */
  .site-header__inner {
    justify-content: space-between;
  }
}


/* --------------------------------------------------------------------------
   900px and below: stack the two-column layouts
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
  /* Hero */
  .hero {
    min-height: 0;
    padding-bottom: 3rem;
  }

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

  .hero__art {
    justify-self: center;
    width: min(100%, 460px);
  }

  .hero__floor-fade {
    height: 38%;
  }

  /* Service cards go one per row */
  .service-card--game,
  .service-card--web,
  .service-card--xr,
  .service-card--assets {
    grid-column: 1 / -1;
  }

  .service-card {
    min-height: 0;
  }

  .service-card__title {
    margin-top: 2.5rem;
  }

  .service-card__link {
    margin-top: 0;
  }

  .service-card__text,
  .service-card--game .service-card__text,
  .service-card--assets .service-card__text {
    max-width: 30em;
  }

  /* Pictures inside cards drop below the text instead of floating beside it */
  .service-card__media {
    position: static;
    width: 100%;
    max-width: 440px;
    margin-top: 1.5rem;
    order: 5;
  }

  .service-card__blocks {
    width: 30%;
  }

  /* Selected work */
  .work__heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .showcase__slide {
    grid-template-columns: 1fr;
    gap: 2rem;
    min-height: 0;
  }

  .showcase__media {
    order: -1;
  }

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

  /* Tabs scroll sideways instead of squeezing */
  .showcase__tabs {
    overflow-x: auto;
    scrollbar-width: none;
    padding-top: 0.2rem;
  }

  .showcase__tabs::-webkit-scrollbar {
    display: none;
  }

  .showcase__arrows {
    justify-content: flex-end;
  }

  /* Hover previews make no sense on touch screens */
  .showcase__preview {
    display: none;
  }

  /* About */
  .about-intro__layout {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .about-intro__body {
    padding-top: 0;
  }

  /* Process becomes a vertical timeline with the line down the left */
  .process__steps {
    grid-template-columns: 1fr;
    gap: 2.4rem;
  }

  .process__steps::before {
    top: 10px;
    bottom: 0;
    left: 9px;
    right: auto;
    width: 1px;
    height: auto;
    transform: scaleY(var(--line, 1));
    transform-origin: top center;
  }

  .process-step {
    padding: 0 0 0 3.2rem;
  }

  .process-step__text {
    max-width: 30em;
  }

  /* Footer */
  .site-footer__top {
    grid-template-columns: 1fr 1fr;
  }

  .site-footer__brand {
    grid-column: 1 / -1;
  }
}


/* --------------------------------------------------------------------------
   768px and below
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  .contact__panels {
    grid-template-columns: 1fr;
  }

  .panel {
    min-height: 0;
  }

  .hero__actions .btn {
    flex: 1 1 11rem;
  }
}


/* --------------------------------------------------------------------------
   520px and below: phones (390px and 360px wide)
   -------------------------------------------------------------------------- */
@media (max-width: 520px) {
  .brand__tagline {
    display: none; /* keeps the logo and menu button on one line at 360px */
  }

  .brand__name {
    font-size: 1rem;
  }

  .site-footer__top {
    grid-template-columns: 1fr;
  }

  .site-footer__policies {
    gap: 1.2rem;
  }

  .service-card__chips li {
    padding: 0.5em 0.85em;
  }

  .showcase__tabs {
    grid-auto-columns: minmax(140px, 1fr);
  }

  .panel .btn,
  .hero__actions .btn {
    width: 100%;
  }
}


/* --------------------------------------------------------------------------
   Very short landscape screens (phones on their side)
   -------------------------------------------------------------------------- */
@media (max-height: 520px) and (orientation: landscape) {
  .hero {
    min-height: 0;
  }
}

/* Services, Projects and the video rows on tablets and phones */
@media (max-width: 1100px) {
  .reels__row {
    grid-template-columns: 1fr 1fr;
  }

  .reels__row .reel:nth-child(3) {
    grid-column: 1 / -1;
  }
}

@media (max-width: 900px) {
  .service-block,
  .watch-item,
  .watch-item:nth-child(even) {
    grid-template-columns: 1fr;
  }

  .watch-item:nth-child(even) .watch-item__video {
    order: 0;
  }

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

  .project-tile,
  .project-tile:first-child {
    grid-column: span 1;
  }

  .project-tile:first-child {
    grid-column: 1 / -1;
  }

  .reels__head,
  .cta-band__inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 600px) {
  .reels__row,
  .project-grid {
    grid-template-columns: 1fr;
  }

  .reels__row .reel:nth-child(3) {
    grid-column: auto;
  }

  .cta-band__actions .btn {
    flex: 1 1 100%;
  }
}

/* Individual service and project pages */
@media (max-width: 900px) {
  .detail-hero__layout,
  .detail-split {
    grid-template-columns: 1fr;
  }

  .detail-hero__blocks {
    display: none; /* the decorative blocks add nothing on small screens */
  }

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

@media (max-width: 600px) {
  .pager,
  .pager--three {
    grid-template-columns: 1fr;
  }

  .detail-hero__actions .btn {
    flex: 1 1 100%;
  }
}

/* Contact page: stack the form above the calendar */
@media (max-width: 900px) {
  .schedule__card {
    grid-template-columns: 1fr;
  }

  .schedule__col + .schedule__col {
    border-left: 0;
    border-top: 1px solid rgba(11, 43, 59, 0.18);
  }
}

/* Home slider tabs: three equal columns even on a 360px phone */
@media (max-width: 520px) {
  .showcase__tabs { grid-auto-columns: minmax(0, 1fr); gap: 0.7rem; }
  .showcase__tab { grid-template-columns: 1fr; gap: 0.15rem; }
  .showcase__tab-title { font-size: 0.82rem; line-height: 1.2; }
  .showcase__controls { gap: 0.8rem; }
  .showcase__arrow { width: 40px; height: 40px; }
}
/* Home slider: four project tabs. On phones they sit two by two. */
@media (max-width: 520px) {
  .showcase__tabs { grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow-x: visible; }
}

/* Service-card icon scenes sit under the text on tablets and phones instead of behind it */
@media (max-width: 900px) {
  .viz { position: relative; right: auto; bottom: auto; align-self: center; margin-top: 1.5rem; opacity: 0.9; font-size: clamp(11px, 3.2vw, 16px); }
  .service-card:hover .viz { transform: none; }
}

@media (max-width: 900px) {
  .viz-web, .viz-xr { font-size: clamp(11px, 3.2vw, 16px); opacity: 0.9; }
}

/* Services grid v2: one column below 900px; the illustration moves under the tags */
@media (max-width: 900px) {
  .services__grid { grid-template-columns: 1fr; }
  .service-card__text, .service-card--game .service-card__text, .service-card--assets .service-card__text, .service-card__chips { padding-right: 0; }
  .service-card .viz { position: relative; right: auto; bottom: auto; order: 2; align-self: center; margin-top: 1.5rem; opacity: 0.95; font-size: clamp(11px, 3.4vw, 16px); }
  .service-card__link { order: 3; margin-top: auto; padding-top: 1.5rem; }
  .service-card:hover .viz { transform: none; }
}

@media (max-width: 900px) { .post-art .viz { font-size: calc(70cqw / 20); } }
