/* ============================================================================
   MESH UI 2.0 — CONTENT GUARD
   ----------------------------------------------------------------------------
   The Content Guard is the structural backbone of every Mesh UI 2.0 section.
   It is a responsive centering container that "guards" the readable content
   from the screen edges while letting backgrounds (color fields, full-bleed
   imagery) run edge-to-edge behind it.

   Why a Guard and not a plain `.container`?
     • It enforces the system's generous, accessibility-led edge gutters that
       shrink gracefully from desktop → tablet → phone (80 → 40 → 20px).
     • It caps line length at a large-but-readable max so oversized type never
       sprawls into unreadable measures on wide monitors.
     • Sections set their OWN full-width background; only the inner content is
       guarded. This is how Mesh UI gets full-bleed media with aligned copy.

   USAGE
     <section class="mesh-section">          // owns background + vertical pad
       <div class="content-guard">           // owns horizontal gutter + cap
         …content…
       </div>
     </section>

   Variants: add a modifier to widen / narrow the cap for a given block.
   ========================================================================== */

.content-guard {
  box-sizing: border-box;
  width: 100%;
  max-width: var(--max-content, 1500px);
  margin-inline: auto;
  padding-inline: var(--gutter, clamp(20px, 5vw, 80px));
}

/* Frame guard — for full-bleed CTA banners / media that round at the edges */
.content-guard--frame   { max-width: var(--max-frame, 1667px); }
/* Reading guard — narrow measure for centered editorial / accordion stacks */
.content-guard--reading  { max-width: 900px; }
/* Wide guard — dashboards, blog grids that want more room                  */
.content-guard--wide     { max-width: 1680px; }
/* Flush guard — keeps the cap + centering but drops the gutter (nested use) */
.content-guard--flush    { padding-inline: 0; }

/* ── SECTION SHELL ─────────────────────────────────────────────────────── */
/* Standard vertical rhythm. Sections own their background; guard owns sides. */
/* Canvas is always gray — white is reserved for cards/panels on top, never the page. */
.mesh-section {
  box-sizing: border-box;
  padding-block: var(--space-section-top) var(--space-section-bot);
  background: var(--surface-1);
  color: var(--fg-1);
  border-bottom: solid 1px #8080803d;
}
.mesh-section--wash    { background: var(--surface-1); }
.mesh-section--inverse { background: var(--surface-inverse); color: var(--fg-on-accent); }
.mesh-section--tight   { padding-block: clamp(32px, 4vw, 56px); }
.mesh-section--flush-top { padding-top: 0; }

/* ============================================================================
   SHARED PRIMITIVE · BUTTONS
   Large hit targets (>=56px, hero buttons 66px). Pill or 7px banner radius.
   Icon sits to the right with a wide gap — a signature Mesh UI button shape.
   NO shadows, ever. Hover = darken; press = subtle scale-down.
   ========================================================================== */
.mesh-btn {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 66px;
  padding: 0 24px 0 32px;
  border: 0;
  border-radius: var(--r-pill);
  font-family: var(--font-sans);
  font-size: 20px;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 140ms ease, transform 120ms ease, color 140ms ease;
}
.mesh-btn:active { transform: scale(0.97); }
.mesh-btn .mesh-btn__icon { font-size: 28px; line-height: 1; flex: 0 0 auto; }

.mesh-btn--primary {
  background: var(--accent);
  color: var(--fg-on-accent);
  min-width: clamp(240px, 21vw, 331px);
}
.mesh-btn--primary:hover { background: var(--accent-deep); }

.mesh-btn--solid-light {
  background: var(--c-white);
  color: var(--c-black);
}
.mesh-btn--solid-light:hover { background: var(--c-gray-100); }

.mesh-btn--outline {
  background: transparent;
  color: var(--fg-1);
  border: 1.5px solid var(--border);
}
.mesh-btn--outline:hover { background: var(--surface-1); }

/* Compact button (utility / nav). Banner radius variant available. */
.mesh-btn--sm { height: 49px; font-size: 17px; gap: 14px; padding: 0 24px; min-width: 0; }
.mesh-btn--sm .mesh-btn__icon { font-size: 19px; }
.mesh-btn--banner { border-radius: var(--r-banner); }

/* ── CHIP / EYEBROW PILL ───────────────────────────────────────────────── */
.mesh-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding: 0 22px;
  border-radius: var(--r-pill);
  background: var(--surface-2);
  color: var(--fg-1);
  font-weight: 600;
  font-size: var(--small-size);
}

/* Glass pill — translucent, blurred. Used over imagery (never a shadow). */
.mesh-glass {
  background: rgb(255 255 255 / 0.43);
  border: 1px solid rgb(255 255 255 / 0.26);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-radius: var(--r-pill);
}

/* ── CHECK LIST (feature bullets with accent ticks) ────────────────────── */
.mesh-checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 18px; }
.mesh-checklist li { display: flex; gap: 16px; align-items: flex-start; font-size: var(--body-size); color: var(--fg-2); line-height: 1.45; }
.mesh-checklist .fa-solid { color: var(--accent); font-size: 1.25em; margin-top: 0.08em; flex: 0 0 auto; }
/* Hard cap: a checklist physically never shows more than 3 items */
.mesh-checklist li:nth-child(n+4) { display: none !important; }

/* ── HAIRLINE / ACCENT RULE ────────────────────────────────────────────── */
.mesh-rule { width: 100%; height: 1px; background: var(--border); border: 0; margin: 0; }
.mesh-rule--accent { width: 6px; height: 100px; background: var(--accent); border-radius: 2px; }

@media (prefers-reduced-motion: reduce) {
  .mesh-btn { transition: none; }
}
