/******************************************************************************
 *                        Style for DCAT-AP.de website
 *
 * This style sheet extend the default KERN design system
 * Import this stylesheet via
 *   <link rel="stylesheet" href="...">
 *
 ******************************************************************************/

/* =============================================================
   CSS Custom Properties
   ============================================================= */

:root {
    --page-max-w:     80rem;
    --page-px:        1rem;

    /* Code-shell chrome tokens (syntax highlighting itself comes from Prism theme) */
    --code-bg:        var(--kern-color-layout-background-hued);
    --code-text:      var(--kern-color-layout-text-default);
    --copy-btn-bg:    var(--kern-color-neutral-200);
    --copy-btn-hover: var(--kern-color-neutral-300);
    --copy-btn-text:  var(--kern-color-layout-text-default);

    /* Hero surface tokens: action-default is a bright accent color meant for small
        elements (buttons/text), not a large full-bleed fill - in dark mode it renders
        as a pale, glaring block. Use a muted, theme-appropriate surface instead. */
    --hero-surface:   var(--kern-color-action-default);
    --hero-text:      var(--kern-color-action-on-default);
    --hero-dot-color: var(--kern-color-action-on-default);
    --shadow-strong:  color-mix(in oklch, var(--kern-color-black) 25%, transparent);

    /* SVG styling */
    --svg-background:        var(--kern-color-darkblue-950);
    --svg-path-stroke:       var(--kern-color-darkblue-200);
    --svg-relation-fill:     var(--kern-color-neutral-750);
    --svg-relation-stroke:   var(--kern-color-darkblue-350);
    --svg-relation-text:     var(--kern-color-darkblue-050);
    --svg-node-outer-fill:   var(--kern-color-lightblue-650);
    --svg-node-outer-stroke: var(--kern-color-darkblue-350);
    --svg-node-inner-fill:   var(--kern-color-lightblue-350);
    --svg-node-text:         #fff;
}

html[data-kern-theme="dark"] {
    --hero-surface:   var(--kern-color-layout-background-hued);
    --hero-text:      var(--kern-color-layout-text-default);
    --hero-dot-color: var(--kern-color-decorative-brand-default);

    /* Shadows read much weaker against dark backgrounds - use a stronger, darker shadow
        so elevated cards/modals still feel lifted off the page. */
    --shadow-strong:  color-mix(in oklch, var(--kern-color-black) 60%, transparent);

    /* SVG styling */
    --svg-background:        var(--kern-color-darkblue-500);
    --svg-path-stroke:       var(--kern-color-darkblue-800);
    --svg-relation-fill:     var(--kern-color-darkblue-400);
    --svg-relation-stroke:   var(--kern-color-darkblue-700);
    --svg-relation-text:     var(--kern-color-darkblue-800);
    --svg-node-outer-fill:   var(--kern-color-lightblue-550);
    --svg-node-outer-stroke: var(--kern-color-darkblue-300);
    --svg-node-inner-fill:   var(--kern-color-lightblue-750);
    --svg-node-text:         #000;
}

@media (min-width: 640px) {
    :root {
        --page-px: 1.5rem;
    }
}

@media (min-width: 1024px) {
    :root {
        --page-px: 2rem;
    }
}

/* =============================================================
   Reset / Base
   ============================================================= */

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.hidden {
    display: none !important;
}

body {
    color: var(--kern-color-layout-text-default);
    background: var(--kern-color-layout-background-default);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

/* =============================================================
   Page container
   ============================================================= */

.page-container {
    max-width: var(--page-max-w);
    margin-inline: auto;
    padding-inline: var(--page-px);
}

/* =============================================================
   Site Header and Navigation
   ============================================================= */

.site-header {
    background: var(--kern-color-layout-background-default);
    border-bottom: 1px solid var(--kern-color-decorative-border-default);
    position: sticky;
    top: 0;
    z-index: 40;
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 5rem;
}

.site-header__logo {
    font-size: 1.5rem;
    font-weight: 500;
    letter-spacing: -0.025em;
    color: var(--kern-color-layout-text-default);
    cursor: pointer;
    flex-shrink: 0;
    background: none;
    border: none;
    padding: 0;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.site-header__logo svg {
    display: block;
    height: 2.25rem;
    width: 2.75rem;
    padding-right: .5rem;
}

html[data-kern-theme="dark"] .site-header__logo svg circle {
    fill: var(--kern-color-layout-text-default);
}

@media (min-width: 640px) {
    .site-header__logo {
        font-size: 1.875rem;
    }

    .site-header__logo svg {
        height: 2.75rem;
        width: 3.25rem;
    }
}
@media (min-width: 768px) {
    .site-header__mobile-btn {
        display: none;
    }
}

.site-nav {
    display: none;
    align-items: center;
}

@media (min-width: 768px) {
    .site-nav {
        display: flex;
    }
}

.site-nav__dropdown {
    position: relative;
}

.site-nav__dropdown-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 0.25rem);
    min-width: 14rem;
    background: var(--kern-color-layout-background-default);
    border-radius: 0.375rem;
    border: 1px solid var(--kern-color-decorative-border-default);
    box-shadow: 0 4px 6px -1px color-mix(in oklch, var(--kern-color-black) 10%, transparent), 0 2px 4px -2px color-mix(in oklch, var(--kern-color-black) 10%, transparent);
}

.site-mobile-menu {
    background: var(--kern-color-layout-background-default);
    border-top: 1px solid var(--kern-color-decorative-border-default);
}

/* =============================================================
   Hero Section
   ============================================================= */

.hero {
    position: relative;
    background-color: var(--svg-background);
    color: var(--kern-color-action-on-default);
    overflow: hidden;
    padding: 3rem 0 2.5rem;
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 8% 20%, var(--kern-color-action-on-default) 0 4px, transparent 5px),
        radial-gradient(circle at 30% 65%, var(--kern-color-action-on-default) 0 3px, transparent 4px),
        radial-gradient(circle at 72% 28%, var(--kern-color-action-on-default) 0 5px, transparent 6px),
        radial-gradient(circle at 88% 74%, var(--kern-color-action-on-default) 0 4px, transparent 5px);
    opacity: 0.15;
    pointer-events: none;
}

.hero__bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.hero--animated .hero__bg { animation: hero-drift 24s ease-in-out infinite alternate; }
.hero--animation-paused .hero__bg { animation-play-state: paused; }
.hero__bg svg { display: block; width: 100%; height: 100%; }
.hero__bg svg .node.relation rect { height: 1.7rem; rx: .9rem; y: -1.1rem; fill: var(--svg-relation-fill); stroke: var(--svg-relation-stroke); stroke-width: .125rem; }
.hero__bg svg .node.relation text { text-anchor: middle; fill: var(--svg-relation-text); font-weight: 500; font-size: .7rem; }
.hero__bg svg .node.group circle:nth-child(1){ r: 1.4rem; fill: var(--svg-node-outer-fill); stroke: var(--svg-node-outer-stroke); stroke-width: .15rem; }
.hero__bg svg .node.group.pulse circle:nth-child(1){ r: 2.3rem; fill: url(#grad-root); stroke-width: .2rem; }
.hero__bg svg .node.group circle:nth-child(2){ r: .5rem; fill: var(--svg-node-inner-fill); }
.hero__bg svg .node.group.pulse circle:nth-child(2){ r: 1rem; fill: #fff; }
.hero__bg svg .node.group text{ text-anchor: start; fill: var(--svg-node-text); font-size: .9rem; font-weight: 400; }
.hero__bg svg .node.group.pulse text{ font-size: 1.1rem; font-weight: 700; opacity: .6; }
.hero__bg svg .edges .path { stroke: var(--svg-path-stroke); stroke-width: 2.5; stroke-dasharray: 8 6; fill: none; }

.hero__animation-toggle {
    position: absolute;
    z-index: 11;
    inset-block-start: .25rem;
    inset-inline-end: .5rem;
    display: grid;
    place-items: center;
    inline-size: 2.5rem;
    block-size: 2.5rem;
    padding: 0;
    color: var(--kern-color-layout-text-muted);
    background: var(--kern-color-layout-background-default);
    border: 1px solid var(--kern-color-decorative-border-default);
    border-radius: .25rem;
    cursor: pointer;
}

.hero__animation-toggle:hover { color: var(--kern-color-action-default); }
.hero__animation-toggle:focus-visible { outline: 2px solid currentColor; outline-offset: -4px; }
.hero__animation-toggle[hidden],
.hero__animation-toggle[aria-pressed="false"] .hero__pause-icon,
.hero__animation-toggle[aria-pressed="true"] .hero__play-icon { display: none; }

.hero__inner {
    position: relative;
    z-index: 10;
}

.hero__card {
    max-width: 36rem;
    background: var(--kern-color-layout-background-default);
    color: var(--kern-color-layout-text-default);
    padding: 2rem;
    box-shadow: 0 25px 50px -12px var(--shadow-strong);
    border-top: 8px solid var(--kern-color-decorative-border-level-1);
}

@media (min-width: 640px) {
    .hero__card {
        padding: 3rem;
    }
}

.hero__eyebrow {
    font-size: 1.125rem;
    color: var(--kern-color-layout-text-muted);
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.hero__title {
    font-size: 2.25rem;
    font-weight: 900;
    color: var(--kern-color-action-on-default);
    margin: 0;
    letter-spacing: -0.025em;
    line-height: 1.2;
}

.hero__card .hero__title {
    color: var(--kern-color-action-default);
    margin-bottom: 1rem;
}

@media (min-width: 640px) {
    .hero__title {
        font-size: 3rem;
    }
}

.hero__subtitle {
    color: var(--kern-color-layout-text-muted);
    font-size: 1rem;
    margin-bottom: 2rem;
    line-height: 1.75;
}

@media (min-width: 640px) {
    .hero__subtitle {
        font-size: 1.125rem;
    }
}

@keyframes hero-drift {
    from { transform: translate(0, 0); }
    40% { transform: translate(-5%, -2%); }
    to { transform: translate(5%, 2%); }
}

/* =============================================================
   Main content
   ============================================================= */

.main-content {
    flex: 1;
    padding-block: 3rem;
}

.section {
    margin-bottom: 3rem;
}

/* =============================================================
   Footer
   ============================================================= */

.site-footer {
    background: var(--svg-background);
    color: var(--kern-color-action-on-default);
    padding-block: 3rem 2rem;
    position: relative;
    overflow: hidden;
}

.site-footer__bg {
    position: absolute;
    inset: 0;
    opacity: 0.15;
    pointer-events: none;
}

.site-footer__bg svg {
    width: 100%;
    height: 100%;
}

html[data-kern-theme="dark"] .site-footer__bg svg circle {
    fill: var(--svg-path-stroke);
}

html[data-kern-theme="dark"] .site-footer__bg svg line {
    stroke: var(--svg-path-stroke);
}

.site-footer__inner {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding-top: 2rem;
}

@media (min-width: 768px) {
    .site-footer__inner {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.site-footer__brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.site-footer__brand-name {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing:
    -0.025em;
}

.site-footer__brand-sep {
    font-size: 0.75rem;
    color: color-mix(in oklch, var(--kern-color-action-on-default) 70%, transparent);
}

.site-footer__links {
    display: flex;
    flex-wrap: wrap;
    column-gap: 2rem;
    row-gap: 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
}

.site-footer__link {
    color: color-mix(in oklch, var(--kern-color-action-on-default) 85%, transparent);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    transition: color 0.15s;
}

.site-footer__link:hover {
    color: var(--kern-color-action-on-default);
}

.site-footer__link svg {
    width: 0.875rem;
    height: 0.875rem;
    flex-shrink: 0;
}
