/* MATIS LABS PRODUCT REFERENCE SYSTEM
   Shared editorial product language: evidence first, gold as the corporate accent. */

.reference-product {
  --ref-ink: #060913;
  --ref-navy: #0a1020;
  --ref-navy-soft: #111b36;
  --ref-gold: #c4a261;
  --ref-gold-text: #77591f;
  --ref-body: #3f4b60;
  --ref-muted: #5f6b80;
  --ref-border: #d8dde6;
  --ref-page: #f7f6f2;
  background: var(--ref-page);
  color: var(--ref-body);
}

.reference-product .grid-bg,
.reference-product .noise-overlay { display: none; }

.reference-product header {
  background: rgba(255, 255, 255, 0.97) !important;
  border-bottom: 1px solid #dfe3ea;
  box-shadow: 0 0.45rem 1.6rem rgba(17, 27, 54, 0.035);
}

.reference-product main { overflow: hidden; }
.reference-product .conversion-dock { display: none !important; }

/* Shared progressive hero */
.reference-product .ref-hero {
  position: relative;
  min-height: min(980px, calc(100vh + 3rem));
  padding: clamp(8.5rem, 12vw, 11rem) 0 0;
  overflow: hidden;
  background:
    linear-gradient(rgba(17, 27, 54, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17, 27, 54, 0.025) 1px, transparent 1px),
    radial-gradient(circle at 79% 19%, rgba(196, 162, 97, 0.13), transparent 31%),
    radial-gradient(circle at 18% 82%, rgba(17, 27, 54, 0.06), transparent 28%),
    #f8f7f3;
  background-size: 56px 56px, 56px 56px, auto, auto, auto;
}

.reference-product .ref-hero::after {
  content: "";
  position: absolute;
  right: -19rem;
  top: 2rem;
  width: 50rem;
  aspect-ratio: 1;
  border: 1px solid rgba(119, 89, 31, 0.12);
  border-radius: 50%;
  pointer-events: none;
}

.ref-hero-inner { position: relative; z-index: 1; }
.ref-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(500px, 1.1fr);
  align-items: center;
  gap: clamp(3.5rem, 7vw, 7rem);
}

.ref-kicker {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--ref-gold-text);
  font: 700 0.66rem/1.5 var(--font-mono);
  letter-spacing: 0.085em;
  text-transform: uppercase;
}

.ref-kicker::before { content: ""; width: 2rem; height: 1px; background: currentColor; }

.reference-product .ref-title {
  margin: clamp(1.25rem, 2.5vw, 2rem) 0 0;
  color: var(--ref-ink) !important;
  font-size: clamp(3.6rem, 5.1vw, 5.55rem) !important;
  line-height: 0.97 !important;
  letter-spacing: -0.07em !important;
}

.ref-title-mask { display: block; overflow: hidden; padding: 0.03em 0.05em 0.1em 0; }
.ref-title-line {
  display: block;
  opacity: 0;
  transform: translateY(112%);
  animation: ref-title-in 900ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.ref-title-mask:nth-child(2) .ref-title-line { animation-delay: 90ms; }
.ref-title-mask:nth-child(3) .ref-title-line { animation-delay: 180ms; }
.ref-title-line--gold { color: var(--ref-gold-text); }

@keyframes ref-title-in { to { opacity: 1; transform: translateY(0); } }

.ref-lead {
  max-width: 39rem;
  margin: clamp(1.55rem, 2.8vw, 2.35rem) 0 0;
  color: #4d596e !important;
  font-size: clamp(1rem, 1.22vw, 1.13rem);
  line-height: 1.72;
}

.ref-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }
.ref-actions .btn { min-height: 3.4rem; display: inline-flex; align-items: center; justify-content: center; }
.ref-actions .btn:first-child { background: var(--ref-gold-text); border-color: var(--ref-gold-text); color: #fff; }
.ref-actions .btn:first-child:hover { background: #624714; border-color: #624714; color: #fff; }
.ref-actions .btn-secondary { background: rgba(255,255,255,.82); border-color: #cfd5df; color: var(--ref-ink); }

.ref-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin-top: 2.1rem;
  color: #566276;
  font: 700 0.63rem/1.5 var(--font-mono);
  letter-spacing: 0.045em;
  text-transform: uppercase;
}
.ref-facts span::before { content: "•"; margin-right: 0.48rem; color: var(--ref-gold-text); }

.ref-stage { position: relative; min-width: 0; }
.ref-product-window {
  position: relative;
  overflow: hidden;
  margin: 0;
  border: 1px solid #d6dbe4;
  border-radius: 1.15rem;
  background: #fff;
  box-shadow: 0 2.2rem 5rem rgba(17, 27, 54, 0.16);
  transform: perspective(1500px) rotateY(-2deg) rotateX(0.7deg);
  transform-origin: center;
  transition: transform 700ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 400ms ease;
}
.ref-stage:hover .ref-product-window { transform: perspective(1500px) rotateY(0) rotateX(0) translateY(-5px); box-shadow: 0 2.8rem 6rem rgba(17, 27, 54, 0.22); }
.ref-window-bar {
  min-height: 2.7rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid #e0e3e9;
  background: #f5f3ed;
  color: #59657a;
  font: 700 0.58rem/1.2 var(--font-mono);
  letter-spacing: 0.055em;
  text-transform: uppercase;
}
.ref-window-dots { display: flex; gap: 0.35rem; }
.ref-window-dots i { width: 0.55rem; height: 0.55rem; border-radius: 50%; background: #aca9a0; }
.ref-window-screen { overflow: hidden; aspect-ratio: 16 / 9.35; background: #eef1f5; }
.ref-window-screen img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: left top; transition: transform 850ms cubic-bezier(0.16, 1, 0.3, 1); }
.ref-stage:hover .ref-window-screen img { transform: scale(1.018); }
.ref-window-caption { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 0.95rem 1rem 1.05rem; }
.ref-window-caption > div { display: grid; gap: 0.18rem; }
.ref-window-caption strong { color: var(--ref-ink); font-size: 0.9rem; }
.ref-window-caption span { color: #59657a; font-size: 0.75rem; }
.ref-window-status { display: inline-flex !important; align-items: center; gap: 0.4rem; color: #435066 !important; font: 700 0.58rem/1.2 var(--font-mono); text-transform: uppercase; }
.ref-window-status::before { content: ""; width: 0.55rem; height: 0.55rem; border-radius: 50%; background: #258861; box-shadow: 0 0 0 0.22rem rgba(37, 136, 97, 0.12); }

.ref-product-window--portrait { max-width: 34rem; margin-inline: auto; }
.ref-product-window--portrait .ref-window-screen { aspect-ratio: 4 / 5; }
.ref-product-window--portrait .ref-window-screen img { object-position: center 46%; }

.ref-jump {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 0.55rem 1.25rem;
  margin-top: clamp(3rem, 6vw, 5rem);
  padding-block: 1.1rem;
  overflow-x: auto;
  border-top: 1px solid #d9dde5;
  font: 700 0.62rem/1.4 var(--font-mono);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  scrollbar-width: none;
}
.ref-jump::-webkit-scrollbar { display: none; }
.ref-jump > span { margin-right: auto; color: #566276; }
.ref-jump a { flex: none; color: #435066; text-decoration: none; }
.ref-jump a:hover { color: var(--ref-gold-text); }

/* Dark evidence chapter */
.ref-story {
  position: relative;
  padding: clamp(5.5rem, 9vw, 9rem) 0;
  background:
    radial-gradient(circle at 18% 8%, rgba(196, 162, 97, 0.1), transparent 25%),
    linear-gradient(145deg, #060913, #111b36) !important;
}
.ref-story-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr); align-items: center; gap: clamp(4rem, 8vw, 8rem); }
.ref-story-visual { margin: 0; overflow: hidden; border: 1px solid rgba(255,255,255,.14); border-radius: 1.1rem; background: #05060f; box-shadow: 0 2.2rem 5rem rgba(0,0,0,.3); }
.ref-story-visual img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: left top; transition: transform 1s cubic-bezier(0.16,1,0.3,1); }
.ref-story-visual:hover img { transform: scale(1.02); }
.ref-story-visual--portrait { max-width: 31rem; margin-inline: auto; }
.ref-story-visual--portrait img { height: auto; aspect-ratio: auto; object-fit: contain; }
.ref-story-copy small { color: var(--ref-gold); font: 700 0.64rem/1.5 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; }
.ref-story-copy h2 { max-width: 12ch; margin: 1.2rem 0 1.5rem; color: #fff !important; font-size: clamp(3rem, 5vw, 5.35rem); line-height: .98; letter-spacing: -.065em; }
.ref-story-copy > p { color: rgba(238,241,248,.78) !important; font-size: 1.03rem; line-height: 1.8; }
.ref-story-points { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 2.4rem; border-block: 1px solid rgba(255,255,255,.14); }
.ref-story-points span { min-height: 7rem; display: flex; align-items: flex-end; padding: 1rem .8rem 1rem 0; color: #fff; font-size: .85rem; font-weight: 750; line-height: 1.45; }
.ref-story-points span + span { padding-left: .8rem; border-left: 1px solid rgba(255,255,255,.14); }

/* Existing content is recast as a quiet, progressive editorial system. */
.reference-product .section-padding,
.reference-product .air-section,
.reference-product .mvs2-section { padding-block: clamp(5.5rem, 8vw, 8rem); }

.reference-product .section-header,
.reference-product .air-head,
.reference-product .mvs2-head { max-width: 980px; margin: 0 0 clamp(2.5rem, 5vw, 4.25rem); text-align: left; }

.reference-product .section-label,
.reference-product .air-head .section-label,
.reference-product .mvs2-head .section-label {
  color: var(--ref-gold-text) !important;
  font: 700 0.67rem/1.4 var(--font-mono);
  letter-spacing: .09em;
  text-transform: uppercase;
}

.reference-product .section-header h2,
.reference-product .air-head h2,
.reference-product .mvs2-head h2 {
  max-width: 16ch;
  margin: .9rem 0 0;
  color: var(--ref-ink) !important;
  font-size: clamp(2.75rem, 5vw, 5.1rem);
  line-height: .98;
  letter-spacing: -.06em;
}
.reference-product .section-header p,
.reference-product .air-head p,
.reference-product .mvs2-head p { margin-top: 1.3rem; color: #4d596e !important; font-size: 1rem; line-height: 1.75; }

.reference-product .air-section--soft,
.reference-product .mvs2-section--soft { border: 0; background: #f1f3f7; }
.reference-product .air-section:not(.air-section--soft),
.reference-product .mvs2-section:not(.mvs2-section--soft):not(.mvs2-section--navy) { background: #fff; }

.reference-product .card,
.reference-product .air-card,
.reference-product .air-panel,
.reference-product .mvs2-card,
.reference-product .mvs2-step,
.reference-product .mvs2-layer,
.reference-product .mvs2-mini {
  border: 1px solid var(--ref-border);
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 1rem 3rem rgba(17,27,54,.055);
}

.reference-product .air-card,
.reference-product .air-panel,
.reference-product .mvs2-card,
.reference-product .mvs2-step,
.reference-product .mvs2-layer { padding: clamp(1.35rem, 2.5vw, 2rem); }

.reference-product .card-title,
.reference-product .air-card h3,
.reference-product .air-panel h3,
.reference-product .mvs2-card h3,
.reference-product .mvs2-step h3,
.reference-product .mvs2-layer h3,
.reference-product .mvs2-mini h3 { color: var(--ref-ink) !important; }

.reference-product .card-desc,
.reference-product .air-card p,
.reference-product .air-panel p,
.reference-product .mvs2-card p,
.reference-product .mvs2-step p,
.reference-product .mvs2-layer p,
.reference-product .mvs2-mini p { color: #4d596e !important; line-height: 1.7; }

/* Legacy deep sections become intentional evidence chapters. */
.reference-product .sektion-tief,
.reference-product .mvs2-section--navy {
  border: 0 !important;
  background:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(145deg, #070a14, #111b36) !important;
  background-size: 56px 56px, 56px 56px, auto !important;
}
.reference-product .sektion-tief h2,
.reference-product .sektion-tief h3,
.reference-product .sektion-tief .card-title,
.reference-product .mvs2-section--navy h2,
.reference-product .mvs2-section--navy h3 { color: #fff !important; }
.reference-product .sektion-tief p,
.reference-product .sektion-tief li,
.reference-product .sektion-tief .card-desc,
.reference-product .mvs2-section--navy p,
.reference-product .mvs2-section--navy li { color: rgba(238,241,248,.78) !important; }
.reference-product .sektion-tief .section-label,
.reference-product .mvs2-section--navy .section-label { color: var(--ref-gold) !important; }
.reference-product .sektion-tief .card,
.reference-product .mvs2-section--navy .mvs2-card { border-color: rgba(255,255,255,.14); background: rgba(255,255,255,.055); box-shadow: none; }

/* Product-specific cleanups */
.ref-product--air .air-workflow { gap: 1px; overflow: hidden; border: 1px solid var(--ref-border); border-radius: 1rem; background: var(--ref-border); }
.ref-product--air .air-step { min-height: 13rem; padding: 1.4rem; border-top: 3px solid var(--ref-gold); background: #fff; }
.ref-product--air .air-step::before { display: none; }
.ref-product--air .air-roles { border-radius: 1rem; }
.ref-product--air .air-panel--navy { border-color: rgba(196,162,97,.3); background: linear-gradient(145deg,#070a14,#111b36); }
.ref-product--air .air-panel--navy h3 { color: #fff !important; }
.ref-product--air .air-panel--navy p,
.ref-product--air .air-panel--navy li { color: rgba(238,241,248,.78) !important; }

.ref-product--msls #screenshots { background: linear-gradient(145deg,#070a14,#111b36) !important; }
.ref-product--msls #screenshots .section-header h2 { color: #fff !important; }
.ref-product--msls #screenshots .section-header p { color: rgba(238,241,248,.78) !important; }
.ref-product--msls #fuer-wen { background: #fff; }
.ref-product--msls #technical,
.ref-product--msls #editions,
.ref-product--msls #fragen { background: #f7f6f2; }

.ref-product--extractor .mlextractor-floating-reel {
  position: relative !important;
  inset: auto !important;
  z-index: 1 !important;
  width: min(100% - 2rem, 360px) !important;
  margin: 0 auto !important;
  transform: none !important;
}
.ref-reel-section { padding: clamp(5.5rem, 9vw, 9rem) 0; background: #f7f6f2; }
.ref-reel-grid { display: grid; grid-template-columns: minmax(0, .92fr) minmax(340px, .68fr); align-items: center; gap: clamp(4rem, 9vw, 9rem); max-width: 980px; }
.ref-reel-copy small { color: var(--ref-gold-dark); font: 700 .65rem/1.5 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; }
.ref-reel-copy h2 { margin: 1rem 0 1.5rem; font-size: clamp(3.25rem, 6vw, 6.4rem); line-height: .92; letter-spacing: -.075em; }
.ref-reel-copy h2 span { color: var(--ref-gold-dark); }
.ref-reel-copy p { max-width: 34rem; color: var(--ref-text-muted); font-size: 1.05rem; line-height: 1.75; }
.ref-text-link { display: inline-flex; gap: .55rem; margin-top: 1.5rem; color: var(--ref-ink); font-weight: 750; text-decoration: none; border-bottom: 1px solid var(--ref-gold); }
.ref-product--extractor #screenshots { background: #fff; }
.ref-product--extractor #screenshots .wechselblock { padding-block: clamp(3.5rem,6vw,6rem); border-top: 1px solid #dfe3ea; }
.ref-product--extractor #screenshots .wechselblock-bild { overflow: hidden; border: 1px solid var(--ref-border); border-radius: 1rem; box-shadow: 0 1.5rem 4rem rgba(17,27,54,.08); }
.ref-product--extractor #screenshots .wechselblock-bild img { display: block; width: 100%; }

.ref-product--vibescan .mvs2-flow { gap: 1px; overflow: hidden; border: 1px solid var(--ref-border); border-radius: 1rem; background: var(--ref-border); }
.ref-product--vibescan .mvs2-step { border: 0; border-radius: 0; box-shadow: none; }
.ref-product--vibescan .mvs2-brand-stage { display: none; }
.ref-product--vibescan .mvs2-proof,
.ref-product--vibescan .mvs2-gate-panel { border-radius: 1rem; box-shadow: 0 1.6rem 4rem rgba(17,27,54,.1); }
.ref-product--vibescan .mvs2-status-pill { color: #344158; }
.ref-product--vibescan .mvs2-status-pill--key { color: #0b684b; }

/* Closing conversion */
.reference-product .air-final,
.reference-product .mvs2-final,
.reference-product .ref-final { padding: clamp(6rem, 9vw, 9rem) 0; background: #fff; }
.reference-product .air-final-box,
.reference-product .mvs2-final-box,
.reference-product .ref-final-box {
  position: relative;
  overflow: hidden;
  padding: clamp(3rem, 7vw, 6rem);
  border: 1px solid rgba(196,162,97,.28);
  border-radius: 1.25rem;
  background:
    linear-gradient(rgba(255,255,255,.025) 1px,transparent 1px),
    linear-gradient(90deg,rgba(255,255,255,.025) 1px,transparent 1px),
    linear-gradient(145deg,#070a14,#111b36);
  background-size: 56px 56px,56px 56px,auto;
  text-align: center;
  color: #fff;
}
.reference-product .air-final-box h2,
.reference-product .mvs2-final-box h2,
.reference-product .ref-final-box h2 { max-width: 13ch; margin: 0 auto 1.25rem; color: #fff !important; font-size: clamp(3rem,6vw,6rem); line-height: .96; letter-spacing: -.065em; }
.reference-product .air-final-box p,
.reference-product .mvs2-final-box p,
.reference-product .ref-final-box p { max-width: 700px; margin: 0 auto 2rem; color: rgba(238,241,248,.8) !important; line-height: 1.75; }

@media (max-width: 1060px) {
  .ref-hero-grid { grid-template-columns: 1fr; }
  .ref-copy { max-width: 780px; }
  .ref-stage { max-width: 860px; }
  .ref-story-grid { grid-template-columns: 1fr; }
  .ref-story-visual { max-width: 850px; }
  .ref-reel-grid { grid-template-columns: 1fr; }
  .ref-reel-copy { max-width: 640px; }
}

@media (max-width: 760px) {
  .reference-product .ref-hero { min-height: auto; padding-top: 7.2rem; }
  .ref-hero-grid { gap: 3rem; }
  .reference-product .ref-title { font-size: clamp(2.9rem, 12vw, 4.1rem) !important; }
  .ref-actions { display: grid; grid-template-columns: 1fr; }
  .ref-actions .btn { width: 100%; }
  .ref-facts { display: grid; grid-template-columns: 1fr; }
  .ref-product-window { transform: none; }
  .ref-window-caption { align-items: flex-start; flex-direction: column; }
  .ref-jump { margin-inline: -1rem; padding-inline: 1rem; }
  .ref-jump > span { display: none; }
  .ref-story { padding-block: 5rem; }
  .ref-story-points { grid-template-columns: 1fr; }
  .ref-story-points span { min-height: auto; padding: 1rem 0; }
  .ref-story-points span + span { padding-left: 0; border-left: 0; border-top: 1px solid rgba(255,255,255,.14); }
  .reference-product .section-padding,
  .reference-product .air-section,
  .reference-product .mvs2-section { padding-block: 4.8rem; }
  .reference-product .section-header h2,
  .reference-product .air-head h2,
  .reference-product .mvs2-head h2 { font-size: clamp(2.65rem, 12vw, 4rem); }
  .ref-product--air .air-workflow { grid-template-columns: 1fr; }
  .reference-product .air-final-box h2,
  .reference-product .mvs2-final-box h2,
  .reference-product .ref-final-box h2 { font-size: clamp(2.8rem, 13vw, 4.3rem); }
}

@media (prefers-reduced-motion: reduce) {
  .ref-title-line { opacity: 1; transform: none; animation: none; }
  .ref-product-window,
  .ref-window-screen img,
  .ref-story-visual img { transition: none; }
}
