/* style.css — KI-Workshop Anmeldeseite (Bezirksschule Turgi · Schule Baden) */

:root {
    --bg: #f5f7fa;
    --bg-alt: #eceff3;
    --surface: #ffffff;
    --surface-2: #f3f5f8;
    --border: rgba(11, 15, 20, 0.1);
    --border-strong: rgba(11, 15, 20, 0.22);
    --text: #0b0f14;
    --muted: #5b6672;
    --accent: #3f6fe0;
    --accent-2: #6a4fe0;
    --accent-soft: rgba(63, 111, 224, 0.1);
    /* Eigene, kräftigere Verlaufsfarben für Buttons mit weisser Schrift —
       --accent/--accent-2 sind bewusst heller (für Text/Icons auf dunklem
       Hintergrund) und liefern als Button-Füllung zu wenig Kontrast zu Weiss. */
    --btn-grad-1: #2f5fe0;
    --btn-grad-2: #7c3aed;
    --success: #1f9d58;
    --error: #d9463f;
    --grid-line: rgba(11, 15, 20, 0.05);
    --header-bg: rgba(245, 247, 250, 0.85);
    --overlay-bg: rgba(11, 15, 20, 0.55);
    --font: "Inter", "Helvetica Neue", Helvetica, Arial, -apple-system, "Segoe UI", sans-serif;
    --font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
}

/* --- Dunkles Farbschema ---
   Aktivierung: <html data-theme="dark"> setzen (per Toggle-Button oben rechts). */
:root[data-theme="dark"] {
    --bg: #0b0f14;
    --bg-alt: #0f1520;
    --surface: #131a24;
    --surface-2: #171f2b;
    --border: rgba(255, 255, 255, 0.09);
    --border-strong: rgba(255, 255, 255, 0.18);
    --text: #eef2f6;
    --muted: #8b97a5;
    --accent: #5b8cff;
    --accent-2: #7c5cff;
    --accent-soft: rgba(91, 140, 255, 0.12);
    --success: #3ddc84;
    --error: #ff6b6b;
    --grid-line: rgba(255, 255, 255, 0.035);
    --header-bg: rgba(11, 15, 20, 0.85);
    --overlay-bg: rgba(4, 7, 11, 0.75);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    background-color: var(--bg);
    background-image:
        linear-gradient(var(--grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
    background-size: 44px 44px;
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.2s ease, color 0.2s ease;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-2); }

.container {
    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--accent);
}

.eyebrow::before {
    content: "";
    width: 8px;
    height: 8px;
    background: var(--accent);
    display: inline-block;
}

/* --- Header --- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    background: var(--header-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1.4rem;
}

.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    background: transparent;
    border: 1px solid var(--border-strong);
    color: var(--text);
    cursor: pointer;
    transition: border-color 0.2s ease, color 0.2s ease;
}

.theme-toggle:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.theme-icon-sun { display: none; }
:root[data-theme="dark"] .theme-icon-moon { display: none; }
:root[data-theme="dark"] .theme-icon-sun { display: block; }

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.logo {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.logo .logo-main {
    font-size: 1.05rem;
    color: var(--text);
}

.logo .logo-sub {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: var(--muted);
    font-weight: 500;
    letter-spacing: 0.08em;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.main-nav a {
    font-size: 0.9rem;
    color: var(--muted);
    font-weight: 600;
}

.main-nav a:hover { color: var(--text); }

/* Höhere Spezifität nötig, sonst gewinnt ".main-nav a" gegen ".btn-primary"
   und der Header-CTA bekommt fälschlich die gedämpfte Nav-Textfarbe statt Weiss. */
.main-nav a.btn-primary,
.main-nav a.btn-primary:hover {
    color: #fff;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    border: 1px solid var(--border-strong);
    background: transparent;
    color: var(--text);
    font-family: var(--font);
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.02em;
    padding: 0.85rem 1.6rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 0;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 12px 100%, 0 calc(100% - 12px));
}

.btn:hover { border-color: var(--accent); color: var(--accent); }

.btn-primary {
    background: linear-gradient(135deg, var(--btn-grad-1), var(--btn-grad-2));
    border-color: transparent;
    color: #fff;
}

.btn-primary:hover {
    filter: brightness(1.1);
    color: #fff;
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    filter: none;
}

/* --- Hero --- */
.hero {
    position: relative;
    padding: 5.5rem 0 4.5rem;
    border-bottom: 1px solid var(--border);
    overflow: hidden;
}

.hero::after {
    content: "";
    position: absolute;
    top: -30%;
    right: -10%;
    width: 560px;
    height: 560px;
    background: radial-gradient(circle, rgba(91, 140, 255, 0.18), transparent 70%);
    pointer-events: none;
}

.hero-inner {
    position: relative;
    max-width: 760px;
}

.hero h1 {
    font-size: clamp(2.1rem, 5vw, 3.4rem);
    font-weight: 800;
    line-height: 1.12;
    margin: 1rem 0 1.4rem;
    letter-spacing: -0.01em;
}

.hero h1 .accent {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero p.lead {
    font-size: 1.08rem;
    color: var(--muted);
    max-width: 620px;
    margin-bottom: 2.2rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2.8rem;
}

.fact-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
}

.fact {
    background: var(--surface);
    padding: 1.1rem 1.3rem;
}

.fact .fact-label {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent);
    display: block;
    margin-bottom: 0.35rem;
}

.fact .fact-value {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
}

/* --- Section shell --- */
section {
    padding: 5rem 0;
    border-bottom: 1px solid var(--border);
}

.section-head {
    max-width: 620px;
    margin-bottom: 3rem;
}

.section-head h2 {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 800;
    margin: 0.8rem 0 1rem;
    letter-spacing: -0.01em;
}

.section-head p {
    color: var(--muted);
    font-size: 1rem;
}

/* --- Info cards --- */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
}

.card {
    background: var(--surface);
    padding: 2rem;
    position: relative;
}

.card .card-index {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent);
    letter-spacing: 0.1em;
}

.card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 1rem 0 0.7rem;
}

.card p {
    color: var(--muted);
    font-size: 0.92rem;
}

/* --- Ablauf --- */
.steps {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border);
}

.step {
    display: grid;
    grid-template-columns: 90px 1fr;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
}

.step:last-child { border-bottom: none; }

.step-num {
    font-family: var(--font-mono);
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--accent);
    padding: 1.6rem;
    border-right: 1px solid var(--border);
    display: flex;
    align-items: center;
}

.step-body {
    padding: 1.6rem 1.8rem;
}

.step-body h4 {
    font-size: 1.02rem;
    margin-bottom: 0.3rem;
}

.step-body p {
    color: var(--muted);
    font-size: 0.92rem;
}

/* --- Form --- */
.form-wrap {
    background: var(--surface);
    border: 1px solid var(--border);
    max-width: 640px;
    padding: 2.6rem;
}

.form-row {
    margin-bottom: 1.4rem;
}

.form-row label {
    display: block;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.form-row label .optional {
    color: var(--muted);
    font-weight: 500;
    text-transform: none;
    letter-spacing: normal;
}

.form-row input,
.form-row select,
.form-row textarea {
    width: 100%;
    background: var(--bg-alt);
    border: 1px solid var(--border-strong);
    color: var(--text);
    font-family: var(--font);
    font-size: 0.95rem;
    padding: 0.85rem 1rem;
    border-radius: 0;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-row select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%238b97a5' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.6rem;
}

.form-row textarea {
    resize: vertical;
    min-height: 110px;
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.form-row.honeypot {
    position: absolute;
    left: -9999px;
    top: -9999px;
}

.form-submit {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 0.5rem;
}

.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    display: none;
}

.btn-primary.loading .spinner { display: inline-block; }
.btn-primary.loading .btn-label::after { content: "Wird gesendet …"; }
.btn-primary.loading .btn-label { font-size: 0; }
.btn-primary.loading .btn-label::after { font-size: 0.9rem; }

@keyframes spin {
    to { transform: rotate(360deg); }
}

.form-status {
    margin-top: 1.3rem;
    padding: 0.9rem 1.1rem;
    font-size: 0.9rem;
    border: 1px solid transparent;
    display: none;
}

.form-status.show { display: block; }

.form-status.success {
    background: rgba(61, 220, 132, 0.1);
    border-color: rgba(61, 220, 132, 0.4);
    color: var(--success);
}

.form-status.error {
    background: rgba(255, 107, 107, 0.1);
    border-color: rgba(255, 107, 107, 0.4);
    color: var(--error);
}

/* --- Footer --- */
footer {
    padding: 3rem 0 2rem;
    border-bottom: none;
}

.footer-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 1.5rem;
}

.footer-links {
    display: flex;
    gap: 1.6rem;
    flex-wrap: wrap;
}

.footer-links a,
.footer-links button {
    background: none;
    border: none;
    color: var(--muted);
    font-family: var(--font);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
}

.footer-links a:hover,
.footer-links button:hover { color: var(--text); }

.built-with {
    text-align: center;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--muted);
    letter-spacing: 0.03em;
}

.built-with a {
    color: var(--muted);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.built-with a:hover { color: var(--accent); }

/* --- Modal (Impressum) --- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: var(--overlay-bg);
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding: 4vh 1.2rem;
    z-index: 100;
    overflow-y: auto;
}

.modal-overlay.open { display: flex; }

.modal {
    background: var(--surface);
    border: 1px solid var(--border-strong);
    max-width: 680px;
    width: 100%;
    padding: 2.4rem;
    position: relative;
    margin-bottom: 4vh;
}

.modal-close {
    position: absolute;
    top: 1.2rem;
    right: 1.2rem;
    background: none;
    border: 1px solid var(--border-strong);
    color: var(--muted);
    width: 32px;
    height: 32px;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover { color: var(--text); border-color: var(--accent); }

.modal h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    padding-right: 2rem;
}

.modal h3 {
    font-size: 1.02rem;
    margin: 1.6rem 0 0.6rem;
    color: var(--accent);
}

.modal p, .modal address {
    font-style: normal;
    color: var(--muted);
    font-size: 0.92rem;
    margin-bottom: 0.4rem;
}

.modal p a { color: var(--text); }

/* --- Responsive --- */
@media (max-width: 720px) {
    .main-nav { display: none; }
    .header-inner { justify-content: space-between; }
    .form-wrap { padding: 1.8rem 1.4rem; }
    .step { grid-template-columns: 70px 1fr; }
    .step-num { padding: 1.2rem; font-size: 1.1rem; }
    .step-body { padding: 1.2rem 1.3rem; }
    .footer-inner { flex-direction: column; align-items: flex-start; }
}
