/* m4l-library.css — OF Spatial Audio (the library page of the OF devices) inside M4L Plug-ins, between the cards and Subscribe.
   Load order on that page: OF-Design (css/of/*, library.css) first, then the site's styles.css, mobile.css, fonts.css, then this.
   So the site's own rules win everywhere; this file only adapts what is left. Built by tools/build_pages.py. */

/* OF-Design rev 0.3 type inside the section (css/of on the site is still rev 0.2, used by the device pages) */
.m4l-lib {
  --of-caps: 'OF Campo', 'OF Campo Text', 'Helvetica Neue', Arial, sans-serif;
  --of-term: 'OF Campo', 'Helvetica Neue', sans-serif;
  --of-text: 'OF Campo Text', 'OF Campo', 'Helvetica Neue', Arial, sans-serif;
  --of-w-thin: 200;
  --of-fs-body: 1rem;
  --of-fs-prose: 1.1875rem;
  --of-tr-label: 0.06em;
  font-size: 1rem; line-height: var(--of-lh-body, 1.5);
}

/* OF-Design underlines every link: only inside the section, never in the site's header, cards, Subscribe, footer */
body > :not(.m4l-lib) a, .m4l-lib .lib-dev, .m4l-lib .lib-chapters a { border-bottom: 0; }

/* sentences in OF Campo Text, as on the rest of the site (fonts.css sets OF Campo on everything) */
.m4l-lib .of-prose, .m4l-lib .of-say, .m4l-lib .lib-lead, .m4l-lib td, .m4l-lib figcaption, .m4l-lib .of-status {
  font-family: 'OF Campo Text', 'OF Campo', 'Helvetica Neue', Arial, sans-serif !important;
  font-feature-settings: normal; letter-spacing: .012em;
}
.m4l-lib .of-say b, .m4l-lib .lib-nm, .m4l-lib th {
  font-family: 'OF Campo', 'OF Campo Text', 'Helvetica Neue', Arial, sans-serif !important;
  font-feature-settings: "ss02"; letter-spacing: .06em;
}

/* headings: the site's h2 rules (fonts.css) would flatten OF-Design's cover and terms */
.m4l-lib .of-cover { font-size: inherit; }
.m4l-lib .of-cover__name { font-size: min(clamp(3.5rem, 8vw, 6.25rem), 12.5vw); font-weight: 200 !important; }
.m4l-lib .of-cover__sub { letter-spacing: 0; }
.m4l-lib .lib-term { font-weight: 300 !important; }

/* the site's .card rule is generic: OF-Design's img/svg reset must not reach the cards above */
.m4l-lib img, .m4l-lib svg, .m4l-lib canvas { display: block; max-width: 100%; }

/* ── Folded: one button opens the section (tools/sync_spatial_audio.py) ───────────────────────────────── */
.m4l-toggle-h { margin: 0; font: inherit; letter-spacing: normal !important; }
.m4l-toggle {
  position: relative; isolation: isolate; overflow: hidden; display: grid; justify-items: center; row-gap: 18px;
  width: min(100% - 20px, 1300px); margin: 40px auto 0; padding: clamp(56px, 9vw, 120px) 24px clamp(40px, 6vw, 72px);
  background: #000; color: #fff; border: 1px solid #3a3a3a; cursor: pointer; text-align: center;
  transition: border-color .3s ease;
}
/* behind it: the cave of OF GROTTA, from the device's window */
.m4l-toggle::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: .42;
  background: #010101 url(../assets/of-spatial-audio/band-grotta.webp) center / cover no-repeat;
  transition: opacity .5s ease, transform 1.2s cubic-bezier(.2, .7, .2, 1);
}
.m4l-toggle::after { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(ellipse at center, rgba(0,0,0,.55), rgba(0,0,0,.1) 70%); }
.m4l-toggle:hover { border-color: #fff; }
.m4l-toggle:hover::before { opacity: .6; transform: scale(1.03); }
.m4l-toggle:focus-visible { outline: 2px solid #fff; outline-offset: 4px; }
.m4l-toggle__kicker { font-size: 13px; letter-spacing: .2em !important; text-transform: uppercase; color: #bfbfbf; }
.m4l-toggle__cover { display: inline-grid; }
.m4l-toggle__desc {
  max-width: 36em; font-family: 'OF Campo Text', 'OF Campo', sans-serif !important; font-feature-settings: normal;
  letter-spacing: .012em !important; font-size: 17px; line-height: 1.5; color: #d6d6d6;
}
.m4l-toggle__cta {
  display: inline-flex; align-items: center; gap: 14px; margin-top: 10px; padding: 12px 22px; border: 1px solid #fff;
  font-size: 14px; letter-spacing: .14em !important; text-transform: uppercase; transition: background .25s ease, color .25s ease;
}
.m4l-toggle:hover .m4l-toggle__cta { background: #fff; color: #000; }
.m4l-toggle__icon { position: relative; width: 12px; height: 12px; }
.m4l-toggle__icon::before, .m4l-toggle__icon::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: currentColor; transition: transform .3s ease; }
.m4l-toggle__icon::after { transform: rotate(90deg); }
.m4l-toggle__less { display: none; }
.m4l-lib.is-open .m4l-toggle__more { display: none; }
.m4l-lib.is-open .m4l-toggle__less { display: inline; }
.m4l-lib.is-open .m4l-toggle__icon::after { transform: rotate(0deg); }
.m4l-lib.is-open .m4l-toggle { border-bottom-color: transparent; }
.m4l-body { animation: m4l-open .5s ease both; }
@keyframes m4l-open { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .m4l-body { animation: none; } .m4l-toggle::before { transition: none; } }
.m4l-close-row { display: flex; justify-content: center; padding: 24px 0 8px; }
.m4l-close {
  background: none; color: #fff; border: 1px solid #fff; padding: 12px 22px; cursor: pointer;
  font-size: 14px; letter-spacing: .14em !important; text-transform: uppercase;
}
.m4l-close:hover { background: #fff; color: #000; }

/* ── The open section: contents at the side, one column of text in the middle (2026-12-02) ──────────────── */
.m4l-body {
  display: grid; grid-template-columns: 200px minmax(0, 720px) 200px; justify-content: center; column-gap: clamp(32px, 5vw, 80px);
  width: min(100% - 20px, 1300px); margin: 0 auto; padding: 72px 0 24px; border: 1px solid #3a3a3a; border-top: 0;
}
.m4l-main { grid-column: 2; min-width: 0; }

/* contents: a quiet vertical list at the left, apart from the site's menu at the top */
.m4l-toc { grid-column: 1; grid-row: 1; align-self: start; position: sticky; top: calc(var(--lib-head, 52px) + 40px); padding-left: 28px; }
.m4l-toc__h { margin: 0 0 14px; font-size: 11px; letter-spacing: .2em !important; text-transform: uppercase; color: #8c8c8c; }
.m4l-toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid #333; }
.m4l-toc a {
  position: relative; display: flex; gap: 10px; padding: 7px 0 7px 16px; border: 0; color: #8c8c8c;
  font-size: 13px; letter-spacing: .08em !important; text-transform: uppercase; line-height: 1.3; transition: color .2s ease;
}
.m4l-toc a:hover { color: #fff; }
.m4l-toc a[aria-current] { color: #fff; }
.m4l-toc a[aria-current]::before { content: ""; position: absolute; left: -1px; top: 6px; bottom: 6px; width: 1px; background: #fff; }
.m4l-toc__n { min-width: 1.6em; color: #595959; font-variant-numeric: tabular-nums; }
.m4l-toc a[aria-current] .m4l-toc__n { color: #bfbfbf; }

/* chapters */
.m4l-ch { padding: 24px 0 64px; scroll-margin-top: calc(var(--lib-head, 52px) + 32px); }
.m4l-ch__t {
  display: flex; flex-direction: column; align-items: center; gap: 10px; margin: 0 0 40px; text-align: center;
  font-size: clamp(26px, 3vw, 36px) !important; font-weight: 300 !important; letter-spacing: .08em !important; text-transform: uppercase; line-height: 1.1;
}
.m4l-ch__n { font-size: 12px; letter-spacing: .2em !important; color: #8c8c8c; }
.m4l-ch__n:empty { display: none; }

/* text: one centred column, justified, last line centred */
.m4l-p, .m4l-lib figcaption, .m4l-family__tx, .m4l-gloss dd, .m4l-reading {
  font-family: 'OF Campo Text', 'OF Campo', 'Helvetica Neue', Arial, sans-serif !important; font-feature-settings: normal; letter-spacing: .012em !important;
}
.m4l-p {
  max-width: 620px; margin: 0 auto 1.3em; font-size: 19px; line-height: 1.65; color: #d6d6d6;
  text-align: justify; text-align-last: center; hyphens: auto; -webkit-hyphens: auto;
}
.m4l-lead { font-size: 21px; color: #fff; max-width: 660px; }
.m4l-note { font-size: 16px; color: #a6a6a6; }
.m4l-p a, .m4l-main .lib-nm { border: 0; }
.m4l-p a { text-decoration: underline; text-underline-offset: .2em; text-decoration-thickness: 1px; }

/* figures: the drawings in a row, captions centred under them */
.m4l-figs { display: grid; gap: 40px 32px; margin: 48px auto; }
.m4l-figs--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 620px; }
.m4l-figs--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.m4l-figs--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 620px; }
.m4l-fig { margin: 0; display: grid; row-gap: 16px; align-content: start; justify-items: center; }
.m4l-fig > svg { width: 100%; max-width: 240px; }
.m4l-map img { width: 100%; height: auto; outline: 1px solid #333; }
.m4l-figs--2.m4l-map { max-width: none; }   /* MAP v10 (4 Dec): ROOM and ZONES, the two views at full width */
@media (max-width: 600px) { .m4l-figs--2.m4l-map { grid-template-columns: minmax(0, 1fr); } }
.m4l-lib figcaption { font-size: 15px; line-height: 1.55; color: #a6a6a6; text-align: center; }
.m4l-lib figcaption b {
  display: block; margin-bottom: 6px; color: #fff; font-family: 'OF Campo', sans-serif !important; font-weight: 400;
  font-size: 13px; letter-spacing: .14em !important; text-transform: uppercase;
}
.m4l-live { margin: 48px 0 0; display: grid; row-gap: 14px; }
.m4l-live canvas { aspect-ratio: 752 / 300; }

/* the family: a list of names and one line each, linked to its page */
.m4l-family { list-style: none; margin: 0 auto; padding: 0; max-width: 34em; border-top: 1px solid #262626; }
.m4l-family li { border-bottom: 1px solid #262626; }
.m4l-family a { display: grid; justify-items: center; gap: 6px; padding: 20px 8px; border: 0; text-align: center; transition: background .2s ease; }
.m4l-family a:hover { background: #0d0d0d; }
.m4l-family__nm { font-size: 20px; letter-spacing: .08em !important; }
.m4l-family__tx { font-size: 16px; line-height: 1.55; color: #a6a6a6; max-width: 30em; }

/* the table: quiet lines */
.m4l-table { margin: 40px auto; }
.m4l-table .of-table { width: 100%; border-collapse: collapse; }
.m4l-table th { font-size: 12px; letter-spacing: .14em !important; text-transform: uppercase; color: #8c8c8c; font-weight: 400; text-align: left; padding: 0 16px 12px 0; }
.m4l-table td { font-size: 15px !important; line-height: 1.5; color: #bfbfbf; padding: 14px 16px 14px 0; border-top: 1px solid #262626; vertical-align: top; }
.m4l-table td:first-child { color: #fff; font-family: 'OF Campo', sans-serif !important; font-size: 13px !important; letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; }
.m4l-table td:last-child { color: #fff; }

/* drawings between chapters: one per device, thin white lines, the device's colour as the only accent (2026-12-02) */
.m4l-art { --c: #fff; margin: 0 0 64px; padding: 8px 0; border-top: 1px solid #1f1f1f; border-bottom: 1px solid #1f1f1f; }
.m4l-art[data-dev="sabbia"] { --c: #FFB532; }
.m4l-art[data-dev="nebbia"] { --c: #A8BFD1; }
.m4l-art[data-dev="campo"]  { --c: #c9c9cf; }
.m4l-art[data-dev="stormo"] { --c: #6BE8A3; }
.m4l-art[data-dev="grotta"] { --c: #fff; }
.m4l-art svg { display: block; width: 100%; height: auto; overflow: visible; }
.m4l-art .l { fill: none; stroke: #4a4a4a; stroke-width: 1; vector-effect: non-scaling-stroke; }
.m4l-art .l2 { stroke-dasharray: 2 4; stroke: #3a3a3a; }
.m4l-art .a { fill: var(--c); }
.m4l-art .o { fill: none; stroke: var(--c); stroke-width: 1; opacity: .35; vector-effect: non-scaling-stroke; }
.m4l-art .p { fill: #8c8c8c; }
.m4l-art .k { fill: #fff; }
.m4l-art .fog { stroke: var(--c); stroke-width: 1.4; stroke-linecap: round; }
.m4l-art .t { stroke: var(--c); stroke-width: 1; opacity: .55; vector-effect: non-scaling-stroke; }
.m4l-art .sp { fill: #fff; }
.m4l-art .path { fill: none; stroke: var(--c); stroke-width: 1.2; opacity: .7; vector-effect: non-scaling-stroke; }
.m4l-art .lane { stroke: #262626; stroke-width: 1; vector-effect: non-scaling-stroke; }
.m4l-art .seg { stroke: #d6d6d6; stroke-width: 2.4; }
.m4l-art .tick { stroke: #fff; stroke-width: 1; }
.m4l-art .head { stroke: #fff; stroke-width: 1.5; }
/* slow motion: the grains breathe, the fog drifts; none with reduced motion */
@media (prefers-reduced-motion: no-preference) {
  .m4l-art[data-dev="sabbia"] .a { animation: m4l-breathe 6s ease-in-out infinite; animation-delay: var(--d, 0s); transform-box: fill-box; transform-origin: center; }
  .m4l-art .drift { animation: m4l-drift 40s linear infinite alternate; }
}
@keyframes m4l-breathe { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.7); } }
@keyframes m4l-drift { from { transform: translateX(-30px); } to { transform: translateX(30px); } }

/* glossary: two quiet columns */
.m4l-gloss { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 40px; margin: 0; }
.m4l-gloss > div { padding: 14px 0; border-top: 1px solid #262626; scroll-margin-top: calc(var(--lib-head, 52px) + 32px); }
.m4l-gloss > div:target dt { text-decoration: underline; text-underline-offset: .2em; }
.m4l-gloss dt { font-size: 13px; letter-spacing: .12em !important; text-transform: uppercase; color: #fff; margin-bottom: 4px; }
.m4l-gloss dd { margin: 0; font-size: 15px; line-height: 1.5; color: #a6a6a6; }
.m4l-reading { margin: 48px auto 0; max-width: 34em; font-size: 14px; line-height: 1.7; color: #8c8c8c; text-align: center; }
.m4l-reading b { display: block; margin-bottom: 8px; font-family: 'OF Campo', sans-serif !important; font-weight: 400; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: #bfbfbf; }
.m4l-close-row { margin: 24px 0 0; }

/* medium screens: no right spacer */
@media (max-width: 1180px) { .m4l-body { grid-template-columns: 180px minmax(0, 1fr); padding-right: 40px; } }

/* phone and tablet: the contents become a short list at the top, not sticky */
@media (max-width: 860px) {
  .m4l-body { display: block; padding: 40px 20px 16px; }
  .m4l-toc { position: static; padding: 0 0 40px; margin: 0 auto 40px; max-width: 320px; border-bottom: 1px solid #262626; }
  .m4l-toc__h { text-align: center; }
  .m4l-toc ol { border-left: 0; display: grid; grid-template-columns: 1fr 1fr; column-gap: 16px; }
  .m4l-toc a { padding-left: 0; }
  .m4l-toc a[aria-current]::before { display: none; }
  .m4l-figs--4, .m4l-figs--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  /* the six cards: two to a row, with their subtitle (the site's phone rule makes three tiny ones) */
  .section:has(+ .m4l-lib) .grid-plugs { row-gap: 8px; column-gap: 16px; }
  .section:has(+ .m4l-lib) .grid-plugs > .card { flex-basis: calc((100% - 16px) / 2); }
  .section:has(+ .m4l-lib) .card h3 { font-size: 18px !important; margin-top: 14px; font-stretch: 100% !important; font-variation-settings: normal; }
  .section:has(+ .m4l-lib) .card p { font-size: 11px; letter-spacing: .06em !important; }
  .section:has(+ .m4l-lib) .card p { display: block; }
  .section:has(+ .m4l-lib) .card-price { font-size: 12px; }


  .m4l-toggle { width: calc(100% - 20px); row-gap: 14px; }
  .m4l-toggle__desc { font-size: 15px; }
  .m4l-body { width: calc(100% - 20px); padding-inline: 16px; }
  .m4l-p { font-size: 17px; line-height: 1.6; }
  .m4l-lead { font-size: 18px; }
  .m4l-figs--2, .m4l-figs--3, .m4l-figs--4 { grid-template-columns: minmax(0, 1fr); max-width: 300px; }
  .m4l-live canvas { aspect-ratio: 4 / 3; }
  .m4l-art { margin-bottom: 48px; overflow: hidden; }
  .m4l-art svg { width: 170%; max-width: none; margin-left: -35%; }
  .m4l-gloss { grid-template-columns: minmax(0, 1fr); }
  .m4l-ch { padding-bottom: 48px; }
  /* the table: each row a block, the two columns stacked with their heading */
  .m4l-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .m4l-table tr, .m4l-table td { display: block; }
  .m4l-table tr { border-top: 1px solid #262626; padding: 14px 0; }
  .m4l-table td { border: 0; padding: 0 0 8px; white-space: normal !important; }
  .m4l-table td[data-label]:not([data-label=""])::before {
    content: attr(data-label); display: block; font-family: 'OF Campo', sans-serif; font-size: 11px;
    text-transform: uppercase; letter-spacing: .1em; color: #8c8c8c; padding-bottom: 2px;
  }
}
/* the visualizer before the concept (2026-12-04) */
.m4l-video { width: min(100% - 20px, 860px); margin: 72px auto 32px; background: #000; border: 1px solid #262626; }
.m4l-video video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; background: #000; }
