/**
 * NOVA YAPI — Responsive & Mobile Adaptations
 * Strict Typography System: Space Grotesk + DM Sans
 * Three-Tier Interaction Strategy:
 *  1. Desktop (> 1024px): Full Architectural Editorial Experience + 3D Tilt + Floating Previews
 *  2. Tablet (768px - 1024px): Reduced Experience + Flat Transforms + Refined Layouts
 *  3. Mobile (0 - 767px): Simple, Fast, Stable + Zero 3D Perspective + Left-to-Right Hero Sequence
 */

/* ==========================================================================
   1. LAPTOP & TABLET LANDSCAPE (max-width: 1200px)
   ========================================================================== */
@media (max-width: 1200px) {
  h1, .hero-giant-title, .heading-massive {
    font-size: clamp(3.5rem, 6vw, 6rem);
    line-height: 0.96;
    letter-spacing: -0.048em;
  }

  h2, .heading-xl {
    font-size: clamp(2.6rem, 5vw, 5rem);
  }

  .hero-grid-split {
    grid-template-columns: 45% 55%;
    gap: 3vw;
  }

  .numbers-composition-grid {
    grid-template-columns: 1fr;
    gap: 60px;
  }

  .giant-stat-box {
    border-right: none;
    border-bottom: 1px solid var(--border-light);
    padding-right: 0;
    padding-bottom: 40px;
  }

  .process-blueprint-track {
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
  }

  .process-blueprint-track::before {
    display: none;
  }

  .projects-editorial-grid {
    grid-template-columns: 1fr 1fr;
  }

  .grid-col-7, .grid-col-5, .grid-col-12, .grid-col-6 {
    grid-column: span 1;
  }

  .grid-col-12 {
    grid-column: span 2;
  }

  .grid-offset-down {
    transform: none;
  }

  .project-spec-strip {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
  }

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

  .archive-hero-grid {
    grid-template-columns: 55% 45%;
  }

  .single-hero-grid {
    grid-template-columns: 55% 45%;
  }

  .story-editorial-grid {
    grid-template-columns: 15% 85%;
  }
}

/* ==========================================================================
   2. TABLET SYSTEM (768px – 1024px)
   ========================================================================== */
@media (max-width: 1024px) {
  :root {
    --header-height: 76px;
  }

  /* Completely eliminate heavy 3D perspective on tablets */
  .perspective-wrap,
  .perspective-card,
  .perspective-tilt {
    perspective: none !important;
    transform: none !important;
    transform-style: flat !important;
  }

  .perspective-card:hover {
    transform: translateY(-4px) !important;
  }

  .floating-project-preview {
    display: none !important;
  }

  /* Global Header Offset for Tablet */
  .hero-editorial,
  .page-hero-editorial,
  .page-hero,
  .projects-archive-hero,
  .single-project-hero-wrap {
    padding-top: calc(var(--header-height) + var(--admin-bar-height, 0px) + 36px);
  }

  .section-padding {
    padding: 80px 0;
  }

  .section-padding-lg {
    padding: 100px 0;
  }

  .desktop-nav {
    display: none;
  }

  h1, .hero-giant-title, .heading-massive {
    font-size: clamp(3.2rem, 5.8vw, 5.2rem);
    line-height: 0.96;
    letter-spacing: -0.048em;
  }

  h2, .heading-xl {
    font-size: clamp(2.2rem, 5vw, 3.8rem);
    line-height: 0.95;
  }

  .manifesto-headline {
    font-size: clamp(2.2rem, 4.5vw, 4rem);
    line-height: 1.1;
  }

  .hero-grid-split {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .hero-visual-frame {
    height: 50vh;
    min-height: 340px;
  }

  .manifesto-subgrid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .work-item-75,
  .work-item-55-right {
    width: 100%;
  }

  .works-editorial-list {
    gap: 70px;
  }

  .service-row-item {
    grid-template-columns: 50px 1fr auto;
    padding: 24px 0;
  }

  .scrollytelling-section {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .scrollytelling-sticky-col {
    position: static;
  }

  .team-editorial-grid {
    grid-template-columns: 1fr;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
  }

  .contact-layout-grid {
    grid-template-columns: 1fr;
    gap: 50px;
  }

  /* Projects Archive Tablet Rhythms */
  .archive-hero-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .editorial-stream-container {
    gap: 80px;
  }

  .stream-layout-70-left,
  .stream-layout-45-right,
  .stream-layout-100-panorama,
  .stream-layout-58-left,
  .stream-layout-cinematic-wide,
  .stream-layout-50-right,
  .stream-layout-portrait-left,
  .stream-layout-ultra-wide,
  .stream-layout-offset-landscape,
  .stream-layout-100-final {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
    margin-top: 0;
  }

  .single-hero-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .single-hero-meta-strip {
    grid-template-columns: repeat(2, 1fr);
  }

  .story-editorial-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .architectural-specs-table {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   3. WORDPRESS ADMIN BAR RESPONSIVE
   ========================================================================== */
@media (max-width: 782px) {
  body.admin-bar {
    --admin-bar-height: 46px;
  }
}

@media (max-width: 600px) {
  body.admin-bar {
    --admin-bar-height: 0px;
  }
}

/* ==========================================================================
   4. MOBILE SYSTEM (0 – 767px): COMPLETE 3D STRIP & LEFT-TO-RIGHT HERO FLOW
   ========================================================================== */
@media (max-width: 767px) {
  :root {
    --header-height: 68px;
  }

  .site-container {
    padding: 0 5vw;
  }

  /* --- CRITICAL: Complete 3D Perspective, Parallax & Hover Elimination --- */
  *,
  *::before,
  *::after {
    perspective: none !important;
    transform-style: flat !important;
    backface-visibility: visible !important;
  }

  .perspective-wrap,
  .perspective-card,
  .perspective-tilt,
  .hero-visual-frame,
  .clip-hero-poly,
  .clip-corner-cut,
  .clip-diagonal {
    perspective: none !important;
    transform: none !important;
    transform-style: flat !important;
    will-change: auto !important;
  }

  .perspective-card:hover,
  .perspective-tilt:hover,
  .stream-img:hover {
    transform: none !important;
  }

  /* Disable parallax & hover previews on touch */
  .floating-project-preview,
  .services-hover-backdrop-layer {
    display: none !important;
  }

  /* --- CRITICAL: Header Overlap Fix Across All Mobile Pages --- */
  .hero-editorial,
  .page-hero-editorial,
  .page-hero,
  .projects-archive-hero,
  .single-project-hero-wrap {
    padding-top: calc(var(--header-height) + var(--admin-bar-height, 0px) + 24px) !important;
    min-height: auto !important;
  }

  .site-header {
    height: var(--header-height);
  }

  /* Mobile Header Actions & Compact WhatsApp Button (Sadece 'WhatsApp') */
  .header-actions {
    gap: 10px !important;
  }

  .header-brand-logo {
    height: 30px !important;
    max-width: 170px;
  }

  .header-whatsapp-btn {
    padding: 7px 12px !important;
    font-size: 11.5px !important;
    letter-spacing: 0.04em !important;
  }

  .header-whatsapp-btn .wa-desktop-label {
    display: none !important;
  }

  .header-whatsapp-btn .wa-mobile-label {
    display: inline !important;
    font-weight: 600;
  }

  .menu-toggle-btn {
    padding: 7px 12px !important;
    font-size: 11.5px !important;
    gap: 8px !important;
  }

  /* Fluid Responsive Typography for Inner Pages */
  .heading-massive {
    font-size: clamp(2.6rem, 10.5vw, 3.8rem) !important;
    line-height: 0.98 !important;
    letter-spacing: -0.04em !important;
    margin-top: 12px !important;
  }

  /* ==========================================================================
     KIRKLAR DİZAYN — MOBİL ANASAYFA HERO REVİZYONU
     - Başlık: %15 daha büyük (clamp(3.3rem, 13.5vw, 4.85rem))
     - Satır Aralığı: Ferah ve kontrollü (line-height: 0.98)
     - Letter Spacing: Tight mimari karakter (-0.048em)
     - Metadata: Kompakt editorial blok
     - Entrance Animation: Soldan sağa kademeli mimari reveal (Left -> Right)
     ========================================================================== */
  .hero-giant-title {
    font-size: clamp(3rem, 12vw, 4.4rem) !important;
    line-height: 0.94 !important;
    letter-spacing: -0.048em !important;
    margin-top: 8px !important;
    margin-bottom: 4px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
    overflow: visible !important;
    padding-top: 2px !important;
  }

  .hero-giant-title .hero-line {
    display: block !important;
    font-size: inherit !important;
    line-height: 0.94 !important;
    letter-spacing: inherit !important;
    padding-top: 0.05em !important;
    padding-bottom: 0.01em !important;
    overflow: visible !important;
  }

  .hero-giant-title .font-editorial-accent,
  .hero-giant-title .font-contrast-accent {
    font-size: inherit !important;
    line-height: inherit !important;
    letter-spacing: inherit !important;
    font-weight: 400 !important;
  }

  /* Kompakt Turuncu Metadata Bloğu */
  .hero-tech-meta {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 8px !important;
    row-gap: 6px !important;
    margin-bottom: 12px !important;
    line-height: 1.2 !important;
    font-size: 11.5px !important;
    letter-spacing: 0.12em !important;
  }

  .hero-tech-meta .meta-dot {
    opacity: 0.6;
  }

  .hero-desc {
    font-size: 15.5px !important;
    line-height: 1.65 !important;
    margin-top: 6px !important;
    max-width: 100% !important;
  }

  .hero-cta-group {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 16px !important;
    margin-top: 8px !important;
  }

  .hero-cta-btn:active {
    transform: scale(0.985) !important;
  }

  .hero-felsefe-link {
    display: inline-flex !important;
    align-items: center !important;
    position: relative !important;
  }

  .hero-felsefe-link::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: var(--accent-bronze);
    transform-origin: left;
  }

  /* --- MOBİL HERO LEFT-TO-RIGHT ENTRANCE ANIMATION SEQUENCE --- */
  .hero-anim-meta {
    animation: heroSlideFadeLeft 0.65s cubic-bezier(0.22, 1, 0.36, 1) 0.05s both;
  }

  .hero-line-1 {
    animation: heroTitleMaskLeft 0.75s cubic-bezier(0.22, 1, 0.36, 1) 0.18s both;
  }

  .hero-line-2 {
    animation: heroTitleMaskLeft 0.75s cubic-bezier(0.22, 1, 0.36, 1) 0.30s both;
  }

  .hero-line-3 {
    animation: heroTitleMaskLeft 0.75s cubic-bezier(0.22, 1, 0.36, 1) 0.42s both;
  }

  .hero-anim-desc {
    animation: heroSlideFadeLeft 0.65s cubic-bezier(0.22, 1, 0.36, 1) 0.62s both;
  }

  .hero-cta-btn {
    animation: heroCtaBorderReveal 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.80s both;
  }

  .hero-felsefe-link {
    animation: heroSlideFadeLeft 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.92s both;
  }

  .hero-felsefe-link::after {
    animation: heroUnderlineScale 0.6s cubic-bezier(0.22, 1, 0.36, 1) 1.05s both;
  }

  .hero-anim-image {
    animation: heroImageFadeLeft 0.75s cubic-bezier(0.22, 1, 0.36, 1) 1.10s both;
  }

  @keyframes heroSlideFadeLeft {
    from {
      opacity: 0;
      transform: translateX(-24px);
    }
    to {
      opacity: 1;
      transform: translateX(0);
    }
  }

  @keyframes heroTitleMaskLeft {
    from {
      opacity: 0;
      transform: translateX(-28px);
    }
    to {
      opacity: 1;
      transform: translateX(0);
    }
  }

  @keyframes heroCtaBorderReveal {
    from {
      opacity: 0;
      transform: translateX(-18px);
    }
    to {
      opacity: 1;
      transform: translateX(0);
    }
  }

  @keyframes heroUnderlineScale {
    from {
      transform: scaleX(0);
    }
    to {
      transform: scaleX(1);
    }
  }

  @keyframes heroImageFadeLeft {
    from {
      opacity: 0;
      transform: translateX(-16px) scale(1.015);
      clip-path: inset(0 100% 0 0);
    }
    to {
      opacity: 1;
      transform: translateX(0) scale(1);
      clip-path: inset(0 0 0 0);
    }
  }

  /* Diğer Bölüm Başlıkları ve Sayılar */
  .archive-giant-h1 {
    font-size: clamp(2.8rem, 11vw, 4.2rem) !important;
    line-height: 0.92 !important;
  }

  .single-project-giant-title {
    font-size: clamp(2.4rem, 9.5vw, 3.6rem) !important;
    line-height: 0.95 !important;
  }

  h2, .heading-xl {
    font-size: clamp(1.9rem, 7.5vw, 2.8rem) !important;
    line-height: 1.02 !important;
    letter-spacing: -0.035em !important;
  }

  h3, .heading-lg {
    font-size: clamp(1.4rem, 5.5vw, 2rem) !important;
    line-height: 1.1 !important;
  }

  .manifesto-headline {
    font-size: clamp(1.7rem, 6vw, 2.4rem) !important;
    line-height: 1.2 !important;
    letter-spacing: -0.03em !important;
  }

  .giant-stat-number {
    font-size: clamp(4.5rem, 16vw, 7rem) !important;
    line-height: 0.88 !important;
  }

  .footer-giant-wordmark {
    font-size: clamp(4rem, 16vw, 7rem) !important;
    line-height: 0.8 !important;
  }

  /* --- CRITICAL: Simplified Mobile Scroll Entrance Animations (Fade + Translate) --- */
  .scroll-reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.5s var(--ease-architectural), transform 0.5s var(--ease-architectural);
    will-change: opacity, transform;
  }

  .scroll-reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
  }

  .scroll-reveal-item {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.55s var(--ease-architectural), transform 0.55s var(--ease-architectural);
    will-change: opacity, transform;
  }

  .scroll-reveal-item.is-visible {
    opacity: 1;
    transform: translateY(0);
  }

  /* Stagger delays for mobile project row components */
  .scroll-reveal-item .stream-project-num {
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.4s var(--ease-architectural) 0.06s, transform 0.4s var(--ease-architectural) 0.06s;
  }

  .scroll-reveal-item.is-visible .stream-project-num {
    opacity: 1;
    transform: translateY(0);
  }

  .scroll-reveal-item .stream-project-title {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.45s var(--ease-architectural) 0.1s, transform 0.45s var(--ease-architectural) 0.1s;
  }

  .scroll-reveal-item.is-visible .stream-project-title {
    opacity: 1;
    transform: translateY(0);
  }

  .scroll-reveal-item .stream-project-meta {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.4s var(--ease-architectural) 0.14s, transform 0.4s var(--ease-architectural) 0.14s;
  }

  .scroll-reveal-item.is-visible .stream-project-meta {
    opacity: 1;
    transform: translateY(0);
  }

  .scroll-reveal-mask {
    clip-path: none !important;
    opacity: 1 !important;
  }

  /* Editorial Projects Stream on Mobile */
  .editorial-stream-container {
    gap: 50px;
  }

  .stream-project-caption {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .stream-image-wrap {
    aspect-ratio: 16 / 10 !important;
  }

  /* Native Touch Swipe Horizontal Track on Mobile */
  .horizontal-track-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    scroll-padding: 0 5vw;
    gap: 20px;
    padding-bottom: 16px;
  }

  .horizontal-track-item {
    flex: 0 0 82vw;
    min-width: 82vw;
    scroll-snap-align: center;
  }

  /* Grids & Cards Flow */
  .process-blueprint-track,
  .timeline-architectural-grid,
  .supporting-stats-grid,
  .projects-editorial-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .grid-col-12 {
    grid-column: span 1;
  }

  .single-hero-meta-strip {
    grid-template-columns: 1fr;
    padding: 20px;
    gap: 16px;
  }

  .single-featured-image-stage {
    padding: 0;
    margin: 20px 0 30px;
  }

  .featured-image-frame {
    height: 40vh;
    min-height: 260px;
  }

  .next-project-cinematic-stage {
    height: 55vh;
    min-height: 340px;
  }

  .footer-nav-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .footer-bottom-bar {
    flex-direction: column;
    gap: 14px;
    text-align: center;
  }
}

/* ==========================================================================
   5. ACCESSIBILITY: PREFERS-REDUCED-MOTION
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto !important;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
    perspective: none !important;
    transform: none !important;
  }

  .scroll-reveal,
  .scroll-reveal-item,
  .scroll-reveal-mask,
  .stream-project-num,
  .stream-project-title,
  .stream-project-meta,
  .reveal-line,
  .hero-anim-meta,
  .hero-line-1,
  .hero-line-2,
  .hero-line-3,
  .hero-anim-desc,
  .hero-cta-btn,
  .hero-felsefe-link,
  .hero-felsefe-link::after,
  .hero-anim-image {
    opacity: 1 !important;
    transform: none !important;
    clip-path: none !important;
    transition: none !important;
    animation: none !important;
  }
}
