/* ───────────────────────────────────────────────────────────────────────────
   Michael Winkler — Android- & Webentwicklung. Public site styling.
   Modern, clean, dev-flavoured theme (slate ink + indigo/violet accent).
   ─────────────────────────────────────────────────────────────────────────── */

:root {
    --bg: #ffffff;
    --bg-alt: #f6f8fc;
    --ink: #0b1220;
    --ink-2: #1e293b;
    --muted: #475569;
    --faint: #94a3b8;
    --line: #e6eaf2;
    --accent: #6366f1;
    --accent-2: #7c3aed;
    --accent-dark: #4f46e5;
    --accent-soft: #eef0fe;
    --radius: 18px;
    --radius-sm: 12px;
    --shadow: 0 18px 48px -20px rgba(30, 41, 59, .30);
    --shadow-sm: 0 8px 24px -14px rgba(30, 41, 59, .35);
    --maxw: 1120px;
    --grad: linear-gradient(120deg, var(--accent), var(--accent-2));
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--ink);
    background: var(--bg);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: var(--accent-dark); text-decoration: none; }
a:hover { color: var(--accent-2); }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.center { text-align: center; }

.eyebrow {
    display: inline-flex; align-items: center; gap: 9px;
    font-size: 12.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
    color: var(--accent-dark); margin-bottom: 16px;
    background: var(--accent-soft); padding: 6px 13px; border-radius: 999px;
}
.eyebrow .ping { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); position: relative; }
.eyebrow .ping::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--accent); animation: ping 1.8s cubic-bezier(0,0,.2,1) infinite; }
@keyframes ping { 75%, 100% { transform: scale(2.4); opacity: 0; } }

h1, h2, h3 { line-height: 1.18; color: var(--ink); margin: 0 0 .5em; letter-spacing: -.02em; }
h1 { font-size: clamp(2.1rem, 5.2vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.4rem); font-weight: 800; }
h3 { font-size: 1.18rem; font-weight: 700; letter-spacing: -.01em; }
.lead { font-size: 1.14rem; color: var(--muted); max-width: 58ch; }

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 13px 24px; border-radius: 999px; font-weight: 600; font-size: 15px;
    cursor: pointer; border: 1px solid transparent;
    transition: transform .14s ease, background .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 12px 26px -10px rgba(99, 102, 241, .7); }
.btn-primary:hover { color: #fff; box-shadow: 0 16px 30px -10px rgba(99, 102, 241, .85); transform: translateY(-2px); }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--bg-alt); color: var(--ink); border-color: #d4d9e6; }
.btn-light { background: rgba(255,255,255,.14); color: #fff; border-color: rgba(255,255,255,.28); backdrop-filter: blur(4px); }
.btn-light:hover { background: rgba(255,255,255,.24); color: #fff; }

/* ── Header / nav ────────────────────────────────────────────────────────── */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(255, 255, 255, .72);
    backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid transparent;
    transition: border-color .25s ease, box-shadow .25s ease, background .25s ease;
}
.site-header.scrolled { border-bottom-color: var(--line); box-shadow: 0 6px 22px -18px rgba(30,41,59,.5); background: rgba(255,255,255,.86); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 70px; }
.brand { display: flex; align-items: center; gap: 11px; font-weight: 800; color: var(--ink); font-size: 1.06rem; letter-spacing: -.02em; }
.brand .mark {
    width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center;
    color: #fff; font-weight: 800; font-size: 13px; background: var(--grad);
    box-shadow: 0 6px 16px -6px rgba(99, 102, 241, .8);
}
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { color: var(--muted); font-weight: 500; font-size: 15px; }
.nav-links a:hover { color: var(--ink); }
.nav-links .btn { padding: 10px 20px; }
/* The CTA in the nav is an <a>; keep its button text white like every other
   .btn-primary (the generic .nav-links a colour would otherwise win on order). */
.nav-links a.btn-primary, .nav-links a.btn-primary:hover { color: #fff; }
.nav-toggle { display: none; background: none; border: 0; color: var(--ink); cursor: pointer; padding: 6px; }

/* ── Hero ────────────────────────────────────────────────────────────────── */
.hero { position: relative; padding: 96px 0 84px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; position: relative; z-index: 2; }
.hero h1 { max-width: 16ch; }
.hero .lead { margin: 20px 0 32px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 30px; color: var(--faint); font-size: 14px; }
.hero-meta span { display: inline-flex; align-items: center; gap: 7px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); display: inline-block; }

.bg-blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .5; z-index: 1; pointer-events: none; }
.bg-blob-1 { width: 520px; height: 520px; top: -180px; right: -120px; background: radial-gradient(circle, #c7d2fe, transparent 70%); }
.bg-blob-2 { width: 460px; height: 460px; bottom: -220px; left: -160px; background: radial-gradient(circle, #ede9fe, transparent 70%); }

/* Hero visual: glassy code card + floating chips */
.hero-visual { position: relative; }
.codecard {
    background: #0e1530; border: 1px solid #232a4d; border-radius: 16px;
    box-shadow: var(--shadow); overflow: hidden; transform: rotate(1.2deg);
    transition: transform .3s ease;
}
.hero-visual:hover .codecard { transform: rotate(0); }
.codecard-bar { display: flex; align-items: center; gap: 7px; padding: 12px 16px; background: #0a0f24; border-bottom: 1px solid #232a4d; }
.codecard-bar span { width: 11px; height: 11px; border-radius: 50%; background: #3a4470; }
.codecard-bar span:nth-child(1) { background: #ff5f57; }
.codecard-bar span:nth-child(2) { background: #febc2e; }
.codecard-bar span:nth-child(3) { background: #28c840; }
.codecard-bar em { margin-left: auto; color: #6b76a8; font-style: normal; font-size: 12.5px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.code {
    margin: 0; padding: 20px 22px; color: #c7d0f5; background: #0e1530;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13.5px; line-height: 1.75;
    white-space: pre; overflow-x: auto;
}
.c-key { color: #c792ea; } .c-typ { color: #82aaff; } .c-fn { color: #82d2ff; } .c-str { color: #c3e88d; }
.chip {
    position: absolute; background: #fff; color: var(--ink-2); font-weight: 600; font-size: 13px;
    padding: 9px 15px; border-radius: 999px; box-shadow: var(--shadow-sm); border: 1px solid var(--line);
    animation: float 5s ease-in-out infinite;
}
.chip-1 { top: -18px; left: -14px; animation-delay: 0s; }
.chip-2 { bottom: 36px; right: -22px; animation-delay: .8s; }
.chip-3 { bottom: -20px; left: 32px; animation-delay: 1.6s; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }

/* ── Sections ────────────────────────────────────────────────────────────── */
section { padding: 80px 0; }
.section-head { max-width: 60ch; margin: 0 auto 48px; }
.section-head .lead { margin-inline: auto; }
.alt { background: var(--bg-alt); border-block: 1px solid var(--line); }

/* ── Services ────────────────────────────────────────────────────────────── */
.cards { display: grid; gap: 24px; grid-template-columns: repeat(3, 1fr); }
.card {
    background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 32px 28px; position: relative; overflow: hidden;
    transition: transform .18s ease, box-shadow .22s ease, border-color .22s ease;
}
.card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--grad); transform: scaleX(0); transform-origin: left; transition: transform .25s ease; }
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: #d8dcec; }
.card:hover::before { transform: scaleX(1); }
.card .ci {
    display: grid; place-items: center; width: 56px; height: 56px; border-radius: 15px;
    background: var(--accent-soft); font-size: 27px; margin-bottom: 18px;
}
.card h3 { margin-bottom: 9px; }
.card p { color: var(--muted); margin: 0; }

/* ── About ───────────────────────────────────────────────────────────────── */
.about-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 52px; align-items: start; }
.about-grid p { color: var(--muted); white-space: pre-line; }
.facts { display: grid; gap: 14px; }
.fact {
    background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm);
    padding: 16px 20px; border-left: 3px solid var(--accent); transition: transform .15s ease, box-shadow .2s ease;
}
.fact:hover { transform: translateX(3px); box-shadow: var(--shadow-sm); }
.fact .k { font-size: 11.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--faint); font-weight: 700; }
.fact .v { color: var(--ink); font-weight: 600; }

/* ── Projects ────────────────────────────────────────────────────────────── */
.proj-grid { display: grid; gap: 20px; grid-template-columns: repeat(3, 1fr); }
.proj {
    background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 26px; transition: transform .18s ease, box-shadow .22s ease, border-color .22s ease;
}
.proj:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: #d8dcec; }
.proj-mark {
    width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center;
    background: var(--ink); color: #fff; font-weight: 800; font-size: 20px; margin-bottom: 16px;
}
.proj h3 { margin-bottom: 6px; }
.proj p { color: var(--muted); margin: 0; font-size: 15px; }
.btn-sm { padding: 9px 16px; font-size: 14px; }
.proj-store { display: flex; align-items: center; gap: 16px; margin-top: 18px; }
.proj-store-link { flex: 0 0 auto; }
.proj-qr { width: 76px; height: 76px; flex: 0 0 auto; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 5px; }
.proj-qr svg { display: block; width: 100%; height: 100%; }
.proj-qr:empty { display: none; }

/* ── Process / Ablauf ────────────────────────────────────────────────────── */
.process { list-style: none; margin: 0; padding: 0; display: grid; gap: 22px; grid-template-columns: repeat(3, 1fr); counter-reset: pstep; }
.pstep {
    position: relative; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 26px 26px 28px; transition: transform .18s ease, box-shadow .22s ease, border-color .22s ease;
}
.pstep:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: #d8dcec; }
.pstep-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.pstep-num {
    font-weight: 800; font-size: 1.05rem; letter-spacing: -.02em;
    background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.pstep-icon {
    display: grid; place-items: center; width: 46px; height: 46px; border-radius: 13px;
    background: var(--accent-soft); font-size: 22px;
}
.pstep h3 { margin-bottom: 8px; }
.pstep p { color: var(--muted); margin: 0; font-size: 15px; }

/* ── Maintenance page ────────────────────────────────────────────────────── */
body.maintenance { background: var(--ink); color: #cbd5e1; min-height: 100vh; }
.maint-wrap { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 26px; padding: 40px 24px; text-align: center; }
.maint-banner { width: 100%; max-width: 640px; height: auto; border-radius: 16px; box-shadow: 0 24px 60px -24px rgba(0,0,0,.8); }
.maint-card { max-width: 540px; }
.maint-badge {
    display: inline-flex; align-items: center; gap: 9px; font-size: 12.5px; font-weight: 700;
    letter-spacing: .09em; text-transform: uppercase; color: #c7d2fe; margin-bottom: 18px;
    background: rgba(99,102,241,.16); padding: 6px 14px; border-radius: 999px;
}
.maint-card h1 { color: #fff; font-size: clamp(1.8rem, 5vw, 2.6rem); }
.maint-card p { color: #cbd5e1; font-size: 1.1rem; line-height: 1.7; margin: 0 0 26px; white-space: pre-line; }
.maint-foot { color: var(--faint); font-size: 13px; margin: 0; }

/* ── Contact ─────────────────────────────────────────────────────────────── */
.contact-card {
    max-width: 680px; margin: 0 auto; background: var(--bg);
    border: 1px solid var(--line); border-radius: var(--radius); padding: 38px; box-shadow: var(--shadow);
}
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 7px; }
.field input, .field textarea {
    width: 100%; padding: 13px 15px; font: inherit; color: var(--ink);
    border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.field textarea { min-height: 140px; resize: vertical; }
.form-note { font-size: 13.5px; color: var(--faint); margin-top: 4px; }
.form-msg { margin-top: 16px; padding: 13px 16px; border-radius: var(--radius-sm); font-size: 14px; display: none; }
.form-msg.ok { display: block; background: #dcfce7; color: #166534; }
.form-msg.err { display: block; background: #fee2e2; color: #991b1b; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ── Footer ──────────────────────────────────────────────────────────────── */
.site-footer { background: var(--ink); color: #cbd5e1; padding: 56px 0 32px; }
.site-footer .brand { color: #fff; }
.footer-grid { display: flex; flex-wrap: wrap; gap: 30px; justify-content: space-between; align-items: center; }
.footer-links { display: flex; flex-wrap: wrap; gap: 22px; }
.site-footer a { color: #cbd5e1; font-size: 14px; }
.site-footer a:hover { color: #fff; }
.footer-bottom { margin-top: 30px; padding-top: 22px; border-top: 1px solid #1e293b; display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; color: var(--faint); font-size: 13px; }

/* ── Legal pages ─────────────────────────────────────────────────────────── */
.legal { max-width: 760px; margin: 0 auto; padding: 60px 24px 80px; }
.legal h1 { font-size: 2.1rem; }
.legal h2 { font-size: 1.25rem; margin-top: 1.7em; }
.legal p, .legal address { color: var(--muted); font-style: normal; white-space: pre-line; }
.legal a.back { display: inline-block; margin-bottom: 26px; font-weight: 600; }

/* ── Reveal-on-scroll ────────────────────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 940px) {
    .hero-grid { grid-template-columns: 1fr; gap: 56px; }
    .hero-visual { max-width: 480px; }
}
@media (max-width: 860px) {
    /* Tablet: keep two columns rather than jumping straight to one. */
    .cards, .proj-grid, .process { grid-template-columns: repeat(2, 1fr); }
    .about-grid { grid-template-columns: 1fr; gap: 30px; }
    .row2 { grid-template-columns: 1fr; }
    section { padding: 64px 0; }
    .section-head { margin-bottom: 36px; }
    .nav-toggle { display: block; }
    .nav-links {
        position: absolute; top: 70px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0;
        background: #fff; border-bottom: 1px solid var(--line); padding: 8px 24px 18px; display: none;
    }
    .nav-links.open { display: flex; }
    .nav-links a { padding: 13px 0; border-bottom: 1px solid var(--line); }
    .nav-links .btn { margin-top: 12px; justify-content: center; }
    .chip-2 { right: 0; }
}
@media (max-width: 600px) {
    .cards, .proj-grid, .process { grid-template-columns: 1fr; }
    .container { padding: 0 18px; }
    .proj-store { flex-wrap: wrap; }
    .code { font-size: 12px; padding: 16px 16px; }
}
@media (max-width: 460px) {
    .hero { padding: 64px 0 60px; }
    section { padding: 52px 0; }
    .contact-card { padding: 24px; }
    .btn { padding: 12px 20px; }
}

@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; transition: none; }
    .chip { animation: none; }
    .eyebrow .ping::after { animation: none; }
    html { scroll-behavior: auto; }
}
