/* ==========================================================================
   OASIS ENGINEERING & CONSULTANCY — responsive.css
   Mobile-first enhancements. Breakpoints:
   360 (small phones) · 480 · 640 · 768 · 1024 · 1280 · 1600
   ========================================================================== */

/* ---------- Very small phones (<= 359px) ---------- */
@media (max-width: 359px) {
  :root { --gutter: 1rem; }
  .brand { gap: .55rem; }
  .brand__mark { width: 36px; height: 36px; }
  .brand__name { font-size: 1.1875rem; }
  .brand__sub { font-size: .5625rem; letter-spacing: .04em; }
  .btn { padding-inline: 1.1rem; }
  .btn-row .btn { width: 100%; }
}

/* ---------- Phones (>= 480px) ---------- */
@media (min-width: 480px) {
  .brand__sub { font-size: .65rem; letter-spacing: .09em; }
  .hero__actions .btn { min-width: 12.5rem; }
}

/* ---------- Small tablets (>= 640px) ---------- */
@media (min-width: 640px) {
  .grid--2, .grid--3, .grid--4, .grid--five { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--five > :last-child, .fill-last:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / -1; }
  .footer-bottom { grid-template-columns: 1fr auto; align-items: center; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cta-band__inner .btn-row { flex-wrap: wrap; }
  .lightbox { padding: 1.25rem; }
  .lb-prev { left: .75rem; } .lb-next { right: .75rem; }
}

/* ---------- Tablets (>= 768px) ---------- */
@media (min-width: 768px) {
  :root { --header-h: 76px; }
  .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .deco { display: block; animation: floaty 9s ease-in-out infinite; }
  .deco--2 { animation-duration: 12s; animation-delay: -3s; }
  .deco--3 { animation-duration: 10s; animation-delay: -6s; }
  .blob--a { animation: morph 22s ease-in-out infinite; }
  .blob--b { animation: morph 28s ease-in-out infinite reverse; }
  .blob { filter: blur(60px); }
  .hero__tags { gap: .5rem 2.25rem; }
  .media-frame__badge { left: -1.25rem; bottom: 2rem; }
  .step { grid-template-columns: 3.25rem minmax(0, 1fr); gap: 1.5rem; }
  .step::before { left: 1.625rem; top: 3.25rem; }
  .step__badge { width: 3.25rem; height: 3.25rem; }
  .footer-grid { gap: 2.5rem 2rem; }
}

/* ---------- Laptops / desktop nav (>= 1024px) ---------- */
@media (min-width: 1024px) {
  :root { --header-h: 80px; }

  .nav-toggle { display: none; }
  .site-nav {
    position: static; height: auto; overflow: visible; padding: 0; background: none;
    flex-direction: row; align-items: center; gap: 1.25rem;
    opacity: 1; visibility: visible; transform: none; transition: none;
  }
  .site-nav__list { display: flex; align-items: center; gap: .125rem; }
  .site-nav__list li { border: 0; animation: none !important; }
  .site-nav__list a {
    min-height: 2.75rem; padding: .5rem .8rem; font-weight: 500; font-size: var(--fs-nav); color: rgba(245, 245, 242, .88);
    transition: color .25s;
  }
  .site-nav__list a::after { left: .8rem; right: .8rem; bottom: .3rem; width: auto; transform: scaleX(0); transform-origin: left; transition: transform .4s var(--ease); }
  .site-nav__list a:hover, .site-nav__list a[aria-current="page"] { color: var(--white); }
  .site-nav__list a:hover::after, .site-nav__list a[aria-current="page"]::after { width: auto; transform: scaleX(1); }
  .site-nav .btn { display: none; width: auto; }

  .split { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split--wide-text { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); }
  .split--reverse > :first-child { order: 2; }
  .grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .grid--five { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .grid--five > * { grid-column: span 2; }
  .grid--five > :nth-last-child(2), .grid--five > :last-child { grid-column: span 3; }
  .grid--features-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--details { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; }

  .steps--row { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1.5rem; }
  .steps--row .step { grid-template-columns: minmax(0, 1fr); gap: 1.25rem; padding-bottom: 0; }
  .steps--row .step::before { display: block; left: 3.25rem; right: -1.5rem; top: 1.625rem; bottom: auto; width: auto; height: 2px; transform: none; background: linear-gradient(90deg, var(--orange), rgba(232, 139, 50, .15)); }
  .steps--row .step:last-child::before { display: none; }
  .steps--row .step__body { padding-top: 0; }

  .contact-layout { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); align-items: stretch; }
  .contact-layout .map-wrap { aspect-ratio: auto; height: 100%; min-height: 380px; }
  .footer-grid { grid-template-columns: 1.5fr .8fr 1fr 1.2fr; }
  .footer-brand { grid-column: auto; }
  .page-hero h1 { max-width: 22ch; }
  .lb-btn { width: 52px; height: 52px; }
}

/* ---------- Desktop (>= 1280px) ---------- */
@media (min-width: 1280px) {
  .site-nav__list a { padding-inline: .95rem; }
  .site-nav__list a::after { left: .95rem; right: .95rem; }
  .site-nav .btn { display: inline-flex; min-height: 2.75rem; padding: .55rem 1.25rem; }
  .grid--contact { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .hero__content { max-width: 50rem; }
}

/* ---------- Large / wide screens (>= 1600px) ---------- */
@media (min-width: 1600px) {
  :root { --container: 1320px; }
  html { font-size: 106.25%; }
}

/* ---------- Short landscape phones ---------- */
@media (max-height: 520px) and (orientation: landscape) {
  .hero { min-height: 0; padding-block: calc(var(--header-h) + 2rem) 2.5rem; }
}

/* ---------- Touch devices: no hover-only affordances ---------- */
@media (hover: none) {
  .project-card__zoom { opacity: 1; transform: none; width: 2.25rem; height: 2.25rem; }
  .svc-card { transform: none !important; }
}

/* ---------- Mobile hero legibility: stronger overlay behind text ---------- */
@media (max-width: 767px) {
  .hero__overlay { background: linear-gradient(180deg, rgba(13, 25, 40, .8) 0%, rgba(13, 25, 40, .72) 55%, rgba(13, 25, 40, .92) 100%); }
  .hero__media img { object-position: 62% 50%; }
}
