/* MausHaus shared tokens + primitives (catalogue look). Loaded in editor + front. */
:root {
  --mh-ivory: #F1E9D8;
  --mh-ivory-2: #E9DEC8;
  --mh-paper-edge: #E0D2B6;
  --mh-ink: #3B2E22;
  --mh-ink-soft: rgba(59, 46, 34, 0.70);
  --mh-ink-faint: rgba(59, 46, 34, 0.48);
  --mh-oxblood: #7C3A2E;
  --mh-oxblood-2: #934A3B;
  --mh-sage: #8A9A7E;
  --mh-walnut: #2E241B;
  --mh-line: rgba(59, 46, 34, 0.26);
  --mh-line-soft: rgba(59, 46, 34, 0.13);
  --mh-display: "Fraunces", "Hoefler Text", Georgia, serif;
  --mh-body: "Hanken Grotesk", system-ui, sans-serif;
  --mh-ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --mh-ease-soft: cubic-bezier(0.25, 1, 0.5, 1);
}

/* Catalogue eyebrow (tracked uppercase) */
.mh-eyebrow {
  font-family: var(--mh-body);
  font-size: 0.74rem;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--mh-oxblood);
}

/* Ornamental rule with centre diamond */
.mh-rule { display: flex; align-items: center; gap: 1.1rem; justify-content: center; }
.mh-rule::before, .mh-rule::after { content: ""; height: 1px; background: var(--mh-line); flex: 1; }
.mh-rule .mh-diamond { width: 9px; height: 9px; transform: rotate(45deg); border: 1px solid var(--mh-oxblood); flex: none; }

/* Plate — keyline image frame. border-box so the 10px+1px frame measures
   inside any explicit width (maker mobile, hero) instead of overflowing it. */
.mh-plate {
  position: relative;
  box-sizing: border-box;
  background: var(--mh-ivory-2);
  padding: 10px;
  border: 1px solid var(--mh-ink);
  box-shadow: inset 0 0 0 1px var(--mh-ivory), 6px 8px 0 -2px var(--mh-line-soft);
}
.mh-plate__img { position: relative; overflow: hidden; border: 1px solid var(--mh-line); }
.mh-plate__img img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  object-position: var(--mh-focal, 50% 50%);
  transition: transform 1.1s var(--mh-ease-out), filter 0.9s var(--mh-ease-out);
  filter: saturate(0.86) sepia(0.06);
}
.mh-plate:hover .mh-plate__img img { transform: scale(1.04); filter: saturate(0.95) sepia(0.02); }

/* Lot / plate numeral tab */
.mh-lot {
  position: absolute; top: -1px; left: -1px; z-index: 3;
  background: var(--mh-ink); color: var(--mh-ivory);
  font-family: var(--mh-display); font-weight: 500; font-size: 0.82rem;
  letter-spacing: 0.1em; padding: 0.3rem 0.7rem; border: 1px solid var(--mh-ink);
}
.mh-lot em { font-style: normal; color: var(--mh-oxblood-2); }

/* Buttons */
.mh-btn {
  --bg: var(--mh-ink); --fg: var(--mh-ivory);
  display: inline-flex; align-items: center; gap: 0.6rem;
  background: var(--bg); color: var(--fg);
  font-family: var(--mh-body); font-weight: 600; font-size: 0.74rem;
  letter-spacing: 0.18em; text-transform: uppercase;
  padding: 0.95rem 1.6rem; border: 1px solid var(--mh-ink); border-radius: 2px;
  cursor: pointer; text-decoration: none;
  transition: transform 0.4s var(--mh-ease-out), box-shadow 0.4s var(--mh-ease-out), background 0.3s, color 0.3s;
}
/* Hold the button's own text colour through every state — otherwise the
   theme's `a:hover` colour (oxblood) wins the specificity tie and reddens the
   label. */
.mh-btn:hover, .mh-btn:focus, .mh-btn:focus-visible, .mh-btn:active { color: var(--fg); }
.mh-btn:hover { transform: translateY(-2px); box-shadow: 4px 6px 0 -1px var(--mh-oxblood); }
.mh-btn--ghost { --bg: transparent; --fg: var(--mh-ink); }
.mh-btn--ghost:hover { background: var(--mh-ivory-2); box-shadow: 4px 6px 0 -1px var(--mh-line); }

/* Content measure — sections are full-bleed (align:full), but their inner
   content is centered to the catalogue width, like version-3's `.wrap`.
   .mh-sec-head keeps its own narrower 60ch measure (defined below). */
.mh-hero__grid,
.mh-maker__grid,
.mh-restore__card,
.mh-cta__inner,
.mh-entry-grid,
.mh-lot-grid,
.mh-gallery {
  box-sizing: border-box;
  /* !important defeats the full-width (align:full) breakout margins that core
     applies to some of these wrappers, which otherwise let the card stretch
     past its section's right edge. */
  width: min(1180px, 92vw) !important;
  max-width: 100% !important;
  margin-inline: auto !important;
}

/* Section vertical rhythm — version-3's `.section`. `mh-lots` carries
   `mh-section` from its render.php; the rest get it by class here.
   (`mh-hero` keeps its own bespoke padding.) */
.mh-section,
.mh-sortiment,
.mh-maker,
.mh-restore,
.mh-galerie,
.mh-cta { padding-block: clamp(3.5rem, 8vw, 6.5rem); position: relative; }
.mh-sec-head { max-width: 60ch; margin: 0 auto clamp(2.5rem, 5vw, 3.5rem); text-align: center; }
.mh-sec-head__h2 {
  font-family: var(--mh-display); font-weight: 400;
  font-size: clamp(2rem, 1.4rem + 2.8vw, 3.4rem); line-height: 1.04;
  letter-spacing: -0.02em; margin: 0.7rem 0 0.9rem;
}
.mh-sec-head__h2 em { font-style: italic; color: var(--mh-oxblood); }
.mh-sec-head__p { color: var(--mh-ink-soft); max-width: 54ch; margin: 0 auto 1.4rem; }
.mh-sec-head .mh-rule { margin-top: 1.2rem; }

/* Form primitives — the framed form card and its fields, shared by the
   Kontakt and Anfrage blocks (visual-only forms, no submission handling). */
.mh-contact__form {
  background: var(--mh-ivory-2); border: 1px solid var(--mh-ink);
  box-shadow: inset 0 0 0 1px var(--mh-ivory), 8px 10px 0 -2px var(--mh-line-soft);
  padding: clamp(1.6rem, 4vw, 2.6rem);
}
.mh-field { display: grid; gap: 0.4rem; margin-bottom: 1.1rem; }
.mh-field label { font-size: 0.68rem; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 700; color: var(--mh-ink-soft); }
.mh-field__req { color: var(--mh-oxblood); }
.mh-field__opt { font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--mh-ink-faint); }
.mh-input, .mh-textarea, .mh-select {
  font-family: var(--mh-body); font-size: 1rem; color: var(--mh-ink);
  padding: 0.85rem 1.1rem; border-radius: 2px;
  border: 1px solid var(--mh-ink); background: var(--mh-ivory);
  width: 100%; box-sizing: border-box;
}
.mh-textarea { resize: vertical; min-height: 9rem; line-height: 1.6; }
/* Select: replace the OS arrow with the same quiet chevron WooCommerce's
   checkout select uses, so both forms read identically. */
.mh-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%233B2E22' d='M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  background-size: 20px;
  padding-right: 2.8rem;
}
.mh-input::placeholder, .mh-textarea::placeholder { color: var(--mh-ink-faint); }
.mh-input:focus-visible, .mh-textarea:focus-visible, .mh-select:focus-visible { outline-offset: 0; }
.mh-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
@media (max-width: 560px) { .mh-field-row { grid-template-columns: 1fr; } }
.mh-form-note { font-size: 0.82rem; color: var(--mh-ink-faint); margin: 0.4rem 0 0; }

/* Legal pages (Impressum / Datenschutz / AGB patterns) — built from core
   blocks carrying these classes, so the text stays freely editable. Catalogue
   clauses: Roman-numeral tabs, hairline rules, framed operator card. */
.mh-legal { padding-block: clamp(1rem, 3vw, 2rem) clamp(3.5rem, 8vw, 6.5rem); }
.mh-legal__inner {
  box-sizing: border-box;
  width: min(760px, 92vw) !important;
  max-width: 100% !important;
  margin-inline: auto !important;
}
.mh-legal-card {
  background: var(--mh-ivory-2); border: 1px solid var(--mh-ink);
  box-shadow: inset 0 0 0 1px var(--mh-ivory), 8px 10px 0 -2px var(--mh-line-soft);
  padding: clamp(1.4rem, 3.5vw, 2.2rem);
  margin-bottom: clamp(2.4rem, 5vw, 3.4rem);
}
.mh-legal-card p {
  display: flex; gap: 1rem; align-items: baseline; flex-wrap: wrap;
  margin: 0; padding: 1.05rem 0; border-top: 1px solid var(--mh-line);
  color: var(--mh-ink);
}
.mh-legal-card p:first-child { border-top: none; padding-top: 0; }
.mh-legal-card p:last-child { padding-bottom: 0; }
.mh-legal-card p strong {
  font-size: 0.68rem; letter-spacing: 0.16em; text-transform: uppercase;
  font-weight: 700; color: var(--mh-ink-faint); flex: none; width: 7.5rem;
}
.mh-legal-sec { border-top: 1px solid var(--mh-line); padding-top: 1.5rem; margin-top: clamp(2rem, 4vw, 2.8rem); }
.mh-legal-sec__n {
  font-family: var(--mh-display); font-size: 0.95rem; letter-spacing: 0.08em;
  color: var(--mh-oxblood); margin: 0 0 0.45rem; font-variant-numeric: oldstyle-nums;
}
.mh-legal-sec h2 {
  font-family: var(--mh-display); font-weight: 600; font-size: 1.45rem;
  letter-spacing: -0.01em; line-height: 1.15; margin: 0 0 0.8rem;
}
.mh-legal-sec p, .mh-legal-sec li { color: var(--mh-ink-soft); line-height: 1.7; max-width: 62ch; }
.mh-legal-sec p { margin: 0 0 0.8rem; }
.mh-legal-sec p:last-child { margin-bottom: 0; }
.mh-legal-sec ul { margin: 0.8rem 0 0; padding-left: 1.2rem; }
.mh-legal-sec li { margin-bottom: 0.35rem; }
.mh-legal-sec li::marker { color: var(--mh-oxblood); }
.mh-legal-stand {
  margin-top: clamp(2rem, 4vw, 2.8rem); padding-top: 1.3rem; border-top: 1px solid var(--mh-line);
  font-size: 0.7rem; letter-spacing: 0.18em; text-transform: uppercase;
  font-weight: 700; color: var(--mh-ink-faint);
}

/* Reveal-on-scroll — the hidden state applies ONLY once reveal.js has added
   `mh-reveal-ready` to <html>. That script loads on the front end only, so the
   block editor (and any JS-off context) never hides the content. */
html.mh-reveal-ready .mh-reveal { opacity: 0; transform: translateY(26px); }
@media (prefers-reduced-motion: no-preference) {
  html.mh-reveal-ready .mh-reveal {
    transition: opacity 1s var(--mh-ease-out), transform 1s var(--mh-ease-out);
  }
  html.mh-reveal-ready .mh-reveal.is-in { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .mh-reveal { opacity: 1 !important; transform: none !important; }
}

/* Editor only: core marks every top-level dynamic block `draggable="true"` and
   paints `cursor: grab` on the wrapper. Because `cursor` inherits, that grab
   bleeds across all our non-editable decorative markup (plates, rules, the lot
   grid). Reset it on our block roots — dragging still works via the toolbar
   mover handle. Scoped to `.editor-styles-wrapper`, so the front end is
   untouched; the extra `.wp-block` class outranks core's selector. */
.editor-styles-wrapper .block-editor-block-list__block.wp-block[class*="wp-block-maushaus-"] {
  cursor: auto;
}

/* Editor only: the hero previews its product plate via <ServerSideRender>,
   which wraps the output in a <div>. `display: contents` lets the inner
   <figure class="mh-hero__plate"> act as the hero grid's second column, so the
   editor preview matches the front end (where render.php emits the figure
   directly). */
.editor-styles-wrapper .mh-hero__grid > .mh-hero__ssr {
  display: contents;
}

/* Forms — honeypot field (bots fill it, humans never see it) and the
   post-submit notice rendered above the form after the admin-post redirect. */
.mh-field--hp {
  position: absolute !important;
  left: -9999px;
  width: 1px; height: 1px;
  overflow: hidden;
}
.mh-form-notice {
  margin: 0 0 1.2rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--mh-line);
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--mh-ink);
  background: var(--mh-ivory);
}
.mh-form-notice.is-success { border-color: var(--mh-sage); box-shadow: inset 3px 0 0 var(--mh-sage); }
.mh-form-notice.is-error { border-color: var(--mh-oxblood); box-shadow: inset 3px 0 0 var(--mh-oxblood); }
/* The newsletter CTA centers its text; keep the notice readable there. */
.mh-cta .mh-form-notice { margin: 0 auto 1.2rem; max-width: 460px; }
