/* ============================================================================
 * Nur Startseite (body.home): Abschnitte "Aus Hofheim am Taunus", "Individuelles Webdesign", "Ueber mich".
 * Das gemeinsame Schwarz-Weiss-Design (Farben, Menue, Karten, Buttons) steht in theme.css.
 * ========================================================================== */

/* ---------- Hero der Startseite: Headline in zwei Zeilen ("Professionelle Webentwicklung" / "& Webdesign") ----------
 * Die Textspalte reicht ueber beide Gridspalten und die Schrift wird mit der Breite kleiner, damit die laengere erste Zeile passt.
 * Auf schmalen Handys bricht sie weiterhin um (28 Zeichen passen dort nur in sehr kleiner Schrift). */
body.home .home-hero-text { max-width: 72rem; }
body.home .home-title { font-size: clamp(2.25rem, 4.3vw, 4.25rem); line-height: 1.1; letter-spacing: -0.02em; }

/* ---------- Abschnitt "Individuelles Webdesign" ---------- */
body.home .webdesign-text p {
    font-size: 1.0625rem;
    line-height: 1.75;
    color: var(--muted-on-light);
}
body.home .webdesign-text p + p { margin-top: 1.25rem; }
body.home .webdesign-figure img {
    display: block;
    width: 100%;
    height: auto;
}

/* ---------- Abschnitt "Leistungen": Kopf links, Leistungsliste mit Pfeil-Kreis rechts ----------
 * Akzentfarbe (--accent, Gold, in theme.css): Testlauf nur hier. Hover/Tastaturfokus: Titel und Pfeil-Kreis in der Akzentfarbe,
 * Pfeil dreht sich, Trennlinie laeuft in der Akzentfarbe von links ein. */
body.home .svc-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2rem, 6vw, 6rem); align-items: start; }
body.home .svc-head { position: sticky; top: 7rem; }
body.home .svc-label {
    display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1.25rem;
    font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent-text);
}
body.home .svc-label::before { content: ""; width: 2.25rem; height: 2px; background: var(--accent); }
body.home .svc-title {
    font-size: clamp(2.75rem, 1rem + 4.4vw, 5.75rem);
    font-weight: 600; line-height: 1; letter-spacing: -0.035em; color: var(--ink);
    hyphens: manual; /* "Leistungen" darf nicht getrennt werden */
}
body.home .svc-lead { margin-top: clamp(1.25rem, 2.5vw, 2rem); max-width: 22rem; font-size: 1.125rem; line-height: 1.6; color: var(--muted-on-light); }
body.home .svc-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid rgba(var(--ink-blue-rgb), 0.16); }
body.home .svc-item {
    position: relative; padding: clamp(1.5rem, 3vw, 2.25rem) 0;
    border-bottom: 1px solid rgba(var(--ink-blue-rgb), 0.16);
}
body.home .svc-item::after { /* Linie, die beim Hover von links einlaeuft */
    content: ""; position: absolute; left: 0; bottom: -1px; height: 2px; width: 100%;
    background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .45s ease;
}
body.home .svc-item:hover::after { transform: scaleX(1); }
body.home .svc-row { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
body.home .svc-row h3 {
    font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.3rem); font-weight: 600; line-height: 1.2; color: var(--ink);
    min-width: 0; overflow-wrap: break-word; transition: transform .35s ease, color .3s ease;
}
body.home .svc-arrow {
    flex: none; display: inline-flex; align-items: center; justify-content: center;
    width: 3rem; height: 3rem; border-radius: 9999px; color: var(--ink);
    border: 1px solid rgba(var(--ink-blue-rgb), 0.35);
    transition: background-color .3s ease, color .3s ease, border-color .3s ease, transform .35s ease;
}
body.home .svc-item:hover .svc-row h3 { transform: translateX(0.6rem); color: var(--accent-text); }
body.home .svc-item:hover .svc-arrow { background: var(--accent); color: var(--on-accent); border-color: var(--accent); transform: rotate(45deg); }
body.home .svc-item p { margin-top: 0.9rem; max-width: 36rem; font-size: 1.0625rem; line-height: 1.7; color: var(--muted-on-light); }
@media (max-width: 899px) {
    body.home .svc-grid { grid-template-columns: minmax(0, 1fr); }
    body.home .svc-head { position: static; }
    body.home .svc-title { font-size: clamp(2.5rem, 13vw, 4.5rem); }
    body.home .svc-arrow { width: 2.5rem; height: 2.5rem; }
}
@media (prefers-reduced-motion: reduce) {
    body.home .svc-item::after, body.home .svc-row h3, body.home .svc-arrow { transition: none; }
    body.home .svc-item:hover .svc-row h3, body.home .svc-item:hover .svc-arrow { transform: none; }
}

/* ---------- Hero-Subline: in 2 bis 3 Zeilen umbrechen ---------- */
body.home .home-subline { max-width: 48rem; text-wrap: balance; }

/* ---------- Abschnitt "Aus Hofheim am Taunus an Ihrer Seite" ---------- */
body.home .local-text {
    max-width: 38rem; /* ca. 60-70 Zeichen pro Zeile */
    margin-inline: auto;
    text-align: center;
}
body.home .local-text p {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--muted-on-light);
}
body.home .local-text p + p { margin-top: 1.5rem; }
body.home .local-text strong { color: var(--ink); font-weight: 600; }
body.home .local-text a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
body.home .local-text a:hover { text-decoration-thickness: 2px; color: var(--accent-text); }

/* ---------- Dekorative Skizze im Abschnitt "Aus Hofheim am Taunus" ----------
 * Rein visuell: <img alt="" aria-hidden="true" loading="lazy">, Klicks gehen durch, Layout wird nicht beeinflusst
 * (absolut positioniert, width/height-Attribute -> kein Layoutsprung). Keine Animation.
 * Deckkraft: rote Linien auf Weiss; dunkler Text hat auch dort, wo die Skizze dahinter liegt, mindestens 4.5:1 (WCAG AA).
 * Bild austauschen: images/roemer-skizze-rot.webp ersetzen (Seitenverhaeltnis ca. 1000:517, sonst width/height im HTML anpassen). */
body.home #vor-ort { position: relative; overflow: hidden; }
body.home #vor-ort > .container { position: relative; z-index: 1; }
/* Wrapper fuer den Einflug-Effekt (.reveal): fuellt den Abschnitt, die Positionierung der Skizze bleibt unveraendert */
body.home .local-art-wrap { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
body.home .local-art {
    position: absolute;
    z-index: 0;
    pointer-events: none;
    max-width: none;
    height: auto;
    opacity: 0.5;
    /* Desktop: rechts auf mittlerer Hoehe (etwas tiefer), leicht schraeg, rechts angeschnitten,
       ein kleiner Teil reicht hinter den unteren Text */
    width: 64%;
    right: -15%;
    top: 54%;
    transform: translateY(-50%) rotate(6deg);
}
@media (max-width: 1023px) {
    body.home .local-art { width: 72%; right: -22%; top: 60%; }
}
@media (max-width: 767px) {
    /* Handy: kleiner, im unteren Bereich unter dem Text, rechts angeschnitten */
    body.home #vor-ort { padding-bottom: 11rem; }
    body.home .local-art {
        width: 125%;
        right: -32%;
        top: auto;
        bottom: -1.5rem;
        transform: rotate(5deg);
    }
}

/* ---------- Abschnitt "Ueber mich": dunkles Foto links, helle Textflaeche (Creme) rechts ----------
 * Schwarzer Rahmen um das Panel. Foto: verdunkeltes Schwarz-Weiss-Portraet (images/ueber-mich-dunkel-*.webp); sein
 * fast schwarzer Hintergrund wird per mix-blend-mode: lighten auf die Kartenfarbe (--card-dark) angehoben, so gibt es
 * keine sichtbare Kante. Alle grossen Container (Ueber-mich-Panel, Projekt-Slider) nutzen denselben Eckenradius. */
body.home {
    --radius-frame: clamp(16px, 1.8vw, 28px); /* einheitliche Rundung der grossen Container */
    --cream: #f4f0e8;      /* warmes Weiss-Beige */
    --about-copy: #5a5a5a; /* gedaempftes Grau, ca. 6:1 auf --cream */
}
body.home #ueber-mich.about {
    padding: clamp(5.5rem, 9vw, 8rem) clamp(1rem, 4vw, 4rem) clamp(1.5rem, 4vw, 4rem);
    background: var(--black);
    color: var(--white);
}
body.home .about-panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    max-width: 90rem;
    margin-inline: auto;
    min-height: clamp(30rem, 78vh, 50rem);
    min-height: clamp(30rem, 78svh, 50rem);
    background: var(--cream);
    color: var(--ink);
    border-radius: var(--radius-frame);
    overflow: hidden;
}
body.home .about-photo {
    position: relative;
    overflow: hidden;
    background: var(--card-dark);
}
body.home .about-photo img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    object-position: 45% 25%;
    mix-blend-mode: lighten; /* Bildhintergrund (fast schwarz) wird zur Kartenfarbe des Panels */
}
/* Startseite: helles Portraet (wie auf der Ueber-mich-Seite) mit leichtem Ink-Blue-Filter, damit es nicht zu hell heraussticht */
body.home .about-photo-tint img { mix-blend-mode: normal; object-position: 50% 20%; }
body.home .about-photo-tint::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: rgba(var(--ink-blue-rgb), 0.28);
    mix-blend-mode: multiply;
}
body.home .about-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    text-align: left;
    padding: clamp(2.5rem, 6vw, 6.5rem) clamp(1.5rem, 5vw, 6rem);
}
body.home .about-label {
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--muted-on-light);
    margin-bottom: 1.25rem;
}
body.home .about-name {
    font-size: clamp(3rem, 1.6rem + 4.4vw, 6.5rem);
    line-height: 0.98;
    font-weight: 600;
    letter-spacing: -0.025em;
    color: var(--ink);
    text-wrap: balance;
}
body.home .about-name span { display: block; }
body.home .about-name-2 { margin-left: 0.55em; } /* zweite Zeile eingerueckt */
body.home .about-lead {
    margin-top: clamp(1.5rem, 3vw, 2.5rem);
    max-width: 30rem;
    font-size: clamp(1.25rem, 1rem + 0.9vw, 1.75rem);
    font-weight: 500;
    line-height: 1.3;
    color: var(--ink);
}
body.home .about-copy {
    margin-top: 1.25rem;
    max-width: 28rem;
    font-size: 0.9375rem;
    line-height: 1.7;
    color: var(--about-copy);
}
body.home .about-copy a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
body.home .about-copy a:hover { text-decoration-thickness: 2px; color: var(--accent-text); }
body.home .about-btn {
    margin-top: clamp(1.75rem, 3vw, 2.5rem);
    padding: 0.95rem 2rem;
    border-radius: 999px; /* abgerundet */
}
/* schwarzer Button mit weisser Schrift auf der hellen Textflaeche */
body.home .about-panel .btn-primary { background: var(--black); color: var(--white); }
body.home .about-panel .btn-primary:hover { background: #2a2a2a; }
body.home .about-panel a:focus-visible { outline-color: var(--black); }
@media (max-width: 767px) {
    body.home #ueber-mich.about { padding: 5rem 1rem 1.25rem; }
    body.home .about-panel { grid-template-columns: 1fr; min-height: 0; }
    body.home .about-photo { height: 60vh; height: 60svh; min-height: 22rem; }
    body.home .about-photo img { object-position: 45% 20%; }
    body.home .about-text { padding: 2.5rem 1.5rem 3.5rem; }
    body.home .about-name { font-size: clamp(3rem, 15vw, 4.5rem); }
}

/* ---------- Abschnitt "Ausgewaehlte Projekte": Slider mit Farbwechsel Weiss -> Schwarz ----------
 * Die Buehne (.proj-stage) enthaelt nur den Slide-Rahmen mit gleichem Abstand oben und unten. Ihr Hintergrund wechselt
 * bei 50 % hart von Weiss zu Schwarz, also genau in der vertikalen Mitte des Slide-Bilds, egal wie gross der Slide ist.
 * Die Slides haben ein festes Seitenverhaeltnis (1400:680), Bilder mit leicht anderer Hoehe werden minimal beschnitten. */
body.home #webdesign { padding-bottom: clamp(4.5rem, 10vw, 9rem); } /* weisse Flaeche laeuft in die Buehne */
body.home #projekte.projects {
    padding: 0 0 clamp(1rem, 2vw, 2rem); /* der naechste Abschnitt bringt oben selbst genug schwarzen Abstand mit */
    background: var(--black);
    color: var(--white);
    scroll-margin-top: 4.5rem;
}
body.home .proj-carousel { outline-offset: -4px; }
body.home .proj-stage {
    position: relative;
    padding: clamp(1.5rem, 3vw, 3rem) max(2.2vw, 2rem); /* seitlich knapp, Platz fuer halb ueberstehende Pfeile */
    background: linear-gradient(to bottom, #ffffff 0, #ffffff 50%, var(--ink-blue) 50%, var(--ink-blue) 100%);
}
body.home .proj-hint { position: absolute; left: 0; right: 0; top: 0; bottom: 50%; pointer-events: none; } /* Menuefarbe: obere Haelfte ist weiss */
/* Breite: fast volle Seitenbreite, begrenzt auf 1760 px und so, dass der Slide (Ratio 1400:680) in die Fensterhoehe passt */
body.home .proj-frame-wrap {
    position: relative;
    width: min(100%, 1760px, max(36rem, calc((100vh - 7rem) * 2.0588)));
    width: min(100%, 1760px, max(36rem, calc((100svh - 7rem) * 2.0588)));
    margin-inline: auto;
}
body.home .proj-viewport {
    display: grid;
    border: 5px solid #c4c4c4;
    border-radius: var(--radius-frame);
    overflow: hidden;
    background: var(--ink-blue);
    box-shadow: 0 40px 90px rgba(var(--ink-blue-rgb), 0.38), 0 12px 32px rgba(var(--ink-blue-rgb), 0.25);
    touch-action: pan-y;
    user-select: none;
    -webkit-user-select: none;
}
body.home .proj-slide {
    grid-area: 1 / 1;
    aspect-ratio: 1400 / 680;
    opacity: 0;
    visibility: hidden;
    transform: translateX(var(--shift, 0));
    transition: opacity 0.4s ease, transform 0.4s ease, visibility 0s linear 0.4s;
}
body.home .proj-slide.is-active { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
body.home .proj-slide img { display: block; width: 100%; height: 100%; max-width: none; object-fit: cover; }

/* Runde Pfeil-Buttons auf Hoehe der Slide-Mitte */
body.home .proj-btn {
    position: absolute;
    top: 50%;
    width: 52px;
    height: 52px;
    margin-top: -26px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--ink-blue);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 8px 24px rgba(var(--ink-blue-rgb), 0.35);
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
body.home .proj-prev { left: -26px; }
body.home .proj-next { right: -26px; }
body.home .proj-btn:hover { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
body.home .proj-btn:focus-visible,
body.home .proj-dot:focus-visible,
body.home .proj-carousel:focus-visible { outline: none; box-shadow: inset 0 0 0 3px #fff, inset 0 0 0 6px var(--ink-blue); }
@media (max-width: 1099px) {
    body.home .proj-btn { width: 48px; height: 48px; margin-top: -24px; }
    body.home .proj-prev { left: -24px; }
    body.home .proj-next { right: -24px; }
}
@media (max-width: 767px) {
    body.home .proj-btn { width: 40px; height: 40px; margin-top: -20px; }
    body.home .proj-stage { padding-inline: 1.25rem; }
    body.home .proj-prev { left: -16px; }
    body.home .proj-next { right: -16px; }
    body.home .proj-viewport { border-width: 4px; }
}

/* Titel, Beschreibung und Punkte unter dem Slide (schwarzer Grund) */
body.home .proj-info { padding: clamp(1.75rem, 3.5vw, 2.75rem) 1rem 0; text-align: center; }
body.home .proj-captions { display: grid; max-width: 42rem; margin-inline: auto; }
body.home .proj-caption {
    grid-area: 1 / 1;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.35s ease, transform 0.35s ease, visibility 0s linear 0.35s;
}
body.home .proj-caption.is-active { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
body.home .proj-caption h3 { font-size: clamp(1.25rem, 1rem + 1vw, 1.75rem); font-weight: 600; color: var(--white); }
body.home .proj-caption p { margin-top: 0.6rem; color: var(--muted-on-dark); font-size: 1rem; line-height: 1.65; }
body.home .proj-dots { display: flex; justify-content: center; gap: 0.25rem; margin-top: 1.5rem; }
body.home .proj-dot {
    position: relative;
    width: 1.75rem;
    height: 1.75rem;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: none;
    cursor: pointer;
}
body.home .proj-dot::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0.625rem;
    height: 0.625rem;
    transform: translate(-50%, -50%);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.38);
    transition: width 0.3s ease, background-color 0.3s ease;
}
body.home .proj-dot:hover::before { background: var(--accent-light); }
body.home .proj-dot.is-active::before { width: 1.5rem; background: #fff; }

@media (prefers-reduced-motion: reduce) {
    body.home .proj-slide, body.home .proj-caption, body.home .proj-btn, body.home .proj-dot::before { transition: none !important; }
}

/* ---------- Letzter Abschnitt "Interessiert? Lass uns reden.": Panel in Creme, links Text, rechts schwarze Formularkarte ----------
 * Schwarzer Rahmen und Eckenradius wie beim Ueber-mich-Panel (--radius-frame). */
body.home #kontakt.contact {
    padding: clamp(1.5rem, 4vw, 4rem) clamp(1rem, 4vw, 4rem) clamp(3rem, 6vw, 6rem);
    background: var(--black);
    color: var(--white);
}
body.home .contact-panel {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: clamp(2rem, 5vw, 5rem);
    align-items: stretch;
    max-width: 90rem;
    margin-inline: auto;
    padding: clamp(2rem, 4.5vw, 5rem);
    background: var(--cream);
    color: var(--ink);
    border-radius: var(--radius-frame);
}
body.home .contact-intro { display: flex; flex-direction: column; justify-content: space-between; gap: 2.5rem; }
body.home .contact-title {
    font-size: clamp(3rem, 1.2rem + 5.6vw, 7.5rem);
    line-height: 0.98;
    font-weight: 600;
    letter-spacing: -0.03em;
    color: var(--ink);
    text-wrap: balance;
}
body.home .contact-title span { display: block; }
body.home .contact-direct { font-size: 1rem; line-height: 1.7; color: var(--about-copy); }
body.home .contact-direct p + p { margin-top: 0.75rem; }
body.home .contact-direct a { color: var(--ink); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
body.home .contact-direct a:hover { text-decoration-thickness: 2px; color: var(--accent-text); }
body.home .contact-card {
    background: var(--black);
    color: var(--white);
    border-radius: calc(var(--radius-frame) * 0.8);
    padding: clamp(1.5rem, 3vw, 2.75rem);
    align-self: center;
}
body.home .contact-card-title {
    font-size: clamp(1.25rem, 1rem + 0.9vw, 1.75rem);
    font-weight: 600;
    line-height: 1.25;
    margin-bottom: 1.5rem;
    color: var(--white);
}
body.home .contact-card .glass-input { border-radius: 12px; }
body.home .contact-submit { margin-top: 1.5rem; border-radius: 999px; background: var(--white); color: var(--black); }
body.home .contact-submit:hover { background: #e2e2e2; }
body.home .contact-panel a:focus-visible { outline-color: var(--black); }
body.home .contact-card :is(input, textarea, button):focus-visible { outline: 2px solid var(--white); outline-offset: 3px; }
@media (max-width: 899px) {
    body.home .contact-panel { grid-template-columns: minmax(0, 1fr); }
    body.home .contact-panel > * { min-width: 0; }
    body.home .contact-intro { gap: 1.5rem; }
    body.home .contact-title { font-size: clamp(2.5rem, 12.5vw, 4.5rem); }
}
