/* ==========================================================================
   Mande (getmande.com) - Responsive
   Mobile-first refinements. Breakpoints: 1200, 1024, 768, 576.
   The 1024 breakpoint owns the desktop-to-drawer navigation switch.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1200px and below
   -------------------------------------------------------------------------- */
@media (max-width: 1200px) {
  h1 { font-size: 52px; }
  h2 { font-size: 36px; }
  .hero { padding: 88px 0 72px; }
  .nav { gap: 20px; }
  .nav__list { gap: 2px; }
  .nav__link { padding: 8px 11px; font-size: 15px; }
}

/* --------------------------------------------------------------------------
   1024px and below: navigation becomes a drawer
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .nav__toggle { display: flex; }
  .nav__overlay { display: block; }

  .nav {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(400px, 88vw);
    z-index: 1001;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin-left: 0;
    padding: 24px 20px 40px;
    background: var(--color-white);
    box-shadow: -12px 0 40px rgba(9,9,11,0.16);
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.28s ease;
  }
  .nav.is-open { transform: translateX(0); }

  .nav__list { flex-direction: column; align-items: stretch; gap: 2px; width: 100%; }
  .nav__item { width: 100%; }
  .nav__link {
    justify-content: space-between;
    width: 100%;
    padding: 14px 12px;
    font-size: 17px;
    font-weight: 500;
    border-radius: var(--radius-sm);
  }
  .nav__item:hover .nav__caret { transform: none; }
  .nav__item.is-expanded .nav__caret { transform: rotate(180deg); }

  /* Submenus collapsed by default on touch. Hover is not a strategy here. */
  .dropdown {
    position: static;
    min-width: 0;
    opacity: 1;
    visibility: visible;
    transform: none;
    border: none;
    box-shadow: none;
    border-radius: 0;
    padding: 0 0 0 12px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.28s ease;
  }
  .dropdown--wide { display: block; min-width: 0; }
  .nav__item:hover .dropdown, .nav__item:focus-within .dropdown { max-height: 0; }
  .nav__item.is-expanded .dropdown { max-height: 760px; }
  .dropdown__link { padding: 12px; font-size: 15.5px; }
  .dropdown__link span { display: none; }

  .nav__actions {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    width: 100%;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--color-border);
  }
  .nav__signin { padding: 12px; text-align: center; font-size: 16px; border-radius: var(--radius-sm); background: var(--color-bg-alt); }
  .nav__actions .btn { width: 100%; padding: 14px 20px; }

  .header__inner { gap: 16px; }

  .grid--4 > .grid-item-wrapper { width: calc(50% - 12px); }
  .dropdown--wide { grid-template-columns: 1fr; }
}

/* --------------------------------------------------------------------------
   992px and below
   -------------------------------------------------------------------------- */
@media (max-width: 992px) {
  h1 { font-size: 44px; }
  h2 { font-size: 32px; }
  .section, .section--alt, .section--dark { padding: 72px 0; }
  .section__header { margin-bottom: 40px; }

  .grid--3 > .grid-item-wrapper { width: calc(50% - 12px); }

  .hero__title { font-size: 44px; }
  .hero__subtitle { font-size: 18px; }
  .page-hero__title { font-size: 38px; }
  .cta__title { font-size: 32px; }
  .proof__title { font-size: 28px; }

  .utility-bar__inner { justify-content: center; }
}

/* --------------------------------------------------------------------------
   768px and below
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  body { font-size: 16px; }
  h1 { font-size: 36px; }
  h2 { font-size: 28px; }
  h3 { font-size: 20px; }

  .container { padding: 0 20px; }
  .section, .section--alt, .section--dark { padding: 56px 0; }
  .hero { padding: 64px 0 56px; }
  .page-hero { padding: 48px 0 44px; }

  .grid { gap: 16px; }
  .grid--2 > .grid-item-wrapper,
  .grid--3 > .grid-item-wrapper,
  .grid--4 > .grid-item-wrapper { width: 100%; }

  .hero__title { font-size: 36px; }
  .hero__subtitle { font-size: 17px; }
  .hero__rotator { min-width: 0; }
  .page-hero__title { font-size: 32px; }
  .page-hero__subtitle { font-size: 17px; }
  .cta { padding: 64px 0; }
  .cta__title { font-size: 28px; }
  .cta__text { font-size: 17px; }

  .btn-group { width: 100%; flex-direction: column; }
  .btn-group .btn { width: 100%; }

  .trust-bar__grid { flex-direction: column; align-items: flex-start; gap: 18px; }

  /* The comparison table stacks: each row becomes a labelled block. */
  .compare__row { flex-direction: column; }
  .compare__row--head { display: none; }
  .compare__cell { padding: 14px 18px; border-bottom: 1px solid var(--color-border-light); }
  .compare__row:last-child .compare__cell:last-child { border-bottom: none; }
  .compare__cell--label { background: var(--color-bg-alt); font-size: 15px; }

  .step { gap: 16px; padding-bottom: 32px; }
  .step__number { width: 38px; height: 38px; font-size: 15px; }
  .step__title { font-size: 18px; }

  .stat { padding: 16px 8px; }
  .stat__value { font-size: 36px; }

  .proof { gap: 28px; }
  .proof__title { font-size: 24px; }
  .proof__panel { padding: 24px; }

  .operator { gap: 24px; }
  .operator__mark { width: 68px; height: 68px; font-size: 36px; border-radius: 16px; }
  .operator__title { font-size: 24px; }

  .card { padding: 24px; }
  .price-card { padding: 24px; }
  .price-card__blurb { min-height: 0; }
  .price-card__figure { font-size: 38px; }

  .faq__question { padding: 16px 18px; font-size: 16px; }
  .faq__answer-inner { padding: 0 18px 18px; font-size: 15.5px; }

  .form { padding: 24px; }
  .form__row { flex-direction: column; gap: 20px; }
  .contact-layout { gap: 32px; }

  .legal { padding: 48px 0 64px; }
  .legal__title { font-size: 30px; }

  .error-page { padding: 80px 0; }
  .error-page__code { font-size: 72px; }
  .error-page__title { font-size: 26px; }

  .footer__link,
  .footer__contact a,
  .footer__legal a,
  .info-card__list a,
  .breadcrumbs a,
  .breadcrumbs__current,
  .utility-bar__link {
    display: inline-block;
    padding-top: 4px;
    padding-bottom: 4px;
    min-height: 24px;
  }
  .footer__list { gap: 6px; }
  .footer__contact { gap: 8px; }
  .form__checkbox input { width: 24px; height: 24px; margin-top: 0; }

  .footer { padding: 56px 0 0; }
  .footer__grid { gap: 32px; padding-bottom: 40px; }
  .footer__bottom { flex-direction: column; align-items: flex-start; }

  .mockup__body { padding: 16px; }
  .chat-bubble { max-width: 84%; font-size: 14px; }
}

/* --------------------------------------------------------------------------
   576px and below
   -------------------------------------------------------------------------- */
@media (max-width: 576px) {
  h1 { font-size: 32px; }
  h2 { font-size: 25px; }

  .container { padding: 0 16px; }
  .hero__title { font-size: 32px; }
  .hero__badge { font-size: 13px; padding: 6px 13px; }

  /* Utility bar keeps only what fits: the numbers stay tappable, labels drop. */
  .utility-bar { height: auto; padding: 8px 0; }
  .utility-bar__inner { flex-wrap: wrap; justify-content: center; gap: 8px 16px; }
  .utility-bar__divider { display: none; }
  .utility-bar__link { font-size: 13px; padding: 4px 2px; }

  .section__subtitle { font-size: 17px; }
  .stat__value { font-size: 32px; }
  .chip { font-size: 14px; padding: 9px 16px; }
  .back-to-top { bottom: 16px; right: 16px; width: 42px; height: 42px; }
}

/* Photography */
@media (max-width: 992px) {
  .media-row { gap: 36px; }
  .media-row__title { font-size: 28px; }
}
@media (max-width: 768px) {
  .media-row, .media-row--flip { flex-direction: column; gap: 28px; }
  .media-row__title { font-size: 24px; }
  .media-row__text { font-size: 16px; }
  .photo-card__body { padding: 18px 20px 22px; }
  .photo-card__title { font-size: 18px; }
}

/* SaaS marketing layer
   Hero pattern: hero-product-showcase (row at desktop).
   Stacks as COLUMN (copy first), not the spec's column-reverse, so the H1
   stays first in the mobile fold. See index.html PATTERN-DEVIATION. */
@media (max-width: 1200px) {
  .hero--product .hero__inner { gap: 44px; }
  .hero--product .hero__title { font-size: 48px; }
}
@media (max-width: 1024px) {
  .hero--product .hero__panel { padding: 48px 32px; }
  .hero--product .hero__proof { justify-content: center; gap: 18px 28px; }
  .hero--product .hero__inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 48px;
    min-height: 0;
  }
  /* justify-items:center would size each grid item to MAX-CONTENT, letting the
     headline run 410px wide inside a 375px viewport. The hero's overflow:hidden
     then CLIPS it, so scrollWidth reports no overflow and the responsive gate
     cannot see it. Items must stretch; centring is done on the inner flex. */
  .hero--product .hero__content,
  .hero--product .hero__visual { width: 100%; max-width: 100%; min-width: 0; }
  .hero--product .hero__content { align-items: center; text-align: center; }
  .hero--product .hero__subtitle { max-width: 620px; }
  .hero--product .hero__pills,
  .hero--product .btn-group { justify-content: center; }
  .hero--product .hero__visual { max-width: 720px; margin: 0 auto; }
  .hero--product .hero__title { font-size: 46px; max-width: 640px; }
  /* Reserved rotator width is a DESKTOP concern - it stops the two-column
     headline reflowing on each word swap. Once the hero centres, the reserved
     space reads as a gap after the word, so close it up. The .hero--product
     prefix is required to out-specify the desktop rule. */
  .hero--product .hero__rotator { min-width: 0; }
}
@media (max-width: 992px) {
  .hero--product .hero__title { font-size: 42px; }
  .hero--product .hero__subtitle { font-size: 18px; }
  .bento__item--third { width: calc(50% - 10px); }
}
@media (max-width: 768px) {
  .hero--product { padding: 32px 0 44px; }
  .hero--product .hero__panel { padding: 36px 20px; }
  .hero--product .hero__proof { flex-direction: column; align-items: flex-start; gap: 14px; padding-top: 22px; }
  .hero--product .hero__inner { gap: 40px; }
  .hero--product .hero__title { font-size: 36px; letter-spacing: -0.02em; }
  .hero--product .hero__subtitle { font-size: 17px; }
  .hero--product .hero__visual::before { display: none; }
  .bento__item--wide, .bento__item--third { width: 100%; }
  .tile { padding: 22px; }
  .tile__title { font-size: 19px; }
  .contrast__col { padding: 22px; }
  .contrast__headline { font-size: 20px; }
  .ui-pipe { flex-direction: column; }
}

/* Aesthetic layer */
@media (max-width: 768px) {
  .card, .tile, .photo-card, .price-card, .form, .mockup { border-radius: 8px; }
}
@media (max-width: 576px) {
  .hero--product .hero__pills { gap: 6px; }
  .hero--product .pill { font-size: 12.5px; padding: 6px 11px; }
}
