/* Style guide — Maresme Brewery design reference.
   Loaded on top of style.css; only adds the guide page's own scaffolding
   (header, swatches, spec rows, demo panels) — every color/type/spacing
   value shown on the page comes from style.css's own :root tokens. */

body { background: var(--wash); }

.mg-head {
  background: var(--ink);
  color: var(--paper-on-ink);
  padding: 18px 0;
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--rule-on-ink);
}
.mg-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.mg-head .brand { display: block; }
.mg-head .brand img {
  height: 28px;
  width: auto;
  filter: invert(1) brightness(2);
  mix-blend-mode: screen;
}
.mg-head .back {
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: .06em;
  color: var(--paper-on-ink-62);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
}
.mg-head .back:hover { color: var(--paper); border-color: var(--paper); }

.mg-main { padding: 56px var(--gut) 96px; max-width: 1000px; margin: 0 auto; }
.mg-main > .lede { margin: 14px 0 8px; }
.mg-main > .mg-note { margin-top: 20px; max-width: 640px; }

/* Plain quiet caption text — deliberately its own class, not the site's own
   .note (a padded, wash-background callout box from assets/style.css): that
   class is meant for the booking form's light-surface hint text only, and
   its background turns unreadable when a caption sits inside a dark demo
   panel below. */
.mg-note { font-family: var(--mono); font-size: 13px; color: var(--ink-45); line-height: 1.6; }

.mg-section { margin-top: 72px; }
.mg-section > h2 { font-size: clamp(28px, 3.4vw, 40px); }
.mg-section > .mg-sub { color: var(--ink-62); font-size: 16px; line-height: 1.7; margin: 10px 0 24px; max-width: 640px; }
.mg-section h3 { font-family: var(--sans); font-weight: 500; font-size: 18px; margin: 30px 0 14px; }

.mg-panel { background: var(--paper); border: 1px solid var(--rule); padding: 26px 28px; }

/* Swatches — a bordered grid, dividers drawn by the gap showing the
   rule-soft background rather than a border on every tile */
.mg-swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1px; background: var(--rule-soft); border: 1px solid var(--rule-soft); }
.mg-swatch { background: var(--paper); }
.mg-swatch .chip { height: 76px; display: flex; align-items: flex-end; padding: 10px 14px; }
.mg-swatch .chip code { font-family: var(--mono); font-size: 12px; font-weight: 700; background: rgba(255, 255, 255, .85); color: var(--ink); padding: 2px 7px; }
.mg-swatch .chip.on-ink code { background: rgba(2, 9, 18, .55); color: var(--paper); }
.mg-swatch .meta { padding: 12px 14px 16px; }
.mg-swatch .meta strong { display: block; font-family: var(--sans); font-weight: 500; font-size: 15px; }
.mg-swatch .meta code { font-family: var(--mono); font-size: 12px; color: var(--ink-45); }
.mg-swatch .meta span { display: block; font-size: 13px; color: var(--ink-62); margin-top: 4px; line-height: 1.5; }

/* Do / don't — no color coding, this brand doesn't have one; a solid vs
   dashed ink rule on the left edge is the only differentiator */
.mg-rules { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--rule-soft); border: 1px solid var(--rule-soft); }
.mg-rule { background: var(--paper); padding: 16px 20px; font-size: 14px; line-height: 1.6; color: var(--ink-80); border-left: 3px solid var(--ink); }
.mg-rule.dont { border-left-style: dashed; }
.mg-rule strong { display: block; font-family: var(--mono); text-transform: uppercase; font-size: 12px; letter-spacing: .1em; margin-bottom: 6px; color: var(--ink); }

/* Type specimens */
.mg-type { display: grid; }
.mg-type-row { display: grid; grid-template-columns: 220px 1fr; gap: 20px; align-items: baseline; padding: 18px 0; border-top: 1px solid var(--rule); }
.mg-type-row:first-child { border-top: none; padding-top: 0; }
.mg-type-row .spec { font-family: var(--mono); font-size: 13px; color: var(--ink-45); line-height: 1.6; }
.mg-type-row .spec code { color: var(--ink); }

/* Spacing bars */
.mg-space { display: grid; gap: 1px; background: var(--rule-soft); border: 1px solid var(--rule-soft); padding: 0; }
.mg-space-row { background: var(--paper); display: grid; grid-template-columns: 90px 1fr 260px; gap: 16px; align-items: center; padding: 14px 20px; font-family: var(--mono); font-size: 13px; }
.mg-space-row .bar { height: 16px; background: var(--ink); max-width: 100%; }
.mg-space-row code { color: var(--ink); font-weight: 700; }
.mg-space-row span { color: var(--ink-62); }

/* Component demo panels */
.mg-demo { background: var(--paper); border: 1px solid var(--rule); padding: 26px 28px; display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.mg-demo.dark { background: var(--ink); border-color: var(--rule-on-ink); }
.mg-demo .mg-note { flex-basis: 100%; margin-top: 6px; }
.mg-demo.dark .mg-note { color: var(--paper-on-ink-62); }

.mg-list { display: grid; gap: 10px; padding: 0; margin: 0; list-style: none; font-size: 15px; line-height: 1.6; color: var(--ink-80); max-width: 640px; }
.mg-list li { padding-left: 22px; position: relative; }
.mg-list li::before { content: "—"; position: absolute; left: 0; color: var(--ink-45); }

.mg-foot { border-top: 1px solid var(--rule); padding: 28px var(--gut); text-align: center; font-family: var(--mono); font-size: 13px; color: var(--ink-45); }
.mg-foot a { color: var(--ink); font-weight: 700; }

@media (max-width: 700px) {
  .mg-rules { grid-template-columns: 1fr; }
  .mg-type-row { grid-template-columns: 1fr; gap: 6px; }
  .mg-space-row { grid-template-columns: 70px 1fr; }
  .mg-space-row span { display: none; }
}
