*, *::before, *::after { box-sizing: border-box; }

:root {
    --brand: #0e4cc4;
    --brand-600: #0b3f9f;
    --accent: #1fb981;
    --bg: #0b1220;
    --panel: #0f172a;
    --muted: #9aa4b2;
    --text: #e6edf3;
    --radius: 16px;
    --shadow: 0 10px 30px rgba(0, 0, 0, .25);
    --border: #1b2b52;
}

html, body { height: 100% }

body {
    margin: 0;
    font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
    color: var(--text);
    background: radial-gradient(1200px 600px at 10% -10%, rgba(14, 76, 196, .25), transparent 60%),
    radial-gradient(1000px 600px at 100% 0%, rgba(31, 185, 129, .2), transparent 60%),
    linear-gradient(#0b1220, #0b1220);
}

a { color: inherit }

.container { max-width: 1200px; margin: 0 auto; padding: 24px }

header { display: flex; align-items: center; justify-content: space-between; gap: 16px }

.brand { display: flex; align-items: center; gap: 14px }
.brand img { height: 44px; width: auto; border-radius: 10px }
.brand h1 { margin: 0; font-size: clamp(20px, 2.5vw, 28px) }

.btn {
    display: inline-flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 12px;
    text-decoration: none; font-weight: 700; line-height: 1; border: 1px solid transparent; cursor: pointer;
    transition: transform .08s ease, filter .2s ease, box-shadow .2s ease, background .2s ease;
    box-shadow: 0 3px 10px rgba(0, 0, 0, .2);
}
.btn:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(14, 76, 196, .35) }
.btn-primary { background: linear-gradient(180deg, var(--brand), var(--brand-600)); color: #fff }
.btn-strong { background: #152349; color: #eaf2ff; border-color: #2a4585 }

.hero { margin-top: 28px }
.hero-panel { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 26px; }
.hero h2 { margin: 0 0 8px 0; font-size: clamp(22px, 3.2vw, 32px) }
.hero p { margin: 0 0 18px 0; color: var(--muted) }
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px }

.apps { margin-top: 28px; display: grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap: 20px }
@media (max-width: 820px) { .apps { grid-template-columns:1fr } }

.card {
    position: relative; overflow: hidden; background: linear-gradient(180deg, #0f1a35 0%, #0d162c 100%);
    border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px;
    isolation: isolate; min-height: 190px;
}
.card h3 { margin: 0 0 8px 0; font-size: 20px }
.card p { margin: 0 0 14px 0; color: var(--muted) }

.download-row { display: flex; flex-wrap: wrap; gap: 10px }
.download-button {
    display: inline-flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; font-weight: 800;
    background: linear-gradient(180deg, #1d4ed8, #153a9c); border: 1px solid #2c4fb1; color: #eef3ff;
    text-decoration: none; box-shadow: 0 4px 14px rgba(21, 58, 156, .25); white-space: nowrap;
    transition: transform .08s ease, box-shadow .2s ease, filter .2s ease;
}
.download-button[aria-disabled="true"] { opacity: .55; pointer-events: none; filter: grayscale(.35) }

/* Right-side app artwork */
.card-art { position: absolute; inset: 0 0 0 auto; width: 100%; pointer-events: none; opacity: .05; background-repeat: no-repeat; background-position: 110% 60%; background-size: 300px auto; }
.card--survey .card-art { background-image: url('survey-logo.webp') }
.card--report .card-art { background-image: url('report-logo.png') }

footer { margin: 28px 0 10px 0; color: var(--muted); font-size: 13px; text-align: center }

/* Modal */
.overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, .55); display: none; z-index: 50 }
.overlay.active { display: block }
.modal { position: fixed; inset: 0; display: none; place-items: center; z-index: 60; padding: 20px }
.modal.active { display: grid }
.modal-dialog {
    width: min(500px, 100%);
    background: #0f1a35; border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow); padding: 20px;
}
.modal h3 { margin: 0 0 10px 0 }

/* Ensure form and inputs never overflow the dialog */
.modal form { display: grid; gap: 10px; margin-top: 8px; width: 100%; max-width: 100%; }
.input {
    width: 100%; max-width: 100%;
    padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border);
    background: #0c1530; color: var(--text);
}

.sr-only {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0,0,0,0);
    white-space: nowrap; border: 0;
}

.error { color: #f87171; min-height: 20px }
.row { display: flex; gap: 10px; justify-content: flex-end }
.link-quiet { color: var(--muted); text-decoration: underline dotted }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important } }