/* Media Boxes — landing page. Prefix lp-. Calm and exact: white ground, black type, one accent, the live engine as the imagery.
   The only motion on this page is the engine's own re-layout (filters, layout switch). Tokens come from demo.css. */

.lp-sec, .lp-proof { scroll-margin-top: 16px; }
.lp-sec { padding-block: clamp(48px, 5.4vw, 72px); }
.lp-sechead { max-width: 760px; margin-bottom: clamp(28px, 3.4vw, 44px); }
/* display voice: Archivo set wide, weight 800 */
.lp-h2 { margin: 0; font-size: clamp(2rem, 3.75vw, 3.375rem); font-weight: 800; font-stretch: 112%; line-height: 1.04; letter-spacing: -0.035em; text-wrap: balance; }
.lp-h2--xl { max-width: 18ch; margin-inline: auto; text-align: center; }
.lp-lead { margin: 16px 0 0; max-width: 640px; font-size: clamp(1.0625rem, 1.5vw, 1.3125rem); line-height: 1.55; color: var(--demo-muted); text-wrap: pretty; }
.lp-sechead .lp-lead { margin-top: 16px; }
.lp-lead code, .lp-faq code { font: 0.875em var(--demo-mono); padding: 1px 6px; background: var(--demo-surface); border: 1px solid var(--demo-line); border-radius: 6px; color: var(--demo-text); }
.lp-lead a, .lp-faq a { color: var(--demo-text); text-decoration-thickness: 1px; }
.lp-lead a:hover, .lp-faq a:hover { color: var(--demo-accent-text); }
.lp-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.lp-cta .demo-btn--primary { box-shadow: 0 10px 24px -12px var(--demo-accent-shadow); }
.lp-cta .demo-btn--lg { min-height: 52px; padding-inline: 28px; }

/* ---------- Hero: centered ---------- */

.lp-hero { padding-block: clamp(40px, 4.4vw, 56px) clamp(56px, 7vw, 104px); }
/* showcase width, as on essential-grid.com: wider than the 1240 text wrap */
.lp-hero .demo-wrap--wide, .lp-layouts .demo-wrap--wide { max-width: calc(1760px + 2 * var(--demo-gutter)); }
.lp-hero__head { display: grid; justify-items: center; text-align: center; }
.lp-h1 { margin: 0; font-size: clamp(2.5rem, 6.6vw, 6rem); font-weight: 800; font-stretch: 112%; line-height: 0.98; letter-spacing: -0.04em; text-wrap: balance; }
.lp-h1 span { display: block; }
.lp-hero .lp-lead { margin: 24px 0 0; max-width: 660px; font-size: clamp(1.0625rem, 1.5vw, 1.3125rem); }
.lp-hero .lp-cta { justify-content: center; margin-top: 32px; }
.lp-facts { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 28px; margin: 24px 0 0; padding: 0; list-style: none; font-size: 0.9375rem; font-weight: 550; line-height: 1.4; color: var(--demo-muted); }
.lp-version-note { margin: 20px 0 0; font-size: 0.9375rem; color: var(--demo-muted); }
.lp-version-note a { color: var(--demo-text); font-weight: 600; text-underline-offset: 3px; }
.lp-version-note a:hover { color: var(--demo-accent-text); }
.lp-facts li { display: inline-flex; align-items: center; gap: 8px; }
.lp-facts svg { flex: none; width: 18px; height: 18px; fill: none; stroke: var(--demo-brand); stroke-width: 2.75; stroke-linecap: round; stroke-linejoin: round; }

/* The live grid: the real engine in a tinted frame. Its height is reserved per breakpoint (the unfiltered masonry), so nothing below it moves. */
.lp-live {
  position: relative; margin-top: clamp(32px, 3.4vw, 48px); padding: 20px; box-sizing: border-box;
  background: var(--demo-tint); border: 1px solid var(--demo-tint-line); border-radius: 28px;
}
/* reserve space only until the engine has drawn the grid; after that the frame follows its content (a filter can shrink it) */
.lp-live:not(:has(media-boxes[data-ready])) { min-height: 900px; }
@media (max-width: 759px) { .lp-live:not(:has(media-boxes[data-ready])) { min-height: 700px; } }
.lp-live media-boxes, .lp-sheet media-boxes { --mb-accent: var(--demo-accent); --mb-accent-contrast: var(--demo-accent-ink); --mb-radius: var(--demo-radius-lg); }

/* ---------- Layouts ---------- */

.lp-layouts { background: var(--demo-surface); }
.lp-layouts .lp-sechead { max-width: 760px; }
.lp-layoutbar { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; margin-bottom: 24px; }
.lp-attr { font: 0.9375rem/1.4 var(--demo-mono); color: var(--demo-text); overflow-wrap: anywhere; }
.lp-sheet { min-height: 600px; }
.lp-checks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 48px; margin: clamp(40px, 5vw, 64px) 0 0; padding: 32px 0 0; border-top: 1px solid var(--demo-line); list-style: none; max-width: 980px; }
.lp-checks li { display: flex; align-items: flex-start; gap: 12px; line-height: 1.5; }
.lp-checks svg { flex: none; width: 20px; height: 20px; margin-top: 3px; fill: none; stroke: var(--demo-text); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Example sites ---------- */

.lp-sites { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); gap: 40px 24px; margin: 0; padding: 0; list-style: none; }
.site { display: grid; gap: 2px; color: var(--demo-text); text-decoration: none; }
.site__thumb {
  display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; gap: 4px; aspect-ratio: 3 / 2; margin-bottom: 14px;
  overflow: hidden; border-radius: var(--demo-radius-lg); background: var(--demo-surface); isolation: isolate;
}
.site__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 500ms var(--demo-ease); }
.site__a { grid-row: 1 / 3; }
.site:hover .site__thumb img, .site:focus-visible .site__thumb img { transform: scale(1.05); }
.site__name { font-size: 1.125rem; font-weight: 650; letter-spacing: -0.01em; line-height: 1.3; justify-self: start; text-decoration: underline 2px transparent; text-underline-offset: 5px; transition: text-decoration-color 160ms var(--demo-ease); }
.site:hover .site__name, .site:focus-visible .site__name { text-decoration-color: var(--demo-accent); }
.site__kind { color: var(--demo-muted); font-size: 0.9375rem; line-height: 1.4; }
.site__note { color: var(--demo-muted); font-size: 0.8125rem; line-height: 1.4; }
.site:focus-visible { outline: 2px solid var(--demo-brand); outline-offset: 6px; border-radius: var(--demo-radius); }

/* ---------- Feature pages ---------- */

.lp-featsec { background: var(--demo-tint); border-block: 1px solid var(--demo-tint-line); }
.lp-feats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 32px; margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--demo-tint-line); }
.feat { display: flex; align-items: center; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--demo-tint-line); color: var(--demo-text); text-decoration: none; }
.feat img { flex: none; width: 76px; height: 52px; object-fit: cover; border-radius: 8px; background: var(--demo-surface); }
.feat__t { display: grid; gap: 1px; min-width: 0; }
.feat strong { font-size: 1.0625rem; font-weight: 650; line-height: 1.3; transition: color 160ms var(--demo-ease); }
.feat small { font-size: 0.9375rem; line-height: 1.4; color: var(--demo-muted); }
.feat:hover strong, .feat:focus-visible strong { color: var(--demo-accent-text); }
.feat:focus-visible { outline: 2px solid var(--demo-brand); outline-offset: 2px; border-radius: 8px; }

/* ---------- Proof ---------- */

.lp-proof { padding-block: clamp(56px, 6vw, 88px); }
.lp-proof__text { margin: 0; max-width: 24em; font-size: clamp(1.625rem, 3.4vw, 2.875rem); font-weight: 500; line-height: 1.14; letter-spacing: -0.03em; color: var(--demo-muted); text-wrap: balance; }
.lp-proof__text strong { font-weight: 800; color: var(--demo-text); }
.lp-proof__spec { display: flex; flex-wrap: wrap; gap: 8px 32px; margin: clamp(24px, 3vw, 40px) 0 0; padding: 24px 0 0; list-style: none; max-width: 96ch; border-top: 1px solid var(--demo-line); font-size: 1rem; line-height: 1.6; color: var(--demo-muted); }

/* ---------- Install ---------- */

.lp-install { background: var(--demo-surface); }
.lp-install__grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 32px clamp(32px, 6vw, 96px); align-items: center; }
.lp-install .lp-sechead { margin-bottom: 0; }
.lp-links { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 24px 0 0; }
.lp-links a { font-weight: 600; color: var(--demo-text); text-decoration-thickness: 1px; }
.lp-links a:hover { color: var(--demo-accent-text); }
.lp-code { min-width: 0; background: var(--demo-code-bg); border: 1px solid var(--demo-code-line); border-radius: var(--demo-radius-lg); overflow: hidden; }
.lp-code__head { display: flex; align-items: center; justify-content: space-between; padding: 8px 8px 8px 20px; border-bottom: 1px solid var(--demo-code-line); font-size: 0.875rem; color: var(--demo-code-muted); }
.lp-code .lp-code__copy { position: static; }
.lp-code pre { margin: 0; padding: 24px; overflow: auto; font: 0.875rem/1.8 var(--demo-mono); color: var(--demo-code-text); tab-size: 2; scrollbar-color: rgb(255 255 255 / 0.3) transparent; }
.lp-code pre:focus-visible { outline: 2px solid #ff7a7d; outline-offset: -2px; }
.lp-code code { font: inherit; white-space: pre; }

/* ---------- FAQ ---------- */

.lp-faqgrid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 32px clamp(32px, 6vw, 96px); align-items: start; }
.lp-faq { border-top: 1px solid var(--demo-line); max-width: 780px; }
.lp-faq details { border-bottom: 1px solid var(--demo-line); }
.lp-faq summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; padding: 14px 0; font-size: 1.125rem; font-weight: 600; line-height: 1.35; cursor: pointer; list-style: none; border-radius: 8px; }
.lp-faq summary::-webkit-details-marker { display: none; }
.lp-faq summary::after {
  content: ''; flex: none; width: 9px; height: 9px; margin-inline-end: 6px; border-inline-end: 2px solid var(--demo-muted); border-block-end: 2px solid var(--demo-muted);
  rotate: 45deg; translate: 0 -2px; transition: rotate 200ms var(--demo-ease), translate 200ms var(--demo-ease);
}
.lp-faq details[open] summary::after { rotate: 225deg; translate: 0 2px; }
.lp-faq summary:hover { color: var(--demo-accent-text); }
.lp-faq summary:focus-visible { outline: 2px solid var(--demo-brand); outline-offset: 2px; }
.lp-faq details > div { padding: 0 0 24px; max-width: 66ch; color: var(--demo-muted); }
.lp-faq details p { margin: 0; }

/* ---------- Close ---------- */

.lp-close { padding-block: clamp(56px, 6vw, 88px); text-align: center; background: var(--demo-tint); border-top: 1px solid var(--demo-tint-line); }
.lp-close .lp-cta { justify-content: center; margin-top: 32px; }
body[data-demo='index'] .demo-footer { margin-top: 0; }

/* ---------- Responsive ---------- */

@media (max-width: 1100px) {
  .lp-feats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1279px) { .lp-install__grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 900px) { .lp-faqgrid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 759px) {
  .lp-live { padding: 12px; border-radius: 20px; }
  .lp-hero .lp-cta { width: 100%; }
  .lp-hero .lp-cta .demo-btn { flex: 1 1 100%; }
}
@media (max-width: 640px) {
  .lp-checks, .lp-feats { grid-template-columns: minmax(0, 1fr); }
  .lp-sheet { min-height: 480px; }
  .lp-cta .demo-btn { flex: 1 1 100%; }
  .lp-code pre { padding: 16px; font-size: 0.8125rem; }
}
@media (prefers-reduced-motion: reduce) {
  .site__thumb img, .site__name, .feat strong, .lp-faq summary::after { transition: none; }
  .site:hover .site__thumb img, .site:focus-visible .site__thumb img { transform: none; }
}
/* On small touch screens the hover skin keeps its caption visible; in these small showcase tiles it does not fit.
   The photo stays clean and its title still shows in the lightbox. */
@media (hover: none) and (max-width: 759px) {
  .lp-live .mb-content, .lp-sheet .mb-content { display: none; }
}

/* Controls inside the coral frame: white pills and search on the wash, warm grey text (cool grey clashes with the pink). */
.lp-live media-boxes { --mb-surface-2: #ffffff; --mb-text-muted: #6b5f61; }
.lp-live .mb-filter:not(.is-active, [aria-pressed='true']), .lp-live .mb-search { box-shadow: inset 0 0 0 1px var(--demo-tint-line); }
@media (hover: hover) { .lp-live .mb-filter:not(.is-active, [aria-pressed='true']):hover { background: #ffffff; color: var(--demo-text); box-shadow: inset 0 0 0 1px #ecc4c5; } }
:root[data-theme='dark'] .lp-live media-boxes { --mb-surface-2: #2a1d20; --mb-text-muted: #c4b5b7; }
@media (prefers-color-scheme: dark) { :root:not([data-theme='light']) .lp-live media-boxes { --mb-surface-2: #2a1d20; --mb-text-muted: #c4b5b7; } }
@media (prefers-color-scheme: dark) and (hover: hover) { :root:not([data-theme='light']) .lp-live .mb-filter:not(.is-active, [aria-pressed='true']):hover { background: #33242a; box-shadow: inset 0 0 0 1px #4a343a; } }
:root[data-theme='dark'] .lp-live .mb-filter:not(.is-active, [aria-pressed='true']):hover { background: #33242a; box-shadow: inset 0 0 0 1px #4a343a; }
