/* ======================================================================
   Rihayesh.com — Responsive Styles
   Mobile-first corrections: 1200px | 992px | 768px | 560px
   ====================================================================== */

/* ---- 1200px ---------------------------------------------------------- */
@media (max-width: 1200px) {
  :root { --container: 1060px; }

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

/* ---- 992px — Tablet / mobile nav breakpoint -------------------------- */
@media (max-width: 992px) {

  /* Nav */
  .nav__phone { display: none; }
  .nav__links {
    display: none;
    position: fixed;
    top: var(--header-h);
    left: 0; right: 0;
    background: rgba(255,255,255,.97);
    backdrop-filter: blur(28px) saturate(200%);
    -webkit-backdrop-filter: blur(28px) saturate(200%);
    flex-direction: column;
    padding: 1.6rem var(--gutter) 3rem;
    gap: .3rem;
    border-bottom: 1px solid rgba(0,0,0,.07);
    border-radius: 0 0 var(--r-lg) var(--r-lg);
    box-shadow: 0 16px 48px rgba(0,0,0,.10), 0 0 0 1px rgba(0,0,0,.04);
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .nav__links.is-open { display: flex; }
  .nav__links a {
    width: 100%;
    font-size: 1.6rem;
    padding: 1.35rem 1.6rem;
    color: rgba(17,17,17,.72);
    border-radius: 8px;
  }
  .nav__links a:hover, .nav__links a.active {
    color: var(--clr-primary);
    background: rgba(201,101,0,.07);
  }
  .nav__toggle {
    display: flex;
    min-width: 44px;
    min-height: 44px;
  }

  /* Hero */
  .hero__stats { gap: 2.4rem; }
  .hero__container {
    grid-template-columns: 1fr;
    padding-top: calc(var(--header-h) + 2.8rem);
    padding-bottom: 5rem;
    gap: 3.2rem;
    min-height: auto;
  }
  .hero__content { max-width: 640px; }
  .hero__visual {
    aspect-ratio: unset;
    width: 100%;
    height: 360px;
    border-radius: var(--r-lg);
  }

  /* About new */
  .about-new { margin-bottom: 5.6rem; }

  /* CEO section */
  .ceo-section__grid {
    grid-template-columns: 1fr;
    gap: 3.2rem;
  }
  .ceo-section__img-wrap { aspect-ratio: 16/9; max-height: 360px; }
  .ceo-ph { aspect-ratio: 16/9; min-height: 0; }

  /* Mission & Vision */
  .mv-grid { grid-template-columns: 1fr; gap: 2.4rem; padding-top: 5.6rem; }

  /* Projects */
  .project-panel {
    grid-template-columns: 1fr;
    grid-template-areas: "media" "body";
    gap: 3.2rem;
  }
  .project-panel__media { aspect-ratio: 16/9; }

  /* Gallery */
  .gallery-grid { columns: 2; }

  /* Why us */
  .why-grid { grid-template-columns: repeat(2, 1fr); gap: 2rem; }

  /* Contact */
  .contact__grid {
    grid-template-columns: 1fr;
    gap: 4rem;
  }

  /* Footer */
  .footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: 3.6rem;
  }
  .footer__grid > *:first-child { grid-column: 1 / -1; }
}

/* ---- 768px — Mobile portrait / small tablet -------------------------- */
@media (max-width: 768px) {

  :root {
    --section-py: clamp(3.4rem, 7.5vw, 5.6rem);
    --header-h: 78px;
  }

  /* Logo — slightly larger for mobile prominence */
  .brand__logo { height: 68px; }

  /* Hero */
  .hero__title   { font-size: clamp(3.8rem, 9vw, 6rem); }
  .hero__sub     { font-size: 1.55rem; max-width: 100%; }
  .hero__stats   { gap: 2rem; flex-wrap: wrap; }
  .hero__cta     { flex-direction: column; }
  .hero__cta .btn { width: 100%; justify-content: center; }
  .hero__visual  { height: 300px; }
  .hero__visual-badge { padding: 1rem 1.4rem; }
  .hero__visual-badge strong { font-size: 1.6rem; }

  /* Section titles */
  .section-title { font-size: clamp(3.2rem, 7.5vw, 5.5rem); letter-spacing: .04em; }

  /* Section sub — readable on narrow screens */
  .section-sub { font-size: 1.6rem; max-width: 100%; }

  /* About */
  .about-new { margin-bottom: 4.8rem; }
  .about-new__lead { font-size: clamp(2.2rem, 4.5vw, 3.4rem); letter-spacing: .05em; }
  /* Remove justify on mobile — narrow columns break word-spacing badly */
  .about-new p { text-align: left; hyphens: none; }

  /* CEO */
  .ceo-section { padding-top: 4.8rem; margin-bottom: 4.8rem; }
  .ceo-section__head { margin-bottom: 3.6rem; }
  .ceo-section__body p { text-align: left; hyphens: none; }
  .mv-grid { padding-top: 4.8rem; gap: 2rem; }
  .mv-card { padding: 3rem 2.4rem; }
  .mv-card__title { font-size: 2.4rem; }

  /* Projects */
  .project-panel__features { grid-template-columns: 1fr 1fr; }
  .project-panel__cta { flex-direction: column; align-items: flex-start; }
  .project-panel__desc { text-align: left; hyphens: none; }

  /* Gallery */
  .gallery-grid { columns: 2; column-gap: 1rem; }
  .gallery-item { margin-bottom: 1rem; }

  /* Why us */
  .why-grid { grid-template-columns: 1fr; gap: 1.6rem; }
  .why-card { padding: 3rem 2.4rem; }

  /* Form */
  .form-row { grid-template-columns: 1fr; }
  /* Fix iOS Safari auto-zoom on inputs — minimum 16px (1.6rem) prevents it */
  .field input, .field select, .field textarea { font-size: 1.6rem; }

  /* Footer */
  .footer__grid { grid-template-columns: 1fr; gap: 3.2rem; }
  .footer__grid > *:first-child { grid-column: 1; text-align: center; }
  .footer__socials { justify-content: center; }
  .footer__bottom { flex-direction: column; text-align: center; gap: .8rem; }

  /* Section-head spacing */
  .section-head { margin-bottom: clamp(3rem, 6.5vw, 5.2rem); }

  /* Lightbox nav */
  .lightbox__nav--prev { left: 1.2rem; }
  .lightbox__nav--next { right: 1.2rem; }
}

/* ---- 560px — Small phones -------------------------------------------- */
@media (max-width: 560px) {

  :root {
    --gutter: 1.6rem;
    --header-h: 68px;
    --section-py: clamp(2.8rem, 7vw, 4.6rem);
  }

  /* Nav — hide CTA button, keep logo + toggle clean */
  .nav__actions .btn { display: none; }

  /* Logo — bigger and more visible on small screens */
  .brand__logo { height: 58px; }

  /* Hero */
  .hero { min-height: 100svh; }
  .hero__container { gap: 2.4rem; padding-top: calc(var(--header-h) + 2rem); }
  .hero__title { letter-spacing: .03em; font-size: clamp(3.4rem, 10vw, 5.5rem); }
  .hero__sub   { font-size: 1.5rem; }
  .hero__cta   { gap: 1.2rem; }
  .hero__stats > * { flex: 1 1 40%; }
  .hero__visual { height: 250px; border-radius: var(--r-md); }
  .hero__visual-badge { bottom: 1.4rem; left: 1.4rem; padding: .9rem 1.3rem; }
  .hero__visual-badge strong { font-size: 1.5rem; }
  .hero__visual-badge span  { font-size: 1rem; }

  /* Section titles */
  .section-title { font-size: clamp(2.8rem, 8vw, 4.8rem); letter-spacing: .03em; }

  /* Section sub */
  .section-sub { font-size: 1.5rem; }

  /* Eyebrow */
  .eyebrow { font-size: 1rem; letter-spacing: .18em; }

  /* About */
  .about-new__lead { font-size: clamp(2rem, 6vw, 2.8rem); letter-spacing: .04em; }
  .about-new p { font-size: 1.55rem; line-height: 1.80; }

  /* CEO & MV */
  .ceo-section { padding-top: 3.6rem; margin-bottom: 3.6rem; }
  .ceo-sig { gap: 1.6rem; }
  .mv-grid { padding-top: 3.6rem; }
  .mv-card { padding: 2.4rem 2rem; }
  .mv-card__title { font-size: 2.2rem; }
  .mv-card__text { font-size: 1.5rem; }

  /* Gallery */
  .gallery-grid { columns: 1; }
  .gallery-filters { gap: .6rem; }
  .gallery-filter { font-size: 1.2rem; padding: .7rem 1.4rem; }

  /* Projects */
  .project-panel__features { grid-template-columns: 1fr; gap: .6rem; }
  .project-panel__specs { gap: .6rem; }
  .project-panel__title { font-size: clamp(2.8rem, 8vw, 4.8rem); }
  .project-panel__cta { gap: 1rem; }
  .project-panel__cta .btn { width: 100%; justify-content: center; }

  /* Contact */
  .contact__form-wrap { padding: 2.4rem 2rem; }
  .contact__info-head { font-size: clamp(2.6rem, 8vw, 4.4rem); }
  .contact__item { padding: 1.4rem 1.6rem; gap: 1.4rem; }
  .contact__item-ico { width: 4rem; height: 4rem; }
  .contact__item b { font-size: 1.1rem; }
  .contact__item span, .contact__item a { font-size: 1.45rem; }

  /* Why cards */
  .why-card { padding: 2.4rem 2rem; }
  .why-card__title { font-size: 1.9rem; }
  .why-card__desc { font-size: 1.45rem; }

  /* Buttons — better thumb tap targets on mobile */
  .btn--sm { padding: 1.2rem 2rem; }

  /* Footer — mobile clean stack */
  .footer__socials { gap: .6rem; justify-content: center; }
  .footer__brand-logo { height: 54px; display: block; margin: 0 auto 2rem; }
  .footer__tagline { text-align: center; font-size: 1.4rem; }
  .footer__grid > *:first-child { text-align: center; }
  .footer__links a { font-size: 1.5rem; line-height: 1.9; }
  .footer__contact-item { font-size: 1.4rem; }

  /* Section-head */
  .section-head { margin-bottom: clamp(2.4rem, 5.5vw, 4rem); }

  /* Badge */
  .badge { font-size: 1.05rem; }
  .price-badge { font-size: 1.1rem; }

  /* WhatsApp float — compact on small screens, stays out of thumb zone */
  .wa-float { bottom: 2rem; right: 1.6rem; width: 5rem; height: 5rem; }
  .wa-float .ico { width: 2.6rem; height: 2.6rem; }
}

/* ---- Reduced motion -------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  html { scroll-behavior: auto; }
  .reveal, .reveal--left, .reveal--right, .reveal--zoom, .reveal--up {
    opacity: 1;
    transform: none;
  }
}

/* ---- Fullbleed hero responsive ---------------------------------------- */
@media (max-width: 992px) {
  .hero--fullbleed .hero__container {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .hero__veil {
    background:
      linear-gradient(to bottom, rgba(5,4,3,0.60) 0%, transparent 30%),
      linear-gradient(to top,    rgba(5,4,3,0.55) 0%, transparent 30%) !important;
  }
  .hero__veil::after { display: none; }
}

@media (max-width: 768px) {
  .hero--fullbleed .hero__bg img {
    object-position: center 20%;
  }
}

/* ---- Logo slider responsive ------------------------------------------ */
@media (max-width: 768px) {
  .ls-section { padding: 2.8rem 0; }
  .ls-label { font-size: .9rem; margin-bottom: 2rem; }
  .ls-name { padding: 0 2rem; font-size: 1.25rem; letter-spacing: .14em; }
  .ls-dot { width: 4px; height: 4px; }
  .ls-inner { animation-duration: 28s; }
}

@media (max-width: 560px) {
  .ls-section { padding: 2.4rem 0; }
  .ls-name { padding: 0 1.6rem; font-size: 1.15rem; letter-spacing: .10em; }
  .ls-dot { width: 4px; height: 4px; }
  .ls-inner { animation-duration: 24s; }
}

/* ---- Premium project cards responsive --------------------------------- */
@media (max-width: 992px) {
  .project-panel--flip {
    grid-template-areas: "media" "body";
  }
  .project-panel {
    border-radius: var(--r-lg);
    padding: 2.8rem;
    margin-bottom: 2rem;
  }
}

@media (max-width: 768px) {
  .project-panel {
    padding: 2.4rem;
    border-radius: var(--r-md);
  }
}

@media (max-width: 560px) {
  .project-panel {
    padding: 2rem 1.8rem;
    margin-bottom: 1.6rem;
  }
}

/* ---- Print ----------------------------------------------------------- */
@media print {
  .site-header, .scroll-bar, .scroll-cue, .ls-section, .wa-float { display: none; }
  .hero { min-height: auto; padding-top: 4rem; }
  * { color: black !important; background: white !important; }
}
