/* ================================================================
   RESPONSIVE — interim mobile/tablet rules.

   ⚠️ Designer has NOT delivered mobile/tablet screens. These are sensible
   defaults to keep the site usable below the design width — they are not
   pixel-accurate to a Figma reference. Replace with real values when the
   designer ships official mobile/tablet frames.

   Scope: every rule below is wrapped in a max-width media query. At
   viewports ≥1024px the page renders exactly as sections.css + components.css
   define it (with body zoom: 0.8 from min-width: 768px). These rules don't
   touch the desktop view.

   Breakpoints:
     ≤1023px — tablet portrait + smaller laptops (body zoom 0.8 still applies)
     ≤767px  — phone (body zoom is disabled at this width by sections.css)
   ================================================================ */


/* =============== TABLET (≤1023px) =============== */
@media (max-width: 1023px) {
  :root {
    --pad: 32px;
  }

  /* Nav — tighten menu (152px → 28px gap, 20 → 14 font) */
  .nav-links {
    gap: 28px;
  }
  .nav-links a {
    font-size: 14px;
  }

  /* Hero About — stack left/right halves vertically */
  .hero-about {
    flex-direction: column;
    gap: 40px;
  }
  .hero-about-left,
  .hero-about-right {
    width: 100%;
  }
  .hero-about-left p,
  .hero-about-right p,
  .hero-about-right p:last-child {
    width: auto;
    flex: 1;
    max-width: 100%;
  }

  /* Services — 2 cols */
  .services-grid {
    grid-template-columns: 1fr 1fr;
    gap: 60px 40px;
  }
  .service-title {
    font-size: 32px;
  }

  /* Projects — softer corner, smaller buttons */
  .projects-frame {
    border-radius: 60px;
  }
  .projects-nav {
    width: 56px;
    height: 56px;
    padding: 14px;
  }

  /* Process — 3 cols + intro stacks */
  .process-intro {
    flex-direction: column;
    gap: 16px;
    margin-bottom: 80px;
  }
  .process-intro p {
    width: 100%;
    max-width: 600px;
  }
  .process-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 56px 32px;
  }

  /* Testimonials — single column */
  .footer-area .testimonials {
    flex-direction: column;
    gap: 48px;
  }
  .testimonial {
    width: 100%;
  }

  /* Footer area spacing */
  .footer-area {
    margin-top: 140px;
  }
  .footer-logo-wrap {
    margin-top: 140px;
  }
  .footer {
    margin-top: 100px;
  }

  /* Footer row — stack vertically */
  .footer-row {
    grid-template-columns: 1fr;
    gap: 48px;
    align-items: flex-start;
  }
  .footer-newsletter,
  .footer-contact,
  .footer-social {
    width: 100%;
  }
  .footer-contact {
    text-align: left;
  }
  .footer-social {
    justify-content: flex-start;
  }

  /* Modal */
  .modal-content {
    padding: 60px 40px;
    border-radius: 60px;
  }
  .estimate-title {
    font-size: 32px;
    margin-bottom: 48px;
  }
  /* Brief modal — stack the 3 fixed-width columns so they fit tablet widths */
  .brief-grid {
    flex-direction: column;
    align-items: stretch;
    gap: 48px;
  }
  .brief-col-left,
  .brief-col-middle,
  .brief-col-right {
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
  }
}


/* =============== MOBILE (≤767px) =============== */
/* Matched to the designer's "Home Responsive" Figma frame (402px wide, 16px margins). */
@media (max-width: 767px) {
  :root {
    --pad: 16px;                               /* Figma responsive: 16px side margins */
  }

  /* Body zoom (0.8) is disabled at this width — sizes render at 100%, so we
     manually scale typography and spacing down to readable mobile values. */

  /* Nav — logo + hamburger toggle (Figma responsive header 561:664). Desktop
     link row is hidden; the toggle opens the full-screen mobile menu. */
  .nav {
    padding: 16px 0;
  }
  .nav-logo {
    width: 56px;
    height: 30px;
  }
  .nav-links {
    display: none;
  }
  .nav-menu-toggle {
    display: flex;
  }

  /* Hero — Figma "Home Responsive": header gradient image, 34px uppercase
     tagline, 2-col intro, 18px body, wordmark at content width. */
  .hero {
    padding-top: 64px;
  }
  /* Swap the desktop circle gradient for the mobile header gradient image */
  .hero-mask {
    left: 0;
    transform: none;
    width: 100%;
    height: calc(100vw * 684 / 402);
    background: url("../assets/images/responsive Gradient_Header.png") top center / 100% 100% no-repeat;
  }
  .hero-circle,
  .hero-blur {
    display: none;
  }

  .hero-tagline-wrap {
    padding-top: 175px;                        /* tagline ≈ 239px from top (Figma) */
  }
  .hero-tagline {
    font-size: 34px;                           /* Figma "Title Small Mobile" */
    max-width: 100%;
  }
  .hero-tagline br {
    display: none;                             /* wrap naturally like the design, not desktop breaks */
  }

  .hero-about {
    padding-top: 100px;
    flex-direction: column;
    gap: 48px;                                 /* Figma: intro → body gap */
  }
  /* Intro labels sit side-by-side (New York based | International shipping) */
  .hero-about-left {
    flex-direction: row;
    justify-content: space-between;
    gap: 0;
    width: 100%;
  }
  .hero-about-left p {
    width: 175px;                              /* Figma intro blocks */
    font-size: 18px;
  }
  .hero-about-right {
    flex-direction: column;
    gap: 30px;                                 /* Figma: between paragraphs */
    width: 100%;
  }
  .hero-about-right p {
    font-size: 18px;                           /* Figma "Body Mobile" */
    line-height: 1.3;
    width: auto;
  }
  .hero-wordmark-wrap {
    padding-top: 48px;                         /* Figma: about → wordmark */
  }
  /* No parallax zoom on mobile — at >1× the 2-line wordmark's right edge clips
     against overflow-x. Keep it fixed at container width (cut-free). */
  .hero-wordmark {
    transform: none !important;
  }

  /* Services — single column, Figma mobile (34px title, 18px num/desc, 40/20 gaps) */
  .services {
    padding-top: 100px;
  }
  .services-grid {
    grid-template-columns: 1fr;
    gap: 40px;                                 /* Figma: between services */
  }
  .service {
    gap: 20px;                                 /* Figma: title group → description */
  }
  .service-title {
    font-size: 34px;                           /* Figma "Title Small Mobile" */
  }
  .service-num,
  .service-desc {
    font-size: 18px;                           /* Figma "Body Mobile" */
  }

  /* Projects — Figma mobile: full-bleed 402×480, swipe dots only (no arrows) */
  .projects {
    padding-top: 80px;
  }
  .projects-frame {
    aspect-ratio: 402 / 480;
    border-radius: 24px;
  }
  .projects-nav-row {
    display: none;                             /* design uses swipe + dots, no arrow buttons */
  }

  /* Process — Figma mobile: 18px intro + 6 steps in a horizontal-scroll row */
  .process {
    padding-top: 80px;
  }
  .process-intro {
    flex-direction: column;
    gap: 4px;
    margin-bottom: 80px;                       /* Figma: intro → steps */
  }
  .process-intro p {
    font-size: 18px;
    line-height: 1.3;
    width: 100%;
  }
  .process-intro br {
    display: none;                             /* wrap naturally on phone */
  }
  /* 6 steps scroll horizontally (the design row is wider than the phone) */
  .process-grid {
    display: flex;
    grid-template-columns: none;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 20px;                                 /* Figma: between steps */
    margin: 0 calc(-1 * var(--pad));           /* scroll edge-to-edge */
    padding: 0 var(--pad) 10px;
    -webkit-overflow-scrolling: touch;
  }
  .process-step {
    flex: 0 0 auto;
    width: 240px;                              /* Figma step width */
    height: auto;
  }
  .process-title {
    font-size: 28px;                           /* Figma "Title Small" (matches desktop) */
  }

  /* ---- Footer area (Figma "Home Responsive"): CTA over the mobile gradient,
     testimonials, mini logo, subscribe, contact, then TEXT social links ---- */
  .footer-area {
    margin-top: 100px;
    background: url("../assets/images/responsive Gradient_Footer.png") top center / 100% auto no-repeat;
  }
  .footer-gradient {
    display: none;                             /* replaced by the mobile gradient background */
  }
  .footer-cta-wrap .cta-button {
    font-size: 18px;
    padding: 16px 22px;
  }

  /* Testimonials — single column, Figma mobile type (34px title, 18px text) */
  .footer-area .testimonials {
    flex-direction: column;
    gap: 80px;                                 /* Figma: between testimonials */
    margin-top: 120px;
  }
  .testimonial { gap: 18px; }                  /* quote → author */
  .testimonial-content { gap: 20px; }          /* title → quote */
  .testimonial h3 { font-size: 34px; }         /* Figma "Title Small Mobile" */
  .testimonial p { font-size: 18px; line-height: 1.3; }
  .testimonial .who { font-size: 18px; }

  .footer-logo-wrap { margin-top: 120px; }
  .footer-logo { width: 198px; height: auto; } /* Figma footer logo 198px */
  .footer { margin-top: 80px; }

  /* Newsletter + contact */
  .newsletter-label,
  .newsletter-sub { font-size: 18px; }
  .newsletter-input-wrap input { font-size: 18px; }
  .footer-contact { font-size: 18px; }

  /* Social — Figma mobile shows TEXT links (Instagram | Facebook | X) with
     dividers, not icons. TikTok & LinkedIn aren't in the mobile design. */
  .footer-social {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    row-gap: 16px;
    column-gap: 12px;
    width: 100%;
  }
  /* 3 links per row → the 5 links form 2 rows (Instagram/Facebook/TikTok • LinkedIn/X) */
  .footer-social-icon {
    flex: 1 0 28%;
    display: flex;
    justify-content: center;
    width: auto;
    height: auto;
    background: none;
    border-radius: 0;
  }
  .footer-social-icon svg { display: none; }
  .footer-social-icon::before {
    content: attr(aria-label);
    font-family: var(--body-font);
    font-weight: 700;
    font-size: 22px;                           /* Figma "Body Large Mobile" */
    line-height: 1;
    color: var(--color-black);
  }

  /* Projects carousel — Figma mobile shows swipe dots only, centered, no caption */
  .projects-caption {
    display: none;
  }
  .projects-dots {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    bottom: 20px;
  }

  /* Modal */
  .modal {
    padding: 16px 12px;
  }
  .modal-content {
    padding: 48px 24px 32px;
    border-radius: 32px;
  }
  .modal-close {
    width: 36px;
    height: 36px;
    top: 16px;
    right: 16px;
  }
  .estimate-title {
    font-size: 24px;
    margin-bottom: 36px;
  }

  /* Brief modal — single-column layout, tighter spacing, mobile-friendly type */
  .brief-grid {
    flex-direction: column;
    align-items: stretch;
    gap: 36px;
  }
  .brief-col-left,
  .brief-col-middle,
  .brief-col-right {
    width: 100%;
    max-width: 100%;
    margin: 0;
  }
  .brief-col-left { gap: 28px; }
  /* middle/right group spacing is handled by the per-group margin-bottom rules
     (same as desktop) — don't re-add a column gap or it doubles up. */
  .brief-col-middle,
  .brief-col-right { gap: 0; }

  /* Headline + greeting smaller on phone */
  .brief-greeting { font-size: 22px; }

  /* Chips wrap and tighten on small screens */
  .chip {
    font-size: 16px;
    padding: 8px 14px;
  }
  .chip-label,
  .brief-input label,
  .brief-hi {
    font-size: 13px;
  }
  .brief-input input {
    font-size: 18px;
  }

  /* Upload list — file chips can wrap if the filename is long */
  .upload-text,
  .upload-chip-name {
    font-size: 18px;
  }

  /* Submit row — shrink the CTA so it never overflows the narrow modal. */
  .brief-submit {
    margin-top: 40px;
    flex-wrap: wrap;
  }
  .brief-submit .cta-button {
    font-size: 18px;
    padding: 16px 22px;
  }
}
