@import url('https://fonts.googleapis.com/css2?family=Herr+Von+Muellerhoff&family=Work+Sans:ital,wght@0,100..900;1,100..900&display=swap');

:root {
    --bg: #050506;
    --card-radius: 24px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    /* Ensures crisp text rendering on high-DPI screens */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* Use the modern system font stack consistent with index.css */
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
}


body {
    min-height: 100vh;
    background: var(--bg);
    color: #fff;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    sans-serif;
    /* Use normal block flow so header, main, and footer stack vertically */
    display: block;
}

.page {
    width: 100%;
    max-width: 1200px;
    padding: 32px 16px 64px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    /* Center the content container to align with the fixed header width */
    margin: 0 auto;
}


/* Removes default link styles (underline) from the hero wrapper link */
.page > a {
    text-decoration: none;
    color: inherit;
    display: block; /* Ensures the link behaves like a block element */
}

/* HERO-BEREICH OBEN */

.hero {
    position: relative;
    border-radius: var(--card-radius);
    overflow: hidden;
    min-height: 500px;
    background: #05060c;
    display: flex;
    align-items: flex-end;
}

.first-hero {
    margin-top: 7vh;
}

.hero-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background-image: url("../img/setup.PNG");
    background-size: cover;
    background-position: center;
    filter: saturate(1.1);
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Investments hero uses a different visual */
.hero.invest .hero-img {
    /* Use the dedicated investments background image */
    background-image: url("../img/stocksRender2.webp");
}

.hero:hover .hero-img {
    transform: scale(1.03);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
            to top,
            rgba(0, 0, 0, 0.9) 0%,
            rgba(0, 0, 0, 0.4) 35%,
            transparent 100%
    );
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    width: 100%;
    padding: 40px;
}

.hero-title {
    font-size: clamp(32px, 4vw, 46px);
    line-height: 1.1;
    font-weight: 700;
    letter-spacing: -0.04em;
    color: white;
    text-decoration: none;
}

/* Eyebrow, subcopy, and CTA for heroes */
.eyebrow {
    font-size: 12px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 10px;
}

.hero-sub {
    margin-top: 10px;
    font-size: clamp(14px, 1.6vw, 18px);
    color: rgba(255, 255, 255, 0.85);
    max-width: 60ch;
}

.hero-cta {
    display: inline-block;
    margin-top: 18px;
    padding: 10px 16px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 14px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #fff;
}

/* Investments hero — refined look */
.hero.invest {
    align-items: center;
    min-height: 420px;
}

.hero.invest .hero-content {
    align-self: flex-end;
}

.hero.invest .hero-overlay {
    background: radial-gradient(1200px 400px at 10% 100%, rgba(255, 221, 0, 0.1), rgba(0, 0, 0, 0) 60%),
    linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.45) 40%, rgba(0, 0, 0, 0) 100%);
}

/* Subtle animated grid for finance vibe */
.hero.invest::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
    background-size: 40px 40px, 40px 40px;
    background-position: -20px -20px, -20px -20px;
    mix-blend-mode: overlay;
    opacity: 0.25;
    pointer-events: none;
    transform: translateZ(0);
    animation: grid-pan 18s linear infinite;
}

@keyframes grid-pan {
    from {
        background-position: 0 0, 0 0;
    }
    to {
        background-position: 40px 40px, 40px 40px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero.invest::before {
        animation: none;
    }
}

/* KACHELN UNTEN */

.tile-row {
    display: grid;
    /* Start with a clean single-column stack by default */
    grid-template-columns: 1fr;
    /* Make rows consistent so spans look balanced */
    grid-auto-rows: 180px;
    grid-auto-flow: dense;
    gap: 24px;
}

/* Make entire tile anchor clickable without default underline */
.tile-row a {
    display: block;
    text-decoration: none;
    color: inherit;
}

.tile {
    position: relative;
    border-radius: var(--card-radius);
    overflow: hidden;
    min-height: 180px;
    display: flex;
    align-items: flex-end;
    padding: 24px;
    box-shadow: 0 20px 35px rgba(0, 0, 0, 0.7);
    transform-origin: center;
    transition: transform 0.25s ease, box-shadow 0.25s ease, translate 0.25s ease, filter 0.35s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.2s ease;
    cursor: pointer;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #0b0c10; /* Neutral base */
    border: 1px solid rgba(255, 255, 255, 0.08);
    /* Calm default color treatment */
    filter: grayscale(0.8) saturate(0.8) contrast(0.95) brightness(0.9);
}

/* Quiet bottom-left labels for each tile */
.tile.apps::before,
.tile.contact::before,
.tile.collab::before {
    position: absolute;
    left: 16px;
    bottom: 14px;
    z-index: 1;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: rgba(255, 255, 255, 0.85);
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 6px 10px;
    border-radius: 999px;
}


/* Soft vertical gradient overlay to calm imagery */
.tile::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
            to top,
            rgba(0, 0, 0, 0.70),
            rgba(0, 0, 0, 0.25),
            rgba(0, 0, 0, 0)
    );
    pointer-events: none;
}

.tile:hover {
    transform: translateY(-2px) scale(1.01);
    box-shadow: 0 28px 50px rgba(0, 0, 0, 0.9);
    /* Reveal a bit more color on hover, but keep it subtle */
    filter: grayscale(0.25) saturate(1) contrast(1) brightness(1);
    border-color: rgba(255, 255, 255, 0.14);
}

/* (glow removed to keep things minimal) */

.tile span {
    position: relative;
    font-size: clamp(28px, 2.6vw, 36px);
    font-weight: 700;
    letter-spacing: 0.04em;
    transform: none;
    z-index: 1;
}

/* Specific Tile Images */

.tile.apps {
    background-image: url("../img/appsC.webp");
}

.tile.contact {
    background-image: url("../img/contact.webp");
}

.tile.collab {
    background-image: url("../img/collab.webp");
}

@media (max-width: 800px) {
    .hero {
        min-height: 400px;
    }

    /* Stays single-column on small screens (default already 1fr) */
}

/* Asymmetric layout for tiles on larger screens */
@media (min-width: 900px) {
    .tile-row {
        /* Two columns with a larger feature column on the left */
        grid-template-columns: 2fr 1fr;
    }

    /* Make the first tile span two rows to create a magazine-like layout */
    .tile-row a:nth-child(1) {
        grid-row: span 2;
    }

    /* Ensure tiles fill their grid area neatly */
    .tile {
        height: 100%;
        min-height: unset; /* row height controls size now */
    }
}

/* Keyboard focus visibility */
.tile-row a:focus-visible .tile,
.page > a:focus-visible .hero {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 255, 153, 0.55), 0 20px 35px rgba(0, 0, 0, 0.7);
}

/* Footer words animation (moved from index.html) */
.words {
    opacity: 60%;
    font-size: 0.8rem;
}