:root {
    --bg: #041D1D;               /* tiefes Smaragdgrün */
    --bg-2: #0B2F2F;             /* leicht aufgehellt für Sektionen */
    --text: #F5F7FB;             /* Standard-Textfarbe */
    --muted: #C9D2E8;            /* abgeschwächte Text-/UI-Elemente */
    --gold: #C9A14A;             /* Verbund-Akzentfarbe (z.B. für Badges, Icons) */
    --emerald: #19A57A;          /* Tesserakt-Hauptakzent */
    --emerald-2: #129169;        /* dunklere Version für Hover, Borders etc. */
    --card: #0E3535;             /* Kartenelemente, Boxen */
    --radius: 20px;              /* globale Rundung */
    --shadow: 0 10px 30px rgba(0, 0, 0, .25); /* globaler Schatten */
    --focus: #2BC89D;            /* Fokusmarkierung (z.B. für Inputs) */
    --maxw: 1200px;              /* Maximalbreite des Contents */
    --header: rgba(8, 40, 40, 0.85);;
}

* {
    box-sizing: border-box
}

html {
    scroll-behavior: smooth
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Helvetica, Arial;
    color: var(--text);
    background: linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

a {
    color: inherit
}

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

.container {
    max-width: var(--maxw);
    margin-inline: auto;
    padding: 0 20px;
}

.skip {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden
}

.skip:focus {
    left: 16px;
    top: 16px;
    width: auto;
    height: auto;
    background: #000;
    color: #fff;
    padding: .6rem 1rem;
    border-radius: 12px;
    outline: 3px solid var(--focus);
    z-index: 9999
}

header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--header);
    backdrop-filter: saturate(150%) blur(6px);
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.brand {
    display: flex;
    gap: 10px;
    align-items: center;
    text-decoration: none
}

.brand svg {
    width: 34px;
    height: 34px
}

.brand strong {
    letter-spacing: .5px
}

.lang {
    border: 1px solid rgba(255, 255, 255, .25);
    padding: .35rem .6rem;
    border-radius: 10px
}

/* -- Menu layout - Start -- */

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 22px;
    padding: 0;
    margin: 0;
    align-items: center
}

nav a {
    opacity: .9;
    text-decoration: none;
    font-weight: 500
}

nav a:hover, nav a:focus {
    opacity: 1;
    text-decoration: underline;
    text-underline-offset: 3px
}

/* Submenu überschreibt das globale nav ul Verhalten */
nav ul.submenu {
    display: none;
    position: absolute;
    top: 100%; /* direkt unter dem Parent */
    left: 0; /* am linken Rand des Parent-Links */
    flex-direction: column;
    background: var(--card); /* dunkler Hintergrund für Kontrast */
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    min-width: 200px;
    padding: 6px 0;
    margin: 0;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
    z-index: 9999;
}

/* Mobile nav */
.menu-btn {
    display: none;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, .25);
    color: var(--text);
    padding: .5rem .7rem;
    border-radius: 10px
}

.main-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}

.main-menu > li {
    position: relative;
}

.main-menu > li > a {
    display: block;
    padding: 1rem 1.5rem;
    text-decoration: none;
    color: #222;
    font-weight: 500;
}

.main-menu > li > a:hover {
    color: #00796b; /* sanftes Highlight */
}

/* Submenu */
.submenu {
    list-style: none;
    margin: 0;
    padding: 0;
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    display: none;
    min-width: 200px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

nav ul.submenu li a {
    display: block;
    padding: 0.65rem 1rem;
    text-decoration: none;
    white-space: nowrap;
    color: #fff;
}

nav ul.submenu li a:hover,
nav ul.submenu li a:focus {
    background: rgba(255, 255, 255, 0.08);
    color: var(--emerald); /* Highlight beim Hover */
}

/* Hover-Logik */
.has-submenu {
    position: relative; /* wichtig: Submenu orientiert sich am Eltern-LI */
}

.has-submenu:hover .submenu {
    display: block;
}

@media (max-width: 860px){
    #primary-nav .submenu {
        display: none; /* hidden by default */
        margin-top: -20px;
        padding-left: 20px;
    }
}

#primary-nav .submenu.open {
    display: block; /* visible when toggled */
}

/* -- Menu layout - End -- */

/* Hero */
.hero {
    padding: 72px 0 32px;
    border-bottom: 1px solid rgba(255, 255, 255, .08)
}

.hero h1 {
    font-size: clamp(2rem, 3.6vw, 3.2rem);
    line-height: 1.15;
    margin: 0 0 12px
}

.hero p {
    color: var(--muted);
    margin: 0 0 20px
}

.btn {
    display: inline-block;
    background: var(--emerald);
    color: #071a3b;
    font-weight: 700;
    padding: .8rem 1.2rem;
    border-radius: 12px;
    text-decoration: none;
    border: 2px solid transparent;
    box-shadow: 0 6px 18px rgba(25, 165, 122, .35)
}

.btn:hover {
    background: var(--emerald-2);
    color: var(--text)
}

.btn-ghost {
    display: inline-block;
    border: 1px solid rgba(255, 255, 255, .25);
    padding: .8rem 1.1rem;
    border-radius: 12px;
    text-decoration: none;
    margin-left: 8px
}

/* Pillars */
.pillars {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    padding: 28px 0 8px
}

.card {
    background: var(--card);
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: var(--radius);
    padding: 22px;
    box-shadow: var(--shadow)
}

.icon {
    width: 28px;
    height: 28px;
    color: var(--emerald);
    margin-bottom: 10px
}

.card h3 {
    margin: 0 0 8px;
    font-size: 1.2rem
}

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

/* New & Essential + Invite */
.grid-2 {
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: 22px;
    padding: 18px 0 36px
}

@media (max-width: 980px) {
    .grid-2 {
        grid-template-columns:1fr
    }
}

.list {
    list-style: none;
    padding: 0;
    margin: 0
}

.list li {
    padding: 14px 0;
    border-bottom: 1px dashed rgba(255, 255, 255, .12)
}

.list time {
    display: block;
    color: var(--muted);
    font-size: .95rem
}

/* Stepper */
.stepper {
    padding: 12px 0 36px
}

.steps {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px
}

.step {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 14px;
    padding: 16px
}

.step strong {
    display: block;
    color: var(--emerald)
}

.step p {
    margin: .35rem 0 0;
    color: var(--muted);
    font-size: .95rem
}

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

@media (max-width: 560px) {
    .steps {
        grid-template-columns:1fr
    }
}

/* Portal */
.portal {
    padding: 26px 0 38px;
    border-top: 1px solid rgba(255, 255, 255, .08)
}

.emblem {
    width: 78px;
    height: 78px;
    margin: 0 auto 16px;
    display: block;
    filter: drop-shadow(0 6px 18px rgba(201, 161, 74, .35))
}

.portal-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px
}

.portal-card {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, .18);
    padding: 18px;
    border-radius: 16px;
    text-decoration: none
}

.portal-card:hover {
    background: rgba(255, 255, 255, .04)
}

.portal-card strong {
    display: block;
    font-size: 1.1rem;
    margin-bottom: 6px
}

.portal-card span {
    color: var(--muted);
    font-size: .95rem
}

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

footer {
    border-top: 1px solid rgba(255, 255, 255, .08);
    padding: 20px 0 34px;
    color: var(--muted);
    font-size: .95rem
}

footer nav {
    display: flex;
    flex-wrap: wrap;
    gap: 16px
}

footer a {
    text-decoration: none
}

footer a:hover {
    text-decoration: underline
}

:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 2px
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important
    }
}

@media (max-width: 860px){
    nav ul {
        display: none
    }

    .menu-btn {
        display: inline-flex
    }

    nav[aria-expanded="true"] ul {
        display: flex;
        position: absolute;
        left: 0;
        right: 0;
        top: 64px;
        background: var(--bg);
        padding: 16px;
        flex-direction: column;
        gap: 14px;
        border-bottom: 1px solid rgba(255, 255, 255, .08)
    }
}
