/* ==========================================================================
   Stanschus Law — Coming Soon
   CI: Burgunder #5e0c1c · Display-Serif (Canela-Ersatz) · Inter
   Keine externen Requests. Keine Cookies. Keine Tracker.
   ========================================================================== */

/* --------------------------------------------------------------- Webfonts */
/* Self-hosted (SIL Open Font License) — siehe assets/fonts/OFL-*.txt        */

@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/playfair-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/playfair-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('../fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('../fonts/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ------------------------------------------------------------------ Tokens */
:root {
  /* CI-Farbe und daraus abgeleitete Töne */
  --burgundy: #5e0c1c;
  --burgundy-deep: #47070f;
  --burgundy-hover: #7c1526;
  --paper: #fbf7f7;
  --paper-raised: #ffffff;
  --ghost: #f3e7e9;
  --ink: #2b1519;
  --ink-muted: #6d585c;
  --line: rgba(94, 12, 28, 0.16);
  --line-soft: rgba(94, 12, 28, 0.09);
  --focus: #5e0c1c;

  --font-display: 'Canela Text', 'Playfair Display', 'Iowan Old Style',
    'Palatino Linotype', Palatino, Georgia, 'Times New Roman', serif;
  --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto,
    'Helvetica Neue', Arial, sans-serif;

  --step--1: clamp(0.8125rem, 0.79rem + 0.12vw, 0.875rem);
  --step-0: clamp(0.9375rem, 0.9rem + 0.2vw, 1.0625rem);
  --step-1: clamp(1.0625rem, 1rem + 0.3vw, 1.1875rem);
  --step-3: clamp(1.75rem, 1.35rem + 1.9vw, 2.9rem);

  --gutter: clamp(1.375rem, 4vw, 3.5rem);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ------------------------------------------------------------------- Reset */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--step-0);
  font-weight: 400;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
svg {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--burgundy);
  text-decoration-color: var(--line);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  transition: color 0.2s var(--ease), text-decoration-color 0.2s var(--ease);
}

a:hover {
  color: var(--burgundy-hover);
  text-decoration-color: currentColor;
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Sichtbar nur für Screenreader */
.u-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Skip-Link */
.skip {
  position: absolute;
  left: 50%;
  top: 0;
  translate: -50% -150%;
  z-index: 100;
  padding: 0.6rem 1.1rem;
  background: var(--burgundy);
  color: #fff;
  font-size: var(--step--1);
  text-decoration: none;
  transition: translate 0.2s var(--ease);
}

.skip:focus {
  translate: -50% 0;
  color: #fff;
}

/* ================================================================== Bühne */
.stage {
  position: relative;
  flex: 1 0 auto;
  display: grid;
  place-items: center;
  padding: clamp(3rem, 9vh, 6.5rem) var(--gutter) clamp(3rem, 8vh, 5.5rem);
  overflow: hidden;
  isolation: isolate;
}

/* Große, sehr helle Bildmarke als angeschnittene Flächengrafik —
   Zitat der CI-Titelseite. Der Verlauf löst die Marke zur Seitenmitte hin
   auf, damit sie hinter dem Text nicht mitliest. */
.stage__mark {
  position: absolute;
  z-index: -1;
  right: clamp(-7rem, -5vw, -2rem);
  bottom: clamp(-9rem, -11vh, -3.5rem);
  width: clamp(18rem, 44vw, 38rem);
  color: var(--ghost);
  fill: currentColor;
  pointer-events: none;
  user-select: none;
  -webkit-mask-image: linear-gradient(
    100deg,
    transparent 4%,
    rgba(0, 0, 0, 0.3) 38%,
    #000 82%
  );
  mask-image: linear-gradient(
    100deg,
    transparent 4%,
    rgba(0, 0, 0, 0.3) 38%,
    #000 82%
  );
}

/* ------------------------------------------------------------------ Inhalt */
.hero {
  width: 100%;
  max-width: 46rem;
  text-align: center;
}

.hero__logo {
  width: clamp(13rem, 34vw, 20.5rem);
  margin: 0 auto;
  display: block;
}

.hero__rule {
  width: 3.25rem;
  height: 1px;
  margin: clamp(2.25rem, 5vh, 3.25rem) auto clamp(1.5rem, 3vh, 2rem);
  border: 0;
  background: var(--burgundy);
  opacity: 0.45;
}

.hero__eyebrow {
  margin: 0 0 0.85rem;
  font-size: var(--step--1);
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--burgundy);
}

.hero__title {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: var(--step-3);
  font-weight: 400;
  line-height: 1.14;
  letter-spacing: -0.012em;
  color: var(--burgundy);
  text-wrap: balance;
}

.hero__text {
  margin: 0 auto;
  max-width: 34rem;
  font-size: var(--step-1);
  font-weight: 300;
  color: var(--ink-muted);
  text-wrap: pretty;
}

/* Auf schmalen Schirmen liegt die Marke sonst als heller Balken mitten im
   Kontaktblock — dort trägt sie nichts bei. */
@media (max-width: 46em) {
  .stage__mark {
    display: none;
  }

  .stage {
    padding-top: clamp(2.25rem, 6vh, 3.5rem);
    padding-bottom: clamp(2.25rem, 5vh, 3rem);
  }
}

/* ------------------------------------------------------------- Kontaktdaten */
.contact {
  margin: clamp(2.5rem, 6vh, 3.75rem) 0 0;
  padding: clamp(1.75rem, 4vh, 2.25rem) 0 0;
  border-top: 1px solid var(--line-soft);
  display: grid;
  gap: 1.75rem clamp(1.5rem, 4vw, 3rem);
  grid-template-columns: 1fr;
  text-align: center;
}

@media (max-width: 46em) {
  .hero__rule {
    margin-top: 1.85rem;
    margin-bottom: 1.3rem;
  }

  .contact {
    margin-top: 2.25rem;
    padding-top: 1.5rem;
    gap: 1.15rem;
  }
}

@media (min-width: 46em) {
  .contact {
    grid-template-columns: repeat(3, 1fr);
    text-align: left;
  }

  .contact__item + .contact__item {
    padding-left: clamp(1.5rem, 4vw, 3rem);
    border-left: 1px solid var(--line-soft);
  }
}

.contact__item {
  margin: 0;
}

.contact__label {
  display: block;
  margin-bottom: 0.3rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.contact__value {
  font-family: var(--font-display);
  font-size: var(--step-1);
  line-height: 1.45;
  color: var(--burgundy);
  font-style: normal;
}

.contact__value a {
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  padding-bottom: 1px;
}

.contact__value a:hover {
  border-bottom-color: currentColor;
}

/* ================================================================= Footer */
/* Burgunder Band am Seitenfuß — Zitat der CI-Titelseite                    */
.footer {
  flex: 0 0 auto;
  background: var(--burgundy);
  color: #fff;
  padding: 1.35rem var(--gutter);
}

.footer__inner {
  max-width: 72rem;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  font-size: var(--step--1);
}

.footer__brand {
  margin: 0;
  opacity: 0.82;
}

.footer__nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 1.35rem;
}

.footer__nav a {
  color: #fff;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.35);
  padding-bottom: 1px;
}

.footer__nav a:hover {
  color: #fff;
  border-bottom-color: #fff;
}

.footer__nav :focus-visible {
  outline-color: #fff;
}

/* ================================================================== Modal */
/* Sichtbar per :target (funktioniert ohne JavaScript).                      */
/* Ist JS aktiv (html.js), steuert das Skript zusätzlich [data-open],        */
/* damit Fokus, ESC und Scroll-Sperre zuverlässig greifen.                   */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 50;
  padding: clamp(0.75rem, 4vh, 3rem) clamp(0.75rem, 4vw, 2rem);
  align-items: center;
  justify-content: center;
}

.modal:target,
.modal[data-open] {
  display: flex;
}

.js .modal:target:not([data-open]) {
  display: none;
}

/* Bewusst ohne backdrop-filter: Chromium legt die dadurch entstehende
   Compositing-Ebene sporadisch über das Panel, das Modal wird dann
   durchscheinend. Ein deckendes Overlay ist stabil und deutlich günstiger. */
.modal__backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: rgba(38, 18, 22, 0.66);
  cursor: pointer;
}

/* min-width: 0 — ohne das zwingt der min-content-Beitrag der Rechtstexte
   das Panel über die Viewport-Breite hinaus (Schließen-Button wandert raus). */
.modal__panel {
  position: relative;
  z-index: 1;
  width: 100%;
  min-width: 0;
  max-width: 48rem;
  max-height: min(88svh, 60rem);
  display: flex;
  flex-direction: column;
  background: var(--paper-raised);
  box-shadow: 0 1.5rem 4rem rgba(43, 21, 25, 0.3);
  animation: modal-in 0.28s var(--ease) both;
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(0.75rem) scale(0.985);
  }
}

.modal__head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem clamp(1.25rem, 4vw, 2.5rem);
  background: var(--burgundy);
  color: #fff;
}

.modal__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.125rem, 1rem + 0.6vw, 1.5rem);
  font-weight: 400;
  line-height: 1.2;
}

.modal__close {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 2.375rem;
  height: 2.375rem;
  margin-right: -0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  color: #fff;
  text-decoration: none;
  font-size: 1.05rem;
  line-height: 1;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease);
}

.modal__close:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.6);
}

.modal__close:focus-visible {
  outline-color: #fff;
}

.modal__body {
  flex: 1 1 auto;
  min-width: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  scrollbar-color: var(--line) transparent;
}

/* Scroll-Sperre für den Hintergrund */
.has-modal,
.has-modal body {
  overflow: hidden;
}

/* ------------------------------------------------------- Rechtstexte (Modal) */
.legal {
  counter-reset: sec;
  font-size: var(--step--1);
  line-height: 1.7;
  color: var(--ink);
  overflow-wrap: break-word;
}

.legal > p:first-child,
.legal .legal__lead {
  font-size: var(--step-0);
  color: var(--ink-muted);
}

.legal section + section {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line-soft);
}

.legal h2 {
  counter-increment: sec;
  counter-reset: sub;
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: clamp(1.0625rem, 1rem + 0.4vw, 1.3rem);
  font-weight: 500;
  line-height: 1.25;
  color: var(--burgundy);
  hyphens: auto;
}

.legal h2::before {
  content: counter(sec) '.';
  margin-right: 0.5em;
  font-family: var(--font-sans);
  font-size: 0.78em;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--burgundy);
  opacity: 0.55;
}

.legal h3 {
  margin: 1.6rem 0 0.4rem;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--ink);
}

.legal h3::before {
  counter-increment: sub;
  content: counter(sec) '.' counter(sub);
  margin-right: 0.5em;
  font-variant-numeric: tabular-nums;
  color: var(--burgundy);
  opacity: 0.5;
}

.legal h4 {
  margin: 1.15rem 0 0.3rem;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink-muted);
}

.legal p,
.legal ul,
.legal ol {
  margin: 0 0 0.85rem;
}

.legal ul,
.legal ol {
  padding-left: 1.35rem;
}

.legal li {
  margin-bottom: 0.35rem;
}

.legal li::marker {
  color: var(--burgundy);
}

.legal > section > p:last-child,
.legal > section > ul:last-child,
.legal > section > ol:last-child {
  margin-bottom: 0;
}

/* Definitionsliste für das Impressum */
.legal dl {
  margin: 0;
  display: grid;
  gap: 0.15rem 1.25rem;
  grid-template-columns: 1fr;
}

@media (min-width: 34em) {
  .legal dl {
    grid-template-columns: minmax(9rem, 13rem) 1fr;
  }
}

.legal dt {
  font-weight: 600;
  color: var(--ink-muted);
}

.legal dd {
  margin: 0 0 0.7rem;
}

@media (min-width: 34em) {
  .legal dt,
  .legal dd {
    margin-bottom: 0.55rem;
  }
}

.legal address {
  font-style: normal;
}

.legal address p {
  line-height: 1.5;
}

/* Auszufüllende Werte — im Layout unübersehbar.
   Kein white-space: nowrap — die langen Hinweistexte würden sonst das
   ganze Modal aufziehen. */
.ph {
  display: inline;
  padding: 0.05em 0.45em;
  border: 1px dashed rgba(94, 12, 28, 0.45);
  border-radius: 3px;
  background: rgba(94, 12, 28, 0.06);
  font-family: ui-monospace, SFMono-Regular, 'Cascadia Mono', Consolas, monospace;
  font-size: 0.85em;
  color: var(--burgundy);
  overflow-wrap: break-word;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.legal__updated {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line-soft);
  font-size: 0.8125rem;
  color: var(--ink-muted);
}

/* ---------------------------------------------------------------- Einstieg */
@media (prefers-reduced-motion: no-preference) {
  .hero > * {
    animation: rise 0.7s var(--ease) both;
  }

  .hero__logo {
    animation-delay: 0.05s;
  }
  .hero__rule {
    animation-delay: 0.18s;
  }
  .hero__eyebrow {
    animation-delay: 0.24s;
  }
  .hero__title {
    animation-delay: 0.3s;
  }
  .hero__text {
    animation-delay: 0.36s;
  }
  .contact {
    animation-delay: 0.44s;
  }

  @keyframes rise {
    from {
      opacity: 0;
      transform: translateY(0.9rem);
    }
  }
}

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

/* ------------------------------------------------------------------- Print */
@media print {
  .stage__mark,
  .footer,
  .modal__backdrop,
  .modal__close,
  .skip {
    display: none !important;
  }

  body {
    background: #fff;
  }

  .modal[data-open],
  .modal:target {
    display: block;
    position: static;
    padding: 0;
  }

  .modal__panel {
    max-width: none;
    max-height: none;
    box-shadow: none;
    animation: none;
  }

  .modal__body {
    overflow: visible;
    padding: 0;
  }

  a {
    text-decoration: none;
  }
}
