/* ==========================================================================
   KESİT Mimarlık — responsive.css
   Tablet and mobile compositions. Desktop styles live in layout.css.
   ========================================================================== */

/* ---- Large desktop ----------------------------------------------------- */

@media (min-width: 1800px) {
  :root {
    --fs-display-xl: 11rem;
  }
}

/* ---- Tablet landscape / small desktop --------------------------------- */

@media (max-width: 1200px) {
  .intro__text { grid-column: 3 / span 6; }
  .intro__image { grid-column: 9 / span 4; }
  .intro__facts { grid-column: 3 / span 6; }

  .section-head .eyebrow { grid-column: 1 / span 12; }
  .section-head__title { grid-column: 1 / span 9; }
  .section-head__aside { grid-column: 10 / span 3; }

  .contact__intro { grid-column: 1 / span 5; }
  .contact__form { grid-column: 7 / span 6; }

  .team-member { grid-column: span 4; }
  .team-member:nth-child(4n + 2),
  .team-member:nth-child(4n + 4) { margin-top: 0; }
  .team-member:nth-child(3n + 2) { margin-top: 2.5rem; }

  .process { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 3rem; }
  .hero__scene { width: 60%; }
}

/* ---- Tablet portrait --------------------------------------------------- */

@media (max-width: 1024px) {
  :root {
    --nav-h: 4.75rem;
  }

  .site-nav { display: none; }
  .menu-toggle { display: block; }
  .site-header__inner { grid-template-columns: 1fr 1fr; }

  .hero__title { grid-column: 1 / span 12; max-width: 10ch; }
  .hero__lead { grid-column: 1 / span 8; }
  .hero__cta { grid-column: 1 / span 12; margin-top: 1rem; }
  .hero__scene { width: 70%; opacity: 0; }
  .hero__scene.is-ready { opacity: 0.85; }

  .intro__label { grid-column: 1 / span 12; }
  .intro__text { grid-column: 1 / span 8; }
  .intro__image { grid-column: 7 / span 6; margin-top: 2rem; }
  .intro__facts { grid-column: 1 / span 8; }


  .philosophy { grid-template-columns: 1fr; min-height: 0; }
  .philosophy__media { min-height: 70vh; }
  .philosophy__inner { padding-block: var(--section-y-s) var(--section-y); }

  .service-row__head,
  .service-row__body { grid-template-columns: 3rem minmax(0, 1fr) 3rem; }
  .service-row__desc { grid-column: 2; }
  .service-row__toggle { grid-column: 3; grid-row: 1 / span 2; }
  .service-row__body p,
  .service-row__scope { grid-column: 2; }
  .service-row__scope { margin-top: 1.25rem; }
  .service-preview { display: none; }

  .cinematic { height: 90vh; min-height: 520px; }
  .cinematic__content .display-l { grid-column: 1 / span 12; }
  .cinematic__content .link-arrow { grid-column: 1 / span 12; justify-self: start; }

  .contact__intro { grid-column: 1 / span 12; }
  .contact__form { grid-column: 1 / span 10; }

  .site-footer__brand { grid-column: 1 / span 12; }
  .site-footer__top > .site-footer__col:nth-child(n) { grid-column: span 4; }

  .page-hero__title { grid-column: 1 / span 12; }
  .page-hero__lead { grid-column: 1 / span 9; }
  .page-hero--split .page-hero__title { grid-column: 1 / span 12; }

  .detail-cover__title { grid-column: 1 / span 12; }
  .detail-cover__location { grid-column: 1 / span 12; justify-self: start; text-align: left; }

  .detail-info__meta { grid-column: 1 / span 12; }
  .detail-info__text { grid-column: 1 / span 10; }
  .detail-concept__label { grid-column: 1 / span 12; }
  .detail-concept__text { grid-column: 1 / span 10; }

  .materials__text { grid-column: 1 / span 12; position: static; }
  .materials__media { grid-column: 1 / span 12; }

  .viewer-section__head { grid-column: 1 / span 12; }
  .viewer-section__hint { grid-column: 1 / span 12; justify-self: start; text-align: left; }

  .studio-statement__text { grid-column: 1 / span 10; }
  .studio-statement__image { grid-column: 4 / span 9; }

  .approach-item__num { grid-column: 1 / span 12; }
  .approach-item h3 { grid-column: 1 / span 10; }
  .approach-item p { grid-column: 1 / span 10; }

  .timeline__year { grid-column: 1 / span 3; }
  .timeline__title { grid-column: 4 / span 9; }
  .timeline__text { grid-column: 4 / span 9; margin-top: 0.4rem; }

  .service-detail__media,
  .service-detail:nth-child(even) .service-detail__media { grid-column: 1 / span 12; grid-row: auto; }
  .service-detail__body,
  .service-detail:nth-child(even) .service-detail__body { grid-column: 1 / span 10; grid-row: auto; }

  .contact-page__form { grid-column: 1 / span 12; }
  .contact-page__aside { grid-column: 1 / span 10; }

  .cta-band__title { grid-column: 1 / span 12; }
  .cta-band__action { grid-column: 1 / span 12; justify-self: start; }
}

/* ---- Mobile ------------------------------------------------------------ */

@media (max-width: 680px) {
  :root {
    --nav-h: 4.25rem;
    --fs-display-xl: clamp(3rem, 15vw, 4.75rem);
    --fs-display-l: clamp(2.6rem, 12vw, 4rem);
    --fs-display-m: clamp(2.2rem, 9.5vw, 3.25rem);
    --section-y: 5rem;
    --section-y-s: 3.5rem;
    --gap: 1rem;
  }

  .hero {
    min-height: 100svh;
  }

  .hero__content {
    padding-top: calc(var(--nav-h) + 3rem);
    padding-bottom: 6.5rem;
    row-gap: 1.5rem;
  }

  .hero__eyebrow { flex-direction: column; gap: 0.5rem; }
  .hero__eyebrow span:last-child { display: none; }
  .hero__title { max-width: 9ch; }
  .hero__lead { grid-column: 1 / span 12; font-size: 1.05rem; }
  .hero__scene { display: none; }
  .hero__shade {
    background:
      linear-gradient(0deg, rgba(25, 26, 24, 0.9) 0%, rgba(25, 26, 24, 0.45) 45%, rgba(25, 26, 24, 0.25) 100%);
  }
  .hero__meta {
    left: var(--gutter);
    right: var(--gutter);
    bottom: 2rem;
    justify-content: space-between;
  }
  .scroll-indicator { flex-direction: row; gap: 0.75rem; }
  .scroll-indicator i { width: 3rem; height: 1px; }
  .scroll-indicator i::after { animation-name: scrollLineX; }

  .intro__text { grid-column: 1 / span 12; }
  .intro__image { grid-column: 1 / span 12; margin-top: 0; aspect-ratio: 4 / 5; }
  .intro__facts { grid-column: 1 / span 12; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
  .fact__value { font-size: 2rem; }

  .section-head { margin-bottom: 2.5rem; }
  .section-head__title { grid-column: 1 / span 12; }
  .section-head__aside { grid-column: 1 / span 12; justify-self: start; }

  .projects-grid { row-gap: 3rem; }
  .projects-grid .project-card:nth-child(n) { grid-column: 1 / span 12; margin-top: 0; }
  .project-card__title { font-size: 1.5rem; }

  .philosophy__media { min-height: 60vh; }
  .principles { grid-template-columns: 1fr; }

  .service-row__head { grid-template-columns: 2.25rem minmax(0, 1fr) 2.25rem; padding: 1.25rem 0; }
  .service-row__body { grid-template-columns: 2.25rem minmax(0, 1fr) 2.25rem; }
  .service-row__title { font-size: 1.5rem; }
  .service-row__desc { display: none; }

  .cinematic { height: 80vh; min-height: 480px; }

  .form { grid-template-columns: 1fr; gap: 0.5rem; }
  .form__actions { flex-direction: column; align-items: flex-start; }
  .btn-line { width: 100%; }

  .contact__details li { grid-template-columns: 1fr; gap: 0.3rem; }

  .site-footer__top > .site-footer__col:nth-child(n) { grid-column: span 6; }
  .site-footer__bottom { flex-direction: column; gap: 0.75rem; }

  .filters { gap: 0.25rem 1.25rem; }
  .filters__count { width: 100%; margin-left: 0; margin-top: 0.5rem; }

  .detail-cover { height: 85vh; min-height: 520px; }
  .detail-info__meta dl { grid-template-columns: 6.5rem 1fr; }

  .gallery__item:nth-child(n) { grid-column: 1 / span 12; margin-top: 0; }
  .gallery__item:nth-child(3) { grid-column: 3 / span 10; }
  .gallery__item:nth-child(5) { grid-column: 1 / span 10; }

  .viewer { aspect-ratio: 4 / 5; }

  .project-nav { grid-template-columns: 1fr; }
  .project-nav a + a { border-left: 0; border-top: 1px solid var(--line); text-align: left; }
  .project-nav a + a .caption { justify-content: flex-start; }

  .studio-statement__text { grid-column: 1 / span 12; }
  .studio-statement__image { grid-column: 1 / span 12; }
  .team-member { grid-column: span 6; }
  .team-member:nth-child(n) { margin-top: 0; }
  .team-member:nth-child(even) { margin-top: 2rem; }

  .timeline__year { grid-column: 1 / span 12; margin-bottom: 0.4rem; }
  .timeline__title,
  .timeline__text { grid-column: 1 / span 12; }

  .studio-gallery figure:nth-child(n) { grid-column: 1 / span 12; margin-top: 0; }
  .studio-gallery figure:nth-child(2) { grid-column: 3 / span 10; }

  .service-detail__body,
  .service-detail:nth-child(even) .service-detail__body { grid-column: 1 / span 12; }
  .service-detail h2 { font-size: 2rem; }
  .process { grid-template-columns: 1fr; }

  .contact-page__aside { grid-column: 1 / span 12; }

  .mobile-menu__footer { grid-template-columns: 1fr; }

  .cursor { display: none; }
}

@keyframes scrollLineX {
  0%   { transform: translateX(-100%); }
  50%  { transform: translateX(0); }
  100% { transform: translateX(100%); }
}

/* ---- Short viewports --------------------------------------------------- */

@media (max-height: 640px) and (min-width: 681px) {
  .hero__content { padding-top: calc(var(--nav-h) + 2rem); }
  :root { --fs-display-xl: clamp(3rem, 7vw, 6rem); }
}

/* ---- Touch devices ------------------------------------------------------ */

@media (hover: none) {
  .project-card__media img { transition: none; }
  .service-preview { display: none; }
}
