/* ==========================================================================
   responsive.css — tablet & mobile layouts
   Breakpoints: 1199 (laptop), 991 (tablet), 767 (large phone), 575 (phone), 380 (small)
   ========================================================================== */
@media (max-width: 1199.98px) {
  .nav-links__a { padding: 8px 10px; font-size: 0.86rem; }
  .navbar-ws { gap: 16px; }
  .site-footer__top { grid-template-columns: 1.3fr 1fr 1fr; }
  .site-footer__contact { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px; }
  .site-footer__contact .site-footer__h { width: 100%; margin-bottom: 4px; }
  .site-footer__mail { margin: 0; }
  .site-footer__contact .btn-ws { margin-top: 0 !important; }
}

@media (max-width: 1100px) {
  .nav-links, .nav-hire { display: none; }
  .nav-toggle { display: block; }
}

@media (max-width: 991.98px) {
  :root { --header-h: 68px; }
  .hero { min-height: auto; padding: calc(var(--header-h) + 24px) 0 88px; flex-direction: column; align-items: stretch; }
  .hero__stage { position: relative; inset: auto; order: -1; height: min(62vw, 440px); margin: 0 auto -10px; width: 100%; }
  .hero__fallback { position: absolute; left: 50%; right: auto; top: 50%; width: min(56vw, 400px); transform: translate(-50%, -50%); }
  .hero:not(.is-3d) .hero__fallback { animation: none; }
  .hero__glow { left: 50%; right: auto; width: 80vw; height: 80vw; transform: translate(-50%, -50%); }
  .hero__copy { max-width: 720px; margin: 0 auto; text-align: center; }
  .hero__role, .hero__ctas, .hero__avail { justify-content: center; }
  .hero__lead { margin-left: auto; margin-right: auto; }
  .hero__scroll { display: none; }
  .showcase, .showcase--flip { grid-template-columns: 1fr; }
  .showcase--flip .showcase__media { order: 0; }
  .process__list { grid-template-columns: repeat(2, 1fr); }
  .services-list { grid-template-columns: 1fr; }
  .links-panel { grid-template-columns: 1fr; }
  .case-hero__grid { grid-template-columns: 1fr; align-items: start; }
  .case-cta__grid { grid-template-columns: 1fr; }
  .timeline__line { left: 25px; transform: none; }
  .timeline__item, .timeline__item--right { grid-template-columns: 52px 1fr; gap: 16px; align-items: start; }
  .timeline__dot { grid-column: 1; grid-row: 1; }
  .timeline__card, .timeline__item--right .timeline__card { grid-column: 2; grid-row: 1; text-align: left; }
  .cta__box--row { flex-direction: column; align-items: flex-start; }
  .section-head { align-items: flex-start; }
}

@media (max-width: 767.98px) {
  body { font-size: 1rem; }
  .projects-grid { grid-template-columns: 1fr; }
  .site-footer__top { grid-template-columns: 1fr 1fr; gap: 32px; }
  .site-footer__brand { grid-column: 1 / -1; }
  .site-footer__bottom { flex-direction: column; }
  .about-quick { grid-template-columns: 1fr; }
  .feature-list { grid-template-columns: 1fr; }
  .gallery--desktop, .gallery--dashboard { grid-template-columns: 1fr; }
  .service-card__cols { grid-template-columns: 1fr; }
  .wa-float__label { display: none; }
  .wa-float { width: 56px; padding: 0; justify-content: center; }
  .lightbox { padding: 16px; }
  .lightbox__nav { top: auto; bottom: 18px; transform: none; }
  .lightbox__nav--prev { left: calc(50% - 60px); }
  .lightbox__nav--next { right: calc(50% - 60px); }
  .lightbox__figure img { max-height: 72vh; }
}

@media (max-width: 575.98px) {
  .container-xl { --bs-gutter-x: 2.5rem; }
  .hero__stage { height: 74vw; }
  .hero__fallback { width: 66vw; }
  .hero__kicker { font-size: 0.68rem; letter-spacing: 0.1em; }
  .hero__title { font-size: clamp(2.3rem, 11.5vw, 3.2rem); }
  .hero__tagline span { display: block; margin: 4px 0 0; }
  .hero__ctas { flex-direction: column; }
  .hero__ctas .btn-ws { width: 100%; }
  .facts { grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
  .facts li { padding: 14px 10px; }
  .facts strong { font-size: 1.6rem; }
  .facts span { font-size: 0.74rem; }
  .code-window__body { min-height: 0; padding: 18px 16px 20px; font-size: 0.72rem; }
  .process__list { grid-template-columns: 1fr; }
  .doc-card { padding: 22px; gap: 16px; }
  .doc-card__icon { width: 50px; height: 60px; font-size: 1.4rem; }
  .project-card__body { padding: 20px; }
  .project-card__actions .btn-ws { flex: 1 1 auto; }
  .showcase__actions .btn-ws, .case-hero__actions .btn-ws, .cta__actions .btn-ws { flex: 1 1 100%; }
  .cta__box--row .btn-ws { width: 100%; }
  .filter-bar { flex-wrap: nowrap; overflow-x: auto; margin-left: calc(var(--bs-gutter-x) * -0.5); margin-right: calc(var(--bs-gutter-x) * -0.5); padding: 4px calc(var(--bs-gutter-x) * 0.5) 10px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .filter-bar::-webkit-scrollbar { display: none; }
  .filter-btn { flex-shrink: 0; }
  .skills-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .skill-card { min-height: 0; }
  .skill-card__front { padding: 18px 16px; }
  .skill-card__icon { width: 52px; height: 52px; margin-bottom: 14px; }
  .skill-card__icon img { width: 30px; height: 30px; }
  .skill-card__name { font-size: 1.05rem; }
  /* On touch phones the detail is shown below the name instead of on hover */
  .skill-card__detail { position: static; opacity: 1; transform: none; background: none; padding: 0 16px 18px; }
  .skill-card__hint { display: none; }
  .skill-card:hover .skill-card__front, .skill-card:focus-within .skill-card__front { opacity: 1; }
  .skill-card__desc { font-size: 0.82rem; color: var(--text-2); }
  .document-card__actions .btn-ws { flex: 1 1 100%; }
  .pdf-preview__frame iframe { height: 70vh; }
  .service-card__actions .btn-ws { width: 100%; }
  .case-facts div { grid-template-columns: 1fr; gap: 2px; }
  .site-footer__top { grid-template-columns: 1fr; }
  .channel { padding: 14px 16px; }
  .form-panel { border-radius: 22px; }
}

@media (max-width: 380px) {
  .brand__text small { display: none; }
  .skills-grid { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr; }
}

@media (hover: none) {
  .skill-card__detail { position: static; opacity: 1; transform: none; background: none; padding: 0 24px 22px; }
  .skill-card__hint { display: none; }
  .skill-card { min-height: 0; }
  .skill-card__front { height: auto; padding-bottom: 14px; }
  .skill-card__desc { color: var(--text-2); }
  .skill-card:hover .skill-card__front, .skill-card:focus-within .skill-card__front { opacity: 1; }
  .gallery__zoom { opacity: 1; }
}

/* keep Bootstrap's large gutters inside the container padding on phones */
@media (max-width: 575.98px) {
  .row.g-5 { --bs-gutter-x: 1.5rem; --bs-gutter-y: 2.25rem; }
}
