/* ==========================================================================
   Georgetown Wallpaper Installer — responsive rules
   Desktop-first; tested at 1920 / 1440 / 1280 / 1024 / 768 / 480 / 390 / 375 / 360 / 320.
   ========================================================================== */

/* ---------- ≥ 1600: a little more air ---------- */
@media (min-width: 1600px) {
  :root { --container: 1400px; }
}

/* ---------- ≤ 1279: drop the header phone, tighten nav ---------- */
@media (max-width: 1279px) {
  .header-phone { display: none; }
  .nav-track a { padding: 0.55em 0.8em; font-size: 0.9rem; }
}

/* ---------- ≤ 1099: drawer navigation, stacked hero card ---------- */
@media (max-width: 1099px) {
  .primary-nav { display: none; }
  .header-actions { margin-left: auto; }
  .nav-toggle { display: inline-flex; }

  .js .drawer {
    position: fixed;
    top: calc(var(--header-h) + 30px);
    left: var(--gutter);
    right: var(--gutter);
    z-index: 59;
    max-height: calc(100vh - var(--header-h) - 48px);
    overflow-y: auto;
    padding: 14px;
    border-radius: 30px;
    background: var(--bg);
    border: var(--edge);
    box-shadow: var(--raise-lg);
  }
  .js .drawer.is-open { display: block; }
  /* Without JavaScript the menu is simply shown under the header */
  .no-js .nav-toggle { display: none; }
  .no-js .drawer { display: block; padding: 0 var(--gutter) 12px; }
  .no-js .drawer__list { display: flex; flex-wrap: wrap; gap: 4px; }
  .no-js .drawer__list a { padding: 8px 12px; font-size: 0.95rem; }
  .no-js .drawer__list a::after { content: none; }
  .no-js .drawer__actions { display: none; }

  .hero__photo { height: clamp(420px, 62vh, 640px); }
  .hero__card {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    transform: none;
    width: calc(100% - 48px);
    max-width: 760px;
    margin: -120px auto 6px;
  }

  .service-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: clamp(190px, 30vw, 280px);
    grid-template-areas:
      "a a"
      "p1 b"
      "p1 c"
      "d p2"
      "f p2"
      "e e";
  }

  .footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- ≤ 1023: stack "why" ---------- */
@media (max-width: 1023px) {
  .why__grid { grid-template-columns: 1fr; }
  .why__intro { position: static; }
}

/* ---------- ≤ 960: stack CTA, contact, location ---------- */
@media (max-width: 960px) {
  .cta__panel { grid-template-columns: 1fr; }
  .cta__swatches {
    order: -1;
    height: auto;
    display: flex;
    justify-content: center;
    gap: 14px;
    padding: 6px 0 4px;
  }
  .swatch { position: relative; inset: auto; width: 30%; max-width: 190px; padding: 7px 7px 9px; }
  .swatch--1 { transform: rotate(-4deg); }
  .swatch--2 { transform: rotate(1deg) translateY(-8px); }
  .swatch--3 { transform: rotate(4deg); }
  .swatch figcaption { font-size: 0.66rem; letter-spacing: 0.06em; }

  .contact__grid { grid-template-columns: 1fr; }
  .location__grid { grid-template-columns: 1fr; }
}

/* ---------- ≤ 900: stack about, vertical timeline ---------- */
@media (max-width: 900px) {
  .about__grid { grid-template-columns: 1fr; }
  .about__media { max-width: 560px; width: 100%; margin-inline: auto; }
  .about__photo { aspect-ratio: 5 / 4; }
  .about__badge { right: 12px; bottom: -22px; }
  .about__copy { margin-top: 18px; }

  .timeline { grid-template-columns: 1fr; gap: 22px; }
  .timeline::before,
  .timeline::after { left: 26px; right: auto; top: 33px; bottom: 33px; }
  .timeline::before { width: 14px; height: auto; }
  .timeline::after { left: 31px; width: 4px; height: auto; right: auto; top: 39px; bottom: 39px; transform-origin: center top; }
  .timeline__step { flex-direction: row; align-items: flex-start; text-align: left; gap: 18px; }
  .timeline__knob { width: 66px; height: 66px; margin-left: 0; flex: none; }
  .timeline__card { margin-top: 0; }
}
@media (max-width: 900px) and (prefers-reduced-motion: no-preference) {
  .reveal-on .timeline::after { transform: scaleY(0); }
  .reveal-on .timeline.is-in::after { transform: scaleY(1); }
}

/* ---------- ≤ 760: phone layout ---------- */
@media (max-width: 760px) {
  :root { --header-h: 64px; }
  body { font-size: 1rem; padding-bottom: 84px; }

  .site-header { padding: 8px 0 6px; }
  .site-header .container.header-bar { width: calc(100% - 20px); padding-inline: 10px 8px; gap: 10px; }
  .brand__mark svg { width: 40px; height: 40px; }
  .brand__name { font-size: 1.32rem; }
  .brand__tag { font-size: 0.58rem; letter-spacing: 0.16em; }
  .nav-toggle { width: 46px; height: 46px; }
  .js .drawer { top: calc(var(--header-h) + 22px); left: 10px; right: 10px; }

  .hero { padding-top: 4px; }
  .hero .container { padding-inline: 10px; }
  .hero__frame { padding: 9px; border-radius: 30px; }
  .hero__photo { height: min(clamp(300px, 100vw, 600px), 62vh); height: min(clamp(300px, 100vw, 600px), 62svh); border-radius: 22px; }
  .hero__photo img { object-position: 50% 50%; }
  .hero__photo::after { background: none; }
  .hero__card {
    width: calc(100% - 20px);
    margin-top: -64px;
    padding: 26px 22px 24px;
    border-radius: 26px;
  }
  .location-chip { font-size: 0.78rem; }
  .hero__card .btn-row .btn { flex: 1 1 100%; }
  .hero__chips { gap: 10px; margin-top: 22px; }
  .hero__chips li { font-size: 0.8rem; padding: 0.5em 0.95em; }

  .section { padding-block: clamp(60px, 14vw, 80px); }

  .gallery__note { font-size: 0.94rem; }

  .cta__panel { padding: 20px 14px 14px; border-radius: 32px; }
  .cta__copy { padding: 24px 20px; }
  .cta__copy .btn-row .btn { flex: 1 1 100%; }

  .form-card { padding: 24px 18px; border-radius: 28px; }
  .location-card { padding: 24px 20px; }
  .map-well { padding: 8px; border-radius: 26px; }
  .map-well iframe { height: 340px; border-radius: 20px; }

  .footer__grid { padding: 26px 22px; border-radius: 28px; }

  .mobile-bar {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: 10px;
    z-index: 55;
    display: flex;
    gap: 10px;
    padding: 8px;
    border-radius: 999px;
    background: rgba(232, 231, 226, 0.97);
    border: var(--edge);
    box-shadow: 0 -2px 22px rgba(80, 74, 64, 0.25), var(--raise-sm);
    transition: transform 0.35s ease, opacity 0.35s ease;
  }
  .mobile-bar .btn { flex: 1 1 0; min-height: 48px; padding: 0 1em; }
  .mobile-bar.is-hidden { transform: translateY(140%); opacity: 0; pointer-events: none; }
}

/* ---------- ≤ 680: single-column cards ---------- */
@media (max-width: 680px) {
  .service-grid { grid-template-columns: 1fr; }
  .why__list { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; }

  .gallery-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
    grid-template-areas: none;
  }
  .g-tile { grid-area: auto !important; aspect-ratio: 4 / 3; }
  .g-p1, .g-p2 { aspect-ratio: 4 / 5; }
}

/* ---------- ≤ 560: single-column form ---------- */
@media (max-width: 560px) {
  .form-grid { grid-template-columns: 1fr; gap: 18px; }
  .btn-row { gap: 12px; }
  .footer__bottom { flex-direction: column; align-items: flex-start; }
}

/* ---------- ≤ 480: compact header ---------- */
@media (max-width: 480px) {
  .header-cta { display: none; }
  .hero__title { font-size: clamp(2.35rem, 1.2rem + 6.4vw, 2.9rem); }
  .section-title { font-size: clamp(2rem, 1.3rem + 4vw, 2.4rem); }
  .contact-list li { padding: 12px 14px; gap: 12px; }
  .icon-well--sm { width: 42px; height: 42px; }
}

/* ---------- ≤ 360: smallest phones ---------- */
@media (max-width: 360px) {
  .brand { gap: 9px; }
  .brand__mark svg { width: 36px; height: 36px; }
  .brand__name { font-size: 1.18rem; }
  .brand__tag { font-size: 0.52rem; letter-spacing: 0.12em; }
  .hero__card { padding: 22px 16px 20px; }
  .location-chip { font-size: 0.72rem; padding: 0.5em 0.8em 0.5em 0.65em; }
  .mobile-bar .btn { font-size: 0.9rem; }
}

/* ---------- Large touch targets on coarse pointers ---------- */
@media (pointer: coarse) {
  .footer__col a, .footer__contact a { display: inline-block; padding-block: 4px; }
}
