/*  Legalium Mallorca — Rechtsanwaelte und Steuerberater, Llucmajor
    Designwelt „Paret Seca": die mallorquinische Trockenmauer. Sie haelt ohne
    Moertel — jeder Stein sitzt durch Gewicht und Reibung. Lagen liegen
    horizontal, Stossfugen versetzt, nichts ist gerundet, nichts schwebt.
    Gestaltung und Code: PixelUno · https://pixelUno.es
*/

@layer reset, tokens, base, layout, components, sections, utilities;

/* ═══ RESET ═══════════════════════════════════════════════════════════ */
@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  * { margin: 0; }
  html { -webkit-text-size-adjust: 100%; }
  body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
  img, svg, video { display: block; max-width: 100%; }
  img { height: auto; }
  input, button, textarea, select { font: inherit; color: inherit; }
  button { background: none; border: 0; cursor: pointer; }
  ul, ol { list-style: none; padding: 0; }
  a { color: inherit; }
  :target { scroll-margin-top: calc(var(--strip-h) + var(--head-h) + 2rem); }
}

/* ═══ SCHRIFT ═════════════════════════════════════════════════════════
   Lokal gehostet. Fuer eine Kanzlei mit deutscher Klientel ist die
   Uebermittlung der Besucher-IP an Google keine Option (LG Muenchen I,
   3 O 17493/20).                                                        */
@font-face {
  font-family: "Zilla Slab"; src: url("assets/fonts/zillaslab-400.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Zilla Slab"; src: url("assets/fonts/zillaslab-600.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Public Sans"; src: url("assets/fonts/publicsans-var.woff2") format("woff2-variations");
  font-weight: 300 800; font-style: normal; font-display: swap;
}

/* ═══ TOKENS ══════════════════════════════════════════════════════════ */
@layer tokens {
  :root {
    /* Farbe — eine Trockenmauer ist kalkgrau mit Flechten, nicht sandfarben.
       Die Palette bleibt deshalb kuehl. Navy ist die einzige gesaettigte
       Farbe der Seite und damit reserviert: Marke, Links, Handlung, Fokus. */
    --tinta:      #1A1C19;   /* Text und dunkle Lagen — Schwarz mit Gruenstich */
    --tinta-soft: #262A24;   /* zweite Ebene im dunklen Fuss */
    --junta:      #63645B;   /* Sekundaertext — AA auf allen hellen Lagen */
    --fuga:       #C3C1B7;   /* Lager- und Stossfugen. Nie Text. */
    --fuga-deep:  #A8A69B;   /* Fuge auf der helleren Lage */
    --pedra:      #E4E2DB;   /* Grundflaeche, Kalkgrau */
    --calc:       #F2F1EC;   /* hellste Lage */
    --llentia:    #5C6746;   /* Flechten-Oliv — Eyebrows, Marker */
    --llentia-lt: #96A277;   /* dieselbe Flechte auf dunklem Grund */
    --legalium:   #24356B;   /* Navy aus der Bestandsmarke */
    --legalium-lt:#8FA2DC;   /* Navy auf dunklem Grund */

    /* Typografie */
    --display: "Zilla Slab", "Iowan Old Style", Georgia, serif;
    --sans: "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

    --t-hero:  clamp(2.55rem, 1.15rem + 5.0vw, 5.1rem);
    --t-h2:    clamp(1.85rem, 1.15rem + 2.4vw, 3.05rem);
    --t-h3:    clamp(1.18rem, 1.06rem + 0.42vw, 1.42rem);
    --t-lead:  clamp(1.09rem, 1.0rem + 0.42vw, 1.32rem);
    --t-body:  1.0625rem;
    --t-small: 0.9rem;
    --t-eyebrow: 0.735rem;

    /* Mass */
    --wrap: 1200px;
    --gut: clamp(1.15rem, 4vw, 3.25rem);
    --lay: clamp(3.6rem, 6.4vw, 6.6rem);   /* Hoehe einer Lage, innen */
    --strip-h: 34px;
    --head-h: 74px;

    --ease: cubic-bezier(.22,.61,.36,1);
  }

  @media (max-width: 640px) { :root { --head-h: 64px; --strip-h: 46px; } }
}

/* ═══ BASIS ═══════════════════════════════════════════════════════════ */
@layer base {
  html { scroll-behavior: smooth; }
  @media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

  body {
    font-family: var(--sans);
    font-size: var(--t-body);
    line-height: 1.62;
    color: var(--tinta);
    background: var(--pedra);
    font-variant-numeric: tabular-nums;
  }

  h1, h2, h3, h4 {
    font-family: var(--display); font-weight: 400;
    line-height: 1.06; letter-spacing: -0.017em; text-wrap: balance;
  }
  h3, h4 { font-weight: 600; letter-spacing: -0.008em; line-height: 1.24; }
  p { text-wrap: pretty; }

  a { text-decoration-thickness: 1px; text-underline-offset: .22em; }

  :focus-visible {
    outline: 2px solid var(--legalium); outline-offset: 3px; border-radius: 1px;
  }
  .lay--dark :focus-visible, .foot :focus-visible { outline-color: var(--llentia-lt); }

  ::selection { background: var(--legalium); color: var(--calc); }
}

/* ═══ LAYOUT ══════════════════════════════════════════════════════════ */
@layer layout {
  .wrap { width: min(100% - var(--gut) * 2, var(--wrap)); margin-inline: auto; }

  /* Eine Lage. Sektionen sitzen buendig aufeinander — die Grenze ist eine
     Fuge, kein Weissraum. Die beiden Stossfugen zeigen, wo die Steine der
     Lage darunter aneinanderstossen; ihre Position wechselt von Lage zu
     Lage, damit sich kein Muster liest. */
  .lay {
    position: relative; padding-block: var(--lay);
    border-top: 1px solid var(--fuga-deep);
  }
  .lay::before, .lay::after {
    content: ""; position: absolute; inset-block-start: 0;
    inline-size: 1px; background: var(--fuga-deep);
  }
  .lay::before { inset-inline-start: var(--j1, 38%); block-size: clamp(16px, 2.8vw, 30px); }
  .lay::after  { inset-inline-start: var(--j2, 71%); block-size: clamp(9px, 1.6vw, 17px); }

  .lay--calc { background: var(--calc); }
  .lay--pedra { background: var(--pedra); }
  .lay--dark {
    background: var(--tinta); color: var(--pedra);
    border-top-color: #33362E;
  }
  .lay--dark::before, .lay--dark::after { background: #33362E; }
  .lay--tight { padding-block: clamp(2.1rem, 3.6vw, 3.4rem); }

  .head-block { max-width: 46ch; margin-bottom: clamp(2.2rem, 4vw, 3.4rem); }
  .head-block p { color: var(--junta); font-size: var(--t-lead); margin-top: 1.05rem; }
  .lay--dark .head-block p { color: #ABACA1; }
}

/* ═══ KOMPONENTEN ═════════════════════════════════════════════════════ */
@layer components {

  /* ── Vorschaustreifen ──────────────────────────────────────────────
     Immer sichtbar, ueber allem. Diese Seite ist eine unverbindliche
     Vorschau und sagt das auf jedem Bildschirm. */
  .preview-strip {
    display: flex; align-items: center; justify-content: center; gap: .6rem;
    min-block-size: var(--strip-h); padding: .3rem var(--gut);
    background: #6D28D9; color: #F5F0FF;
    font-size: .755rem; font-weight: 500; letter-spacing: .035em;
    text-align: center; line-height: 1.35;
  }
  .preview-strip__dot {
    inline-size: 6px; block-size: 6px; border-radius: 50%;
    background: #D8C2FF; flex: none;
  }

  .topstack { position: sticky; top: 0; z-index: 50; }

  /* ── Kopf ─────────────────────────────────────────────────────────── */
  .site-header {
    background: color-mix(in srgb, var(--calc) 94%, transparent);
    backdrop-filter: blur(9px); -webkit-backdrop-filter: blur(9px);
    border-bottom: 1px solid var(--fuga-deep);
  }
  .header-inner {
    display: flex; align-items: center; justify-content: space-between;
    gap: 1.4rem; min-block-size: var(--head-h);
  }
  .brand {
    display: flex; align-items: center; gap: .62rem;
    text-decoration: none; color: var(--legalium); flex: none;
  }
  .brand .mark { display: block; inline-size: clamp(42px, 7.6vw, 54px); }
  .brand .mark svg { inline-size: 100%; height: auto; }
  .brand-name {
    font-family: var(--sans); font-weight: 700; font-size: clamp(1.24rem, 3.4vw, 1.46rem);
    letter-spacing: -.028em; line-height: 1;
  }
  .brand-sub {
    display: block; font-size: .625rem; font-weight: 600; letter-spacing: .15em;
    text-transform: uppercase; color: var(--junta); margin-top: .22rem;
  }

  .nav { display: flex; align-items: center; gap: clamp(1rem, 2.2vw, 2rem); }
  .nav a {
    text-decoration: none; font-size: .935rem; font-weight: 500;
    color: var(--tinta); padding-block: .4rem; position: relative;
  }
  .nav a::after {
    content: ""; position: absolute; inset-inline: 0; inset-block-end: 0;
    block-size: 2px; background: var(--legalium);
    transform: scaleX(0); transform-origin: left; transition: transform .28s var(--ease);
  }
  .nav a:hover::after, .nav a:focus-visible::after { transform: scaleX(1); }
  .nav a[aria-current="page"] { color: var(--legalium); }
  .nav a[aria-current="page"]::after { transform: scaleX(1); background: var(--llentia); }

  .head-tools { display: flex; align-items: center; gap: .85rem; }

  /* Sprachwahl — drei Kuerzel, getrennt durch dieselbe Fuge wie alles. */
  .langs { display: flex; align-items: center; gap: 1px; background: var(--fuga-deep); }
  .langs a {
    padding: .34rem .56rem; background: var(--calc); text-decoration: none;
    font-size: .705rem; font-weight: 700; letter-spacing: .07em;
    color: var(--junta); transition: color .2s, background .2s;
  }
  .langs a:hover { color: var(--tinta); }
  .langs a[aria-current="true"] { background: var(--legalium); color: var(--calc); }

  /* ── Knopf ────────────────────────────────────────────────────────── */
  .btn {
    display: inline-flex; align-items: center; gap: .6rem;
    padding: .82rem 1.55rem; text-decoration: none;
    font-size: .935rem; font-weight: 600; letter-spacing: .005em;
    background: var(--legalium); color: var(--calc);
    border: 1px solid var(--legalium);
    transition: background .24s var(--ease), transform .16s var(--ease), box-shadow .24s;
  }
  .btn:hover {
    background: #1B2851; transform: translateY(1px);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.14);
  }
  .btn--ghost {
    background: transparent; color: var(--legalium); border-color: var(--fuga-deep);
  }
  .btn--ghost:hover { background: var(--calc); border-color: var(--legalium); }
  .lay--dark .btn--ghost, .foot .btn--ghost { color: var(--pedra); border-color: #43473D; }
  .lay--dark .btn--ghost:hover, .foot .btn--ghost:hover {
    background: var(--tinta-soft); border-color: var(--llentia-lt);
  }
  .btn svg { inline-size: 1.05em; height: auto; flex: none; }

  /* ── Eyebrow ──────────────────────────────────────────────────────── */
  .eyebrow {
    display: flex; align-items: center; gap: .6rem;
    font-family: var(--sans); font-size: var(--t-eyebrow); font-weight: 700;
    letter-spacing: .145em; text-transform: uppercase; color: var(--llentia);
    margin-bottom: 1.1rem;
  }
  .eyebrow::before {
    content: ""; inline-size: clamp(18px, 3vw, 30px); block-size: 2px;
    background: currentColor; flex: none;
  }
  .lay--dark .eyebrow { color: var(--llentia-lt); }


  /* ── Kopf einer Unterseite ────────────────────────────────────────
     Dieselbe oberste Lage wie auf der Startseite, nur ohne Bild: Eyebrow,
     Titel, ein Absatz. Der Absatz sitzt rechts der Mittelachse und nimmt
     die Fugenlogik auf, statt unter dem Titel zu kleben. */
  .pagehead .wrap {
    display: grid; grid-template-columns: minmax(0, 1.18fr) minmax(0, 1fr);
    gap: clamp(1.4rem, 4vw, 4rem); align-items: end;
  }
  .pagehead h1 { font-size: clamp(2.25rem, 1.2rem + 3.3vw, 3.85rem); line-height: 1.03; }
  .pagehead-lead {
    font-size: var(--t-lead); color: var(--junta); max-width: 46ch;
  }
  @media (max-width: 860px) {
    .pagehead .wrap { grid-template-columns: 1fr; align-items: start; }
  }

  /* ── Mauerverband ─────────────────────────────────────────────────
     Sechs Steine in drei Lagen, Breiten nach Textmenge, Stossfugen von
     Lage zu Lage versetzt (7/5, 5/7, 6/6). Kein gap — die Steine stossen
     aneinander, die Fuge ist der durchscheinende Grund. */
  .bond {
    display: grid; grid-template-columns: repeat(12, 1fr);
    gap: 1px; background: var(--fuga-deep);
    border: 1px solid var(--fuga-deep);
  }
  .stone {
    grid-column: span 6; position: relative;
    padding: clamp(1.6rem, 2.6vw, 2.5rem);
    background: var(--calc);
    transition: background .3s var(--ease), transform .18s var(--ease);
  }
  .stone:nth-child(1) { grid-column: span 7; }
  .stone:nth-child(2) { grid-column: span 5; }
  .stone:nth-child(3) { grid-column: span 5; }
  .stone:nth-child(4) { grid-column: span 7; }
  /* 5 und 6 bleiben bei 6/6 — die dritte Stossfuge sitzt in der Mitte */

  /* Steine heben nicht ab. Sie setzen sich. */
  .stone:hover { background: #EEEDE6; transform: translateY(1px); }
  .stone:hover .stone-title { color: var(--legalium); }

  .stone-title {
    font-size: var(--t-h3); margin-bottom: .7rem;
    transition: color .3s var(--ease);
  }
  .stone-body { color: var(--junta); font-size: .965rem; }
  .stone-list { margin-top: 1rem; display: grid; gap: .42rem; }
  .stone-list li {
    font-size: .885rem; color: var(--junta); padding-left: .95rem; position: relative;
  }
  .stone-list li::before {
    content: ""; position: absolute; left: 0; top: .62em;
    inline-size: 5px; block-size: 1px; background: var(--llentia);
  }

  /* ── Lagen des Ablaufs ────────────────────────────────────────────
     Ein Kauf wird aufgeschichtet: jeder Schritt traegt den naechsten.
     Hier ist die Nummerierung keine Dekoration, sondern die Sache selbst. */
  .courses { border-top: 1px solid var(--fuga-deep); max-width: 58rem; }
  .course {
    display: grid; grid-template-columns: auto 1fr; gap: clamp(1.1rem, 3vw, 2.6rem);
    align-items: baseline; padding-block: clamp(1.5rem, 2.6vw, 2.15rem);
    border-bottom: 1px solid var(--fuga-deep);
  }
  .course-no {
    font-family: var(--display); font-size: clamp(1.85rem, 4.4vw, 3.1rem);
    line-height: .9; color: var(--junta); opacity: .5;
    font-variant-numeric: lining-nums tabular-nums;
    min-inline-size: 1.7ch; transition: color .3s var(--ease);
  }
  .course:hover .course-no { color: var(--llentia); opacity: 1; }
  .course-title { font-size: var(--t-h3); margin-bottom: .5rem; }
  .course-body { color: var(--junta); max-width: 66ch; font-size: .965rem; }

  /* ── Kennzahlen ───────────────────────────────────────────────────── */
  .facts {
    display: grid; grid-template-columns: repeat(4, 1fr);
    gap: 1px; background: var(--fuga-deep);
    border-block: 1px solid var(--fuga-deep);
  }
  .fact { background: var(--pedra); padding: clamp(1.2rem, 2.4vw, 1.9rem) clamp(1rem, 2vw, 1.6rem); }
  .fact-value {
    font-family: var(--display); font-size: clamp(1.5rem, 3.1vw, 2.15rem);
    line-height: 1; color: var(--legalium); display: flex; align-items: baseline; gap: .3rem;
  }
  .fact-value small { font-size: .5em; color: var(--llentia); }
  .fact-label {
    margin-top: .55rem; font-size: .805rem; color: var(--junta); line-height: 1.4;
  }
  .fact a { color: inherit; text-decoration-color: var(--fuga-deep); }
  .fact a:hover { color: var(--legalium); }

  /* ── Karten fuer Beitraege ────────────────────────────────────────── */
  .notes {
    display: grid; gap: 1px; background: var(--fuga-deep);
    grid-template-columns: repeat(auto-fit, minmax(238px, 1fr));
    border: 1px solid var(--fuga-deep);
  }
  .note {
    background: var(--calc); padding: clamp(1.35rem, 2.2vw, 1.85rem);
    display: flex; flex-direction: column; gap: .62rem; text-decoration: none;
    transition: background .28s var(--ease), transform .18s var(--ease);
  }
  .note:hover { background: #EEEDE6; transform: translateY(1px); }
  .note-date {
    font-size: .715rem; font-weight: 700; letter-spacing: .12em;
    text-transform: uppercase; color: var(--llentia);
  }
  .note-title {
    font-family: var(--display); font-weight: 600; font-size: 1.075rem;
    line-height: 1.28; letter-spacing: -.008em;
    transition: color .28s var(--ease);
  }
  .note:hover .note-title { color: var(--legalium); }
  .note-body { font-size: .89rem; color: var(--junta); flex: 1; }
  .note-more {
    font-size: .81rem; font-weight: 600; color: var(--legalium);
    display: flex; align-items: center; gap: .4rem;
  }
  .note-more svg { inline-size: .95em; transition: transform .28s var(--ease); }
  .note:hover .note-more svg { transform: translateX(3px); }

  /* ── Bewertungen ──────────────────────────────────────────────────── */
  .voices {
    display: grid; gap: 1px; background: #33362E;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    border: 1px solid #33362E;
  }
  .voice { background: var(--tinta); padding: clamp(1.4rem, 2.4vw, 1.95rem); }
  .voice-stars { color: var(--llentia-lt); font-size: 1rem; letter-spacing: .14em; }
  .voice-title {
    font-family: var(--display); font-weight: 600; font-size: 1.075rem;
    margin: .68rem 0 .5rem; line-height: 1.3; color: var(--calc);
  }
  .voice-meta { font-size: .785rem; color: #9A9B93; }

  /* ── Standorte ────────────────────────────────────────────────────── */
  .places { border-top: 1px solid var(--fuga-deep); }
  .place {
    display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem 1.2rem;
    padding-block: clamp(.95rem, 1.8vw, 1.35rem);
    border-bottom: 1px solid var(--fuga-deep);
  }
  .place-name { font-family: var(--display); font-size: 1.32rem; min-inline-size: 8.5rem; }
  .place-role { font-size: .875rem; color: var(--junta); flex: 1; min-inline-size: 12rem; }
  .place--seat .place-name { color: var(--legalium); }
  .place-tag {
    font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
    color: var(--calc); background: var(--legalium); padding: .2rem .55rem;
  }

  /* ── Formular ─────────────────────────────────────────────────────── */
  .form { display: grid; gap: 1.05rem; }
  .field { display: grid; gap: .38rem; }
  .field label { font-size: .81rem; font-weight: 600; letter-spacing: .025em; }
  .field .hint { font-size: .755rem; color: var(--junta); font-weight: 400; letter-spacing: 0; }
  .field input, .field textarea, .field select {
    padding: .74rem .85rem; background: var(--calc);
    border: 1px solid var(--fuga-deep); border-radius: 0;
    font-size: .95rem; transition: border-color .22s, background .22s;
  }
  .field input:hover, .field textarea:hover, .field select:hover { border-color: var(--junta); }
  .field input:focus, .field textarea:focus, .field select:focus {
    border-color: var(--legalium); background: #fff; outline-offset: 1px;
  }
  .field textarea { resize: vertical; min-block-size: 7.5rem; }
  .field--row { display: grid; gap: 1.05rem; grid-template-columns: 1fr 1fr; }
  .consent { display: grid; grid-template-columns: auto 1fr; gap: .7rem; align-items: start; }
  .consent input { inline-size: 1.05rem; block-size: 1.05rem; margin-top: .2rem; accent-color: var(--legalium); }
  .consent label { font-size: .83rem; font-weight: 400; line-height: 1.5; color: var(--junta); }
  .consent a { color: var(--legalium); }
  .form-note { font-size: .78rem; color: var(--junta); }
  .field-error { font-size: .78rem; color: #8C2B1E; font-weight: 600; }
  .field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: #8C2B1E; }
  .form-done {
    padding: 1rem 1.15rem; background: #E8EDE2; border: 1px solid var(--llentia);
    font-size: .92rem;
  }

  /* ── Kontaktzeilen ────────────────────────────────────────────────── */
  .lines { display: grid; gap: 1px; background: var(--fuga-deep); border: 1px solid var(--fuga-deep); }
  .line {
    display: grid; grid-template-columns: auto 1fr; gap: .95rem; align-items: start;
    padding: 1.05rem 1.15rem; background: var(--calc); text-decoration: none;
    transition: background .26s var(--ease);
  }
  a.line:hover { background: #EAE9E2; }
  .line-icon { color: var(--llentia); margin-top: .12rem; }
  .line-icon svg { inline-size: 1.15rem; height: auto; }
  .line-label {
    font-size: .705rem; font-weight: 700; letter-spacing: .12em;
    text-transform: uppercase; color: var(--junta); margin-bottom: .18rem;
  }
  .line-value { font-size: .965rem; font-weight: 500; }
  .line-value small { display: block; font-weight: 400; font-size: .85rem; color: var(--junta); margin-top: .12rem; }

  /* ── Lageplan ─────────────────────────────────────────────────────── */
  .plan-wrap { border: 1px solid var(--fuga-deep); background: var(--calc); }
  .plan { inline-size: 100%; height: auto; display: block; }
  .plan-ground { fill: var(--calc); }
  .plan-coast { fill: none; stroke: var(--legalium); stroke-width: 1.6; opacity: .5; }
  .plan-built { fill: #D2D0C6; stroke: none; }
  .plan-road { fill: none; stroke: #4E4F47; stroke-linecap: round; stroke-linejoin: round; }
  .plan-wall { fill: none; stroke: var(--llentia); stroke-width: 1.8; }
  .plan-pin-halo { fill: var(--legalium); opacity: .14; }
  .plan-pin-dot { fill: var(--legalium); }
  .plan-pin-cross { stroke: var(--legalium); stroke-width: 1.8; }
  .plan-note {
    font-size: .735rem; color: var(--junta); padding: .7rem .9rem;
    border-top: 1px solid var(--fuga-deep);
  }
  .plan-note a { color: var(--junta); }

  /* ── Fuss ─────────────────────────────────────────────────────────── */
  .foot { background: var(--tinta); color: var(--pedra); }
  .foot a { color: var(--pedra); }
  .foot-main {
    display: grid; gap: clamp(2rem, 4vw, 3.4rem);
    grid-template-columns: minmax(0, 1.5fr) repeat(2, minmax(0, 1fr));
    padding-block: clamp(2.8rem, 5vw, 4.2rem);
  }
  .foot .brand { color: var(--pedra); }
  .foot .brand-sub { color: #9A9B93; }
  .foot-note { color: #ABACA1; font-size: .9rem; margin-top: 1.05rem; max-width: 38ch; }
  .foot h4 {
    font-family: var(--sans); font-size: .715rem; font-weight: 700;
    letter-spacing: .14em; text-transform: uppercase; color: var(--llentia-lt);
    margin-bottom: 1.05rem;
  }
  .foot-list { display: grid; gap: .58rem; font-size: .92rem; }
  .foot-list a { text-decoration: none; color: #C9CAC2; transition: color .22s; }
  .foot-list a:hover { color: var(--calc); }
  .foot-bottom {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
    gap: .8rem 1.5rem; padding-block: 1.2rem;
    border-top: 1px solid #33362E; font-size: .805rem; color: #9A9B93;
  }
  .foot-bottom a { color: #ABACA1; }
  .foot-bottom nav { display: flex; flex-wrap: wrap; gap: .6rem 1.2rem; }
  .signature { display: flex; align-items: center; gap: .38rem; }
  .signature a { color: var(--llentia-lt); font-weight: 600; text-decoration: none; }
  .signature a:hover { text-decoration: underline; }
  .signature svg { inline-size: .88rem; height: auto; color: var(--llentia-lt); }

  /* ── Mobile Navigation ────────────────────────────────────────────── */
  .burger {
    display: none; align-items: center; justify-content: center;
    inline-size: 42px; block-size: 42px; border: 1px solid var(--fuga-deep);
    color: var(--tinta);
  }
  .burger svg { inline-size: 20px; height: auto; }
  .burger[aria-expanded="true"] { background: var(--legalium); color: var(--calc); border-color: var(--legalium); }
  .burger .x { display: none; }
  .burger[aria-expanded="true"] .x { display: block; }
  .burger[aria-expanded="true"] .m { display: none; }
}

/* ═══ SEKTIONEN ═══════════════════════════════════════════════════════ */
@layer sections {

  /* ── Hero: die oberste Lage ───────────────────────────────────────
     Zwei Steine nebeneinander — Wort und Ort —, getrennt durch dieselbe
     Fuge wie alles andere. Das Prinzip der Seite ist ab der ersten
     Sekunde lesbar. */
  .hero {
    display: grid; grid-template-columns: repeat(12, 1fr);
    gap: 1px; background: var(--fuga-deep);
    border-bottom: 1px solid var(--fuga-deep);
  }
  .hero-word {
    grid-column: span 7; background: var(--calc);
    padding: clamp(2.9rem, 6vw, 5.4rem) clamp(1.4rem, 4vw, 4rem);
    display: flex; flex-direction: column; justify-content: center;
    min-block-size: clamp(24rem, 56vh, 34rem);
  }
  .hero h1 {
    font-size: var(--t-hero); line-height: 1.02; letter-spacing: -.028em;
    max-width: 16ch;
  }
  .hero h1 em { font-style: normal; color: var(--legalium); }
  .hero-lead {
    font-size: var(--t-lead); color: var(--junta);
    max-width: 44ch; margin-top: clamp(1.15rem, 2.2vw, 1.65rem);
  }
  .hero-cta {
    display: flex; flex-wrap: wrap; gap: .8rem;
    margin-top: clamp(1.7rem, 3vw, 2.5rem);
  }
  .hero-figure { grid-column: span 5; position: relative; background: var(--pedra); }
  .hero-figure img { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; object-fit: cover; }
  .hero-figure figcaption {
    position: absolute; inset-inline: 0; inset-block-end: 0; z-index: 1;
    padding: 1.8rem 1.15rem .85rem;
    font-size: .715rem; letter-spacing: .04em; color: #EDECE4;
    background: linear-gradient(to top, rgba(18,20,17,.78), transparent);
  }

  /* ── Zwei Rechtsordnungen ─────────────────────────────────────────── */
  .split {
    display: grid; gap: clamp(2rem, 5vw, 4.2rem);
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
    align-items: center;
  }
  .split-body > h2 + p { margin-top: 1.15rem; }
  .split-body > p + p { margin-top: 1.05rem; }
  .split-body p { color: var(--junta); }
  .split-body p.lede { color: var(--tinta); font-size: var(--t-lead); }
  .split-figure { position: relative; }
  .split-figure img { inline-size: 100%; }
  .split-figure figcaption {
    font-size: .735rem; color: var(--junta); margin-top: .6rem;
    padding-left: .8rem; border-left: 2px solid var(--llentia);
  }

  .marks { display: grid; gap: 1.15rem; margin-top: clamp(1.6rem, 3vw, 2.3rem); }
  .marks li {
    display: grid; grid-template-columns: auto 1fr; gap: .8rem; align-items: start;
    font-size: .955rem;
  }
  .marks svg { inline-size: 1.15rem; height: auto; color: var(--llentia); margin-top: .18rem; }
  /* Die Detaillisten tragen statt eines Hakens einen Punkt: sie zaehlen auf,
     sie haken nichts ab. */
  .marks li > span:first-child:not([class]) {
    color: var(--llentia); font-weight: 700; line-height: 1.5;
  }
  .marks strong { font-weight: 650; }

  /* ── Kontaktlage ──────────────────────────────────────────────────── */
  .contact {
    display: grid; gap: clamp(2rem, 4.5vw, 3.8rem);
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    align-items: start;
  }

  /* ── Schlussruf ───────────────────────────────────────────────────── */
  .call { text-align: center; }
  .call h2 { font-size: var(--t-h2); max-width: 20ch; margin-inline: auto; }
  .call p { color: #ABACA1; max-width: 52ch; margin: 1.1rem auto 0; font-size: var(--t-lead); }
  .call .hero-cta { justify-content: center; }

  /* ── Beitragsseite ────────────────────────────────────────────────── */
  /* Beitrag: Text links in Lesebreite, rechts eine schmale Spalte, die
     beim Lesen mitlaeuft. Sie fuellt den Raum nicht mit Dekoration,
     sondern mit dem naechsten Schritt. */
  .reading {
    display: grid; grid-template-columns: minmax(0, 1fr) 17rem;
    gap: clamp(2rem, 5vw, 4.5rem); align-items: start;
  }
  .aside { position: sticky; top: calc(var(--strip-h) + var(--head-h) + 2rem); }
  .aside-card {
    border: 1px solid var(--fuga-deep); background: var(--calc);
    padding: 1.35rem 1.25rem;
  }
  .aside-card h2 {
    font-size: 1.12rem; font-weight: 600; margin-bottom: .6rem;
  }
  .aside-card p { font-size: .885rem; color: var(--junta); margin-bottom: 1.05rem; }
  .aside-card .btn { width: 100%; justify-content: center; font-size: .875rem; padding: .7rem 1rem; }
  .aside-meta {
    margin-top: 1.1rem; padding-top: 1.1rem; border-top: 1px solid var(--fuga-deep);
    font-size: .8rem; color: var(--junta); display: grid; gap: .4rem;
  }
  @media (max-width: 900px) {
    .reading { grid-template-columns: 1fr; }
    .aside { position: static; }
  }

  .prose { max-width: 68ch; }
  .prose > * + * { margin-top: 1.15rem; }
  .prose h2 { font-size: clamp(1.5rem, 2.4vw, 1.95rem); margin-top: clamp(2.2rem, 4vw, 3rem); }
  .prose h3 { font-size: 1.15rem; margin-top: 1.9rem; }
  .prose p { color: #2C2E29; }
  .prose ul { display: grid; gap: .55rem; }
  .prose ul li { padding-left: 1.1rem; position: relative; color: #2C2E29; }
  .prose ul li::before {
    content: ""; position: absolute; left: 0; top: .68em;
    inline-size: 6px; block-size: 1px; background: var(--llentia);
  }
  .prose blockquote {
    border-left: 2px solid var(--llentia); padding-left: 1.15rem;
    font-family: var(--display); font-size: 1.15rem; line-height: 1.45; color: var(--tinta);
  }
  .prose .source { font-size: .82rem; color: var(--junta); }
  .article-head { max-width: 24ch; }
  .article-meta {
    display: flex; flex-wrap: wrap; gap: .5rem 1.1rem; margin-top: 1.1rem;
    font-size: .785rem; font-weight: 600; letter-spacing: .1em;
    text-transform: uppercase; color: var(--llentia);
  }

  /* ── Hinweis auf offene Punkte ────────────────────────────────────── */
  .todo {
    display: grid; grid-template-columns: auto 1fr; gap: .8rem;
    padding: .85rem 1rem; background: #F4EEDC; border: 1px solid #D9C9A0;
    font-size: .855rem; color: #57471F; margin-top: 1.2rem;
  }
  .todo svg { inline-size: 1.05rem; height: auto; margin-top: .12rem; color: #8A6E27; }
  .todo strong { font-weight: 700; }
  .todo a { color: #57471F; }
}

/* ═══ HILFSKLASSEN ════════════════════════════════════════════════════ */
@layer utilities {
  .sr-only {
    position: absolute; inline-size: 1px; block-size: 1px; padding: 0;
    margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
  }
  .skip {
    position: absolute; inset-block-start: -100%; inset-inline-start: 0; z-index: 90;
    padding: .75rem 1.2rem; background: var(--legalium); color: var(--calc);
    font-weight: 600; text-decoration: none;
  }
  .skip:focus { inset-block-start: 0; }

  /* Aufsteigende Lagen: eine Mauer wird von unten gebaut.

     Verborgen wird nur, was das Skript auch wieder aufdecken kann: die
     Klasse `reveal` setzt main.js selbst, unmittelbar bevor es den
     Beobachter startet. Bleibt das Skript aus - abgeschaltet, blockiert,
     mit einem Fehler gestrandet -, ist die Seite trotzdem vollstaendig
     lesbar. Inhalt darf nie an einer Animation haengen. */
  .reveal .rise { opacity: 0; transform: translateY(14px); }
  .reveal .rise.seen {
    opacity: 1; transform: none;
    transition: opacity .62s var(--ease), transform .62s var(--ease);
    transition-delay: var(--d, 0ms);
  }

  @media (prefers-reduced-motion: reduce) {
    .reveal .rise, .reveal .rise.seen {
      opacity: 1; transform: none; transition: none;
    }
    *, *::before, *::after {
      animation-duration: .01ms !important; transition-duration: .01ms !important;
    }
  }
}

/* ═══ VIEWPORTS ═══════════════════════════════════════════════════════ */
@media (max-width: 1000px) {
  .hero-word { grid-column: span 12; min-block-size: 0; }
  .hero-figure { grid-column: span 12; block-size: clamp(15rem, 34vw, 22rem); }
  .split, .contact { grid-template-columns: 1fr; }
  .foot-main { grid-template-columns: 1fr 1fr; }
  .foot-brand { grid-column: 1 / -1; }
}

@media (max-width: 820px) {
  .stone, .stone:nth-child(n) { grid-column: span 12; }
  .facts { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 780px) {
  .nav {
    position: fixed; inset-block-start: calc(var(--strip-h) + var(--head-h));
    inset-inline: 0; z-index: 49;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--calc); border-bottom: 1px solid var(--fuga-deep);
    padding: .5rem var(--gut) 1.2rem;
    transform: translateY(-8px); opacity: 0; visibility: hidden;
    transition: opacity .24s var(--ease), transform .24s var(--ease), visibility .24s;
  }
  .nav[data-open="true"] { transform: none; opacity: 1; visibility: visible; }
  .nav a { padding-block: .85rem; border-bottom: 1px solid var(--fuga-deep); font-size: 1.02rem; }
  .nav a::after { display: none; }
  .burger { display: inline-flex; }
  .field--row { grid-template-columns: 1fr; }
  .course { grid-template-columns: 1fr; gap: .4rem; }
  .course-no { font-size: 1.5rem; }
}

@media (max-width: 560px) {
  .facts { grid-template-columns: 1fr; }
  .foot-main { grid-template-columns: 1fr; }
  .brand-sub { display: none; }
  .hero h1 { max-width: none; }
}

@media print {
  .preview-strip, .burger, .langs, .hero-cta, .form { display: none; }
  body::after { display: none; }
  body::before {
    content: "Entwurf — erstellt von PixelUno, https://pixelUno.es — unverbindliche Vorschau";
    display: block; padding: 8pt 0; font-size: 8pt; letter-spacing: .08em;
  }
  .lay { padding-block: 12pt; }
  * { background: #fff !important; color: #000 !important; }
}
