/* ==========================================================================
   solakcommerce.de — Blattstil
   Umsetzung von design/solakcommerce-de-design-brief-v1.md
   Keine externen Requests. Kein Storage. Kein Cookie.
   ========================================================================== */

/* --- Schriften, lokal ausgeliefert (IBM Plex, OFL) ---------------------- */

@font-face {
  font-family: 'Plex Sans';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('../fonts/plex-sans-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: 'Plex Sans';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('../fonts/plex-sans-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: 'Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/plex-mono-400-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: 'Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/plex-mono-400-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: 'Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/plex-mono-500-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: 'Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/plex-mono-500-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;
}

/* --- Rollen ------------------------------------------------------------- */

:root {
  --blattgrund: #f7f5f0;
  --blattflaeche: #fdfcfa;
  --graphit: #16181a;
  --graphit-2: #5c6166;
  --hilfslinie: #d6d2c8;
  --rasterlinie: #e6e2d9;
  --akzent: #c1121f;
  --akzent-klein: #9b1015;
  --hatch-a: #16181a;
  --hatch-b: #3a4045;

  --sans: 'Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Plex Mono', ui-monospace, 'SFMono-Regular', 'Consolas', monospace;

  --ease-draw: cubic-bezier(0.4, 0, 0.15, 1);
  --ease-snap: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out: cubic-bezier(0.25, 0.46, 0.45, 0.94);

  --rand: 24px;
  --rahmen: 16px;
}

@media (min-width: 768px) {
  :root { --rand: 48px; --rahmen: 32px; }
}
@media (min-width: 1280px) {
  :root { --rand: 72px; }
}

@media (prefers-color-scheme: dark) {
  :root {
    --blattgrund: #111315;
    --blattflaeche: #191c1f;
    --graphit: #edeae3;
    --graphit-2: #9aa0a6;
    --hilfslinie: #2a2e33;
    --rasterlinie: #1f2226;
    --akzent: #e5432f;
    --akzent-klein: #ff7a66;
    --hatch-a: #edeae3;
    --hatch-b: #b9b4ab;
  }
}

/* --- Grundlagen --------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--blattgrund);
  color: var(--graphit);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

@media (min-width: 768px) {
  body { font-size: 1.0625rem; }
}

a { color: inherit; text-decoration: none; }

:where(a, button, [tabindex]):focus-visible {
  outline: 2px solid var(--akzent);
  outline-offset: 2px;
}

h1, h2, h3 { margin: 0; text-wrap: balance; }

.nur-fuer-screenreader {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* --- Blatt: Raster, Rahmen, Registermarken ----------------------------- */

.raster {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    repeating-linear-gradient(to right, var(--rasterlinie) 0 1px, transparent 1px 96px),
    repeating-linear-gradient(to bottom, var(--rasterlinie) 0 1px, transparent 1px 96px);
}

.rahmen {
  position: fixed;
  inset: var(--rahmen);
  z-index: 3;
  pointer-events: none;
}

.rahmen i {
  position: absolute;
  background: var(--hilfslinie);
}
.rahmen .oben   { top: 0; left: 0; right: 0; height: 1px; transform-origin: left center; }
.rahmen .rechts { top: 0; right: 0; bottom: 0; width: 1px; transform-origin: center top; }
.rahmen .unten  { bottom: 0; left: 0; right: 0; height: 1px; transform-origin: right center; }
.rahmen .links  { top: 0; left: 0; bottom: 0; width: 1px; transform-origin: center bottom; }

.rahmen b {
  position: absolute;
  width: 12px; height: 12px;
}
.rahmen .ol { top: -1px; left: -1px;  border-top: 1px solid var(--graphit); border-left: 1px solid var(--graphit); }
.rahmen .or { top: -1px; right: -1px; border-top: 1px solid var(--graphit); border-right: 1px solid var(--graphit); }
.rahmen .ur { bottom: -1px; right: -1px; border-bottom: 1px solid var(--graphit); border-right: 1px solid var(--graphit); }
.rahmen .ul { bottom: -1px; left: -1px;  border-bottom: 1px solid var(--graphit); border-left: 1px solid var(--graphit); }

/* --- Satzspiegel -------------------------------------------------------- */

.blatt {
  position: relative;
  z-index: 1;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 var(--rand);
}

/* --- Annotationsschrift ------------------------------------------------ */

.anno, .mikro {
  font-family: var(--mono);
  font-weight: 500;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
  color: var(--graphit-2);
}
.anno  { font-size: 0.75rem;    letter-spacing: 0.08em; line-height: 1.4; }
.mikro { font-size: 0.6875rem;  letter-spacing: 0.1em;  line-height: 1.4; }

/* --- Schriftfeld ------------------------------------------------------- */

.schriftfeld {
  margin: 0;
  display: grid;
  grid-template-columns: auto auto;
  column-gap: clamp(16px, 3vw, 40px);
  row-gap: 7px;
  border-top: 1px solid var(--hilfslinie);
  padding-top: 14px;
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
}
.schriftfeld dt { color: var(--graphit-2); }
.schriftfeld dd { margin: 0; color: var(--graphit); }

/* --- Kopf der Rechtstextseiten ----------------------------------------- */

.blattkopf {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  align-items: baseline;
  border-bottom: 1px solid var(--hilfslinie);
  padding-bottom: 14px;
}

.rechtstext-blatt {
  padding-top: clamp(64px, 12vh, 128px);
  padding-bottom: clamp(56px, 8vh, 96px);
}

/* --- Wortmarke --------------------------------------------------------- */

.wortmarke {
  font-weight: 600;
  font-size: clamp(3rem, 13vw, 11rem);
  line-height: 0.92;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  background-image: repeating-linear-gradient(
    112deg,
    var(--hatch-a) 0 2px,
    var(--hatch-b) 2px 3px,
    var(--hatch-a) 3px 7px,
    var(--hatch-b) 7px 8px
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* --- Maßlinie ---------------------------------------------------------- */

.masslinie {
  width: 100%;
  height: 9px;
  border-left: 1px solid var(--hilfslinie);
  border-right: 1px solid var(--hilfslinie);
  position: relative;
  transform-origin: left center;
}
.masslinie::after {
  content: '';
  position: absolute;
  top: 4px; left: 0; right: 0;
  height: 1px;
  background: var(--hilfslinie);
}

/* --- Sektion 00 -------------------------------------------------------- */

.kopfblatt {
  min-height: 100svh;
  display: grid;
  grid-template-rows: 1fr auto;
  padding: clamp(72px, 12vh, 160px) 0 clamp(40px, 6vh, 64px);
}
.kopfblatt__marke { display: flex; flex-direction: column; justify-content: flex-end; }
.kopfblatt__fuss {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 32px;
  margin-top: clamp(48px, 10vh, 120px);
}
@media (max-width: 640px) {
  .kopfblatt__fuss { grid-template-columns: 1fr; }
}
.hinweis { display: flex; align-items: center; gap: 12px; }
.hinweis span:last-child {
  display: block;
  width: 48px; height: 1px;
  background: var(--graphit-2);
}

/* --- Sektionsgerüst ---------------------------------------------------- */

/* Der Abstand ist auf drei Sektionen abgestimmt. Weiter geöffnet lesen sich die
   Zwischenräume auf einem so knappen Blatt als fehlender Inhalt, nicht als Ruhe. */
.sektion {
  padding: clamp(72px, 11vh, 128px) 0;
  border-top: 1px solid var(--hilfslinie);
}

.sektion__nr { margin-bottom: clamp(28px, 5vh, 48px); }

h2.titel {
  font-weight: 600;
  font-size: clamp(1.75rem, 4vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

/* --- Sektion 01 Legende ------------------------------------------------ */

.legende { position: relative; padding-left: clamp(20px, 4vw, 44px); }
.legende__linie {
  position: absolute;
  top: 6px; bottom: 6px; left: 0;
  width: 1px;
  background: var(--hilfslinie);
  transform-origin: center top;
}
.legende__liste {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: clamp(28px, 4vh, 40px);
  max-width: 62ch;
}
.legende__liste li {
  display: grid;
  grid-template-columns: 2.5rem minmax(0, 1fr);
  gap: clamp(10px, 2vw, 20px);
  align-items: start;
}
.legende__liste p { margin: 0; }

/* --- Sektion 02 Kontakt ------------------------------------------------ */

.kontakt__mail {
  font-size: clamp(1.0625rem, 1.4vw, 1.25rem);
  border-bottom: 1px solid var(--hilfslinie);
  padding-bottom: 2px;
}
.kontakt__mail:hover, .kontakt__mail:focus-visible { border-bottom-color: var(--akzent); color: var(--akzent); }

/* --- Blattfuß ---------------------------------------------------------- */

.blattfuss {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 32px;
  align-items: end;
  margin-top: clamp(72px, 14vh, 160px);
  border-top: 1px solid var(--hilfslinie);
  padding-top: 16px;
}
@media (max-width: 640px) {
  .blattfuss { grid-template-columns: 1fr; }
}
.blattfuss nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.blattfuss nav a {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--hilfslinie);
  padding-bottom: 2px;
}
.blattfuss nav a:hover, .blattfuss nav a:focus-visible { color: var(--akzent); border-bottom-color: var(--akzent); }

/* --- Rechtstext -------------------------------------------------------- */

.rechtstext {
  display: grid;
  grid-template-columns: 2.5rem minmax(0, 68ch);
  gap: clamp(28px, 4vh, 44px) clamp(12px, 2vw, 24px);
  align-items: start;
}
@media (max-width: 560px) {
  .rechtstext { grid-template-columns: 1.75rem minmax(0, 1fr); }
}
.rechtstext > .anno { padding-top: 8px; }
.rechtstext section h2 {
  font-weight: 500;
  font-size: clamp(1.125rem, 2vw, 1.5rem);
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
}
.rechtstext section h3 {
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.4;
  margin: 20px 0 6px;
}
.rechtstext p, .rechtstext ul { line-height: 1.7; color: var(--graphit-2); }
.rechtstext p { margin: 0 0 12px; }
.rechtstext p:last-child { margin-bottom: 0; }
.rechtstext ul { margin: 0 0 12px; padding-left: 1.1em; }
.rechtstext li { margin-bottom: 4px; }
.rechtstext address { font-style: normal; }
.rechtstext a {
  color: var(--graphit);
  border-bottom: 1px solid var(--hilfslinie);
}
.rechtstext a:hover, .rechtstext a:focus-visible { color: var(--akzent); border-bottom-color: var(--akzent); }

.inhalt { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.inhalt a {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--graphit-2);
  border-bottom: none;
}
.inhalt a:hover, .inhalt a:focus-visible { color: var(--akzent); }

.h1-rechtstext {
  margin: clamp(40px, 7vh, 80px) 0 clamp(32px, 5vh, 56px);
  font-weight: 600;
  font-size: clamp(1.75rem, 4vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

/* ==========================================================================
   Motion
   Der Endzustand ist der CSS-Default. Erst .js-motion auf <html> schaltet
   den Anfangszustand ein. Ohne JavaScript steht die Seite vollständig da.
   ========================================================================== */

@keyframes zeichneX { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes zeichneY { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes rasteEin { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes blendeEin { from { opacity: 0; } to { opacity: 1; } }
@keyframes legeFrei { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes puls { 0%, 100% { opacity: 0.4; } 50% { opacity: 1; } }

.js-motion .rahmen .oben   { animation: zeichneX 200ms var(--ease-draw) both; }
.js-motion .rahmen .rechts { animation: zeichneY 110ms 200ms var(--ease-draw) both; }
.js-motion .rahmen .unten  { animation: zeichneX 200ms 310ms var(--ease-draw) both; }
.js-motion .rahmen .links  { animation: zeichneY 110ms 510ms var(--ease-draw) both; }
.js-motion .rahmen b       { animation: blendeEin 120ms var(--ease-snap) both; }
.js-motion .rahmen .ol { animation-delay: 180ms; }
.js-motion .rahmen .or { animation-delay: 220ms; }
.js-motion .rahmen .ur { animation-delay: 260ms; }
.js-motion .rahmen .ul { animation-delay: 300ms; }

.js-motion .wortmarke        { animation: legeFrei 700ms 300ms var(--ease-draw) both; }
.js-motion .kopf-anno        { animation: blendeEin 200ms 900ms var(--ease-snap) both; }
.js-motion .kopf-masslinie   { animation: zeichneX 380ms 700ms var(--ease-draw) both; }
.js-motion .kopf-stand       { animation: rasteEin 200ms 900ms var(--ease-snap) both; }
.js-motion .kopf-hinweis     { animation: puls 2400ms 1400ms ease-in-out infinite; }
.js-motion .schriftfeld dt,
.js-motion .schriftfeld dd   { animation: rasteEin 140ms var(--ease-snap) both; }
.js-motion .schriftfeld > :nth-child(-n+2)  { animation-delay: 1000ms; }
.js-motion .schriftfeld > :nth-child(n+3)   { animation-delay: 1060ms; }
.js-motion .schriftfeld > :nth-child(n+5)   { animation-delay: 1120ms; }
.js-motion .schriftfeld > :nth-child(n+7)   { animation-delay: 1180ms; }
.js-motion .schriftfeld > :nth-child(n+9)   { animation-delay: 1240ms; }

/* Scrollgebundene Elemente: Anfangszustand, bis .sichtbar gesetzt wird. */
.js-motion [data-auf] { opacity: 0; transform: translateY(6px); }
.js-motion [data-auf].sichtbar {
  opacity: 1;
  transform: none;
  transition: opacity 260ms var(--ease-out), transform 260ms var(--ease-out);
}
.js-motion [data-linie] { transform: scaleY(0); }
.js-motion [data-linie].sichtbar { transform: scaleY(1); transition: transform 600ms var(--ease-draw); }

/* Der Rahmen der beiden Rechtstextseiten zeichnet sich kürzer. */
.js-motion .rechtstext-blatt-rahmen .oben   { animation-duration: 150ms; }
.js-motion .rechtstext-blatt-rahmen .rechts { animation: zeichneY 75ms 150ms var(--ease-draw) both; }
.js-motion .rechtstext-blatt-rahmen .unten  { animation: zeichneX 150ms 225ms var(--ease-draw) both; }
.js-motion .rechtstext-blatt-rahmen .links  { animation: zeichneY 75ms 375ms var(--ease-draw) both; }

@media (prefers-reduced-motion: reduce) {
  .js-motion *,
  .js-motion *::before,
  .js-motion *::after {
    animation: none !important;
    transition: none !important;
  }
  .js-motion [data-auf] { opacity: 1; transform: none; }
  .js-motion [data-linie] { transform: none; }
}
