/* ==========================================================================
   VERNATTE — responsive
   Desktop  1200px and up    : the base styles
   Tablet   1024px to 1199px : narrower editorial column beside the content
   Tablet   768px to 1023px  : editorial column becomes a band under the features
   Mobile   below 768px      : redesigned single column (hero first)
   Features are two columns across the whole tablet range (768px to 1199px).
   ========================================================================== */

/* The mobile menu can never be open on larger screens. */
@media (min-width: 768px) {
  .mobile-menu { display: none !important; }
}

/* ---- Tablet: 768px to 1199px -------------------------------------------- */

@media (max-width: 1199.98px) {
  :root {
    --sidebar-w: 224px;
    --header-h: 72px;
    --fs-side-title: 1.375rem;
  }

  /* Panels hug their content instead of stretching to equal height. */
  .layout { align-items: start; }
  .sidebar { padding: 26px 16px 22px; }
  .sidebar__block--end { margin-top: 0; }
  .sidebar .btn { padding-inline: 14px; gap: 8px; font-size: var(--fs-small); }

  /* Two columns; the third card becomes a wide closing tile. */
  .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .features > .card:last-child { grid-column: 1 / -1; }
  .features > .card:last-child > .slot { aspect-ratio: 5 / 2; }

  .nav { gap: clamp(22px, 3vw, 40px); }
}

/* ---- Tablet portrait: 768px to 1023px ----------------------------------- */
/* One column. The hero keeps its split; the editorial column turns into a
   two-column band (copy beside the 3:4 photograph, fragrance feature below). */

@media (max-width: 1023.98px) {
  :root {
    --fs-h1: clamp(2.5rem, 5.4vw, 3.5rem);
    --fs-side-title: 1.875rem;
  }

  .layout { grid-template-columns: minmax(0, 1fr); grid-template-areas: "main" "aside"; }

  .hero { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }
  .hero__copy { padding: clamp(22px, 3.4vw, 36px); }

  .sidebar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr);
    /* Flexible rows above and below centre the copy against the photograph. */
    grid-template-areas:
      ".      figure"
      "intro  figure"
      "copy   figure"
      "cta    figure"
      "social figure"
      ".      figure"
      "mini   mini";
    grid-template-rows: 1fr auto auto auto auto 1fr auto;
    column-gap: clamp(24px, 5vw, 48px);
    row-gap: 18px;
    padding: 34px clamp(24px, 4vw, 40px) 30px;
  }
  .sidebar .btn { max-width: 340px; padding-inline: 26px; gap: 12px; font-size: var(--fs-nav); }

  .mini { grid-auto-flow: column; justify-content: start; align-items: center; gap: 18px; padding-top: 6px; }
}

/* ---- Mobile: below 768px ------------------------------------------------ */

@media (max-width: 767.98px) {
  :root {
    --r-container: 18px;
    --container-pad: 8px;
    --gap: 8px;
    --header-h: 64px;
    --fs-wordmark: 1.5rem;
    --fs-h1: clamp(3rem, 14vw, 4rem);
  }

  /* Header: logo left, bag and menu right. Search moves into the menu. */
  .site-header { grid-template-columns: 1fr auto; padding-inline: 16px 6px; }
  .brand__icon { height: 34px; }
  .nav,
  .site-header__divider,
  .icon-btn--search { display: none; }
  .menu-toggle { display: inline-flex; }

  /* Hero stacks: photograph first, then the copy. */
  .hero { grid-template-columns: minmax(0, 1fr); }
  .hero__copy { padding: 30px 22px 34px; }
  .hero__lede { max-width: 30ch; }

  .features { grid-template-columns: minmax(0, 1fr); }
  .features > .card:last-child { grid-column: auto; }
  .features > .card:last-child > .slot { aspect-ratio: 5 / 4; }
  .card__body { grid-template-rows: auto auto auto; padding: 20px; }

  .site-footer { grid-template-columns: minmax(0, 1fr); gap: 28px; padding: 32px 22px 22px; }
  .site-footer > .social { margin: 0 0 0 -10px; } /* align the glyph with the text edge */
  .site-footer__legal { flex-direction: column; align-items: flex-start; }
}

/* ---- Small phones: below 600px ------------------------------------------ */
/* From 600px (large phones, iPad mini) the editorial band above still fits, so
   the 3:4 photograph is not stretched to the full width. Below it: a stack. */

@media (max-width: 599.98px) {
  .sidebar { display: flex; flex-direction: column; gap: 22px; padding: 32px 22px 30px; }
  .sidebar .btn { max-width: none; }
  .sidebar__figure { width: min(100%, 380px); }
  .sidebar__block--end { padding-top: 6px; }
}
