/* ============================================================
   i-data One-Time Secret – Design System (überarbeitet)
   Hell, frisch, präzise. Zweispaltig, passt auf 1080p ohne Scroll.
   ============================================================ */

@font-face { font-family:'Space Grotesk'; src:url('/assets/fonts/space-grotesk.woff2') format('woff2'); font-weight:300 700; font-display:swap; }
@font-face { font-family:'InterVar'; src:url('/assets/fonts/inter.woff2') format('woff2'); font-weight:100 900; font-display:swap; }
@font-face { font-family:'JetBrains Mono'; src:url('/assets/fonts/jetbrains-mono.woff2') format('woff2'); font-weight:400 700; font-display:swap; }

:root {
    --bg: #F1F5F6;
    --surface: #FFFFFF;
    --ink: #0B0E0F;
    --ink-soft: #2A3438;
    --muted: #5C6B70;
    --teal: #0FC2B6;
    --teal-strong: #0BA89D;
    --teal-deep: #096A64;
    --teal-tint: #E7FAF8;
    --teal-line: #B6ECE7;
    --border: #E1E8E9;
    --danger: #C0392B;
    --r: 18px;
    --r-sm: 11px;
    --r-pill: 999px;
    --shadow-sm: 0 1px 2px rgba(11,14,15,.05);
    --shadow: 0 2px 4px rgba(11,14,15,.04), 0 14px 36px rgba(11,14,15,.07);
    --shadow-teal: 0 8px 22px rgba(15,194,182,.22);
    --font-display: 'Space Grotesk', system-ui, sans-serif;
    --font-body: 'InterVar', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0; min-height: 100vh;
    display: flex; flex-direction: column;
    font-family: var(--font-body); color: var(--ink); line-height: 1.55;
    background:
        radial-gradient(1100px 520px at 82% -10%, rgba(15,194,182,.10), transparent 60%),
        radial-gradient(820px 460px at -6% -4%, rgba(140,224,227,.16), transparent 55%),
        var(--bg);
    background-attachment: fixed;
    -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}

.container-wide { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 36px; }
.container-narrow { width: 100%; max-width: 620px; margin: 0 auto; padding: 0 36px; }

/* ---------- Header ---------- */
.site-header { padding: 22px 0 10px; flex: none; }
.site-header .container-wide { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand-logo { height: 60px; width: auto; display: block; }
.hero-mark { display: block; width: 56px; height: 56px; margin: 0 0 22px; }
.state-mark { display: block; width: 48px; height: 48px; margin: 0 0 18px; }
.product-tag {
    display: inline-flex; align-items: center; justify-content: center; line-height: 1;
    font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
    color: var(--teal-deep); background: var(--teal-tint); border: 1px solid var(--teal-line);
    padding: 8px 14px; border-radius: var(--r-pill); white-space: nowrap;
}

/* ---------- Main (vertikal zentriert, füllt Höhe) ---------- */
.site-main { flex: 1 1 auto; display: flex; align-items: center; padding: 10px 0 84px; }

/* Zweispaltiges Home-Layout */
.split { display: grid; grid-template-columns: 1.18fr 1fr; gap: 52px; align-items: start; width: 100%; }

/* ---------- Hero ---------- */
.hero { max-width: 600px; }
.eyebrow {
    display: inline-flex; align-items: center; gap: 9px;
    font-size: 12px; font-weight: 600; letter-spacing: .15em; text-transform: uppercase;
    color: var(--teal-deep); margin: 0 0 16px;
}
.eyebrow::before { content: ""; width: 24px; height: 1.5px; background: var(--teal); }
h1 {
    font-family: var(--font-display); font-weight: 600;
    font-size: clamp(27px, 3.2vw, 38px); line-height: 1.08; letter-spacing: -.022em;
    margin: 0 0 16px; color: var(--ink); text-wrap: balance;
}
.lead { font-size: 16px; color: var(--muted); margin: 0; max-width: 50ch; text-wrap: pretty; }

.trust { display: flex; flex-wrap: wrap; gap: 10px; margin: 24px 0 0; padding: 0; list-style: none; }
.trust li {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 13px; font-weight: 500; color: var(--ink-soft);
    background: var(--surface); border: 1px solid var(--border);
    padding: 7px 13px 7px 11px; border-radius: var(--r-pill); box-shadow: var(--shadow-sm);
}
.trust svg { width: 16px; height: 16px; color: var(--teal-strong); flex: none; }

/* ---------- Card ---------- */
.card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--r); box-shadow: var(--shadow); padding: 30px;
    animation: rise .5s cubic-bezier(.2,.7,.2,1) both;
}
.center-card { display: flex; justify-content: center; width: 100%; }
.center-card .card { width: 100%; }
.card .eyebrow { margin-bottom: 12px; }
.card h1 { font-size: clamp(22px, 2.6vw, 27px); }

/* ---------- Segmented ---------- */
.segmented { display: inline-flex; gap: 3px; padding: 3px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-pill); margin-bottom: 18px; }
.seg-btn { appearance: none; border: 0; background: transparent; cursor: pointer; font: inherit; font-weight: 600; font-size: 14px; color: var(--muted); padding: 7px 18px; border-radius: var(--r-pill); transition: .18s ease; display: inline-flex; align-items: center; gap: 7px; }
.seg-btn svg { width: 15px; height: 15px; }
.seg-btn.is-active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.segmented.seg-full { display: flex; width: 100%; }
.segmented.seg-full .seg-btn { flex: 1; justify-content: center; padding: 8px 10px; }

/* ---------- Fields ---------- */
.field { margin: 15px 0; }
.field > label { display: block; font-weight: 600; font-size: 13.5px; margin-bottom: 7px; color: var(--ink-soft); }
.muted { color: var(--muted); font-weight: 400; }
.form-control { width: 100%; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--r-sm); font-family: inherit; font-size: 15px; color: var(--ink); background: var(--surface); transition: border-color .15s, box-shadow .15s; }
.form-control:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(15,194,182,.18); }
textarea.form-control { resize: vertical; min-height: 96px; line-height: 1.5; }
select.form-control { 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='%235C6B70' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 40px; }
input[type="file"].form-control { padding: 10px 14px; cursor: pointer; }
.field-check { display: flex; align-items: center; gap: 10px; margin: 18px 0; }
.field-check input { width: 18px; height: 18px; accent-color: var(--teal-strong); cursor: pointer; }
.field-check label { font-weight: 500; font-size: 14.5px; cursor: pointer; }
.hint { color: var(--muted); font-size: 13px; margin: 8px 0 0; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; border: 1px solid var(--border); background: var(--surface); color: var(--ink); padding: 12px 20px; border-radius: var(--r-sm); font-family: inherit; font-size: 15px; font-weight: 600; line-height: 1; text-decoration: none; cursor: pointer; transition: transform .12s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn svg { width: 17px; height: 17px; }
.btn-primary { background: var(--teal); border-color: var(--teal); color: #043b37; box-shadow: var(--shadow-teal); }
.btn-primary:hover { background: var(--teal-strong); border-color: var(--teal-strong); }
.btn-primary:disabled { background: var(--teal-line); border-color: var(--teal-line); color: #5a807c; box-shadow: none; cursor: not-allowed; transform: none; }
.btn-block { width: 100%; padding: 14px 20px; font-size: 15.5px; }
.actions { margin-top: 22px; }
:focus-visible { outline: 2px solid var(--teal-deep); outline-offset: 2px; border-radius: 4px; }

/* ---------- Status ---------- */
.status { margin-top: 14px; font-size: 14px; min-height: 1.3em; display: flex; align-items: center; gap: 8px; }
.status:empty { display: none; }
.status-busy { color: var(--teal-deep); }
.status-busy::before { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--teal-line); border-top-color: var(--teal-strong); animation: spin .7s linear infinite; flex: none; }
.status-error { color: var(--danger); }

/* ---------- Result ---------- */
.seal { display: flex; align-items: center; gap: 12px; background: var(--teal-tint); border: 1px solid var(--teal-line); border-radius: var(--r-sm); padding: 14px 16px; margin-bottom: 16px; }
.seal svg { width: 22px; height: 22px; color: var(--teal-strong); flex: none; }
.seal strong { display: block; font-size: 15px; }
.seal .sub { display: block; font-size: 13px; color: var(--teal-deep); }
.link-display { font-family: var(--font-mono); font-size: 13.5px; line-height: 1.7; word-break: break-all; color: var(--ink-soft); background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 14px 16px; margin-bottom: 12px; }
.key-note { font-size: 13px; color: var(--muted); margin: 4px 0 18px; }
.result-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- Reveal output ---------- */
#output { margin-top: 18px; }
.output-text textarea { font-family: var(--font-mono); font-size: 14px; }
.copy-inline { margin-top: 10px; }

/* ---------- Footer ---------- */
.site-footer { flex: none; color: var(--muted); font-size: 13px; padding: 12px 0 22px; }
.site-footer .container-wide { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.site-footer a { color: var(--muted); text-decoration: none; border-bottom: 1px solid transparent; }
.site-footer a:hover { color: var(--ink); border-bottom-color: var(--teal); }
.footer-seal { display: inline-flex; align-items: center; gap: 8px; }
.footer-seal svg { width: 15px; height: 15px; color: var(--teal-strong); }
.footer-links { display: flex; gap: 16px; }

/* ---------- Utilities ---------- */
.hidden { display: none !important; }
.mb-0 { margin-bottom: 0; }
.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; }
code { font-family: var(--font-mono); background: var(--bg); padding: 1px 6px; border-radius: 6px; font-size: .9em; }

/* ---------- Motion ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }
.trust li { animation: rise .5s cubic-bezier(.2,.7,.2,1) both; }
.trust li:nth-child(1) { animation-delay: .04s; }
.trust li:nth-child(2) { animation-delay: .10s; }
.trust li:nth-child(3) { animation-delay: .16s; }

/* ---------- Responsive ---------- */
@media (max-width: 920px) {
    .split { grid-template-columns: 1fr; gap: 28px; }
    .site-main { align-items: flex-start; padding: 8px 0 32px; }
    .hero { max-width: none; }
}
@media (max-width: 560px) {
    .container-wide, .container-narrow { padding: 0 20px; }
    .site-header .container-wide { flex-direction: row; }
    .card { padding: 22px; }
    .result-actions { flex-direction: column; }
    .result-actions .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* Dropzone & Datei-Notiz */
.dropzone { border: 1.5px dashed var(--border); border-radius: var(--r-sm); background: var(--bg); padding: 22px 18px; text-align: center; cursor: pointer; transition: border-color .15s, background .15s; }
.dropzone:hover, .dropzone:focus-visible { border-color: var(--teal); background: var(--teal-tint); outline: none; }
.dropzone.is-drag { border-color: var(--teal-strong); background: var(--teal-tint); }
.dz-prompt, .dz-chosen { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.dropzone .dz-chosen { display: none; }
.dropzone.has-file .dz-prompt { display: none; }
.dropzone.has-file .dz-chosen { display: flex; }
.dropzone svg { width: 28px; height: 28px; color: var(--teal-strong); }
.dz-text { margin: 0; font-size: 14px; color: var(--muted); }
.dz-link { color: var(--teal-deep); font-weight: 600; }
.dz-file { margin: 0; font-size: 14px; font-weight: 600; color: var(--ink); word-break: break-all; }
.dz-change { margin: 0; font-size: 12.5px; color: var(--muted); }
/* Notiz beim Datei-Abruf */
.note-block { background: var(--teal-tint); border: 1px solid var(--teal-line); border-radius: var(--r-sm); padding: 12px 14px; margin-bottom: 16px; }
.note-label { margin: 0 0 4px; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .09em; text-transform: uppercase; color: var(--teal-deep); }
.note-text { margin: 0; font-size: 14px; color: var(--ink-soft); white-space: pre-wrap; word-break: break-word; }

/* Datei-Karte beim Abruf */
.file-card { display: flex; align-items: center; gap: 13px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 14px 16px; margin-bottom: 14px; }
.file-icon { flex: none; width: 30px; height: 30px; color: var(--teal-strong); }
.file-meta { min-width: 0; }
.file-name { margin: 0; font-weight: 600; font-size: 14.5px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-size { margin: 2px 0 0; font-size: 12.5px; color: var(--muted); }
.dl-status { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 12px; }
.dl-done { font-weight: 600; color: var(--teal-deep); font-size: 14px; }
.btn-link { background: none; border: 0; padding: 0; cursor: pointer; font-family: var(--font-body); font-size: 13.5px; color: var(--muted); text-decoration: underline; }
.btn-link:hover { color: var(--ink-soft); }

/* ---------- Auswertungsbereich (/admin) ---------- */
.admin-wrap { align-self: flex-start; width: 100%; padding: 8px 0 8px; }
.admin-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.admin-head h1 { margin: 0; }
.btn-ghost { background: none; border: 1px solid var(--border); color: var(--ink-soft); padding: 8px 16px; border-radius: var(--r-pill); font-family: var(--font-body); font-size: 14px; cursor: pointer; }
.btn-ghost:hover { border-color: var(--teal); color: var(--ink); }
.admin-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.metric-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 18px 20px; box-shadow: var(--shadow-sm); }
.metric-value { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: 30px; line-height: 1; color: var(--ink); }
.metric-label { margin: 8px 0 0; font-size: 13px; color: var(--muted); }
.admin-section { margin-top: 28px; }
.admin-section h2 { font-family: var(--font-display); font-weight: 600; font-size: 16px; margin: 0 0 14px; color: var(--ink); }
.admin-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.kv-row { display: flex; align-items: center; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 14px; color: var(--ink-soft); }
.kv-row span:last-child { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--ink); }
.admin-foot { margin-top: 28px; font-size: 12.5px; }
.chart-svg { width: 100%; height: auto; display: block; }
.chart-axis { stroke: var(--border); stroke-width: 1; }
.chart-bar { fill: var(--teal-strong); }
.chart-value { fill: var(--muted); font-family: var(--font-mono); font-size: 10px; }
.chart-label { fill: var(--muted); font-family: var(--font-mono); font-size: 10px; }
@media (max-width: 720px) {
    .admin-grid { grid-template-columns: 1fr 1fr; }
    .admin-cols { grid-template-columns: 1fr; gap: 8px; }
}

/* Fortschritt beim großen (chunked) Upload */
.upload-progress { margin-top: 16px; }
.up-row { display: flex; align-items: center; justify-content: space-between; font-size: 13.5px; color: var(--muted); margin-bottom: 6px; }
.up-row #upload-pct { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--ink); }
progress#upload-progress { display: block; width: 100%; height: 8px; border: 0; appearance: none; -webkit-appearance: none; background: var(--border); border-radius: var(--r-pill); overflow: hidden; }
progress#upload-progress::-webkit-progress-bar { background: var(--border); border-radius: var(--r-pill); }
progress#upload-progress::-webkit-progress-value { background: var(--teal-strong); border-radius: var(--r-pill); }
progress#upload-progress::-moz-progress-bar { background: var(--teal-strong); border-radius: var(--r-pill); }
.upload-progress .btn-link { margin-top: 10px; }

/* Dezenter Funnel-Hinweis nach dem Erstellen (nur Startseite) */
.result-cta { margin-top: 18px; text-align: center; font-size: 13px; color: var(--muted); }
.result-cta a { color: var(--teal-deep); text-decoration: none; font-weight: 600; }
.result-cta a:hover { text-decoration: underline; }

/* Sekundärer CTA am Ende der Reveal-Seite (Empfänger -> eigenes Erstellen) */
.reveal-cta { display: block; margin-top: 20px; text-align: center; }
