/* ==============================
   RESPONSIVE — Wedge-inspired (Webflow logic)
   Breakpoints mirror Wedge: 991 / 767 / 479
   - Nav collapses to hamburger + full-screen overlay (large centered links)
   - Hero headline stays large & bold with tight line-height
   - Section headings ~34px, subtitles ~18px
   - Tight side padding (15-20px), generous vertical rhythm (~50px)
   - Everything single column
============================== */

/* Hamburger button + mobile overlay: hidden on desktop by default */
.nav-toggle { display: none; }
.mobile-menu { display: none; }

/* ─────────────────────────────────────────
   FLUID CONTAINER — override the fixed 1440px desktop wrapper
   ───────────────────────────────────────── */
@media (max-width: 1439px) {
  .page {
    width: 100%;
    max-width: 100%;
  }
}

/* ─────────────────────────────────────────
   TABLET & DOWN (≤ 991px)
   ───────────────────────────────────────── */
@media (max-width: 991px) {
  /* Show hamburger, hide desktop SVG links */
  .nav-right { display: none; }
  .nav-world-link { display: none; }

  .nav-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    margin-left: auto;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 60;
  }
  .nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: #000;
    transition: transform 0.3s ease, opacity 0.2s ease;
  }
  .nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle.open span:nth-child(2) { opacity: 0; }
  .nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  /* Full-screen overlay menu */
  .mobile-menu {
    display: flex;
    position: fixed;
    inset: 0;
    z-index: 50;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #fff;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }
  .mobile-menu.open {
    opacity: 1;
    pointer-events: auto;
  }
  .mobile-menu > a {
    font-size: 42px;
    font-weight: 400;
    letter-spacing: -0.4px;
    line-height: 1.1;
    color: #000;
    text-decoration: none;
    padding: 7px 16px;
    transition: color 0.2s ease;
  }
  .mobile-menu > a:hover { color: #0014ff; }

  .mobile-menu-social {
    display: flex;
    gap: 22px;
    margin-top: 48px;
  }
  .mobile-menu-social a {
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.04em;
    color: #000;
    text-decoration: none;
    transition: color 0.2s ease;
  }
  .mobile-menu-social a:hover { color: #0014ff; }

  /* Keep the nav (logo + hamburger) visible above the overlay */
  .nav { position: relative; z-index: 55; }

  body.menu-open { overflow: hidden; }

  /* Fluid hero heading/subtitle across all collapsed widths */
  .hero-heading { width: calc(100% - 48px); }
  .hero-subtitle { width: calc(100% - 48px); max-width: 640px; }
}

/* ─────────────────────────────────────────
   TABLET (768px - 991px) — fluid 2-column
   ───────────────────────────────────────── */
@media (min-width: 768px) and (max-width: 991px) {
  .hero-image-wrap { height: 620px; }
  .hero-heading { top: 250px; font-size: 72px; letter-spacing: -1.5px; }
  .hero-subtitle { top: 450px; font-size: 14px; }

  .work-section { padding: 80px 24px 60px; }
  .section-heading { font-size: 44px; margin-bottom: 40px; }

  .projects-grid { grid-template-columns: 1fr 1fr; gap: 20px; padding: 0 24px; }
  .project-img-wrap { height: 460px; }

  .lldm-wrap { padding: 0 24px; }
  .lldm-img-wrap { height: 500px; }

  .pov-section { margin-top: 80px; }
  .pov-inner { padding: 24px; }
  .pov-heading { font-size: 40px; width: 300px; }

  .testimonials-section { margin-top: 80px; }
  .testimonials-grid { grid-template-columns: 1fr 1fr; gap: 14px; padding: 0 24px; }
  .testimonial-card { height: 320px; }

  .contact-section { margin: 80px 24px 0; padding: 0; }
  .contact-form { max-width: 620px; }
  .form-actions .btn-submit,
  .form-actions .btn-whatsapp { width: 340px; }

  .footer-top { flex-wrap: wrap; gap: 40px; }
}

/* ─────────────────────────────────────────
   MOBILE (≤ 767px) — Figma node 203:2 (402px frame)
   ───────────────────────────────────────── */
@media (max-width: 767px) {
  html, body { overflow-x: hidden; }

  /* CMS mobile-image swap */
  .img-mobile-only { display: block; }
  .img-desktop-only { display: none; }

  /* ── NAV ── */
  .nav { height: 42px; padding: 0 11px; }
  .nav-logo { width: 109px; height: 16px; top: 13px; }
  .nav-toggle { width: 38px; height: 38px; gap: 4px; padding: 9px; }
  .nav-toggle span { width: 15px; height: 1.5px; }
  .nav-toggle span:nth-child(2) { display: none; }
  .nav-toggle.open span:nth-child(1) { transform: translateY(3px) rotate(45deg); }
  .nav-toggle.open span:nth-child(3) { transform: translateY(-2.5px) rotate(-45deg); }

  /* ── HERO ── */
  /* nav (42px) is in flow; Figma puts the image at y=64 → 22px padding.
     Text tops anchor to .hero: image at 22, so Figma's in-image offsets
     (137 / 229) become 159 / 251. */
  .hero { padding-top: 22px; padding-bottom: 0; }
  .hero-image-wrap { margin: 0 11px; height: 405px; border-radius: 16px; }
  .hero-heading {
    top: 159px;
    width: calc(100% - 40px);
    font-size: 36px;
    letter-spacing: -0.7px;
    line-height: 1.15;
  }
  .hero-subtitle {
    top: 251px;
    width: 274px;
    max-width: calc(100% - 60px);
    font-size: 8.5px;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1.2;
    /* even line lengths — stops a single word ("DO.") landing alone
       on the last line; degrades to normal wrapping if unsupported */
    text-wrap: balance;
  }

  /* ── SECTION HEADINGS (small, centered) ── */
  .section-heading,
  .contact-heading {
    font-size: 18px;
    letter-spacing: -0.2px;
    line-height: 1.15;
    text-wrap: balance;
  }

  /* ── WORK ── */
  .work-section { margin-top: 26px; padding: 0 11px; }
  .section-heading { margin-bottom: 25px; }
  .projects-grid { grid-template-columns: 1fr; gap: 30px; padding: 0; }
  .project-card { width: 100%; }
  .project-img-wrap { width: 100%; height: 431px; border-radius: 16px; }
  .project-meta { gap: 10px; padding: 4px 0 0; }
  .client-name { font-size: 13px; }
  .project-date { font-size: 9px; }
  .project-tagline { font-size: 10px; }
  .project-tags { font-size: 9px; }
  .name-overlay { width: 60%; left: 50%; bottom: 18px; }

  /* ── LL+DM banner ── */
  .lldm-wrap { margin-top: 30px; padding: 0; }
  .lldm-img-wrap { height: 431px; border-radius: 16px; }
  .lldm-logo {
    left: 50%;
    top: 64px;
    width: 70px;
    height: 78px;
    transform: translateX(-50%);
  }
  .lldm-tagline {
    left: 50%;
    transform: translateX(-50%);
    top: 168px;
    bottom: auto;
    font-size: 12px;
    white-space: nowrap;
  }
  .lldm-meta { padding: 4px 0 0; background: none; }

  /* ── OUTLINE BUTTONS — one size everywhere on mobile ── */
  .btn-center { margin: 23px 0 0; padding: 0; }
  .btn-lg,
  .btn-sm {
    width: 160px;
    height: 38px;
    font-size: 12px;
    letter-spacing: 0.03em;
    padding: 0;
  }
  .btn-outline { font-size: 12px; }

  /* ── DIVIDERS (visible on mobile per design) ── */
  .divider { display: block; height: 1px; margin: 0 11px; }

  /* ── POV / UPDATES ── */
  .pov-section { margin-top: 39px; padding: 0; }
  .pov-inner { flex-direction: column; gap: 0; padding: 16px 11px 15px; }
  .pov-heading {
    width: 100%;
    font-size: 18px;
    letter-spacing: -0.2px;
    margin-bottom: 16px;
  }
  .pov-heading br { display: none; }
  .update-row {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 0 0 15px;
    border-bottom: none;
  }
  .update-tag { font-size: 10px; font-weight: 700; }
  .update-body p:first-child { font-size: 13px; }
  .update-body p:last-child { font-size: 12px; line-height: 1.35; }

  /* ── TESTIMONIALS — two-up mini cards, no heading ── */
  .testimonials-section { margin-top: 0; padding: 69px 0 0; }
  .testimonials-heading { display: none; }
  .testimonials-grid { grid-template-columns: 1fr 1fr; gap: 3px; padding: 0 11px; }
  .testimonial-card { height: 124px; border-radius: 8px; }
  .testimonial-content {
    padding: 10px 10px 8px;
    grid-template-columns: 12px 1fr;
    column-gap: 4px;
  }
  .quote-mark { width: 8px; height: 6px; margin-top: 2px; }
  .testimonial-text { font-size: 8px; letter-spacing: 0; line-height: 1.3; }
  .testimonial-cite { font-size: 6px; letter-spacing: 0.02em; margin-top: 4px; }

  /* ── CONTACT ── */
  .contact-section { margin: 47px 11px; padding: 0; }
  .contact-heading { margin-bottom: 24px; }
  .contact-sub { display: none; }
  .contact-form { max-width: 100%; gap: 10px; }
  .form-row { gap: 10px; }
  .form-field label { font-size: 11px; }
  .form-field input,
  .form-field textarea { font-size: 16px; padding: 6px 0; } /* 16px prevents iOS zoom */
  .form-actions { gap: 3px; margin-top: 24px; }
  .form-actions .btn-submit,
  .form-actions .btn-whatsapp {
    width: 160px;
    height: 38px;
    font-size: 12px;
    letter-spacing: 0.03em;
    padding: 0;
  }

  /* ── FOOTER — wordmark first, compact card (Figma offsets) ── */
  .footer {
    display: flex;
    flex-direction: column;
    margin: 0 11px;
    padding: 9px 7px 11px;
    border-radius: 14px 14px 0 0;
  }
  .footer-logo-wrap { order: -1; margin: 0 0 34px; }
  .footer-top { display: block; margin-bottom: 0; }
  .footer-headline {
    font-size: 10px;
    line-height: 1.15;
    margin-bottom: 9px;
    max-width: 240px;
  }
  .footer-contact { font-size: 9px; line-height: 1.0; }
  .footer-contact + .footer-contact { margin-top: 4px; }
  .footer-links { margin-top: 26px; }
  .footer-links p { font-size: 9px; font-weight: 400; line-height: 1.0; }
  .footer-links p + p { margin-top: 4px; }
  .footer-arrow { display: none; }
  .footer-copyright { margin-top: 11px; }
  .footer-copyright p { font-size: 6.5px; text-align: left; }
}

/* ─────────────────────────────────────────
   SMALL MOBILE (≤ 479px)
   ───────────────────────────────────────── */
@media (max-width: 479px) {
  .mobile-menu > a { font-size: 38px; }
}

/* ─────────────────────────────────────────
   TOUCH / ACCESSIBILITY
   ───────────────────────────────────────── */
@media (max-width: 991px) {
  button:focus-visible,
  a:focus-visible {
    outline: 2px solid #0014ff;
    outline-offset: 2px;
  }
}

/* ─────────────────────────────────────────
   LANDSCAPE PHONE
   ───────────────────────────────────────── */
@media (max-height: 500px) and (orientation: landscape) {
  .hero-image-wrap { height: 320px; }
  .hero-heading { top: 90px; font-size: 30px; }
  .hero-subtitle { top: 180px; }
  .mobile-menu { gap: 2px; }
  .mobile-menu a { font-size: 22px; padding: 4px 12px; }
}

/* Case-page mobile rules live in case.css */


@media (min-width: 768px) and (max-width: 991px) {
  .case-title { font-size: 40px; }
  .case-figure--full { height: 460px; }
  .case-figure--square { height: 720px; }
}
