/* ==========================================================================
   Risky Bit – Diplomarbeit website
   Theme: dark "terminal / HUD" look (matches the Risky Bit platform)
   Only colors, typography and layout styling – no content.
   ========================================================================== */

@import url("https://fonts.googleapis.com/css2?family=Bai+Jamjuree:wght@500;600;700&family=IBM+Plex+Sans:wght@400;500;600&family=JetBrains+Mono:wght@400;500;700&display=swap");

:root {
    color-scheme: dark;

    /* palette */
    --primary-color: #e03a4a;
    --primary-hover: #ef4f5e;
    --primary-soft: rgba(224, 58, 74, 0.10);
    --primary-line: rgba(224, 58, 74, 0.28);
    --primary-dim: rgba(224, 58, 74, 0.14);
    --bg-color: #060505;
    --bg-color-alt: #100c0c;
    --surface-raised: #161111;
    --text-color: #f3eee9;
    --text-body: #cfc6c2;
    --text-muted: #9d928f;
    --border-color: #2a2022;
    --grid-line: rgba(255, 255, 255, 0.035);
    --band-accent: var(--primary-color);
    --step-accent: var(--primary-color);

    /* type */
    --font-heading: "Bai Jamjuree", "Space Grotesk", "Segoe UI", system-ui, sans-serif;
    --font-body: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
    --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

    --max-width: 1160px;
    --header-height: 72px;
    --cut: 18px; /* clipped-corner size */
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-height) + 1.5rem);
    overflow-x: clip;
}

body {
    position: relative;
    min-height: 100vh;
    margin: 0;
    overflow-x: clip;
    background: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

/* ---------- Background decoration (grid, outlined squares, HUD frame) ---------- */

/* grid + nested outlined squares + dark-red glow */
body::before {
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    content: "";
    background:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 800 800' fill='none' stroke='%23e03a4a'%3E%3Cg transform='rotate(-16 400 400)'%3E%3Crect x='60' y='60' width='680' height='680' stroke-opacity='.22'/%3E%3Crect x='140' y='140' width='520' height='520' stroke-opacity='.26'/%3E%3Crect x='220' y='220' width='360' height='360' stroke-opacity='.30'/%3E%3Crect x='300' y='300' width='200' height='200' stroke-opacity='.34'/%3E%3C/g%3E%3C/svg%3E")
            right -140px top -60px / min(900px, 80vw) no-repeat,
        linear-gradient(var(--grid-line) 1px, transparent 1px) 0 0 / 40px 40px,
        linear-gradient(90deg, var(--grid-line) 1px, transparent 1px) 0 0 / 40px 40px,
        var(--bg-color);
}

/* HUD corner brackets at the viewport corners (bottom-left / bottom-right) */
body::after {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    content: "";
    --b: 2px solid rgba(224, 58, 74, 0.55);
    opacity: 0.45;
}

/* ---------- Links ---------- */

.github-icon {
    margin-right: 1em;
}

a {
    color: var(--primary-color);
    text-underline-offset: 0.2em;
}

a:hover {
    color: var(--primary-hover);
}

a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 4px;
}

::selection {
    background: var(--primary-color);
    color: #0a0505;
}

/* ---------- Header ---------- */

.site-header {
    position: relative;
}

.header-inner,
.hero-inner,
main {
    width: min(100% - 3rem, var(--max-width));
    margin-inline: auto;
}

.header-inner {
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
    min-height: var(--header-height);
    margin: 0;
    padding: 0.6rem max(1.5rem, calc((100% - var(--max-width)) / 2));
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 2rem;
    border-bottom: 1px solid var(--primary-line);
    background: rgba(8, 6, 6, 0.88);
    backdrop-filter: blur(8px);
}

.brand-link {
    display: inline-flex;
    align-items: center;
    gap: 0.9rem;
    flex-shrink: 0;
    color: var(--text-color);
    text-decoration: none;
}

.logo-icon {
    width: 38px;
    min-width: 0;
    height: auto;
}

.logo-header {
    display: block;
    width: 118px;
    height: auto;
}

.brand-copy {
    display: grid;
    gap: 0.15rem;
    line-height: 1.2;
}

.brand-caption {
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.66rem;
    letter-spacing: 0.08em;
}

.site-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    justify-content: flex-end;
    gap: 0.25rem;
}

.site-nav a {
    position: relative;
    display: inline-flex;
    align-items: center;
    padding: 0 1rem;
    border: 0;
    color: var(--text-muted);
    font-family: var(--font-heading);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-decoration: none;
    text-transform: uppercase;
    transition: color 160ms ease, background-color 160ms ease;
}

.site-nav a::after {
    position: absolute;
    right: 0.6rem;
    bottom: -0.62rem; /* sits on the header's bottom border */
    left: 0.6rem;
    height: 2px;
    background: var(--primary-color);
    content: "";
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 200ms ease;
}

.site-nav a:hover {
    background: var(--primary-soft);
    color: var(--text-color);
}

.site-nav a:hover::after,
.site-nav a.is-current::after {
    transform: scaleX(1);
}

.site-nav a.is-current {
    background: var(--primary-soft);
    color: var(--text-color);
}

/* ---------- Hero ---------- */

.hero-inner {
    position: relative;
    padding-block: clamp(3.5rem, 9vw, 7rem);
}

.logo-container {
    margin-bottom: clamp(1.8rem, 4vw, 3rem);
}

.logo {
    display: block;
    width: min(100%, 420px);
    min-width: 0;
    height: auto;
}

.eyebrow {
    margin: 0 0 0.8rem;
    color: var(--primary-color);
    font-family: var(--font-heading);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.24em;
    text-transform: uppercase;
}

.hero-inner h1 {
    position: relative;
    z-index: 1;
    max-width: 18ch;
    margin: 0;
    color: var(--text-color);
    font-family: var(--font-heading);
    font-size: clamp(2.6rem, 6.6vw, 5rem);
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.06;
}

.hero-inner h1 .accent {
    color: var(--primary-color);
}

.hero-inner .subtitle {
    position: relative;
    z-index: 1;
    max-width: 62ch;
    margin: 1.6rem 0 0;
    color: var(--text-body);
    font-size: clamp(1rem, 1.6vw, 1.125rem);
    line-height: 1.75;
}

.hero-inner-compact {
    padding-block: clamp(2.5rem, 6vw, 4.5rem);
}

.hero-inner-compact h1 {
    max-width: 24ch;
    font-size: clamp(2.2rem, 5vw, 3.6rem);
}

.hero-inner-compact .subtitle {
    margin-top: 0.5rem;
    color: var(--text-muted);
    font-family: var(--font-heading);
    font-size: 0.95rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.hero-actions,
.cta-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.25rem;
    margin-top: 2rem;
}

/* ---------- Layout / sections ---------- */

.img-preview {
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;
}

.img-team {
    width: 100%;
    opacity: 80%;
    height: auto;
}

main {
    padding-bottom: 1rem;
}

section {
    padding-block: clamp(2.5rem, 6vw, 4.5rem);
}

.content-section {
    padding-block: 0.9rem;
}

.landing-section {
    padding-block: clamp(2.5rem, 6vw, 4.5rem);
}

section h2 {
    margin: 0 0 1.2rem;
    color: var(--text-color);
    font-family: var(--font-heading);
    font-size: clamp(1.4rem, 2.6vw, 1.8rem);
    font-weight: 700;
    line-height: 1.25;
}

section h2::before {
    display: inline-block;
    width: 3px;
    height: 0.95em;
    margin-right: 0.7rem;
    background: var(--primary-color);
    content: "";
    vertical-align: -0.1em;
}

section h3 {
    color: var(--text-color);
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.35;
}

section > p,
.content-section p {
    max-width: 72ch;
    color: var(--text-body);
}

.content-section p {
    margin-bottom: 1.1rem;
}

.section-heading {
    max-width: 780px;
    margin-bottom: 2.2rem;
}

.section-heading h2,
.landing-cta h2 {
    margin: 0 0 1rem;
    font-size: clamp(1.8rem, 3.6vw, 2.8rem);
    letter-spacing: -0.01em;
}

.section-heading h2::before,
.landing-cta h2::before {
    display: none;
}

.section-heading > p:last-child,
.landing-cta > div:first-child > p:last-child {
    max-width: 66ch;
    margin: 0;
    color: var(--text-body);
    font-size: 1.02rem;
}

/* ---------- Buttons & links ---------- */

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0.7rem 1.4rem;
    border: 1px solid var(--border-color);
    border-radius: 0;
    background: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-heading);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-decoration: none;
    text-transform: uppercase;
    transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease;
}

.button:hover {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: #0a0505;
}

.button span {
    margin-left: 0.55rem;
}

.text-link {
    color: var(--text-color);
    font-family: var(--font-heading);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-decoration: none;
    text-transform: uppercase;
}

.text-link:hover {
    color: var(--primary-color);
}

.back-link {
    display: inline-flex;
    align-items: center;
    margin: 0;
    color: var(--primary-color);
    font-family: var(--font-heading);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-decoration: none;
    text-transform: uppercase;
}

.back-link:hover {
    color: var(--primary-hover);
}

/* ---------- Panels (bracketed cards) ---------- */

.value-card,
.result-card,
.team-member,
.landing-cta,
.product-band {
    position: relative;
    border: 1px solid var(--border-color);
    border-radius: 0;
    background: var(--bg-color-alt);
}

/* red HUD corner brackets: top-left + bottom-right */
.value-card::before,
.result-card::before,
.team-member::before,
.landing-cta::before,
.product-band::before,
.value-card::after,
.result-card::after,
.team-member::after,
.landing-cta::after,
.product-band::after {
    position: absolute;
    width: 14px;
    height: 14px;
    pointer-events: none;
    content: "";
    transition: width 200ms ease, height 200ms ease;
}

.value-card::before,
.result-card::before,
.team-member::before,
.landing-cta::before,
.product-band::before {
    top: -1px;
    left: -1px;
    border-top: 2px solid var(--primary-color);
    border-left: 2px solid var(--primary-color);
}

.value-card::after,
.result-card::after,
.team-member::after,
.landing-cta::after,
.product-band::after {
    right: -1px;
    bottom: -1px;
    border-right: 2px solid var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
}

.value-card:hover::before,
.result-card:hover::before,
.team-member:hover::before,
.value-card:hover::after,
.result-card:hover::after,
.team-member:hover::after {
    width: 26px;
    height: 26px;
}

.value-card:hover,
.result-card:hover,
.team-member:hover {
    border-color: var(--primary-line);
}

.value-grid,
.result-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.1rem;
}

.result-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.value-card,
.result-card {
    min-width: 0;
    padding: clamp(1.3rem, 3vw, 1.8rem);
    transition: border-color 160ms ease;
}

.band-label,
.result-kicker,
.value-index {
    display: inline-block;
    color: var(--primary-color);
    font-family: var(--font-heading);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.value-card h3,
.result-card h3 {
    margin: 0.9rem 0 0.55rem;
    font-size: 1.15rem;
}

.value-card p,
.result-card p {
    margin: 0;
    color: var(--text-body);
    font-size: 0.95rem;
}

/* ---------- Info band ("Kontrolliert und isoliert", "Projektkontakt") ---------- */

.product-band {
    z-index: 0;
    width: 100%;
    margin-block: 1rem;
    padding: 0;
    border-left: 3px solid var(--primary-color);
    background:
        var(--bg-color-alt);
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%);
}

.product-band::before,
.product-band::after {
    display: none;
}

.band-content {
    padding: clamp(1.4rem, 3.4vw, 2.2rem) clamp(1.3rem, 3.4vw, 2.2rem);
}

.band-content-split {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.band-content p {
    max-width: 74ch;
    margin: 0.5rem 0 0;
    color: var(--text-color);
    font-family: var(--font-heading);
    font-size: clamp(1.02rem, 2vw, 1.3rem);
    font-weight: 600;
    line-height: 1.5;
}

.band-content .band-note {
    display: block;
    margin-top: 0.4rem;
    color: var(--text-muted);
    font-size: 0.88rem;
}

.band-link {
    flex: 0 0 auto;
    color: var(--primary-color);
    font-family: var(--font-heading);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-decoration: none;
    text-transform: uppercase;
}

.band-link:hover {
    color: var(--primary-hover);
}

.band-content a:not(.band-link) {
    color: var(--primary-color);
}

.band-icon {
    display: grid;
    width: 58px;
    height: 58px;
    flex: 0 0 auto;
    place-items: center;
    border: 1px solid var(--primary-line);
    color: var(--primary-color);
    font-size: 1.1rem;
    font-weight: 800;
}

/* ---------- Journey list (Lernpfad) ---------- */

.journey-list {
    position: relative;
    display: grid;
    gap: 0.7rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.journey-step {
    position: relative;
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr) auto;
    align-items: center;
    gap: 1rem;
    padding: 1.1rem 1.3rem;
    border: 1px solid var(--border-color);
    border-left: 2px solid var(--primary-color);
    border-radius: 0;
    background: var(--bg-color-alt);
    transition: border-color 160ms ease, background-color 160ms ease;
}

.journey-step:hover {
    border-color: var(--primary-line);
    border-left-color: var(--primary-color);
    background: var(--surface-raised);
}

.journey-number {
    color: var(--step-accent);
    font-family: var(--font-mono);
    font-size: 1.15rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.journey-step h3 {
    margin: 0;
    font-size: 1.02rem;
}

.journey-step p {
    margin: 0.25rem 0 0;
    color: var(--text-muted);
    font-size: 0.92rem;
}

.journey-tag {
    padding: 0.35rem 0.7rem;
    border: 1px solid var(--primary-line);
    border-radius: 0;
    background: var(--primary-soft);
    color: var(--primary-color);
    font-family: var(--font-heading);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    white-space: nowrap;
}

/* ---------- Team ---------- */

.team-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.1rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.team-member {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    min-width: 0;
    padding: 1.5rem;
    transition: border-color 160ms ease;
}

.team-member .member-name {
    margin: 0;
    color: var(--text-color);
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
}

.team-member .member-role {
    margin: 0;
    color: var(--primary-color);
    font-family: var(--font-heading);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.team-member .member-area {
    margin: 0.5rem 0 0;
    color: var(--text-body);
    font-size: 0.92rem;
    line-height: 1.55;
}

.team-member .member-email {
    margin-top: 0.6rem;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    overflow-wrap: anywhere;
}

/* ---------- CTA panel ---------- */

.landing-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    margin-block: 2rem 4rem;
    padding: clamp(1.6rem, 5vw, 3.3rem);
    background:
        radial-gradient(ellipse at 85% 50%, rgba(224, 58, 74, 0.12), transparent 55%),
        var(--bg-color-alt);
}

.landing-cta > div:first-child {
    max-width: 660px;
}

.landing-cta .cta-actions {
    flex: 0 0 auto;
    align-items: flex-start;
    flex-direction: column;
    margin: 0;
}

/* ---------- Footer ---------- */

.site-footer {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem 1.5rem;
    margin-top: 2rem;
    padding: 1.1rem max(1.5rem, calc((100% - var(--max-width)) / 2));
    border-top: 1px solid var(--primary-line);
    background: rgba(8, 6, 6, 0.85);
    color: var(--text-muted);
    font-size: 0.82rem;
}

.site-footer p {
    margin: 0 auto 0 0;
}

.site-footer a {
    color: var(--text-muted);
    font-family: var(--font-heading);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-decoration: none;
    text-transform: uppercase;
}

.site-footer a:hover {
    color: var(--primary-color);
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
    .value-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .hero-inner,
    main {
        width: min(100% - 2rem, var(--max-width));
    }

    .header-inner {
        padding: 0.8rem 1rem 0;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.6rem;
    }

    .site-nav {
        width: 100%;
        justify-content: flex-start;
        gap: 0;
        margin-inline: -0.4rem;
    }

    .site-nav a {
        padding: 0.7rem 0.6rem;
        font-size: 0.7rem;
        letter-spacing: 0.12em;
    }

    .site-nav a::after {
        bottom: 0;
    }

    .result-grid,
    .team-grid {
        grid-template-columns: 1fr;
    }

    .journey-step {
        grid-template-columns: 42px minmax(0, 1fr);
    }

    .journey-tag {
        grid-column: 2;
        justify-self: start;
    }

    .band-content-split,
    .landing-cta {
        align-items: flex-start;
        flex-direction: column;
    }

    .site-footer {
        padding-inline: 1rem;
    }
}

@media (max-width: 420px) {
    .team-member {
        padding: 1.2rem;
    }

    .logo-header {
        width: 100px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
