/* ==========================================================================
   home.css – Startseite
   ========================================================================== */

/* ==========================================================================
   HERO
   ========================================================================== */

.hero {
    position: relative;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: var(--color-black);
}

/* Three.js Canvas */
.hero__canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: var(--z-base);
    pointer-events: none;
}

/* CSS-Fallback Gradient (sichtbar solange Three.js lädt oder deaktiviert ist) */
.hero__gradient-fallback {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 60% 40%, rgba(200, 168, 75, 0.07) 0%, transparent 60%),
        radial-gradient(ellipse 50% 40% at 20% 80%, rgba(139, 105, 20, 0.05) 0%, transparent 50%),
        var(--gradient-hero);
    z-index: var(--z-base);
    pointer-events: none;
}

/* Wenn Three.js lädt: Fallback ausblenden */
.hero--three-loaded .hero__gradient-fallback {
    opacity: 0;
    transition: opacity 1.5s ease;
}

/* Overlay zwischen Canvas und Text für Lesbarkeit */
.hero__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1;        /* Canvas=0, Overlay=1, Content=10 */
    pointer-events: none;
}

.hero__inner {
    position: relative;
    z-index: var(--z-raised);
    padding-top: calc(72px + var(--space-16)); /* Nav-Höhe + Abstand */
    padding-bottom: var(--space-20);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.hero__content {
    max-width: 680px;
    /* Text-Shadow für Lesbarkeit vor dem Partikelfeld */
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.8);
}

/* Eyebrow */
.hero__eyebrow {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    font-weight: var(--weight-semibold);
    color: var(--color-gold);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: var(--space-6);
    opacity: 0;
    animation: fadeInUp 0.6s ease 0.1s forwards;
}

.hero__eyebrow-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--color-gold);
    animation: pulse-glow 2s ease infinite;
}

/* Headline */
.hero__headline {
    font-size: var(--text-5xl);
    line-height: var(--leading-tight);
    color: var(--color-white);
    margin-bottom: var(--space-6);
    opacity: 0;
    animation: fadeInUp 0.6s ease 0.2s forwards;
}

.hero__headline-gold {
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Subheadline */
.hero__sub {
    font-family: var(--font-display);
    font-size: var(--text-xl);
    font-weight: var(--weight-bold);
    font-style: normal;
    color: var(--color-gray-300);
    margin-bottom: var(--space-6);
    opacity: 0;
    animation: fadeInUp 0.6s ease 0.3s forwards;
}

.hero__sub-word {
    color: var(--color-white);
}

.hero__sub-sep {
    color: var(--color-gold-dark);
    margin: 0 var(--space-1);
}

/* Beschreibung */
.hero__desc {
    font-size: var(--text-lg);
    font-weight: var(--weight-bold);
    line-height: var(--leading-normal);
    color: var(--color-gray-300);
    margin-bottom: var(--space-10);
    max-width: 56ch;
    opacity: 0;
    animation: fadeInUp 0.6s ease 0.4s forwards;
}

/* CTAs */
.hero__ctas {
    display: flex;
    gap: var(--space-4);
    flex-wrap: wrap;
    margin-bottom: var(--space-8);
    opacity: 0;
    animation: fadeInUp 0.6s ease 0.5s forwards;
}

/* Trust-Signale */
.hero__trust {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-5);
    opacity: 0;
    animation: fadeInUp 0.6s ease 0.6s forwards;
}

.hero__trust-item {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-sm);
    color: var(--color-gray-300);
}

/* Scroll-Indikator */
.hero__scroll {
    position: absolute;
    bottom: var(--space-8);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
    opacity: 0;
    animation: fadeIn 1s ease 1.2s forwards;
}

.hero__scroll-line {
    display: block;
    width: 1px;
    height: 48px;
    background: linear-gradient(to bottom, var(--color-gold), transparent);
    animation: scrollPulse 2s ease infinite;
}

.hero__scroll-label {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    color: var(--color-gray-300);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    writing-mode: vertical-rl;
}

@keyframes scrollPulse {
    0%, 100% { transform: scaleY(1); opacity: 1; }
    50%       { transform: scaleY(0.6); opacity: 0.4; }
}

/* ==========================================================================
   USP-LEISTE
   ========================================================================== */

.usp-bar {
    border-top: 1px solid var(--color-border);
    padding-block: var(--space-16);
}

.usp-bar__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-8);
}

.usp-bar__item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-4);
}

.usp-bar__icon {
    flex-shrink: 0;
    margin-top: 2px;
}

.usp-bar__title {
    display: block;
    font-size: var(--text-base);
    font-weight: var(--weight-semibold);
    color: var(--color-white);
    margin-bottom: var(--space-1);
}

.usp-bar__text {
    font-size: var(--text-sm);
    color: var(--color-gray-300);
    line-height: var(--leading-normal);
}

/* ==========================================================================
   LEISTUNGEN-TEASER
   ========================================================================== */

.leistungen-teaser__header {
    margin-bottom: var(--space-12);
    max-width: 56ch;
}

.leistungen-teaser__grid {
    gap: var(--space-6);
}

.leistung-card {
    display: flex;
    align-items: flex-start;
    gap: var(--space-5);
    padding: var(--space-8);
    background: var(--color-gray-700);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    text-decoration: none;
    transition: border-color var(--transition-base),
                box-shadow var(--transition-base),
                transform var(--transition-base);
}

.leistung-card:hover {
    border-color: rgba(200, 168, 75, 0.5);
    box-shadow: var(--shadow-gold);
    transform: translateY(-3px);
}

.leistung-card__icon {
    font-size: 2rem;
    line-height: 1;
    flex-shrink: 0;
}

.leistung-card__title {
    font-size: var(--text-xl);
    color: var(--color-white);
    margin-bottom: var(--space-2);
    font-family: var(--font-display);
}

.leistung-card__text {
    font-size: var(--text-sm);
    color: var(--color-gray-300);
    line-height: var(--leading-normal);
    margin-bottom: var(--space-4);
}

.leistung-card__more {
    font-size: var(--text-sm);
    font-weight: var(--weight-semibold);
    color: var(--color-gold);
    transition: color var(--transition-fast);
}

.leistung-card:hover .leistung-card__more {
    color: var(--color-gold-light);
}

/* ==========================================================================
   REFERENZEN-TEASER
   ========================================================================== */

.referenzen-teaser__header {
    margin-bottom: var(--space-12);
}

.ref-card__name {
    font-family: var(--font-display);
    font-size: var(--text-xl);
    font-weight: var(--weight-bold);
    color: var(--color-white);
    margin-bottom: var(--space-1);
}

.ref-card__company {
    font-size: var(--text-sm);
    color: var(--color-gold);
    margin-bottom: var(--space-4);
}

.ref-card__services {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    list-style: none;
    margin: 0;
    padding: 0;
}

.referenzen-teaser__cta {
    text-align: center;
    margin-top: var(--space-12);
}

/* ==========================================================================
   BUCH-TEASER
   ========================================================================== */

.buch-teaser__inner {
    display: flex;
    align-items: center;
    gap: var(--space-16);
}

.buch-teaser__cover {
    flex-shrink: 0;
}

.buch-teaser__cover-placeholder {
    width: 180px;
    height: 260px;
    background: var(--gradient-gold);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-gold-strong), 12px 12px 0 rgba(0,0,0,0.3);
}

.buch-teaser__cover-label {
    font-family: var(--font-display);
    font-size: var(--text-3xl);
    font-weight: var(--weight-bold);
    color: var(--color-black);
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg);
}

.buch-teaser__subtitle {
    font-family: var(--font-display);
    font-style: italic;
    font-size: var(--text-xl);
    color: var(--color-gold);
    margin-bottom: var(--space-4);
    margin-top: calc(-1 * var(--space-3));
}

.buch-teaser__text {
    font-size: var(--text-lg);
    color: var(--color-gray-300);
    line-height: var(--leading-normal);
    max-width: 52ch;
    margin-bottom: var(--space-8);
}

.buch-teaser__coming-soon {
    font-size: var(--text-sm);
}

/* ==========================================================================
   CTA-FINAL
   ========================================================================== */

.cta-final {
    background: var(--gradient-glow), var(--color-black);
    border-top: 1px solid var(--color-border);
}

.cta-final__inner {
    text-align: center;
    max-width: 640px;
    margin-inline: auto;
}

.cta-final__headline {
    margin-bottom: var(--space-6);
}

.cta-final__text {
    margin-bottom: var(--space-10);
    margin-inline: auto;
}

.cta-final__actions {
    display: flex;
    gap: var(--space-4);
    justify-content: center;
    flex-wrap: wrap;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 1024px) {
    .usp-bar__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .buch-teaser__inner {
        gap: var(--space-10);
    }
}

@media (max-width: 768px) {
    .hero__headline {
        font-size: var(--text-4xl);
    }

    .hero__ctas {
        flex-direction: column;
        align-items: flex-start;
    }

    .hero__scroll {
        display: none;
    }

    .usp-bar__grid {
        grid-template-columns: 1fr;
        gap: var(--space-6);
    }

    .leistungen-teaser__grid {
        grid-template-columns: 1fr;
    }

    .buch-teaser__inner {
        flex-direction: column;
        gap: var(--space-8);
        text-align: center;
    }

    .buch-teaser__cover-placeholder {
        width: 140px;
        height: 200px;
    }

    .buch-teaser__text {
        margin-inline: auto;
    }

    .cta-final__actions {
        flex-direction: column;
        align-items: center;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .hero__eyebrow,
    .hero__headline,
    .hero__sub,
    .hero__desc,
    .hero__ctas,
    .hero__trust,
    .hero__scroll {
        opacity: 1;
        animation: none;
    }

    .hero__scroll-line {
        animation: none;
    }

    .leistung-card,
    .leistung-card:hover {
        transform: none;
        transition: none;
    }

    .ref-marquee {
        animation: none;
    }
}

/* ==========================================================================
   REFERENZEN – Laufband + Cards
   ========================================================================== */

.referenzen__header {
    margin-bottom: var(--space-12);
}

/* --- Marquee-Laufband --- */
.ref-marquee-wrap {
    display: flex;             /* Beide Tracks nebeneinander */
    overflow: hidden;
    width: 100%;
    padding: var(--space-6) 0;
    mask-image: linear-gradient(
        to right,
        transparent 0%,
        black 10%,
        black 90%,
        transparent 100%
    );
    -webkit-mask-image: linear-gradient(
        to right,
        transparent 0%,
        black 10%,
        black 90%,
        transparent 100%
    );
}

/* Jeder Track – JS übernimmt die Bewegung via rAF */
.ref-marquee {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    gap: 2.5rem;
    padding-right: 2.5rem;
    will-change: transform;
}

/* Jedes Item: feste 140px Breite, kein Shrink */
.ref-marquee__item {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: var(--space-3);
    width: 140px;
    flex-shrink: 0;
}

.ref-marquee__name {
    font-size: var(--text-xs);
    font-weight: var(--weight-semibold);
    color: var(--color-gray-300);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ref-marquee__logo-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 160px;
    height: 72px;
    border-radius: var(--radius-md);
    padding: 8px 12px;
}

.ref-marquee__logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* --- Referenzen-Cards --- */
.ref-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-5);
    max-width: 1200px;
    margin-inline: auto;
}

.ref-card-new {
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Thumbnail: feste Höhe statt fluid 16:9 */
.ref-card-new__thumb {
    height: 120px;
    width: 100%;
    aspect-ratio: unset;           /* überschreibt .img-placeholder--16-9 */
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    flex-shrink: 0;
    font-size: var(--text-xs);
}

.ref-card-new__body {
    padding: 1rem;                 /* kompakter als --space-6 (1.5rem) */
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    flex: 1;
}

.ref-card-new__top {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
}

/* Logo-Placeholder in der Card: 48×48 */
.ref-card-new__top .img-placeholder--sq80 {
    width: 48px;
    height: 48px;
    font-size: 0.55rem;
    flex-shrink: 0;
}

.ref-card-new__name {
    font-size: var(--text-sm);
    font-weight: var(--weight-semibold);
    color: var(--color-white);
    margin-bottom: 2px;
    line-height: 1.3;
}

.ref-card-new__role {
    font-size: var(--text-xs);
    color: var(--color-gold);
    line-height: 1.3;
}

.ref-card-new__country {
    color: var(--color-gray-300);
}

/* Beschreibung auf 2 Zeilen begrenzen */
.ref-card-new__desc {
    font-size: var(--text-xs);
    color: var(--color-gray-300);
    line-height: var(--leading-normal);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ref-card-new__footer {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: var(--space-3);
    margin-top: auto;
}

.ref-card-new__tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-1);
}

.ref-card-new__cat {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    color: var(--color-gold-dark);
    white-space: nowrap;
    flex-shrink: 0;
}

.referenzen__cta {
    text-align: center;
    margin-top: var(--space-12);
}

/* Responsive Cards */
@media (max-width: 1024px) {
    .ref-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .ref-cards-grid {
        grid-template-columns: 1fr;
    }

}
