/* ==========================================================================
   KI Förder-Check · Stylesheet
   --------------------------------------------------------------------------
   Ersetzt das Tailwind-CDN und den früheren Inline-<style>-Block.
   Heller Auftritt, aber auf derselben Token-Grundlage wie die Hauptsite –
   Rot / Blau / Weiß bleiben durchgängig erhalten.

   Mobile-first: Basisregeln gelten fürs Handy, Erweiterungen über min-width.
   Präfix `fc-` für alle Komponenten dieses Auftritts.
   ========================================================================== */

@import url('tokens.css');

/* ==========================================================================
   1 · Grundlagen
   ========================================================================== */

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

html
{
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body
{
    font-family: var(--font-check);
    font-size: var(--step-0);
    line-height: var(--leading-normal);
    color: var(--gray-800);
    background-color: var(--gray-100);
    overflow-x: hidden;
    min-height: 100svh;
}

img
{
    max-width: 100%;
    height: auto;
    display: block;
}

a
{
    color: var(--blue-700);
}

:focus-visible
{
    outline: 2px solid var(--blue-600);
    outline-offset: var(--focus-offset);
    border-radius: var(--radius-sm);
}

::selection
{
    background: var(--blue-600);
    color: var(--white);
}

.austro
{
    color: var(--red-500);
}

.fc-visually-hidden
{
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

/* ==========================================================================
   2 · Layout
   ========================================================================== */

.fc-container
{
    width: 100%;
    max-width: 1200px;
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.fc-section
{
    padding-block: var(--space-3xl);
}

.fc-section__title
{
    font-size: var(--step-4);
    line-height: var(--leading-tight);
    font-weight: var(--weight-semibold);
    text-align: center;
    text-wrap: balance;
    margin-bottom: var(--space-sm);
}

.fc-section__lead
{
    font-size: var(--step-1);
    text-align: center;
    text-wrap: balance;
    max-width: 60ch;
    margin: 0 auto var(--space-xl);
}

.fc-grid
{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
    gap: var(--space-md);
}

/* ==========================================================================
   3 · Glas-Flächen
   ========================================================================== */

.fc-glass
{
    background: var(--glass-light-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-light-border);
    box-shadow: var(--shadow-md);
}

.fc-glass--dark
{
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: var(--shadow-md);
    color: var(--white);
}

/* ==========================================================================
   4 · Kopfzeile & Navigation
   ========================================================================== */

.fc-header
{
    position: sticky;
    inset-block-start: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.9);
}

.fc-header__inner
{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-sm);
    min-height: 60px;
    padding-block: var(--space-2xs);
}

.fc-brand
{
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-decoration: none;
    color: inherit;
    line-height: 1.2;
}

.fc-brand__title
{
    font-size: var(--step-1);
    font-weight: var(--weight-semibold);
    color: var(--ink);
    text-decoration: none;
}

.fc-brand__title .fc-brand__ki
{
    color: var(--blue-600);
}

.fc-brand__by
{
    font-size: var(--step--1);
    color: var(--gray-600);
    font-family: var(--font-display);
    white-space: nowrap;
}

/* Auf dem Handy ersetzt dieser Button die Navigation – kompakt halten,
   damit die Marke daneben nicht umbricht. */
.fc-nav__mobile-cta
{
    flex-shrink: 0;
    padding: var(--space-2xs) var(--space-sm);
    font-size: var(--step--1);
}

.fc-brand__by a
{
    color: inherit;
    text-decoration: none;
    border-radius: var(--radius-pill);
    transition: color var(--duration-fast) var(--ease-out);
}

.fc-brand__by a:hover
{
    color: var(--ink);
}

/* Navigation: auf dem Handy nur der Start-Button, ab Tablet die volle Leiste */
.fc-nav
{
    display: none;
    align-items: center;
    gap: var(--space-2xs);
}

@media (min-width: 48em)
{
    .fc-nav
    {
        display: flex;
    }

    /* Selektor bewusst über .fc-header qualifiziert: sonst gewinnt das
       später notierte .fc-btn { display: inline-flex } bei gleicher
       Spezifität und der Button bliebe am Desktop sichtbar. */
    .fc-header .fc-nav__mobile-cta
    {
        display: none;
    }

    .fc-brand__title
    {
        font-size: var(--step-2);
    }
}

.fc-nav__link
{
    display: inline-flex;
    align-items: center;
    min-height: var(--tap-min);
    padding: var(--space-2xs) var(--space-sm);
    border-radius: var(--radius-pill);
    color: var(--blue-700);
    font-weight: var(--weight-medium);
    text-decoration: none;
    transition: background var(--duration-fast) var(--ease-out),
                color var(--duration-fast) var(--ease-out);
}

.fc-nav__link:hover
{
    background: var(--blue-50);
    color: var(--blue-800);
}

/* ==========================================================================
   5 · Buttons
   ========================================================================== */

.fc-btn
{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2xs);
    min-height: var(--tap-min);
    padding: var(--space-xs) var(--space-lg);
    border: 1px solid transparent;
    border-radius: var(--radius-pill);
    font-family: inherit;
    font-size: var(--step-0);
    font-weight: var(--weight-semibold);
    line-height: var(--leading-snug);
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background var(--duration-fast) var(--ease-out),
                transform var(--duration-fast) var(--ease-out),
                box-shadow var(--duration-fast) var(--ease-out);
}

.fc-btn--primary
{
    background: var(--blue-600);
    color: var(--white);
}

.fc-btn--ghost
{
    background: transparent;
    border-color: var(--blue-600);
    color: var(--blue-700);
}

.fc-btn--light
{
    background: var(--white);
    color: var(--blue-700);
}

.fc-btn--sm
{
    min-height: 36px;
    padding: var(--space-3xs) var(--space-sm);
    font-size: var(--step--1);
}

@media (hover: hover)
{
    .fc-btn--primary:hover
    {
        background: var(--blue-800);
        transform: translateY(-2px);
        box-shadow: var(--shadow-glow-blue);
    }

    .fc-btn--ghost:hover
    {
        background: var(--blue-50);
    }

    .fc-btn--light:hover
    {
        background: var(--blue-50);
        transform: translateY(-2px);
    }
}

.fc-btn:active
{
    transform: translateY(0);
}

.fc-btn:disabled
{
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
}

/* ==========================================================================
   6 · Hero
   ========================================================================== */

.fc-hero
{
    position: relative;
    overflow: hidden;
    padding-block: var(--space-3xl);
    background: var(--ink);
    color: var(--white);
    text-align: center;
}

#sphere-canvas
{
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.fc-hero__inner
{
    position: relative;
    z-index: 1;
}

.fc-hero__title
{
    font-size: var(--step-5);
    line-height: var(--leading-tight);
    font-weight: var(--weight-semibold);
    text-wrap: balance;
    max-width: 20ch;
    margin: 0 auto var(--space-md);
}

.fc-hero__lead
{
    font-size: var(--step-1);
    color: var(--gray-300);
    text-wrap: balance;
    max-width: 55ch;
    margin: 0 auto var(--space-lg);
}

/* ==========================================================================
   7 · Checker
   ========================================================================== */

.fc-checker
{
    background: linear-gradient(144deg, var(--blue-900) 0%, #5b8de0 100%);
}

.fc-checker__inner
{
    max-width: 56rem;
    margin-inline: auto;
}

.fc-quiz
{
    border-radius: var(--radius-xl);
    background: var(--gray-800);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.fc-quiz__content
{
    position: relative;
    /* Feste 480 px erzwangen früher Überlauf auf kleinen Screens. */
    min-height: clamp(26rem, 22rem + 18vw, 30rem);
}

/* --- Fragenkarte --- */
.fc-question
{
    position: absolute;
    inset: 0;
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: opacity var(--duration-slow) var(--ease-in-out);
}

.fc-question.is-hidden
{
    opacity: 0;
    pointer-events: none;
}

.fc-question__bg
{
    position: absolute;
    inset: 0;
    z-index: 0;
    background-size: cover;
    background-position: center;
    transition: opacity 4.4s var(--ease-in-out);
    animation: fc-slow-zoom 10s ease infinite alternate;
}

@keyframes fc-slow-zoom
{
    from { transform: scale(1); }
    to   { transform: scale(1.1); }
}

.fc-question__overlay
{
    position: absolute;
    inset: 0;
    z-index: 1;
    background-color: rgba(17, 24, 39, 0.68);
}

.fc-question__content
{
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: var(--space-md);
    color: var(--white);
}

@media (min-width: 48em)
{
    .fc-question__content
    {
        padding: var(--space-xl);
    }
}

.fc-question__title
{
    font-size: var(--step-2);
    line-height: var(--leading-snug);
    font-weight: var(--weight-semibold);
    text-align: center;
    text-wrap: balance;
    margin-bottom: var(--space-md);
}

.fc-question__body
{
    display: flex;
    align-items: center;
    flex-grow: 1;
    margin-block: var(--space-2xs);
}

.fc-question__foot
{
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-top: auto;
    padding-top: var(--space-2xs);
}

/* --- Fortschritt --- */
.fc-progress
{
    height: 8px;
    margin-bottom: var(--space-sm);
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, 0.28);
    overflow: hidden;
}

.fc-progress__fill
{
    height: 100%;
    border-radius: var(--radius-pill);
    background: var(--blue-400);
    transition: width 420ms var(--ease-out);
}

/* --- Antwortoptionen --- */
.fc-options
{
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-2xs);
    width: 100%;
}

@media (min-width: 48em)
{
    .fc-options
    {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-sm);
    }
}

.fc-option
{
    display: flex;
    align-items: center;
    width: 100%;
    min-height: var(--tap-min);
    padding: var(--space-xs) var(--space-sm);
    /* Kein rounded-full: lange Labels wie „EPU (Ein-Personen-Unternehmen)“
       brechen in einer Pillenform unsauber um. */
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(7px);
    -webkit-backdrop-filter: blur(7px);
    color: var(--white);
    font-family: inherit;
    font-size: var(--step-0);
    text-align: start;
    cursor: pointer;
    transition: background var(--duration-base) var(--ease-out),
                border-color var(--duration-base) var(--ease-out),
                transform var(--duration-fast) var(--ease-out);
}

@media (hover: hover)
{
    .fc-option:hover
    {
        background: rgba(255, 255, 255, 0.32);
        border-color: rgba(255, 255, 255, 0.8);
    }
}

.fc-option:active,
.fc-option.is-selected
{
    background: var(--blue-600);
    border-color: var(--blue-700);
    box-shadow: 0 0 14px rgba(59, 130, 246, 0.35);
}

.fc-option--back
{
    width: auto;
    min-height: 36px;
    padding: var(--space-3xs) var(--space-sm);
    border-color: transparent;
    background: rgba(255, 255, 255, 0.14);
    font-size: var(--step--1);
    opacity: 0.85;
}

/* --- E-Mail-Eingang --- */
.fc-email
{
    width: 100%;
    max-width: 28rem;
    margin-inline: auto;
}

.fc-email__input
{
    width: 100%;
    min-height: var(--tap-min);
    padding: var(--space-xs) var(--space-md);
    margin-bottom: var(--space-xs);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, 0.5);
    color: var(--ink);
    font-family: inherit;
    /* 16 px verhindert den Auto-Zoom beim Fokus auf iOS. */
    font-size: max(16px, var(--step-0));
    text-align: center;
}

.fc-email__input::placeholder
{
    color: var(--gray-600);
    opacity: 1;
}

.fc-email__input.is-invalid
{
    border-color: var(--danger-500);
    background: var(--danger-100);
}

.fc-email__error
{
    margin-bottom: var(--space-xs);
    color: #ffd4d4;
    font-size: var(--step--1);
    text-align: center;
}

.fc-email__note
{
    margin-top: auto;
    padding-top: var(--space-2xs);
    color: rgba(255, 255, 255, 0.65);
    font-size: var(--step--1);
    text-align: center;
}

.fc-email__note a
{
    color: var(--white);
    text-decoration: underline;
}

.fc-email__submit
{
    width: 100%;
}

/* ==========================================================================
   8 · Ergebnis
   ========================================================================== */

.fc-results
{
    padding: var(--space-md);
    border-radius: var(--radius-xl);
    text-align: center;
    /* Deutlich deckender als die übrigen Glasflächen: der Ergebnisblock liegt
       auf dem blauen Verlauf und muss ohne Grauschleier lesbar bleiben. */
    background: rgba(255, 255, 255, 0.94);
}

@media (min-width: 48em)
{
    .fc-results
    {
        padding: var(--space-xl);
    }
}

.fc-results__title
{
    font-size: var(--step-4);
    font-weight: var(--weight-semibold);
    margin-bottom: var(--space-sm);
}

.fc-results__lead
{
    max-width: 60ch;
    margin: 0 auto var(--space-lg);
}

.fc-results__list
{
    display: grid;
    gap: var(--space-md);
    text-align: start;
    margin-bottom: var(--space-lg);
}

.fc-result
{
    padding: var(--space-md);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.72);
}

.fc-result--inactive
{
    opacity: 0.82;
    background: rgba(255, 255, 255, 0.5);
}

.fc-result__head
{
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-2xs);
    margin-bottom: var(--space-2xs);
}

.fc-result__name
{
    flex: 1 1 14rem;
    font-size: var(--step-2);
    font-weight: var(--weight-semibold);
    color: var(--blue-800);
}

.fc-result__traeger
{
    font-size: var(--step--1);
    font-weight: var(--weight-medium);
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.fc-result__description
{
    margin-bottom: var(--space-sm);
}

/* Eckdaten als Definitionsliste – auf dem Handy gestapelt */
.fc-result__facts
{
    display: grid;
    gap: var(--space-2xs);
    margin-bottom: var(--space-sm);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.7);
    font-size: var(--step--1);
}

@media (min-width: 34em)
{
    .fc-result__facts
    {
        grid-template-columns: auto 1fr;
        column-gap: var(--space-sm);
    }
}

.fc-result__facts dt
{
    font-weight: var(--weight-semibold);
    color: var(--gray-600);
}

.fc-result__facts dd
{
    margin: 0;
}

.fc-result__notice
{
    padding: var(--space-xs) var(--space-sm);
    margin-bottom: var(--space-sm);
    border-inline-start: 3px solid var(--amber-500);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    background: var(--amber-100);
    color: #6b4708;
    font-size: var(--step--1);
}

.fc-result__actions
{
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-xs);
}

.fc-results__foot
{
    padding-top: var(--space-md);
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.fc-results__stand
{
    margin-bottom: var(--space-md);
    color: var(--gray-600);
    font-size: var(--step--1);
}

.fc-results__empty
{
    padding: var(--space-md);
    border: 1px solid rgba(37, 99, 235, 0.25);
    border-radius: var(--radius-lg);
    background: var(--blue-50);
    text-align: start;
}

/* --- Status-Badges --- */
.fc-badge
{
    display: inline-flex;
    align-items: center;
    gap: var(--space-3xs);
    padding: 2px var(--space-2xs);
    border-radius: var(--radius-pill);
    font-size: var(--step--1);
    font-weight: var(--weight-semibold);
    white-space: nowrap;
}

.fc-badge::before
{
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
}

.fc-badge--offen       { background: var(--green-100);  color: #05603a; }
.fc-badge--pruefen     { background: var(--amber-100);  color: #7a4b06; }
.fc-badge--erschoepft  { background: var(--danger-100); color: #97261e; }
.fc-badge--geschlossen { background: #e5e7eb;           color: #44505f; }
.fc-badge--info        { background: var(--blue-100);   color: #1e40af; }

/* ==========================================================================
   9 · Kontakt
   ========================================================================== */

.fc-contact
{
    background: linear-gradient(168deg, rgba(243, 244, 246, 0.94) 0%, rgba(243, 244, 246, 0.6) 100%),
                url('https://picsum.photos/id/0/1920/1080');
    background-size: cover;
    background-position: center;
    text-align: center;
}

.fc-contact__sub
{
    font-size: var(--step-3);
    font-weight: var(--weight-semibold);
    color: var(--blue-800);
    margin-bottom: var(--space-lg);
}

.fc-contact__card
{
    max-width: 26rem;
    margin-inline: auto;
    padding: var(--space-lg);
    border-radius: var(--radius-xl);
}

.fc-contact__brand
{
    font-family: var(--font-display);
    font-size: var(--step-3);
    font-weight: var(--weight-semibold);
    margin-bottom: var(--space-2xs);
}

/* Buttons ausnehmen: sonst gewinnt dieser Selektor (0,2,0) gegen
   .fc-btn--primary (0,1,0) und färbt die Button-Schrift blau statt weiß. */
.fc-contact__card a:not(.fc-btn)
{
    color: var(--blue-700);
}

/* E-Mail-Adresse im „Jetzt durchstarten“-Block hervorheben – im alten Stand
   war sie grau und auf hellem Grund kaum lesbar. */
.fc-contact__mail
{
    display: inline-block;
    margin-block: var(--space-2xs);
    color: var(--blue-700);
    font-size: var(--step-1);
    font-weight: var(--weight-semibold);
    text-decoration: none;
    word-break: break-word;
}

.fc-contact__mail:hover,
.fc-contact__mail:focus-visible
{
    color: var(--blue-800);
    text-decoration: underline;
}

.fc-contact__card .fc-btn
{
    margin-top: var(--space-md);
}

/* ==========================================================================
   10 · Programm-Übersicht
   ========================================================================== */

.fc-programs
{
    background: linear-gradient(192deg, rgba(11, 13, 12, 0.8) 0%, rgba(11, 13, 12, 0.5) 100%),
                url('https://picsum.photos/id/398/1920/1080');
    background-size: cover;
    background-position: center;
    color: var(--white);
}

.fc-programs .fc-section__title,
.fc-programs .fc-section__lead
{
    color: var(--white);
}

.fc-program
{
    display: flex;
    flex-direction: column;
    gap: var(--space-2xs);
    padding: var(--space-md);
    border-radius: var(--radius-xl);
}

.fc-program__label
{
    align-self: flex-start;
    padding: var(--space-3xs) var(--space-sm);
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, 0.16);
    font-size: var(--step--1);
    font-weight: var(--weight-semibold);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.fc-program__title
{
    font-size: var(--step-2);
    font-weight: var(--weight-semibold);
}

/* Ohne dies zieht das Badge im Spalten-Flex auf volle Kartenbreite. */
.fc-program .fc-badge
{
    align-self: flex-start;
}

.fc-program__text
{
    flex-grow: 1;
    color: rgba(255, 255, 255, 0.88);
}

/* Statushinweis direkt in der Karte statt hinter einem Modal */
.fc-program__notice
{
    padding: var(--space-2xs) var(--space-xs);
    border-inline-start: 3px solid var(--amber-500);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    background: rgba(245, 158, 11, 0.16);
    color: #ffe4b0;
    font-size: var(--step--1);
}

.fc-program__actions
{
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-xs);
    margin-top: var(--space-2xs);
}

.fc-program__link
{
    color: var(--white);
    font-weight: var(--weight-medium);
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ==========================================================================
   11 · Fußzeile
   ========================================================================== */

.fc-footer
{
    padding-block: var(--space-xl);
    background: var(--ink);
    color: var(--white);
    text-align: center;
}

.fc-footer__meta
{
    color: var(--gray-400);
    font-size: var(--step--1);
}

.fc-footer__service
{
    margin-block: var(--space-md);
}

.fc-footer__brand
{
    display: inline-block;
    font-family: var(--font-display);
    font-size: var(--step-3);
    font-weight: var(--weight-semibold);
    color: var(--white);
    text-decoration: none;
    margin-block: var(--space-3xs);
}

.fc-footer__brand:hover
{
    text-decoration: underline;
}

.fc-footer__mail
{
    color: var(--gray-300);
    font-size: var(--step--1);
}

.fc-footer__legal
{
    display: flex;
    justify-content: center;
    gap: var(--space-md);
    margin-top: var(--space-md);
    font-size: var(--step--1);
}

.fc-footer__legal a
{
    color: var(--gray-400);
    text-decoration: none;
}

.fc-footer__legal a:hover
{
    color: var(--white);
    text-decoration: underline;
}
