/* TwoPixels Home Masterclass Hero
   5-Layer-Architektur · Pure CSS · Performance-First · LCP < 1.5s */

/* === GRUND === */
.tp-master-hero {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    color: #fff;
    background: #0F1419;
    min-height: clamp(680px, 92vh, 920px);
    display: flex;
    align-items: center;
}

/* === LAYER 1: AURORA-Background === */
.tp-master-hero::before {
    content: '';
    position: absolute;
    inset: -10%;
    z-index: 0;
    background:
        conic-gradient(from 0deg at 50% 50%,
            #E85D3F 0deg,
            #FF8C42 60deg,
            #1A202C 120deg,
            #1A202C 200deg,
            #E85D3F 280deg,
            #FF8C42 340deg,
            #E85D3F 360deg);
    filter: blur(80px);
    opacity: 0.55;
    animation: tpAurora 24s linear infinite;
    will-change: transform;
}
.tp-master-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        radial-gradient(ellipse 1200px 600px at 50% 100%, rgba(15,20,25,0.85) 0%, rgba(15,20,25,0.4) 70%, transparent 100%),
        radial-gradient(ellipse 800px 400px at 50% 0%, rgba(15,20,25,0.4) 0%, transparent 70%);
    pointer-events: none;
}
@keyframes tpAurora {
    to { transform: rotate(360deg); }
}

/* === LAYER 2: CONSTELLATION === */
.tp-master-constellation {
    position: absolute;
    inset: 0;
    z-index: 2;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.7;
}
.tp-master-constellation .star {
    fill: rgba(255, 255, 255, 0.8);
    filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.6));
}
.tp-master-constellation .star-bright {
    fill: #FFB89A;
    filter: drop-shadow(0 0 10px #E85D3F);
    animation: tpStarPulse 3s ease-in-out infinite;
}
.tp-master-constellation .star-bright:nth-child(2n) { animation-delay: 0.5s; }
.tp-master-constellation .star-bright:nth-child(3n) { animation-delay: 1s; }
.tp-master-constellation .star-bright:nth-child(5n) { animation-delay: 1.5s; }
.tp-master-constellation .const-line {
    stroke: rgba(232, 93, 63, 0.25);
    stroke-width: 0.5;
    fill: none;
    stroke-dasharray: 3 4;
    animation: tpConstFlow 8s linear infinite;
}
@keyframes tpStarPulse {
    0%, 100% { opacity: 0.4; transform: scale(0.8); }
    50% { opacity: 1; transform: scale(1.3); }
}
@keyframes tpConstFlow {
    to { stroke-dashoffset: -28; }
}

/* === LAYER 3: TECH-STACK-BADGES (rotierend) === */
.tp-master-badges {
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    overflow: hidden;
}
.tp-master-badge {
    position: absolute;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    border-radius: 999px;
    padding: 7px 16px 7px 12px;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.92);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    letter-spacing: 0.01em;
    white-space: nowrap;
    box-shadow: 0 4px 16px rgba(0,0,0,0.18);
    will-change: transform;
    animation: tpBadgeFloat 12s ease-in-out infinite;
}
.tp-master-badge::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--badge-color, #E85D3F);
    box-shadow: 0 0 8px var(--badge-color, #E85D3F);
}
.tp-master-badge-1 { top: 12%; left: 6%; --badge-color: #95BF47; animation-delay: 0s; }
.tp-master-badge-2 { top: 18%; right: 8%; --badge-color: #00ADD8; animation-delay: 2s; }
.tp-master-badge-3 { top: 38%; left: 3%; --badge-color: #61DAFB; animation-delay: 4s; }
.tp-master-badge-4 { bottom: 28%; right: 4%; --badge-color: #FF6900; animation-delay: 1s; }
.tp-master-badge-5 { bottom: 14%; left: 7%; --badge-color: #02569B; animation-delay: 3s; }
.tp-master-badge-6 { top: 56%; right: 7%; --badge-color: #E85D3F; animation-delay: 5s; }
@keyframes tpBadgeFloat {
    0%, 100% { transform: translateY(0) translateX(0); }
    25% { transform: translateY(-8px) translateX(4px); }
    50% { transform: translateY(0) translateX(8px); }
    75% { transform: translateY(8px) translateX(4px); }
}

/* === LAYER 4: SERVICE-FLOATING-CARDS === */
.tp-master-cards {
    position: absolute;
    inset: 0;
    z-index: 4;
    pointer-events: none;
}
.tp-master-card {
    position: absolute;
    background: linear-gradient(135deg, rgba(255,255,255,0.12) 0%, rgba(255,255,255,0.04) 100%);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(18px) saturate(180%);
    -webkit-backdrop-filter: blur(18px) saturate(180%);
    border-radius: 16px;
    padding: 16px 18px;
    color: #fff;
    width: 200px;
    box-shadow:
        0 24px 48px rgba(0,0,0,0.35),
        0 0 0 1px rgba(255,255,255,0.05) inset;
    will-change: transform;
    animation: tpCardDrift 18s ease-in-out infinite;
    transform-style: preserve-3d;
}
.tp-master-card-icon {
    width: 36px; height: 36px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-bottom: 10px;
    background: linear-gradient(135deg, var(--c-1, #E85D3F), var(--c-2, #D45436));
    box-shadow: 0 6px 14px rgba(232,93,63,0.35);
}
.tp-master-card strong {
    display: block;
    font-size: 0.92rem;
    line-height: 1.3;
    margin-bottom: 3px;
}
.tp-master-card span {
    display: block;
    font-size: 0.74rem;
    color: rgba(255,255,255,0.7);
    line-height: 1.4;
}
.tp-master-card-1 {
    top: 9%; right: 7%;
    --c-1: #FFB89A; --c-2: #E85D3F;
    animation-delay: 0s;
}
.tp-master-card-2 {
    bottom: 14%; left: 4%;
    --c-1: #B794F4; --c-2: #805AD5;
    animation-delay: 4s;
}
.tp-master-card-3 {
    top: 60%; right: 4%;
    --c-1: #9AE6B4; --c-2: #48BB78;
    animation-delay: 8s;
}
@keyframes tpCardDrift {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25%      { transform: translateY(-14px) rotate(-1deg); }
    50%      { transform: translateY(0) rotate(1deg); }
    75%      { transform: translateY(14px) rotate(0deg); }
}

/* === LAYER 5: BACKDROP für Content-Lesbarkeit === */
.tp-master-backdrop {
    position: absolute;
    inset: 0;
    z-index: 5;
    background: radial-gradient(ellipse 800px 500px at center, rgba(15,20,25,0.35) 0%, transparent 80%);
    pointer-events: none;
}

/* === LAYER 6: CONTENT === */
.tp-master-content {
    position: relative;
    z-index: 10;
    text-align: center;
    max-width: 940px;
    margin: 0 auto;
    padding: 80px 24px 60px;
}
.tp-master-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 18px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.18);
    backdrop-filter: blur(12px);
    border-radius: 999px;
    font-size: 0.84rem;
    font-weight: 500;
    color: rgba(255,255,255,0.95);
    letter-spacing: 0.04em;
    margin-bottom: 22px;
    animation: tpFadeUp 0.8s ease-out;
}
.tp-master-eyebrow::before {
    content: '';
    width: 8px; height: 8px;
    border-radius: 50%;
    background: #48BB78;
    box-shadow: 0 0 8px #48BB78;
    animation: tpDotPulse 2s ease-in-out infinite;
}
@keyframes tpDotPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.4); }
}

.tp-master-headline {
    font-size: clamp(2.4rem, 6vw, 4.4rem);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.03em;
    margin: 0 0 22px;
    color: #fff;
    text-shadow: 0 8px 32px rgba(0,0,0,0.4);
    text-wrap: balance;
}
/* Per-Word Animation */
.tp-master-headline .word {
    display: inline-block;
    opacity: 0;
    transform: translateY(20px);
    animation: tpWordReveal 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    margin: 0 0.2em 0 0;
}
.tp-master-headline .word:nth-child(1) { animation-delay: 0.1s; }
.tp-master-headline .word:nth-child(2) { animation-delay: 0.2s; }
.tp-master-headline .word:nth-child(3) { animation-delay: 0.3s; }
.tp-master-headline .word:nth-child(4) { animation-delay: 0.4s; }
.tp-master-headline .word:nth-child(5) { animation-delay: 0.5s; }
.tp-master-headline .word:nth-child(6) { animation-delay: 0.6s; }
.tp-master-headline .word:nth-child(7) { animation-delay: 0.7s; }
.tp-master-headline .word:nth-child(8) { animation-delay: 0.8s; }
.tp-master-headline .word:nth-child(9) { animation-delay: 0.9s; }
.tp-master-headline .word.accent {
    background: linear-gradient(135deg, #FFB89A 0%, #E85D3F 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    text-shadow: none;
}
@keyframes tpWordReveal {
    to { opacity: 1; transform: translateY(0); }
}
@keyframes tpFadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

.tp-master-sub {
    font-size: clamp(1.05rem, 2vw, 1.32rem);
    line-height: 1.55;
    color: rgba(255,255,255,0.92);
    max-width: 720px;
    margin: 0 auto 32px;
    text-shadow: 0 2px 12px rgba(0,0,0,0.4);
    opacity: 0;
    animation: tpFadeUp 0.7s ease-out 1s forwards;
}

/* === STATS-ROW === */
.tp-master-stats {
    display: flex;
    justify-content: center;
    gap: 36px;
    margin: 0 auto 36px;
    flex-wrap: wrap;
    opacity: 0;
    animation: tpFadeUp 0.7s ease-out 1.3s forwards;
}
.tp-master-stat {
    text-align: center;
}
.tp-master-stat-value {
    display: block;
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 800;
    background: linear-gradient(135deg, #FFB89A 0%, #E85D3F 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    line-height: 1;
    margin-bottom: 4px;
}
.tp-master-stat-label {
    display: block;
    font-size: 0.78rem;
    color: rgba(255,255,255,0.7);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* === CTA-Buttons === */
.tp-master-ctas {
    display: flex;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
    opacity: 0;
    animation: tpFadeUp 0.7s ease-out 1.5s forwards;
}
.tp-master-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 34px;
    border-radius: 14px;
    font-size: 1.02rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.25s ease;
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.01em;
}
.tp-master-cta-primary {
    background: linear-gradient(135deg, #E85D3F 0%, #D45436 100%);
    color: #fff !important;
    box-shadow: 0 12px 32px rgba(232,93,63,0.45), 0 0 0 1px rgba(255,255,255,0.1) inset;
}
.tp-master-cta-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 42px rgba(232,93,63,0.6), 0 0 0 1px rgba(255,255,255,0.15) inset;
    color: #fff !important;
}
.tp-master-cta-primary::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.25) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform 0.5s ease;
}
.tp-master-cta-primary:hover::after {
    transform: translateX(100%);
}
.tp-master-cta-secondary {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff !important;
    backdrop-filter: blur(12px);
}
.tp-master-cta-secondary:hover {
    background: rgba(255,255,255,0.16);
    transform: translateY(-2px);
    color: #fff !important;
}

/* === MOBILE OPTIMIZATION === */
@media (max-width: 1024px) {
    .tp-master-card { width: 160px; padding: 12px 14px; }
    .tp-master-card-icon { width: 28px; height: 28px; font-size: 1rem; }
    .tp-master-card strong { font-size: 0.82rem; }
    .tp-master-card span { font-size: 0.68rem; }
    .tp-master-badge { font-size: 0.7rem; padding: 5px 12px 5px 10px; }
}
@media (max-width: 768px) {
    .tp-master-hero { min-height: 88vh; }
    .tp-master-content { padding: 60px 20px 50px; }

    /* Hide most floating elements on mobile (Performance + Lesbarkeit) */
    .tp-master-card-1, .tp-master-card-3 { display: none; }
    .tp-master-card-2 {
        bottom: 4%; left: 50%;
        transform: translateX(-50%);
        width: 200px;
        opacity: 0.85;
    }
    @keyframes tpCardDrift {
        0%, 100% { transform: translateX(-50%) translateY(0); }
        50% { transform: translateX(-50%) translateY(-8px); }
    }

    .tp-master-badge-3, .tp-master-badge-4, .tp-master-badge-6 { display: none; }
    .tp-master-badges .tp-master-badge { opacity: 0.7; }

    .tp-master-constellation { opacity: 0.4; }

    .tp-master-stats { gap: 24px; }
    .tp-master-stat-value { font-size: 1.5rem; }
    .tp-master-stat-label { font-size: 0.7rem; }

    .tp-master-ctas { flex-direction: column; width: 100%; max-width: 320px; margin: 0 auto; }
    .tp-master-cta { width: 100%; }

    .tp-master-hero::before {
        animation-duration: 40s; /* slower on mobile to save battery */
    }
}
@media (max-width: 480px) {
    .tp-master-hero { min-height: 80vh; }
    .tp-master-card-2 { display: none; }
    .tp-master-badge-2, .tp-master-badge-5 { display: none; }
}

/* === REDUCED MOTION === */
@media (prefers-reduced-motion: reduce) {
    .tp-master-hero::before,
    .tp-master-constellation .star-bright,
    .tp-master-constellation .const-line,
    .tp-master-badge,
    .tp-master-card,
    .tp-master-eyebrow::before,
    .tp-master-headline .word,
    .tp-master-sub,
    .tp-master-stats,
    .tp-master-ctas {
        animation: none !important;
    }
    .tp-master-headline .word { opacity: 1; transform: none; }
    .tp-master-sub, .tp-master-stats, .tp-master-ctas { opacity: 1; }
    .tp-master-cta-primary::after { display: none; }
}

/* === Print === */
@media print {
    .tp-master-hero::before, .tp-master-constellation, .tp-master-badges, .tp-master-cards { display: none; }
    .tp-master-hero { background: #fff; color: #000; min-height: 0; }
}
