/* AROS Technology: gemeinsames Stylesheet für alle statischen Seiten.
   Reihenfolge: Designwerte, Grundlagen, Seitenrahmen, Titelband, Inhalte, Breakpoint. */

/* 1. Designwerte: Navy für Überschriften, Petrol für Aktionen. */
:root {
    --navy: #05264d;
    --ink: #132e40;
    --muted: #40596a;
    --teal: #006d70;
    --surface: #f1f4f5;
    --section-tint: #f5f8f9;
    --paper: #fff;
    --mist: #f0f5f6;
    --line: #c8d6db;
    --font: system-ui, -apple-system, "Segoe UI", sans-serif;
    --label-font: ui-monospace, Consolas, monospace;
    --gutter: clamp(1rem, 4vw, 3rem);
    --inset: clamp(1rem, 3vw, 2.5rem);
    --section-space: clamp(1.75rem, 4vw, 3.5rem);
    --content: 72rem;
}

/* 2. Grundlagen: fließende Schriftgrößen, lokale Schriften und Tastaturbedienung. */
*, *::before, *::after { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font: 1rem/1.6 var(--font);
}

h1, h2, h3, p { margin: 0; }
h1, h2, h3 {
    color: var(--navy);
    line-height: 1.1;
    letter-spacing: -.035em;
}
h1 { font-size: clamp(2.55rem, 5.3vw, 4.9rem); }
h2 { font-size: clamp(1.65rem, 3vw, 2.4rem); }
h3 { font-size: clamp(1.45rem, 2.6vw, 2rem); }
address { font-style: normal; }

a {
    color: inherit;
    text-underline-offset: .22em;
}
a:hover { text-decoration-thickness: .14em; }
a[rel~="external"]::after {
    content: "\00a0\2197" / "";
    font-size: .85em;
}
main a, nav a[aria-current] { color: var(--teal); }
main a { font-weight: 650; }
a:focus-visible {
    outline: 3px solid currentColor;
    outline-offset: 3px;
}

.skip {
    position: absolute;
    top: .5rem;
    left: .5rem;
    z-index: 1;
    padding: .6em 1em;
    color: var(--paper);
    background: var(--navy);
}
.skip:not(:focus) { clip-path: inset(50%); }

/* 3. Seitenrahmen und Navigation. */
.wrap {
    width: min(calc(100% - 2 * var(--gutter)), var(--content));
    margin-inline: auto;
    padding-inline: var(--inset);
}
body > header { border-bottom: 1px solid var(--line); }

.bar, nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}
.bar {
    justify-content: space-between;
    gap: .4rem 2rem;
    padding-block: 1rem;
}
.logo {
    display: block;
    width: clamp(8rem, 16vw, 11rem);
    height: auto;
}
nav { gap: .25rem 1.25rem; }
nav a {
    display: inline-block;
    padding-block: .65rem;
    font-weight: 600;
}
nav a:not(:hover, :focus-visible, [aria-current]) { text-decoration: none; }
footer { color: var(--muted); }
footer .bar {
    border-top: 1px solid var(--line);
    padding-block: 1.5rem;
}
main:has(> .tinted:last-child) + footer .bar { border-top: 0; }

/* 4. Seiteneinstiege mit oder ohne Abbildung. */
.hero-layout {
    display: grid;
    gap: clamp(1.25rem, 3vw, 2.5rem);
    padding-block: clamp(1.5rem, 3vw, 2.5rem) clamp(1.25rem, 2vw, 2rem);
    align-items: center;
}
.product-intro h1 {
    max-width: 20ch;
    text-wrap: balance;
    hyphens: manual;
    overflow-wrap: break-word;
}
.eyebrow {
    font: 700 .95rem/1.45 var(--label-font);
    letter-spacing: .055em;
    text-transform: uppercase;
    margin-bottom: .85rem;
    color: var(--teal);
}
.lead {
    color: var(--muted);
    max-width: 43ch;
    margin-block: 1.4rem 1.8rem;
    font-size: clamp(1.05rem, 2vw, 1.3rem);
}
.product-intro .lead { max-width: 62ch; }
.product-intro .lead:last-child { margin-bottom: 0; }
.page-intro { padding-block: clamp(2rem, 4vw, 3.5rem); }
.page-intro .lead { max-width: 64ch; margin-block: 1rem 0; }
.page-intro .lead + .button { margin-top: 1.25rem; }
.button {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    padding: .7rem 1.1rem;
    color: var(--paper);
    background: var(--teal);
    border-radius: .4rem;
    text-decoration: none;
}
.button:hover { background: var(--navy); }
.button:focus-visible { outline-color: var(--teal); }

/* 5. Inhalte: Karten, Projektabbildungen und längere Texte. */
.contacts, .products {
    display: grid;
    gap: 1.25rem;
    margin-top: 2rem;
}
/* Produkte füllen die verfügbare Breite ohne gerätespezifische Breakpoints.
   min(100%, 19rem) lässt eine einzelne Karte auch auf schmalen Geräten schrumpfen. */
.products { grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); }
.card {
    min-width: 0;
    border-top: 1px solid var(--line);
    padding-top: 1rem;
    overflow-wrap: break-word;
}
.card h3 { margin-bottom: .75rem; font-size: clamp(1.4rem, 2.5vw, 2rem); }
.unlined .card { border-top: 0; padding-top: 0; }
.contacts .card { background: var(--surface); border: 0; border-radius: .5rem; padding: clamp(1rem, 2vw, 1.75rem); }
.card address a {
    display: inline-block;
    max-width: 100%;
    padding-block: .3rem;
    overflow-wrap: anywhere;
}
.water-diagram, .sortieransicht {
    margin: 0;
    border-radius: .5rem;
    overflow: hidden;
    background: var(--mist);
    color: var(--ink);
}
.water-diagram { min-width: 0; }
.water-diagram img, .sortieransicht img {
    display: block;
    width: 100%;
    height: auto;
}
.water-diagram .catalogue-unit {
    max-width: 157px;
    margin: 1rem auto;
    mix-blend-mode: multiply;
}
.water-diagram figcaption, .sortieransicht figcaption {
    padding: .65rem 1rem;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font: .85rem/1.5 var(--label-font);
}
.water-trend {
    display: grid;
    align-items: center;
    gap: clamp(1.5rem, 4vw, 4rem);
}

.product-notes h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); }
.product-notes p:not(.eyebrow) {
    max-width: 66ch;
    margin-top: 1rem;
}
.legal {
    --reading-width: 48rem;
    max-width: var(--reading-width);
    margin-inline: auto;
    overflow-wrap: anywhere;
}
.wrap.legal { max-width: calc(var(--reading-width) + 2 * var(--inset)); }
.legal h2 {
    margin: 2.5rem 0 .8rem;
    font-size: clamp(1.35rem, 3vw, 1.75rem);
}
.legal p + p { margin-top: 1rem; }
.legal h2:first-child { margin-top: 0; }
.legal h3 { margin-top: 1.5rem; font-size: 1.2rem; }

/* 6. Startseite und BMS-Vergleich. */
.machine-view {
    margin: 0;
    padding: clamp(.85rem, 1.5vw, 1.25rem);
    background: var(--surface);
    border-radius: .65rem;
}
.hero-product {
    display: block;
    width: 100%;
    height: clamp(13rem, 29vw, 24rem);
    object-fit: contain;
}
.module-view { max-width: 48rem; margin-top: 1.5rem; }
.module-view img { display: block; width: 100%; height: auto; }
.machine-view figcaption, .comparison-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .3rem 1rem;
}
.machine-view figcaption {
    border-top: 1px solid var(--line);
    padding-top: .5rem;
    margin-top: .75rem;
    color: var(--muted);
    font: .85rem/1.5 var(--label-font);
}
.section, .comparison, .product-notes {
    border-top: 1px solid var(--line);
    padding-block: var(--section-space);
}
.tinted {
    background: var(--section-tint);
}
.tinted, .tinted + :is(.section, .product-notes) { border-top: 0; }
.projects { padding-block: clamp(1.25rem, 2vw, 2rem) var(--section-space); }
.project-grid, .model-grid {
    display: grid;
    gap: 2rem;
    margin-top: 1.5rem;
}
.project-grid { margin-top: 1rem; }
.project-image, .product-photo {
    display: block;
    width: 100%;
    border-radius: .5rem;
    background: var(--surface);
}
.project-image {
    height: clamp(9rem, 20vw, 16rem);
    object-fit: cover;
    margin-bottom: 1.25rem;
}
.project-image.schematic { object-fit: contain; background: var(--mist); }
.project-grid h3 { font-size: clamp(1.4rem, 2.5vw, 2rem); }
.project-grid h3 + p { max-width: 55ch; margin-block: .75rem; }
.comparison-head { align-items: center; row-gap: 1rem; }
.download-ribbon {
    display: inline-flex;
    align-items: center;
    gap: .7rem;
    position: relative;
    isolation: isolate;
    padding: .55rem 1.8rem .55rem 1rem;
    color: var(--paper);
    line-height: 1.3;
    text-decoration: none;
}
/* Nur die Farbfläche ausschneiden, damit der Tastaturfokus sichtbar bleibt. */
.download-ribbon::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: var(--teal);
    clip-path: polygon(0 0, 100% 0, calc(100% - .65rem) 50%, 100% 100%, 0 100%);
}
.download-ribbon:hover::before { background: var(--navy); }
.download-ribbon:focus-visible { outline-color: var(--teal); }
.download-ribbon small { display: block; margin-top: .15rem; font-weight: 400; }
.contacts .download-ribbon { margin-top: 1rem; }
.product-photo {
    height: clamp(10rem, 15vw, 13rem);
    padding: 1rem;
    object-fit: contain;
    margin-bottom: 1rem;
}
.model-grid dl, .model-grid dd { margin: 0; }
.model-grid dt {
    border-top: 1px solid var(--line);
    padding-top: .65rem;
    margin-top: 1rem;
    color: var(--muted);
    font: 600 .85rem/1.6 var(--label-font);
}

/* 7. Mobile zuerst: Text und Bild bzw. beide Kontakte stehen zunächst
   untereinander. Erst ab 44rem ist Platz für zwei feste Spalten. */
@media (min-width: 44rem) {
    .hero-layout { grid-template-columns: 1.15fr 1fr; }
    .contacts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .water-trend { grid-template-columns: 1fr 1.1fr; }
    .project-grid { grid-template-columns: 1.35fr 1fr; }
    .model-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 clamp(1rem, 2.5vw, 2rem); }
    /* Gemeinsame Zeilen halten die Merkmale der drei Modelle auf gleicher Höhe. */
    .model-grid article, .model-grid dl { display: grid; grid-template-rows: subgrid; }
    .model-grid article { grid-row: span 8; }
    .model-grid dl { grid-row: span 6; }
}
