@import 'basis.css';

/* =====================================================================
   Amrein Holzbau — Schreinerei Baar
   Haltung: solide, terminfest, ohne Sprüche. Wer einen Handwerker sucht,
   will wissen: kommt er, hält er den Termin, was kostet es.
   Paradigma: BAUPLAN. Strenges Raster, technische Beschriftungen in
   Versalien, Masse und Fristen als Daten statt als Text. Betongrau
   trägt, Signalorange markiert genau das, was zu tun ist.
   ===================================================================== */

:root {
  --grund: oklch(0.955 0.003 250);
  --flaeche: oklch(0.915 0.004 250);
  --flaeche-2: oklch(0.86 0.005 250);
  --tinte: oklch(0.235 0.012 250);
  --leise: oklch(0.45 0.012 250);
  --linie: oklch(0.83 0.006 250);
  --linie-stark: oklch(0.3 0.012 250);
  --akzent: oklch(0.63 0.2 42);
  --auf-akzent: oklch(0.99 0.01 42);
  --stahl: oklch(0.26 0.014 250);

  --serif: 'Barlow', system-ui, sans-serif;
  --grotesk: 'Barlow', system-ui, sans-serif;
  --anzeige: 'Barlow Condensed', 'Barlow', system-ui, sans-serif;

  --mass: 78rem;
  --luft: clamp(3.25rem, 7vw, 6rem);
  --rand: clamp(1.25rem, 5vw, 3rem);
  --rundung: 0px;
  --weich: cubic-bezier(0.22, 1, 0.36, 1);
  --balken: oklch(0.2 0.012 250);
  --vorhang-grund: oklch(0.22 0.012 250);
  --vorhang-tinte: oklch(0.97 0.003 250);
}

body {
  background: var(--grund);
  color: var(--tinte);
  font-family: var(--grotesk);
  font-size: clamp(1rem, 0.96rem + 0.28vw, 1.09rem);
  line-height: 1.6;
}

h1,
h2,
h3 {
  font-family: var(--anzeige);
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: 0.005em;
  text-transform: uppercase;
}
h1 {
  font-size: clamp(2.9rem, 1.9rem + 4.6vw, 5.6rem);
}
h2 {
  font-size: clamp(2rem, 1.5rem + 2.6vw, 3.3rem);
}
h3 {
  font-family: var(--grotesk);
  font-weight: 600;
  font-size: clamp(1.08rem, 1rem + 0.45vw, 1.22rem);
  letter-spacing: 0;
  text-transform: none;
}

.marke {
  font-family: var(--anzeige);
  font-size: 1.35rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  line-height: 1;
}
.marke small {
  margin-top: 0.3rem;
  font-family: var(--grotesk);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--akzent);
}
.merk {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--akzent);
}

/* ---------- Auftritt: Plankopf --------------------------------------- */

.auftritt {
  border-bottom: 2px solid var(--linie-stark);
}
.auftritt-bild {
  position: relative;
}
.auftritt-bild .bild {
  width: 100%;
  aspect-ratio: 21 / 9;
  max-height: 62svh;
}
.auftritt-satz {
  padding-block: clamp(2rem, 5vw, 3.25rem);
}
.auftritt h1 {
  margin-top: 0.8rem;
  max-width: 16ch;
}
.auftritt .lauf {
  max-width: 48ch;
  margin-top: 1.3rem;
  color: var(--leise);
  font-size: clamp(1.02rem, 0.98rem + 0.35vw, 1.15rem);
}
.auftritt-tun {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.7rem;
}

/* Plankopf: die Datenzeile unter dem Bild, wie auf einer Zeichnung. */
.plankopf {
  display: grid;
  border-top: 2px solid var(--linie-stark);
}
.plankopf > div {
  padding: 0.9rem var(--rand);
  border-bottom: 1px solid var(--linie);
}
.plankopf dt {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--leise);
}
.plankopf dd {
  margin: 0.3rem 0 0;
  font-family: var(--anzeige);
  font-size: 1.5rem;
  font-weight: 600;
  text-transform: uppercase;
  line-height: 1;
}

/* ---------- Positionen (Leistungen) ---------------------------------- */

.positionen {
  border-top: 2px solid var(--linie-stark);
  margin-top: clamp(2rem, 5vw, 3rem);
}
.position {
  display: grid;
  gap: 0.5rem;
  padding: 1.4rem 0;
  border-bottom: 1px solid var(--linie);
}
.position .kennung {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--akzent);
}
.position p {
  margin: 0;
  color: var(--leise);
  max-width: 62ch;
}
.position .wert {
  font-family: var(--anzeige);
  font-size: 1.2rem;
  font-weight: 600;
  text-transform: uppercase;
  white-space: nowrap;
}

/* ---------- Referenzen ------------------------------------------------ */

.projekte {
  display: grid;
  gap: clamp(2rem, 5vw, 3rem);
  margin-top: clamp(2rem, 5vw, 3rem);
}
.projekt {
  border-top: 2px solid var(--linie-stark);
  padding-top: 1.2rem;
}
.projekt .bild {
  margin-bottom: 1.2rem;
}
.projekt h3 {
  font-family: var(--anzeige);
  font-size: clamp(1.5rem, 1.25rem + 1vw, 2rem);
  font-weight: 600;
  text-transform: uppercase;
}
.projekt p {
  margin-top: 0.7rem;
  color: var(--leise);
}
.blatt {
  display: grid;
  margin: 1.1rem 0 0;
  border-top: 1px solid var(--linie);
}
.blatt > div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--linie);
  font-size: 0.9rem;
}
.blatt dt {
  color: var(--leise);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  align-self: center;
}
.blatt dd {
  margin: 0;
  font-weight: 600;
  text-align: right;
}

/* ---------- Stahlband -------------------------------------------------- */

.stahl {
  background: var(--stahl);
  color: oklch(0.96 0.003 250);
  --tinte: oklch(0.96 0.003 250);
  --leise: oklch(0.75 0.008 250);
  --linie: oklch(0.38 0.012 250);
  --linie-stark: oklch(0.55 0.012 250);
  --flaeche: oklch(0.3 0.014 250);
}
.stahl p {
  color: var(--leise);
}

/* ---------- Ablauf mit Fristen ----------------------------------------- */

.fristen {
  border-top: 2px solid var(--linie-stark);
  margin-top: clamp(2rem, 5vw, 3rem);
}
.frist {
  display: grid;
  gap: 0.5rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--linie);
}
.frist .nr {
  font-family: var(--anzeige);
  font-size: 2.2rem;
  font-weight: 700;
  line-height: 1;
  color: var(--akzent);
}
.frist p {
  margin: 0;
  color: var(--leise);
  max-width: 60ch;
}
.frist .dauer {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--leise);
  white-space: nowrap;
}

/* ---------- Karten ------------------------------------------------------- */

.karte {
  padding: clamp(1.4rem, 3.5vw, 1.9rem);
  border: 1px solid var(--linie-stark);
  background: var(--flaeche);
}
.zeiten {
  display: grid;
  margin: 0.9rem 0 0;
}
.zeiten div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--linie);
  font-size: 0.92rem;
}
.zeiten div:last-child {
  border-bottom: 0;
}
.zeiten dd {
  margin: 0;
  color: var(--leise);
  text-align: right;
}

.seitenkopf {
  padding-block: clamp(2.25rem, 5vw, 3.5rem) clamp(1.6rem, 3.5vw, 2.25rem);
  border-bottom: 2px solid var(--linie-stark);
}
.seitenkopf p {
  max-width: 58ch;
  margin-top: 1.1rem;
  color: var(--leise);
  font-size: clamp(1.02rem, 0.98rem + 0.3vw, 1.14rem);
}
.brotkrume {
  margin-bottom: 0.8rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--leise);
}
.brotkrume a {
  color: var(--akzent);
  text-decoration: none;
}
.satz {
  font-family: var(--anzeige);
  font-size: clamp(1.8rem, 1.4rem + 2vw, 2.9rem);
  font-weight: 600;
  text-transform: uppercase;
  line-height: 1;
  max-width: 20ch;
}
.reihe {
  display: grid;
  gap: 1.4rem;
  margin-top: clamp(2rem, 5vw, 3rem);
}
.reihe > div {
  padding-top: 0.9rem;
  border-top: 3px solid var(--akzent);
}
.reihe dt {
  font-family: var(--anzeige);
  font-size: clamp(2rem, 1.6rem + 1.5vw, 2.8rem);
  font-weight: 700;
  line-height: 1;
}
.reihe dd {
  margin: 0.45rem 0 0;
  font-size: 0.92rem;
  color: var(--leise);
}

/* ---------- Pakete --------------------------------------------------------- */

.pakete {
  background: var(--stahl);
  color: oklch(0.96 0.003 250);
  --leise: oklch(0.75 0.008 250);
  --linie: oklch(0.38 0.012 250);
  padding-bottom: clamp(2.5rem, 5vw, 3.5rem);
}
.pakete-kopf {
  max-width: 46rem;
}
.pakete-kopf p {
  margin-top: 1rem;
  color: var(--leise);
}
.paketreihe {
  display: grid;
  gap: 1px;
  margin-top: clamp(2rem, 5vw, 3rem);
  background: var(--linie);
  border: 1px solid var(--linie);
}
.paket {
  display: flex;
  flex-direction: column;
  padding: clamp(1.4rem, 3.5vw, 1.9rem);
  background: var(--stahl);
}
.paket[data-beliebt] {
  background: oklch(0.31 0.014 250);
}
.paket-kopf {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.paket h3 {
  font-family: var(--anzeige);
  font-size: 1.6rem;
  font-weight: 700;
  text-transform: uppercase;
}
.marke-beliebt {
  padding: 0.2rem 0.6rem;
  background: var(--akzent);
  color: var(--auf-akzent);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.paket .preis {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  margin: 1rem 0 0.4rem;
  font-family: var(--anzeige);
  font-weight: 700;
  font-size: clamp(2rem, 1.6rem + 1.5vw, 2.7rem);
  line-height: 1;
  color: var(--akzent);
}
.paket .preis span {
  font-family: var(--grotesk);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--leise);
}
.paket > p {
  color: var(--leise);
  font-size: 0.93rem;
}
.paket ul {
  list-style: none;
  margin: 1rem 0 1.4rem;
  padding: 0;
  display: grid;
  gap: 0.5rem;
  font-size: 0.91rem;
  color: var(--leise);
}
.paket li {
  display: grid;
  grid-template-columns: 0.9rem 1fr;
  gap: 0.6rem;
}
.paket li::before {
  content: '';
  width: 0.9rem;
  height: 0.9rem;
  margin-top: 0.32rem;
  background: var(--akzent);
  clip-path: polygon(14% 46%, 6% 58%, 40% 90%, 96% 22%, 86% 12%, 39% 68%);
}
.paket .knopf {
  margin-top: auto;
  width: 100%;
}
.pakete-fuss {
  margin-top: 1.5rem;
  max-width: 60ch;
  font-size: 0.85rem;
  color: var(--leise);
}

.fuss {
  background: oklch(0.19 0.012 250);
  color: oklch(0.76 0.008 250);
  padding-block: clamp(2.5rem, 5vw, 3.5rem) 1.6rem;
}
.fuss .marke {
  display: inline-flex;
  flex-direction: column;
  color: #fff;
  margin-bottom: 0.9rem;
}
.fuss a:hover {
  color: #fff;
}

@media (min-width: 46rem) {
  .plankopf {
    grid-template-columns: repeat(4, 1fr);
  }
  .plankopf > div {
    border-right: 1px solid var(--linie);
  }
  .plankopf > div:last-child {
    border-right: 0;
  }
  .reihe {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
  }
  .paketreihe {
    grid-template-columns: repeat(3, 1fr);
  }
  .position {
    grid-template-columns: 4.5rem 1fr 10rem;
    column-gap: 1.5rem;
    row-gap: 0.4rem;
    align-items: baseline;
  }
  .position .kennung {
    grid-row: 1 / span 2;
  }
  .position h3,
  .position p {
    grid-column: 2;
  }
  .position .wert {
    grid-column: 3;
    grid-row: 1 / span 2;
    text-align: right;
  }
  .frist {
    grid-template-columns: 3.5rem 1fr 9rem;
    column-gap: 1.8rem;
    row-gap: 0.4rem;
    align-items: baseline;
  }
  .frist .nr {
    grid-row: 1 / span 2;
  }
  .frist h3,
  .frist p {
    grid-column: 2;
  }
  .frist .dauer {
    grid-column: 3;
    grid-row: 1 / span 2;
    text-align: right;
  }
  .zweispalt {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(2rem, 5vw, 3.5rem);
    align-items: start;
  }
  .projekte {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 62rem) {
  .auftritt-in {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
  }
  .kontaktraster {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 3.5rem;
    align-items: start;
  }
}


/* =====================================================================
   Feinschliff — ui-ux-pro-max (Kontrast) + impeccable (Craft)
   Gemessene Werte und Begründung: _SKILLS-ANGEWENDET.md
   Feldrand   1.48:1 → 3.22:1  (WCAG 1.4.11, Bedienelement-Rand ≥3:1)
   Platzhalter          → 6.52:1  (WCAG 1.4.3, Fliesstext ≥4.5:1)
   Akzent als Text 3.34:1 → 4.71:1
   Knopfbeschriftung 3.68:1 → 4.71:1
   ===================================================================== */
:root {
  --feld-linie: oklch(0.618 0.012 250);
  --platzhalter: oklch(0.450 0.012 250);
  --akzent-text: oklch(0.546 0.2 42);
  --auf-akzent: oklch(0.211 0.06 42);
}

/* Ein Formularfeld muss man sehen, bevor man hineinklickt. */
.feld input,
.feld select,
.feld textarea {
  border-color: var(--feld-linie);
}
.feld input::placeholder,
.feld textarea::placeholder {
  color: var(--platzhalter);
  opacity: 1;
}
.feld > label {
  font-size: 0.9rem;
}

/* Akzentfarbe auf Fliesstextgrösse: eigene, dunklere Stufe. */
.marke small,
.merk,
.position .kennung,
.frist .nr,
.brotkrume a,
.paket .preis {
  color: var(--akzent-text);
}

/* Sichtbarer Fokus auf allem, was man bedienen kann. */
a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--akzent);
  outline-offset: 2px;
}

/* Kein Inhalt darf auf ein Skript warten, um sichtbar zu werden. */
@media (prefers-reduced-motion: reduce) {
  [data-auftritt],
  [data-auftritt] > *,
  [data-schnitt] {
    opacity: 1 !important;
    transform: none !important;
    clip-path: none !important;
  }
}


/* ---------------------------------------------------------------------
   Gemessene Einzelkorrekturen. Jede Textfarbe dieser Demo wurde auf
   allen fünf Seiten gegen ihren tatsächlichen Hintergrund gerechnet
   (`_kontrast.html`); diese Paare lagen unter der Schwelle. Der neue
   Wert ist der kleinste, der sie erreicht — die Farbe bleibt also so
   nah am Original wie möglich.
   --------------------------------------------------------------------- */
.stahl .nr {
  color: #ca3b0b; /* vorher 2.88:1 */
}
.paket .preis {
  color: #d05126; /* vorher 2.45:1 */
}
.fuss .marke small {
  color: #d2582f; /* vorher 3.44:1 */
}
.stahl .kennung {
  color: #d86d49; /* vorher 2.88:1 */
}


/* ---------- Navigation auf schmalen Schirmen --------------------------
   Kein Hamburger: die Abschnitte stehen als eigene Zeile unter der Marke,
   immer sichtbar und immer klickbar. Fünf Links hinter zwei Klicks zu
   verstecken kostet Aufrufe der Unterseiten.

   Diese Regeln stehen bewusst in stil.css: sie wird nach basis.css
   geladen und hat damit das letzte Wort.
   ---------------------------------------------------------------------- */
@media (max-width: 55.99rem) {
  .kopf-in {
    flex-wrap: wrap;
    row-gap: 0;
  }
  .menue {
    display: flex;
    order: 3;
    width: 100%;
    gap: 0.15rem;
    margin: 0 calc(var(--rand, 1.25rem) * -1);
    padding: 0 var(--rand, 1.25rem);
    overflow-x: auto;
    scrollbar-width: none;
    border-top: 1px solid var(--linie, rgba(128, 128, 128, 0.25));
  }
  .menue::-webkit-scrollbar {
    display: none;
  }
  .menue a {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    min-height: 2.75rem;
    padding: 0 0.7rem;
    font-family: var(--grotesk, system-ui, sans-serif);
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--leise, currentColor);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    opacity: 1;
  }
  .menue a:first-child {
    padding-left: 0;
  }
  .menue a[aria-current='page'] {
    color: var(--akzent, currentColor);
    font-weight: 600;
    border-bottom-color: currentColor;
  }
}


/* ---------- Wegweiser zwischen den Abschnitten --------------------------- */
/* Eine kurze Linie mit Spitze, die sich zeichnet, wenn die Grenze zwischen
   zwei Abschnitten in Sicht kommt. Sie sitzt in einem Kasten ohne eigene
   Höhe, mitten auf der Grenze — die Seite verschiebt sich dadurch nicht.
   Der Kasten steht nicht im HTML; wegweiser.js baut ihn. */

.wegweiser {
  position: relative;   /* eigener Bezug, damit kein Abschnitt umgestellt wird */
  height: 0;
  width: 100%;
  pointer-events: none;
  z-index: 2;
}
.wegweiser svg {
  position: absolute;
  left: 50%;
  top: 0;
  translate: -50% -50%;
  display: block;
  overflow: visible;
}
.wegweiser-linie {
  stroke: var(--weg-ton, currentColor);
  stroke-width: 1.4;
  stroke-linecap: round;
  transition: stroke-dashoffset 1.05s cubic-bezier(.22, .61, .36, 1);
}
.wegweiser-spitze {
  stroke: var(--weg-ton, currentColor);
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0;
  translate: 0 -5px;
  transition: opacity 0.4s ease-out 0.75s, translate 0.5s cubic-bezier(.22, .61, .36, 1) 0.75s;
}
.wegweiser[data-an] .wegweiser-linie { stroke-dashoffset: 0 !important; }
.wegweiser[data-an] .wegweiser-spitze { opacity: 1; translate: 0 0; }

/* Die Naht ist gestrichelt — dafür zeichnet nicht der Strich, sondern die
   Deckkraft, sonst frisst die Strichelung den dashoffset. */
.wegweiser[data-art="naht"] .wegweiser-linie {
  stroke-dasharray: 5 4 !important;
  stroke-dashoffset: 0 !important;
  opacity: 0;
  transition: opacity 0.8s ease-out;
}
.wegweiser[data-art="naht"][data-an] .wegweiser-linie { opacity: 1; }

@media (max-width: 45.99rem) { .wegweiser svg { width: 18px; height: 52px; } }


/* ---------- Gezeichneter Rahmen und antwortende Zeilen ------------------- */
/* Beim Überfahren zeichnet sich ein Rahmen: erst laufen die waagrechten
   Linien aus der Mitte nach aussen, dann wachsen die senkrechten dazu. Zwei
   Pseudoelemente, kein SVG. Der Rahmen liegt 5 px ausserhalb und fängt
   keine Zeiger ab — das Trefferfeld bleibt, wie es war. */

.knopf { position: relative; }
.knopf::before,
.knopf::after {
  content: '';
  position: absolute;
  inset: -5px;
  border-radius: 7px;
  pointer-events: none;
  border: 1.5px solid transparent;
}
.knopf::before {
  border-top-color: var(--akzent);
  border-bottom-color: var(--akzent);
  transform: scaleX(0);
  transition: transform 0.26s cubic-bezier(.22, .61, .36, 1);
}
.knopf::after {
  border-left-color: var(--akzent);
  border-right-color: var(--akzent);
  transform: scaleY(0);
  transition: transform 0.26s cubic-bezier(.22, .61, .36, 1) 0.14s;
}
.knopf:hover::before, .knopf:focus-visible::before { transform: scaleX(1); }
.knopf:hover::after,  .knopf:focus-visible::after  { transform: scaleY(1); }

/* Die Zeilen der Preiskarte antworten nacheinander, nicht alle zugleich —
   45 ms Abstand liest sich als Bewegung, gleichzeitig wäre es ein Ruck. */
.paket li { transition: transform 0.34s cubic-bezier(.22, .61, .36, 1); }
.paket:hover li { transform: translateX(4px); }
.paket:hover li:nth-child(1) { transition-delay: 0s; }
.paket:hover li:nth-child(2) { transition-delay: 0.045s; }
.paket:hover li:nth-child(3) { transition-delay: 0.09s; }
.paket:hover li:nth-child(4) { transition-delay: 0.135s; }
.paket:hover li:nth-child(5) { transition-delay: 0.18s; }

@media (prefers-reduced-motion: reduce) {
  .knopf::before, .knopf::after { display: none; }
  .paket li, .paket:hover li { transform: none; transition: none; }
}
