/* ==========================================================================
   PHONE LAYER (≤ 760px) — shared phone chrome and rhythm.
   The phone is designed as its own thing, not the desktop stacked into one
   column. The rules of the layer:
     · one-thumb reach: the tab bar holds Home · Menu · ORDER · Branches · Club
     · collections swipe sideways (.ph-rail behaviour) instead of stacking
     · small facts sit in 2–3 column tiles, never in a long list
     · a section fits in roughly one screen; nothing is taller than it needs
   Each page's own phone layout lives in the "PHONE" block at the end of its
   css/pages/<page>.css (loaded after this file). One breakpoint: 760px.
   ========================================================================== */

@media (max-width: 760px) {
  :root {
    --tabbar-h: 4.25rem;
    --section-y: 2.75rem;
    --gutter: 1.125rem;
    --fs-h1: 2.35rem;
    --fs-h2: 1.85rem;
    --fs-h3: 1.3rem;
    --fs-lead: 1.0625rem;
    --header-h: 4.25rem;
  }

  body { padding-block-end: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); }

  /* --- Tab bar ----------------------------------------------------------- */
  .tabbar { position: fixed; inset-inline: 0; inset-block-end: 0; z-index: var(--z-fab); display: grid; grid-template-columns: repeat(5, 1fr); align-items: end; block-size: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); padding: 0 0.25rem env(safe-area-inset-bottom); background: rgba(255, 251, 245, 0.96); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-block-start: 1.5px solid var(--sand); box-shadow: 0 -10px 30px -18px rgba(53, 29, 53, 0.35); }
  .tabbar > a, .tabbar > button { position: relative; display: grid; justify-items: center; align-content: center; gap: 0.15rem; block-size: var(--tabbar-h); color: var(--ink-mute); font-size: 0.72rem; font-weight: 700; line-height: 1.2; -webkit-tap-highlight-color: transparent; }
  [dir="rtl"] .tabbar > a, [dir="rtl"] .tabbar > button { font-size: 0.8rem; }
  .tabbar .ic { inline-size: 1.4rem; block-size: 1.4rem; }
  .tabbar a[aria-current="page"] { color: var(--purple); }
  .tabbar a[aria-current="page"] .ic { color: var(--flamingo); }
  .tabbar a[aria-current="page"]::before { content: ""; position: absolute; inset-block-start: 0; inline-size: 1.6rem; block-size: 3px; border-radius: 0 0 3px 3px; background: var(--flamingo); }
  .tab-order { color: var(--purple) !important; }
  .tab-order i { display: grid; place-items: center; inline-size: 3.5rem; block-size: 3.5rem; margin-block-start: -1.6rem; border-radius: 50%; background: var(--flamingo); color: #fff; box-shadow: 0 0 0 5px var(--isabella), var(--shadow-cta); transition: transform var(--t-fast) var(--ease); }
  .tab-order:active i { transform: scale(0.94); }
  .tab-order .ic { inline-size: 1.5rem; block-size: 1.5rem; }

  /* Confirmations sit just above the tab bar. */
  .toast { inset-block-end: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 0.9rem); }

  /* The club has its own tab on phones. */
  .fab { display: none !important; }

  /* --- Header: logo, language, menu — nothing else ------------------------ */
  .site-header .inner { min-block-size: var(--header-h); gap: 0.5rem; }
  .site-header .brand img { block-size: 2.6rem; inline-size: auto; }
  .site-header .lang button { min-inline-size: 2.5rem; block-size: 2.5rem; padding-inline: 0.4rem; font-size: 0.85rem; }

  /* --- Rhythm -------------------------------------------------------------- */
  /* Title and its link share one line; the title wraps in its own space. */
  .section-head { flex-wrap: nowrap; gap: 0.75rem; margin-block-end: 1.1rem; align-items: end; }
  .section-head .stack { --stack: 0.35rem; flex: 1 1 auto; min-inline-size: 0; }
  .section-head h2 { font-size: var(--fs-h2); }
  .section-head > .link, .section-head > .btn { flex: none; white-space: nowrap; font-size: var(--fs-small); }
  .section-head > .btn { padding-inline: 0.9rem; min-block-size: 2.5rem; }
  .section-head.center, .section-head:has(> .btn) { flex-wrap: wrap; }
  .eyebrow { font-size: 0.85rem; }
  .lead { line-height: 1.6; }

  /* --- Sideways collections ----------------------------------------------- */
  .ph-rail { display: flex !important; gap: 0.75rem; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter); margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); padding-block: 0.25rem 0.75rem; scrollbar-width: none; }
  .ph-rail::-webkit-scrollbar { display: none; }
  .ph-rail > * { flex: 0 0 var(--rail-item, 80%); scroll-snap-align: start; min-inline-size: 0; }

  /* --- Shared bands ---------------------------------------------------------- */
  .cta-band { padding: 1.75rem 1.4rem; gap: 1.25rem; border-radius: var(--r-lg); }
  .cta-band h2 { font-size: 1.7rem; }
  .cta-band .row, .cta-band .row .btn { inline-size: 100%; }
  .club-band { grid-template-columns: minmax(0, 1fr); gap: 1.25rem; padding: 1.75rem 1.25rem; border-radius: var(--r-lg); }
  .club-band .btn { inline-size: 100%; white-space: normal; text-align: center; }
  .club-band h2 { font-size: 1.9rem; }
  .club-rewards { padding: 1rem; }

  /* --- Footer: short — links in two columns, branches as chips, then the club --- */
  .site-footer { padding-block-end: 0; }
  .site-footer > .symbol { inline-size: 26rem; inset-block-start: -4rem; inset-inline-end: -9rem; }
  .site-footer .top { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; padding-block: 2.25rem 1.5rem; }
  .site-footer .about { --stack: 0.75rem !important; }
  .site-footer .about img { block-size: 2.6rem; margin-block-end: 0.25rem; }
  .site-footer .slogan { font-size: 1.35rem; }
  .site-footer .about > p.muted { display: none; } /* repeats the slogan's promise */
  .site-footer .socials { gap: 0.4rem; }
  .site-footer .socials a { inline-size: 2.75rem; block-size: 2.75rem; }
  .site-footer h4 { margin-block-end: 0.35rem; }
  .site-footer .links { grid-template-columns: 1fr 1fr; gap: 0 1rem; font-size: var(--fs-small); }
  .site-footer .links a { display: flex; align-items: center; min-block-size: 2.75rem; border-block-end: 1px solid var(--line-dark); }
  .site-footer .top > :nth-child(3) .stack { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; }
  .site-footer .top > :nth-child(3) .stack > * { margin: 0; }
  .site-footer .branch { display: inline-flex; align-items: center; min-block-size: 2.75rem; padding-inline: 1.1rem; border-radius: var(--r-pill); background: var(--purple-soft); }
  .site-footer .branch span { display: none; } /* the hours live on Branches, one tap away */
  .site-footer .top > :last-child { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1rem; padding: 1.1rem; border-radius: var(--r-lg); background: var(--purple-soft); }
  .site-footer .top > :last-child > * { margin: 0; }
  .site-footer .top > :last-child h4, .site-footer .top > :last-child p { flex: 1 1 100%; }
  .site-footer .lang button { min-inline-size: 2.75rem; block-size: 2.75rem; }
  .site-footer .bottom { padding-block: 0.75rem 1.25rem; font-size: var(--fs-tiny); gap: 0 1.25rem; }
  .site-footer .bottom a { display: inline-flex; align-items: center; min-block-size: 2.75rem; }
  .pattern-band { block-size: 2.25rem; }
}
