/* ============================================================
   WebWerkX Check — assets/style.css
   Mobile-first · Keine externen Abhängigkeiten
   ============================================================ */

/* --- Custom Properties ------------------------------------ */
:root {
    --green:     #1D9E75;
    --green-dk:  #167a5c;
    --green-lt:  #e8f7f2;
    --green-mid: rgba(29, 158, 117, .12);
    --yellow:    #EF9F27;
    --red:       #E24B4A;

    --gray-50:  #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-400: #9CA3AF;
    --gray-500: #6B7280;
    --gray-700: #374151;
    --gray-900: #111827;

    --font:      -apple-system, BlinkMacSystemFont, 'Segoe UI Variable', 'Segoe UI',
                 ui-sans-serif, 'Helvetica Neue', Arial, sans-serif;
    --font-mono: ui-monospace, 'SF Mono', 'Cascadia Code', 'Fira Code',
                 'Courier New', monospace;

    --radius-s:  8px;
    --radius:   12px;
    --radius-l: 20px;

    --shadow-s: 0 1px 3px rgba(0,0,0,.06), 0 2px 8px rgba(0,0,0,.04);
    --shadow:   0 4px 12px rgba(0,0,0,.07), 0 12px 40px rgba(0,0,0,.05);

    --nav-h:  64px;
    --wrap:  840px;
}

/* --- Reset ------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.65;
    color: var(--gray-900);
    background: #fff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; }
ul { list-style: none; }
svg { display: block; flex-shrink: 0; }
img { max-width: 100%; height: auto; display: block; }

/* --- Layout helpers --------------------------------------- */
.container {
    max-width: var(--wrap);
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Navigation ------------------------------------------ */
.nav {
    position: sticky;
    top: 0;
    z-index: 200;
    height: var(--nav-h);
    background: rgba(255,255,255,.94);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--gray-200);
}
.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--nav-h);
}
.logo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--gray-900);
    font-weight: 700;
    font-size: .9375rem;
    letter-spacing: -.01em;
    text-decoration: none;
}
.logo:hover { text-decoration: none; }
.logo-icon { color: var(--green); }
.logo-badge {
    font-size: .6875rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--green);
    background: var(--green-lt);
    border: 1px solid rgba(29,158,117,.22);
    padding: 2px 9px;
    border-radius: 99px;
    line-height: 1.6;
}
.nav-cta {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: .875rem;
    font-weight: 500;
    color: var(--gray-500);
    text-decoration: none;
    transition: color .15s;
}
.nav-cta:hover { color: var(--green); text-decoration: none; }
@media (max-width: 400px) { .nav-cta span { display: none; } }

/* --- Hero ------------------------------------------------- */
.hero {
    padding: 72px 0 64px;
    position: relative;
    overflow: hidden;
    background: #fff;
}
/* Subtle engineering-grid */
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(29,158,117,.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(29,158,117,.045) 1px, transparent 1px);
    background-size: 48px 48px;
    pointer-events: none;
}
/* Radial glow top-right */
.hero::after {
    content: '';
    position: absolute;
    top: -120px;
    right: -120px;
    width: 560px;
    height: 560px;
    background: radial-gradient(circle, rgba(29,158,117,.09) 0%, transparent 65%);
    pointer-events: none;
}
.hero-content {
    position: relative;
    z-index: 1;
    max-width: 620px;
}
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--green);
    background: var(--green-lt);
    border: 1px solid rgba(29,158,117,.22);
    padding: 5px 13px;
    border-radius: 99px;
    margin-bottom: 22px;
}
.hero-title {
    font-size: clamp(2.1rem, 5.5vw, 3.375rem);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -.035em;
    color: var(--gray-900);
    margin-bottom: 18px;
}
.hero-subtitle {
    font-size: 1.0625rem;
    color: var(--gray-500);
    line-height: 1.65;
    margin-bottom: 36px;
    max-width: 500px;
}

/* --- Check Form ------------------------------------------ */
.check-form { max-width: 560px; }

.form-row {
    display: flex;
    gap: 8px;
    align-items: stretch;
    margin-bottom: 14px;
}
.input-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    background: #fff;
    transition: border-color .15s, box-shadow .15s;
    overflow: hidden;
    min-width: 0;
}
.input-wrap:focus-within {
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(29,158,117,.13);
}
.input-prefix {
    padding: 0 8px 0 14px;
    font-family: var(--font-mono);
    font-size: .8125rem;
    color: var(--gray-400);
    white-space: nowrap;
    user-select: none;
    pointer-events: none;
    border-right: 1px solid var(--gray-200);
    line-height: 1;
    height: 100%;
    display: flex;
    align-items: center;
}
.url-input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    padding: 15px 12px;
    font-size: .9375rem;
    color: var(--gray-900);
    font-family: var(--font);
    min-width: 0;
}
.url-input::placeholder { color: var(--gray-400); }

/* --- Buttons --------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    font-family: var(--font);
    font-size: .9375rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    border-radius: var(--radius);
    transition: background .15s, transform .1s, box-shadow .15s;
    white-space: nowrap;
    text-decoration: none;
    line-height: 1;
}
.btn:active { transform: scale(.98); }
.btn:focus-visible {
    outline: 2px solid var(--green);
    outline-offset: 2px;
}

.btn-primary {
    background: var(--green);
    color: #fff;
    padding: 15px 20px;
}
.btn-primary:hover {
    background: var(--green-dk);
    color: #fff;
    text-decoration: none;
}

.btn-check { padding: 15px 18px; }

.btn-cta {
    width: 100%;
    padding: 18px 24px;
    font-size: 1rem;
    border-radius: var(--radius);
    box-shadow: 0 4px 18px rgba(29,158,117,.3);
}
.btn-cta:hover { box-shadow: 0 6px 24px rgba(29,158,117,.42); }

/* Form error */
.form-error {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--red);
    font-size: .875rem;
    padding: 10px 14px;
    background: #fef2f2;
    border: 1px solid rgba(226,75,74,.2);
    border-radius: var(--radius-s);
    margin-bottom: 10px;
}

/* Trust indicators */
.form-trust {
    display: flex;
    flex-wrap: wrap;
    gap: 5px 0;
    font-size: .8rem;
    color: var(--gray-400);
}
.form-trust li {
    display: flex;
    align-items: center;
    gap: 8px;
}
.form-trust li + li::before {
    content: '·';
    opacity: .5;
    margin-right: 3px;
}

/* --- Loading Overlay ------------------------------------- */
.loading-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(255,255,255,.96);
    z-index: 500;
    place-items: center;
    place-content: center;
}
.loading-overlay.active { display: grid; }

.loading-content { text-align: center; }

.loading-ring {
    width: 52px;
    height: 52px;
    border: 3px solid var(--gray-200);
    border-top-color: var(--green);
    border-radius: 50%;
    animation: spin .75s linear infinite;
    margin: 0 auto 20px;
}
@keyframes spin { to { transform: rotate(360deg); } }

.loading-text {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--gray-900);
    letter-spacing: -.01em;
    margin-bottom: 6px;
}
.loading-sub {
    font-size: .875rem;
    color: var(--gray-400);
}
.loading-dots span {
    display: inline-block;
    animation: blink 1.4s infinite both;
}
.loading-dots span:nth-child(2) { animation-delay: .2s; }
.loading-dots span:nth-child(3) { animation-delay: .4s; }
@keyframes blink {
    0%, 80%, 100% { opacity: 0; }
    40%           { opacity: 1; }
}

/* --- Result Section -------------------------------------- */
.result-section {
    background: var(--gray-50);
    border-top: 1px solid var(--gray-200);
    border-bottom: 1px solid var(--gray-200);
    padding: 56px 0 64px;
}
.result-wrap { display: flex; flex-direction: column; gap: 16px; }

/* Score card */
.score-card {
    background: #fff;
    border-radius: var(--radius-l);
    padding: 36px 40px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 32px;
    border: 1px solid var(--gray-200);
}

/* SVG ring */
.score-ring-wrap {
    flex-shrink: 0;
    position: relative;
    width: 150px;
    height: 150px;
}
.score-ring-wrap svg { position: absolute; inset: 0; }
.score-ring-fg {
    transition: stroke-dashoffset 1.1s cubic-bezier(.4,0,.2,1);
}
.score-ring-text {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.score-number {
    font-size: 2.625rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -.04em;
}
.score-pts {
    font-size: .75rem;
    color: var(--gray-400);
    margin-top: 3px;
    font-family: var(--font-mono);
}

/* Score info */
.score-info { flex: 1; min-width: 0; }
.score-label {
    font-size: 1.4375rem;
    font-weight: 700;
    letter-spacing: -.025em;
    margin-bottom: 8px;
    line-height: 1.2;
}
.score-label.good { color: var(--green); }
.score-label.warn { color: var(--yellow); }
.score-label.bad  { color: var(--red); }

.score-url {
    font-family: var(--font-mono);
    font-size: .8125rem;
    color: var(--gray-400);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-bottom: 5px;
}
.score-meta {
    font-size: .8125rem;
    color: var(--gray-400);
    line-height: 1.5;
}
.score-note { color: var(--yellow); }

/* Result rows */
.results-grid {
    background: #fff;
    border-radius: var(--radius-l);
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-s);
    overflow: hidden;
}
.result-row {
    display: flex;
    align-items: flex-start;
    gap: 13px;
    padding: 15px 22px;
    border-bottom: 1px solid var(--gray-100);
    animation: slideUp .3s ease-out both;
}
.result-row:last-child { border-bottom: none; }
@keyframes slideUp {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.result-icon {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 1px;
}
.result-icon.ok   { background: #dcfce7; color: var(--green); }
.result-icon.fail { background: #fee2e2; color: var(--red); }
.result-icon.warn { background: #fef3c7; color: var(--yellow); }
.result-icon.skip { background: var(--gray-100); color: var(--gray-400); }

.result-body { flex: 1; min-width: 0; }
.result-label {
    font-size: .9375rem;
    font-weight: 600;
    color: var(--gray-900);
    line-height: 1.3;
}
.result-detail {
    font-size: .8125rem;
    color: var(--gray-500);
    margin-top: 3px;
    line-height: 1.5;
}

.result-pts {
    flex-shrink: 0;
    font-size: .8125rem;
    font-weight: 700;
    color: var(--gray-400);
    white-space: nowrap;
    font-family: var(--font-mono);
    text-align: right;
    padding-top: 2px;
}
.result-pts.ok   { color: var(--green); }
.result-pts.fail { color: var(--red); }
.result-pts.warn { color: var(--yellow); }
.result-pts-max  { opacity: .45; font-weight: 400; }

/* CTA Box */
.cta-box {
    border-radius: var(--radius-l);
    padding: 40px;
    text-align: center;
}
.cta-box.bad {
    background: linear-gradient(145deg, #0f1923 0%, #1a2535 100%);
    border: 1px solid rgba(255,255,255,.06);
}
.cta-box.good {
    background: linear-gradient(145deg, #f0fdf8 0%, #fff 100%);
    border: 1px solid rgba(29,158,117,.18);
}

.cta-headline {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -.025em;
    line-height: 1.22;
    margin-bottom: 12px;
}
.cta-box.bad  .cta-headline { color: #fff; }
.cta-box.good .cta-headline { color: var(--gray-900); }

.cta-sub {
    font-size: .9375rem;
    line-height: 1.6;
    margin-bottom: 26px;
}
.cta-box.bad  .cta-sub { color: rgba(255,255,255,.65); }
.cta-box.good .cta-sub { color: var(--gray-500); }

.cta-box.bad  .btn-cta { background: var(--green); }

.cta-trust {
    font-size: .8125rem;
    margin-top: 13px;
}
.cta-box.bad  .cta-trust { color: rgba(255,255,255,.35); }
.cta-box.good .cta-trust { color: var(--gray-400); }

/* Reset link */
.reset-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    font-size: .875rem;
    color: var(--gray-400);
    transition: color .15s;
    padding: 8px;
}
.reset-link:hover { color: var(--gray-700); text-decoration: none; }

/* --- How it works --------------------------------------- */
.how-section {
    padding: 88px 0 96px;
    background: #fff;
}
.section-title {
    font-size: clamp(1.75rem, 4vw, 2.375rem);
    font-weight: 800;
    letter-spacing: -.035em;
    text-align: center;
    margin-bottom: 10px;
    color: var(--gray-900);
}
.section-sub {
    text-align: center;
    color: var(--gray-500);
    font-size: 1rem;
    margin-bottom: 52px;
}
.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}
.step-card {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-l);
    padding: 32px 28px;
    transition: border-color .2s, box-shadow .2s, transform .2s;
}
.step-card:hover {
    border-color: var(--green);
    box-shadow: 0 0 0 1px var(--green), var(--shadow-s);
    transform: translateY(-2px);
}
.step-number {
    font-size: 2.75rem;
    font-weight: 800;
    color: var(--green);
    letter-spacing: -.05em;
    line-height: 1;
    margin-bottom: 18px;
    opacity: .55;
}
.step-card h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 10px;
    letter-spacing: -.01em;
}
.step-card p {
    font-size: .9rem;
    color: var(--gray-500);
    line-height: 1.65;
}

/* --- Footer --------------------------------------------- */
.footer {
    background: var(--gray-50);
    border-top: 1px solid var(--gray-200);
    padding: 36px 0;
}
.footer-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    text-align: center;
}
.footer-brand {
    font-size: .875rem;
    color: var(--gray-500);
}
.footer-brand a { color: var(--green); font-weight: 600; }
.footer-brand a:hover { text-decoration: underline; }

.footer-links {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}
.footer-links a {
    font-size: .875rem;
    color: var(--gray-500);
    transition: color .15s;
}
.footer-links a:hover { color: var(--green); text-decoration: none; }

.footer-dsgvo {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: .8rem;
    color: var(--gray-400);
}

/* --- Responsive ----------------------------------------- */
@media (max-width: 640px) {
    .hero { padding: 48px 0 44px; }

    .score-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 28px 20px;
        gap: 16px;
    }
    .score-url { text-align: center; }

    .form-row { flex-direction: column; }
    .btn-check { width: 100%; }

    .cta-box { padding: 28px 20px; }
    .cta-headline { font-size: 1.25rem; }

    .result-row { padding: 13px 16px; gap: 10px; }

    .how-section { padding: 60px 0 72px; }
    .steps-grid { grid-template-columns: 1fr; }
}

@media (max-width: 380px) {
    .input-prefix { display: none; }
    .url-input { padding-left: 14px; }
}
