/* ===========================================
   Seilnacht Design System — Editorial Luxury
   Basiert auf dem Seilnacht Design Guide (2025)
   =========================================== */

/* --- Colors (Design Guide + Projekt-Aliasse) --- */
:root {
  --brand-rhubarb: #77202f;
  --brand-crown-blue: #464b64;
  --brand-black-iris: #2b3042;

  --primary: #2b3042;
  --primary-hover: #464b64;
  --primary-ultra-light: #f1f2f5;
  --primary-light: #d8dae2;
  --primary-semi-light: #858ba0;
  --primary-semi-dark: #464b64;
  --primary-dark: #252a3a;
  --primary-ultra-dark: #171a24;

  --action: #77202f;
  --action-hover: #641b28;

  --secondary: #464b64;
  --secondary-light: #d8dae2;

  --base: #2b3042;
  --base-ultra-light: #fbf8f1;
  --base-light: #d8dae2;

  --cream: #fbf8f1;
  --cream-dark: #f2eadc;

  --white: #ffffff;
  --black: #000000;

  /* --- Typography --- */
  --font-heading: 'Jost', sans-serif;
  --font-editorial: 'Jost', sans-serif;
  --font-body: 'Jost', sans-serif;

  --heading-weight: 500;
  --heading-transform: uppercase;
  --heading-tracking: 3px;
  --heading-line-height: 1.2;

  --body-weight: 300;
  --body-line-height: 1.7;

  /* --- Editorial Typography (px-based, parity mit Bricks) --- */
  --editorial-headline: clamp(40px, 5vw, 80px);
  --editorial-statement: clamp(32px, 4.5vw, 72px);
  --editorial-h2: clamp(29px, 3vw, 45px);
  --editorial-tagline: clamp(10px, 0.9vw, 13px);
  --editorial-body: clamp(15px, 1.1vw, 18px);

  /* --- Spacing --- */
  --section-pad-editorial: clamp(80px, 10vw, 160px);
  --section-pad-compact: clamp(48px, 6vw, 80px);
  --content-width: 1400px;
  --gutter: 24px;

  /* --- Lines (Editorial Element) --- */
  --line-color: var(--primary-light);
  --line-color-dark: var(--primary-semi-dark);
  --line-weight: 1px;

  /* --- Shadows --- */
  --shadow-sm: 0 2px 8px rgba(43, 48, 66, 0.06);
  --shadow-md: 0 4px 20px rgba(43, 48, 66, 0.1);
  --shadow-lg: 0 8px 40px rgba(43, 48, 66, 0.14);

  /* --- Transitions --- */
  --transition: 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);

  /* --- Buttons (1:1 aus ACSS) --- */
  --btn-radius: 0;
  --btn-padding: 0.75em 1.5em;
  --btn-transform: uppercase;
  --btn-tracking: 1px;
  --btn-weight: 400;
  --btn-border-width: 2px;
}

/* --- Typography Base --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: var(--heading-weight);
  text-transform: var(--heading-transform);
  letter-spacing: var(--heading-tracking);
  line-height: var(--heading-line-height);
}

.heading {
  font-family: var(--font-heading);
}

/* Hero semantic h1 must stay white regardless of generic heading scale */
.hero-title,
.hero-title.brxe-heading {
  color: var(--white) !important;
}

/*
.heading.brxe-heading {
  font-weight: var(--heading-weight);
  text-transform: var(--heading-transform);
  letter-spacing: var(--heading-tracking);
  line-height: var(--heading-line-height);
  color: var(--primary);
}
*/

body {
  font-family: var(--font-body);
  font-weight: var(--body-weight);
  line-height: var(--body-line-height);
  color: var(--base);
  font-size: 16px;            /* Override Bricks --base-font: 10 conflict */
}
html { font-size: 16px; }      /* rem-Cascade: 1rem = 16px wie HTML-Draft */

/* --- Base normalize / reset essentials --- */
*, *::before, *::after { box-sizing: border-box; }

img, svg, video, canvas, iframe {
  display: block;
  max-width: 100%;
}

input, button, textarea, select {
  font: inherit;
  color: inherit;
}

[hidden], .is-hidden { display: none !important; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip-link:focus,
.skip-link:focus-visible {
  left: 16px;
  top: 16px;
  width: auto;
  height: auto;
  overflow: visible;
  z-index: 100000;
  padding: 10px 14px;
  background: var(--white);
  color: var(--primary-ultra-dark);
  outline: 2px solid var(--action);
  outline-offset: 2px;
}

:focus-visible {
  outline: 2px solid var(--action);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Hero/brand marquee keyframes (needed by global classes) */
@keyframes marqueeFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes marqueeScroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

/* Page-theme scopes: dark pages opt-in via WP body classes */
body.home {
  color: var(--white);
  background: var(--primary-ultra-dark);
  overflow-x: hidden;
}

/* --- Bricks Element-Default-Reset (HTML-Draft-Parität) ---
   Bricks setzt brxe-* Element-Defaults (font, color, display, ...) ueber
   element-id-Selektoren oder eigene .brxe-X Rules. Das schlaegt Klassen
   durch. Wir resetten die Defaults zu `inherit`, damit Klassen-CSS via
   Cascade gewinnt. */

/* Containers: HTML-Draft = block, Bricks = flex column */
.brxe-section,
.brxe-block,
.brxe-div { display: block; flex-direction: initial; }

/* Text-Elemente: Klassen sollen Schrift/Farbe via Cascade vererben */
.brxe-text-basic,
.brxe-text,
.brxe-rich-text,
.brxe-heading {
  font-family: inherit;
  font-weight: inherit;
  font-size: inherit;
  line-height: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  color: inherit;
}

/* Heading-Tag-Defaults wegnehmen damit nur Klasse wirkt */
.brxe-heading h1,
.brxe-heading h2,
.brxe-heading h3,
.brxe-heading h4,
.brxe-heading h5,
.brxe-heading h6 {
  font: inherit;
  color: inherit;
  margin: 0;
}

/* Button-Element: kein default border/bg — nur was Klasse setzt */
.brxe-button {
  font-family: inherit;
  color: inherit;
  background: transparent;
  border: 0;
}

/* Image-Element: object-fit Default fill, nicht cover */
.brxe-image { display: block; max-width: 100%; height: auto; }

/* Video reset: verhindert Bricks responsive drift / width runaway */
.hero-video-wrap,
.hero-video-wrap.brxe-block {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero-video-wrap::after,
.hero-video-wrap.brxe-block::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(to top, rgba(20,22,31,0.7) 0%, rgba(20,22,31,0.35) 45%, rgba(20,22,31,0.15) 100%);
}

.hero-video-wrap video,
.hero-video-wrap .brxe-video,
.hero-video-wrap iframe {
  width: 100% !important;
  height: 100% !important;
  max-width: none;
  object-fit: cover;
  display: block;
  position: relative;
  z-index: 0;
}

/* eyebrow ist immer inline-block, egal welches Bricks-Element */
.eyebrow.brxe-text-basic,
.eyebrow.brxe-block,
.eyebrow { display: inline-block; }

/* --- Editorial Divider --- */
.divider {
  border: none;
  height: var(--line-weight);
  background: var(--line-color);
  margin: 0;
}

.divider--dark {
  background: var(--line-color-dark);
}

/* --- Utility --- */
.container {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* --- WooCommerce Gutenberg Cart/Checkout Pages ---
   Scoped to explicit body classes so Shop/PDP/Account and plugin internals stay safe. */
body.woo-block-flow {
  background: var(--cream);
  color: var(--primary);
}

body.woo-block-flow main,
body.woo-block-flow .site-main,
body.woo-block-flow #brx-content,
body.woo-block-flow .brx-body {
  background: var(--cream);
}

body.woo-block-flow #brx-content.wordpress > h1:first-child {
  display: none;
}

body.woo-block-flow .woo-flow-page {
  max-width: 1180px;
  margin-inline: auto;
  padding: clamp(42px, 6vw, 76px) var(--gutter) clamp(72px, 8vw, 112px);
}

body.woo-block-flow .woo-flow-intro {
  margin-bottom: clamp(24px, 4vw, 42px);
}

body.woo-block-flow .woo-flow-kicker,
body.woo-block-flow .woo-flow-progress {
  font-family: var(--font-heading);
  font-size: 0.76rem;
  line-height: 1.3;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--secondary);
  margin: 0 0 14px;
}

body.woo-block-flow .woo-flow-progress strong {
  color: var(--primary);
  font-weight: 500;
}

body.woo-block-flow .woo-flow-title {
  font-family: var(--font-heading);
  font-size: clamp(2.2rem, 5vw, 4.4rem);
  line-height: 1;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--primary);
  margin: 0 0 14px;
}

body.woo-block-flow .woo-flow-copy {
  max-width: 62ch;
  margin: 0;
  color: var(--base);
  font-size: clamp(1rem, 1.2vw, 1.08rem);
  line-height: 1.7;
}

body.woo-block-flow .woo-trust-strip,
body.woo-block-flow .woo-checkout-notes {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 0 0 clamp(24px, 4vw, 38px);
}

body.woo-block-flow .woo-checkout-notes {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

body.woo-block-flow .woo-trust-card,
body.woo-block-flow .woo-checkout-notes > p {
  background: var(--white);
  border: 1px solid rgba(42, 47, 65, 0.1);
  padding: 20px;
  box-shadow: 0 12px 34px rgba(20, 22, 31, 0.045);
}

body.woo-block-flow .woo-trust-card h3,
body.woo-block-flow .woo-checkout-notes strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.92rem;
  line-height: 1.25;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--primary);
  margin: 0 0 8px;
}

body.woo-block-flow .woo-trust-card p,
body.woo-block-flow .woo-checkout-notes p {
  margin: 0;
  color: var(--base);
  font-size: 0.95rem;
  line-height: 1.6;
}

body.woo-block-flow .woo-block-shell {
  background: var(--white);
  border: 1px solid rgba(42, 47, 65, 0.1);
  box-shadow: 0 18px 48px rgba(20, 22, 31, 0.06);
  padding: clamp(18px, 3vw, 34px);
}

body.woo-block-flow .wp-block-woocommerce-cart,
body.woo-block-flow .wp-block-woocommerce-checkout {
  margin: 0;
  max-width: none;
  color: var(--primary);
}

body.woo-block-flow .screen-reader-text {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

body.woo-block-flow .wc-block-components-product-metadata__description,
body.woo-block-flow .wc-block-components-product-badge,
body.woo-block-flow .wc-block-components-product-stock-indicator,
body.woo-block-flow .wc-block-components-product-metadata__stock-status,
body.woo-block-flow .wc-block-components-product-details__stock-status,
body.woo-block-flow .wc-block-components-order-summary-item__individual-prices {
  display: none;
}

body.woo-block-flow .wc-block-components-title,
body.woo-block-flow .wc-block-cart__totals-title,
body.woo-block-flow .wc-block-components-checkout-step__title,
body.woo-block-flow .wc-block-components-sidebar-layout h2,
body.woo-block-flow .wc-block-components-sidebar h2 {
  font-family: var(--font-heading);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
}

body.woo-block-flow .wc-block-components-button,
body.woo-block-flow .wp-element-button,
body.woo-block-flow button.wc-block-components-button {
  border-radius: 0;
  border: 1px solid var(--primary);
  background: var(--primary);
  color: var(--white);
  font-family: var(--font-heading);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: var(--transition);
}

body.woo-block-flow .wc-block-components-button:hover,
body.woo-block-flow .wp-element-button:hover,
body.woo-block-flow button.wc-block-components-button:hover {
  background: var(--action);
  border-color: var(--action);
  color: var(--white);
}

body.woo-block-flow .wc-block-components-button:not(.is-link),
body.woo-block-flow .wc-block-components-button:not(.is-link):disabled,
body.woo-block-flow .wc-block-cart__submit-button,
body.woo-block-flow .wc-block-components-checkout-place-order-button {
  background-color: var(--primary) !important;
  border-color: var(--primary) !important;
  color: var(--white) !important;
}

body.woo-block-flow .wc-block-components-button:not(.is-link) .wc-block-components-button__text,
body.woo-block-flow .wc-block-cart__submit-button .wc-block-components-button__text,
body.woo-block-flow .wc-block-components-checkout-place-order-button .wc-block-components-button__text {
  color: var(--white) !important;
}

body.woo-block-flow .wc-block-components-button:not(.is-link):hover,
body.woo-block-flow .wc-block-cart__submit-button:hover,
body.woo-block-flow .wc-block-components-checkout-place-order-button:hover {
  background-color: var(--action) !important;
  border-color: var(--action) !important;
  color: var(--white) !important;
}

body.woo-block-flow .wc-block-components-text-input input,
body.woo-block-flow .wc-block-components-textarea,
body.woo-block-flow .wc-block-components-combobox .wc-block-components-combobox-control input,
body.woo-block-flow .wc-block-components-form .wc-block-components-text-input input,
body.woo-block-flow .wc-block-components-select .wc-block-components-select__container,
body.woo-block-flow input[type="text"],
body.woo-block-flow input[type="email"],
body.woo-block-flow input[type="tel"],
body.woo-block-flow textarea,
body.woo-block-flow select {
  border-radius: 0;
  border-color: var(--secondary-light);
  background: var(--white);
  color: var(--primary);
}

body.woo-block-flow .wc-block-components-text-input input:focus,
body.woo-block-flow input:focus,
body.woo-block-flow textarea:focus,
body.woo-block-flow select:focus {
  outline: 2px solid var(--action);
  outline-offset: 1px;
  border-color: var(--action);
}

body.woo-block-flow .wc-block-components-notice-banner,
body.woo-block-flow .woocommerce-info,
body.woo-block-flow .woocommerce-message,
body.woo-block-flow .woocommerce-error {
  border-radius: 0;
  border-color: var(--secondary-light);
  background: var(--cream);
  color: var(--primary);
}

body.woo-block-flow .wc-block-cart__empty-cart__title,
body.woo-block-flow .wp-block-woocommerce-empty-cart-block h2 {
  font-family: var(--font-heading);
  font-weight: 500;
  color: var(--primary);
}

body.woo-block-flow .woo-cart-notes-bottom {
  margin-top: 22px;
  margin-bottom: 0;
}

body.woo-block-flow .woo-flow-help,
body.woo-block-flow .woo-flow-legal {
  margin: 22px 0 0;
  color: var(--base);
  font-size: 0.95rem;
}

body.woo-block-flow .woo-flow-help a,
body.woo-block-flow .woo-flow-legal a {
  color: var(--primary);
  text-decoration: none;
  border-bottom: 1px solid var(--secondary-light);
}

@media (max-width: 980px) {
  body.woo-block-flow .woo-trust-strip,
  body.woo-block-flow .woo-checkout-notes {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  body.woo-block-flow .woo-flow-page {
    padding-inline: 20px;
  }

  body.woo-block-flow .woo-trust-strip,
  body.woo-block-flow .woo-checkout-notes {
    grid-template-columns: 1fr;
  }

  body.woo-block-flow .woo-block-shell {
    padding: 16px;
  }
}

/* Woo My Account shortcode inside Gutenberg wrapper.
   Real DOM: .woo-flow-account > .woo-account-shell > .woocommerce.
   Logged out has form.woocommerce-form-login.login and no MyAccount nav.
   Logged in has body.logged-in plus nav.woocommerce-MyAccount-navigation + .woocommerce-MyAccount-content. */
body.woo-block-account-page .woo-account-shell {
  margin: 0 auto 22px;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

body.woo-block-account-page .woocommerce {
  color: var(--primary);
}

body.woo-block-account-page.logged-in .woo-account-shell {
  width: min(100%, 1120px);
  max-width: 1120px;
}

body.woo-block-account-page.logged-in .woocommerce {
  width: 100%;
  display: block;
  gap: 0;
}

body.woo-block-account-page.woocommerce-account .woocommerce:not(#brx-content),
body.woo-block-account-page .woocommerce-account .woocommerce:not(#brx-content) {
  display: block;
  gap: 0;
}

body.woo-block-account-page.logged-in .woocommerce-MyAccount-navigation,
body.woo-block-account-page.woocommerce-account .woocommerce-MyAccount-navigation {
  float: none;
  width: 100%;
  min-width: 0;
  margin: 0 0 24px;
  background: transparent;
  background-color: transparent;
}

body.woo-block-account-page.logged-in .woocommerce-MyAccount-navigation ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 6px;
}

body.woo-block-account-page.logged-in .woocommerce-MyAccount-navigation li {
  margin: 0;
  flex: 0 0 auto;
}

body.woo-block-account-page.logged-in .woocommerce-MyAccount-navigation a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  line-height: 1em;
  padding: 7px 21px;
  border: 1px solid var(--secondary-light);
  color: var(--primary);
  font-family: var(--font-heading);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
}

body.woo-block-account-page.logged-in .woocommerce-MyAccount-navigation .is-active a,
body.woo-block-account-page.logged-in .woocommerce-MyAccount-navigation a:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
}

body.woo-block-account-page.logged-in .woocommerce-MyAccount-content {
  float: none;
  width: 100%;
  color: var(--base);
  clear: both;
}

body.woo-block-account-page.logged-in .woocommerce-MyAccount-content p,
body.woo-block-account-page.logged-in .woocommerce-MyAccount-content address {
  line-height: 1.7;
}

body.woo-block-account-page .woocommerce table.shop_table,
body.woo-block-account-page .woocommerce-MyAccount-content fieldset,
body.woo-block-account-page .woocommerce form.login,
body.woo-block-account-page .woocommerce form.register {
  border-radius: 0;
  border-color: rgba(42, 47, 65, 0.1);
}

body.woo-block-account-page .woocommerce button.button,
body.woo-block-account-page .woocommerce a.button,
body.woo-block-account-page .woocommerce input.button {
  border-radius: 0;
  background: var(--primary);
  color: var(--white);
  border: 1px solid var(--primary);
  font-family: var(--font-heading);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 500;
}

body.woo-block-account-page .woocommerce button.button:hover,
body.woo-block-account-page .woocommerce a.button:hover,
body.woo-block-account-page .woocommerce input.button:hover {
  background: var(--action);
  border-color: var(--action);
  color: var(--white);
}

@media (min-width: 900px) {
  body.woo-block-account-page.logged-in.woocommerce-account .woocommerce-MyAccount-navigation,
  body.woo-block-account-page.logged-in .woocommerce-account .woocommerce-MyAccount-navigation {
    float: none;
    width: 100%;
  }

  body.woo-block-account-page.logged-in.woocommerce-account .woocommerce-MyAccount-content,
  body.woo-block-account-page.logged-in .woocommerce-account .woocommerce-MyAccount-content {
    float: none;
    width: 100%;
  }
}

/* Account login cleanup: only logged-out account states use the narrow login panel. */
body.woo-block-account-page:not(.logged-in) .woo-account-shell {
  width: min(100%, 680px);
  max-width: 680px;
}

body.woo-block-account-page:not(.logged-in) .woocommerce h2 {
  margin: 0 0 22px;
  text-align: center;
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  line-height: 1.1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--primary);
}

body.woo-block-account-page:not(.logged-in) .woocommerce form.login,
body.woo-block-account-page:not(.logged-in) .woocommerce form.register {
  max-width: 560px;
  margin: 0 auto;
  padding: clamp(26px, 4vw, 42px);
  background: var(--white);
  border: 1px solid rgba(42, 47, 65, 0.1);
  box-shadow: 0 18px 48px rgba(20, 22, 31, 0.06);
}

body.woo-block-account-page:not(.logged-in) .woocommerce form.login .form-row,
body.woo-block-account-page:not(.logged-in) .woocommerce form.register .form-row {
  margin: 0 0 16px;
}

body.woo-block-account-page:not(.logged-in) .woocommerce form.login label,
body.woo-block-account-page:not(.logged-in) .woocommerce form.register label {
  display: block;
  margin-bottom: 6px;
  color: var(--primary);
  font-size: 0.95rem;
}

body.woo-block-account-page:not(.logged-in) .woocommerce form.login input.input-text,
body.woo-block-account-page:not(.logged-in) .woocommerce form.register input.input-text {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--secondary-light);
  background: var(--white);
  color: var(--primary);
}

body.woo-block-account-page:not(.logged-in) .woocommerce form.login .password-input {
  display: block;
}

body.woo-block-account-page:not(.logged-in) .woocommerce form.login .show-password-input {
  top: 50%;
  transform: translateY(-50%);
}

body.woo-block-account-page:not(.logged-in) .woocommerce-form-login__submit {
  margin-top: 6px !important;
}

body.woo-block-account-page:not(.logged-in) .woocommerce-LostPassword {
  margin: 12px 0 0;
  text-align: center;
}

body.woo-block-account-page:not(.logged-in) .woocommerce-LostPassword a {
  color: var(--primary);
  border-bottom: 1px solid var(--secondary-light);
  text-decoration: none;
}
