/* ============================================================================
   HackCheck (Ubuntu Guard) stylesheet.
   Mobile-first. Brand tokens follow BRAND_GUIDE.md section 8.
   ========================================================================= */

/* ----- Reset ----- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
img, svg, video { display: block; max-width: 100%; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
a { color: inherit; }

/* ----- Tokens ----- */
:root {
    --bg:               #1c1f22;
    --bg-soft:          #23262a;
    --surface:          #2b2e30;
    --surface-2:        #34373a;
    --border:           rgba(245,245,245,0.08);
    --border-strong:    rgba(245,245,245,0.18);

    --primary:          #1a7fc8;
    --primary-hover:    #2a8ed8;
    --primary-soft:     rgba(26,127,200,0.14);
    --accent:           #3bbdc6;
    --accent-soft:      rgba(59,189,198,0.14);
    --info:             #4A9EFF;

    --warn:             #ffa726;
    --warn-soft:        rgba(255,167,38,0.12);
    --crisis:           #FF6B6B;
    --crisis-soft:      rgba(255,107,107,0.12);
    --crisis-strong:    rgba(255,107,107,0.32);
    --ok:               #3bbdc6;
    --ok-soft:          rgba(59,189,198,0.12);

    --text:             #f5f5f5;
    --text-muted:       rgba(245,245,245,0.72);
    --text-dim:         rgba(245,245,245,0.55);

    --font-head:        'Exo 2', 'Calibri', 'Segoe UI', sans-serif;
    --font-body:        'Nunito', 'Calibri', 'Segoe UI', sans-serif;
    --font-mono:        'JetBrains Mono', 'Fira Code', ui-monospace, SFMono-Regular, Consolas, monospace;

    --radius-sm:        12px;
    --radius:           16px;
    --radius-lg:        24px;

    --shadow:           0 12px 24px rgba(0,0,0,0.24);
    --shadow-hover:     0 18px 32px rgba(0,0,0,0.28);

    --container:        720px;
    --container-wide:   1200px;

    --duration:         220ms;
    --ease:             cubic-bezier(0.2, 0, 0, 1);
}

/* ----- Body ----- */
body {
    font-family: var(--font-body);
    font-weight: 400;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Subtle decorative background, very low contrast so it does not fight copy */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(60vw 60vw at 12% -10%, rgba(26,127,200,0.10), transparent 60%),
        radial-gradient(50vw 50vw at 100% 100%, rgba(59,189,198,0.08), transparent 60%);
}

/* ----- Layout ----- */
.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}
.container--wide {
    max-width: var(--container-wide);
}

/* ----- Skip link (a11y) ----- */
.skip-link {
    position: absolute;
    top: -40px;
    left: 8px;
    background: var(--primary);
    color: #fff;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    z-index: 1000;
    text-decoration: none;
}
.skip-link:focus { top: 8px; }

/* ----- Brand mark (mobile-first; scales up at 560px and 880px) ----- */
.brand-mark {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text);
    min-width: 0;
}
.brand-mark__logo {
    width: 48px;
    height: auto;
    display: block;
    flex-shrink: 0;
    filter: drop-shadow(0 6px 14px rgba(26,127,200,0.25));
}
.brand-mark__text {
    display: flex;
    flex-direction: column;
    line-height: 1.05;
    min-width: 0;
}
.brand-mark__name {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: -0.015em;
    color: var(--text);
    line-height: 1;
}
.brand-mark__name span {
    color: var(--accent);
    font-weight: 700;
}
.brand-mark__tagline {
    font-family: var(--font-body);
    font-size: 0.68rem;
    color: var(--text-dim);
    margin-top: 5px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
@media (min-width: 560px) {
    .brand-mark { gap: 14px; }
    .brand-mark__logo { width: 56px; }
    .brand-mark__name { font-size: 1.7rem; }
    .brand-mark__tagline { font-size: 0.7rem; }
}
@media (min-width: 880px) {
    .brand-mark { gap: 16px; }
    .brand-mark__logo { width: 64px; }
    .brand-mark__name { font-size: 1.95rem; letter-spacing: -0.02em; }
    .brand-mark__tagline { font-size: 0.74rem; letter-spacing: 0.16em; }
}

/* Legacy .nav block kept for backward compatibility with any older view */
.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0;
}
.brand-mark__shield {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: grid;
    place-items: center;
    color: #fff;
}
.brand-mark__shield .icon { width: 18px; height: 18px; }
.nav-tag {
    font-family: var(--font-body);
    font-size: 0.72rem;
    background: var(--primary-soft);
    color: var(--accent);
    border: 1px solid rgba(59,189,198,0.25);
    padding: 5px 10px;
    border-radius: 999px;
    font-weight: 600;
    letter-spacing: 0.06em;
}

/* ----- Typography ----- */
.eyebrow {
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.72rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.24em;
    margin-bottom: 18px;
}
h1, h2, h3 {
    font-family: var(--font-head);
    line-height: 1.18;
    letter-spacing: -0.01em;
    font-weight: 700;
}
h1 {
    font-size: clamp(1.85rem, 5.6vw, 2.6rem);
    margin-bottom: 16px;
}
h1 strong { color: var(--accent); font-weight: 700; }
h2 {
    font-size: clamp(1.4rem, 3.6vw, 1.65rem);
    margin-bottom: 10px;
}
h3 {
    font-size: 1.05rem;
    margin-bottom: 6px;
}
p { line-height: 1.7; }
.lead {
    font-size: 1.02rem;
    color: var(--text-muted);
    max-width: 540px;
    margin: 0 auto 32px;
}

/* ----- Hero / form ----- */
.hero {
    padding: 32px 0 16px;
    text-align: center;
}
.scan-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 22px;
    box-shadow: var(--shadow);
    transition: border-color var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
    text-align: left;
}
.scan-card:focus-within {
    border-color: rgba(26,127,200,0.45);
    box-shadow: 0 0 0 1px rgba(26,127,200,0.25), var(--shadow-hover);
}
.field-group { display: flex; flex-direction: column; gap: 12px; }
.input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--bg-soft);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    transition: border-color var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
}
.input-wrap:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26,127,200,0.18);
}
.input-wrap .icon {
    width: 20px; height: 20px;
    color: var(--text-dim);
    margin-left: 14px;
    flex-shrink: 0;
}
.input-wrap input {
    flex: 1;
    background: transparent;
    border: 0;
    outline: none;
    padding: 14px 14px 14px 10px;
    font-size: 1rem;
    color: var(--text);
}
.input-wrap input::placeholder { color: var(--text-dim); }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 22px;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    transition: background-color var(--duration) var(--ease),
                color var(--duration) var(--ease),
                transform var(--duration) var(--ease),
                box-shadow var(--duration) var(--ease);
    border: 1px solid transparent;
    line-height: 1;
    min-height: 48px;
}
.btn .icon { width: 18px; height: 18px; }
.btn--primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 16px rgba(26,127,200,0.25);
}
.btn--primary:hover { background: var(--primary-hover); }
.btn--primary:active { transform: translateY(1px); }
.btn--whatsapp {
    background: #25D366;
    color: #042c14;
    box-shadow: 0 6px 18px rgba(37,211,102,0.28);
    font-weight: 800;
    font-size: 1rem;
    padding: 16px 26px;
}
.btn--whatsapp:hover { background: #1fb955; }
.btn--ghost {
    background: transparent;
    border: 1px solid var(--border-strong);
    color: var(--text-muted);
}
.btn--ghost:hover {
    border-color: var(--primary);
    color: var(--text);
}
.btn--block { width: 100%; }
.btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}
.btn[disabled] { opacity: 0.5; cursor: not-allowed; box-shadow: none; }

/* Trust strip */
.trust {
    display: flex;
    flex-wrap: wrap;
    gap: 14px 22px;
    justify-content: center;
    margin-top: 28px;
    color: var(--text-dim);
    font-size: 0.82rem;
}
.trust span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.trust .icon { width: 14px; height: 14px; color: var(--accent); }
.trust span::before { display: none; }

/* Form notice */
.notice {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 12px;
    color: var(--text-dim);
    font-size: 0.78rem;
    line-height: 1.5;
}
.notice .icon { width: 14px; height: 14px; margin-top: 3px; flex-shrink: 0; color: var(--text-dim); }

/* Error box */
.error-box {
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    background: var(--crisis-soft);
    border: 1px solid var(--crisis-strong);
    color: var(--crisis);
    font-size: 0.9rem;
    display: none;
}
.error-box.show { display: flex; gap: 10px; align-items: flex-start; }
.error-box .icon { width: 18px; height: 18px; flex-shrink: 0; margin-top: 2px; }

/* ----- Recon terminal (OPT-3) ----- */
.recon {
    display: none;
    padding: 32px 0;
}
.recon.show { display: block; }
.recon__terminal {
    background: #11141a;
    border: 1px solid rgba(59,189,198,0.18);
    border-radius: var(--radius);
    padding: 18px 18px 22px;
    box-shadow: var(--shadow);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    line-height: 1.7;
    color: var(--text-muted);
    text-align: left;
    overflow: hidden;
}
.recon__bar {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    color: var(--text-dim);
    font-size: 0.72rem;
    letter-spacing: 0.06em;
}
.recon__dots {
    display: inline-flex;
    gap: 5px;
    margin-right: 6px;
}
.recon__dots span {
    width: 9px; height: 9px; border-radius: 50%;
    background: rgba(255,255,255,0.18);
}
.recon__line {
    opacity: 0;
    transform: translateY(2px);
    transition: opacity var(--duration) var(--ease), transform var(--duration) var(--ease);
    white-space: pre-wrap;
}
.recon__line.show { opacity: 1; transform: translateY(0); }
.recon__line .prompt { color: var(--accent); }
.recon__line .label { color: var(--info); }
.recon__line .ok    { color: var(--ok); }
.recon__line .miss  { color: var(--text-dim); }
.recon__line .warn  { color: var(--warn); }
.recon__line .alert { color: var(--crisis); font-weight: 700; }
.recon__caret {
    display: inline-block;
    width: 9px; height: 1.05em;
    background: var(--accent);
    margin-left: 2px;
    vertical-align: -2px;
    animation: blink 0.9s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* ----- Stealer interstitial (OPT-7) ----- */
.stealer-curtain {
    display: none;
    position: fixed;
    inset: 0;
    background: linear-gradient(180deg, #2a0d10 0%, #1c1f22 80%);
    z-index: 50;
    padding: 24px;
    overflow-y: auto;
    animation: curtain-in 360ms var(--ease);
}
.stealer-curtain.show { display: block; }
@keyframes curtain-in {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}
.stealer-curtain__inner {
    max-width: 640px;
    margin: 8vh auto 0;
    text-align: left;
    background: rgba(28,31,34,0.85);
    border: 1px solid var(--crisis-strong);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow);
}
.stealer-curtain__icon {
    width: 56px; height: 56px;
    border-radius: 14px;
    background: var(--crisis-soft);
    border: 1px solid var(--crisis-strong);
    display: grid;
    place-items: center;
    color: var(--crisis);
    margin-bottom: 18px;
}
.stealer-curtain__icon .icon { width: 28px; height: 28px; }
.stealer-curtain h2 { font-size: clamp(1.4rem, 4.4vw, 1.85rem); margin-bottom: 12px; }
.stealer-curtain p { color: var(--text-muted); margin-bottom: 14px; }
.stealer-curtain .btn { margin-top: 8px; }

/* ----- Results ----- */
.results { display: none; padding-bottom: 80px; }
.results.show { display: block; }

.score-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px 24px 28px;
    text-align: center;
    margin-bottom: 14px;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}
.score-card::before {
    content: "";
    position: absolute;
    top: -80px; left: 50%;
    width: 220px; height: 220px;
    border-radius: 50%;
    transform: translateX(-50%);
    background: var(--score-glow, var(--primary-soft));
    pointer-events: none;
    filter: blur(10px);
}
.score-card > * { position: relative; }
.score-eyebrow {
    font-family: var(--font-body);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.24em;
    color: var(--text-dim);
    margin-bottom: 8px;
}
.score-display {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: clamp(4rem, 14vw, 6rem);
    line-height: 1;
    margin-bottom: 6px;
    transition: color var(--duration) var(--ease);
}
.score-display.risk-low    { color: var(--ok); }
.score-display.risk-medium { color: var(--warn); }
.score-display.risk-high   { color: var(--crisis); }

.risk-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    margin-bottom: 14px;
}
.risk-pill::before {
    content: "";
    width: 7px; height: 7px;
    border-radius: 50%;
    background: currentColor;
}
.risk-pill--low    { background: var(--ok-soft);     color: var(--ok); }
.risk-pill--medium { background: var(--warn-soft);   color: var(--warn); }
.risk-pill--high   { background: var(--crisis-soft); color: var(--crisis); }

.score-verdict {
    font-size: 1rem;
    color: var(--text-muted);
    margin: 0 auto 18px;
    max-width: 480px;
}

/* Score deduction chips (OPT-4) */
.deductions {
    display: flex; flex-wrap: wrap; gap: 6px; justify-content: center;
    margin-top: 14px;
}
.deduction {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 999px;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    font-size: 0.74rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
}
.deduction strong { color: var(--crisis); font-weight: 700; }

/* Score bar */
.score-bar {
    margin-top: 18px;
    height: 6px;
    background: rgba(255,255,255,0.06);
    border-radius: 3px;
    overflow: hidden;
}
.score-bar__fill {
    height: 100%;
    width: 0;
    border-radius: 3px;
    transition: width 1100ms var(--ease);
}
.score-bar__fill.risk-low    { background: linear-gradient(90deg, var(--accent), var(--info)); }
.score-bar__fill.risk-medium { background: linear-gradient(90deg, var(--warn), #ff8b3d); }
.score-bar__fill.risk-high   { background: linear-gradient(90deg, var(--crisis), #ff3b3b); }

/* Stat row */
.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 14px;
}
.stat {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px 12px;
    text-align: center;
}
.stat__value {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 1.35rem;
    margin-bottom: 4px;
}
.stat__value.warn { color: var(--warn); }
.stat__value.danger { color: var(--crisis); }
.stat__value.ok { color: var(--ok); }
.stat__label {
    font-size: 0.72rem;
    color: var(--text-dim);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* Section card */
.section-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 22px;
    margin-bottom: 14px;
    box-shadow: var(--shadow);
}
.section-card__head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}
.section-card__head .icon-wrap {
    width: 36px; height: 36px;
    border-radius: 10px;
    background: var(--primary-soft);
    color: var(--accent);
    display: grid; place-items: center;
}
.section-card__head .icon-wrap .icon { width: 18px; height: 18px; }
.section-card__head h2 { margin-bottom: 0; font-size: 1.05rem; }
.section-card__sub {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-top: -4px;
    margin-bottom: 12px;
}

/* Dossier paragraph (OPT-8) */
.dossier {
    font-size: 1rem;
    line-height: 1.75;
    color: var(--text);
}

/* Breach list */
.breach-list {
    display: flex; flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}
.breach-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}
.breach-item__icon {
    width: 32px; height: 32px;
    border-radius: 8px;
    background: var(--crisis-soft);
    color: var(--crisis);
    display: grid; place-items: center;
    flex-shrink: 0;
}
.breach-item__icon .icon { width: 16px; height: 16px; }
.breach-item__name { flex: 1; font-weight: 600; font-size: 0.95rem; word-break: break-word; }
.breach-item__tag {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 6px;
    background: var(--crisis-soft);
    color: var(--crisis);
    letter-spacing: 0.06em;
}

/* Data tags */
.data-tags {
    display: flex; flex-wrap: wrap; gap: 6px;
}
.data-tag {
    font-size: 0.78rem;
    padding: 5px 10px;
    border-radius: 8px;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    color: var(--text-muted);
}
.data-tag.sensitive {
    background: var(--crisis-soft);
    border-color: var(--crisis-strong);
    color: var(--crisis);
}

/* Recommendations */
.rec-list {
    display: flex; flex-direction: column; gap: 10px;
}
.rec {
    display: flex; gap: 12px;
    padding: 14px 16px;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}
.rec--critical { border-color: var(--crisis-strong); background: var(--crisis-soft); }
.rec--high { border-color: rgba(255,167,38,0.28); }
.rec__icon {
    width: 36px; height: 36px;
    border-radius: 10px;
    background: var(--bg);
    color: var(--accent);
    display: grid; place-items: center;
    flex-shrink: 0;
}
.rec--critical .rec__icon { background: rgba(255,107,107,0.16); color: var(--crisis); }
.rec--high .rec__icon { background: rgba(255,167,38,0.18); color: var(--warn); }
.rec__icon .icon { width: 18px; height: 18px; }
.rec__body h3 { font-size: 0.97rem; margin-bottom: 4px; }
.rec__body p { color: var(--text-muted); font-size: 0.88rem; line-height: 1.6; }


/* WhatsApp pre-launch confirm (OPT-10) */
.modal {
    display: none;
    position: fixed; inset: 0;
    background: rgba(10,12,14,0.72);
    backdrop-filter: blur(6px);
    z-index: 60;
    align-items: center;
    justify-content: center;
    padding: 18px;
    animation: modal-bg-in 200ms var(--ease);
}
.modal.show { display: flex; }
.modal__panel {
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    padding: 22px;
    max-width: 460px;
    width: 100%;
    box-shadow: var(--shadow-hover);
    animation: modal-in 220ms var(--ease);
}
.modal__panel h3 { font-size: 1.1rem; margin-bottom: 8px; }
.modal__panel p { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 8px; }
.modal__share-preview {
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    font-size: 0.82rem;
    color: var(--text-muted);
    margin: 12px 0 16px;
    line-height: 1.55;
}
.modal__actions {
    display: flex; gap: 10px; flex-wrap: wrap;
}
.modal__actions .btn { flex: 1; }
@keyframes modal-bg-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes modal-in {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Rescan link */
.rescan {
    text-align: center;
    margin-top: 6px;
}

/* Footer */
.footer {
    border-top: 1px solid var(--border);
    margin-top: 28px;
    padding: 28px 0 36px;
    color: var(--text-dim);
    font-size: 0.8rem;
    text-align: center;
}
.footer a { color: var(--text-dim); text-decoration: none; border-bottom: 1px dotted transparent; transition: color var(--duration) var(--ease), border-color var(--duration) var(--ease); }
.footer a:hover { color: var(--accent); border-bottom-color: var(--accent); }
.footer__contact {
    margin-top: 6px;
    font-family: var(--font-mono);
    font-size: 0.74rem;
    color: var(--text-dim);
}

/* Hidden helper */
.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Icon component */
.icon {
    width: 20px; height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
}

/* Reveal animation */
.reveal {
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 480ms var(--ease), transform 480ms var(--ease);
}
.reveal.show { opacity: 1; transform: translateY(0); }
.reveal[data-stagger="1"] { transition-delay: 80ms; }
.reveal[data-stagger="2"] { transition-delay: 160ms; }
.reveal[data-stagger="3"] { transition-delay: 240ms; }
.reveal[data-stagger="4"] { transition-delay: 320ms; }
.reveal[data-stagger="5"] { transition-delay: 400ms; }
.reveal[data-stagger="6"] { transition-delay: 480ms; }

/* ============================================================================
   Breakpoints. Mobile first defaults above; widen layout from 480px up.
   ========================================================================= */
@media (min-width: 480px) {
    .hero { padding: 56px 0 24px; }
    .field-group { flex-direction: row; }
    .field-group .input-wrap { flex: 1; }
    .field-group .btn { min-width: 160px; }
    .scan-card { padding: 26px 28px; }
    .stats { grid-template-columns: repeat(3, 1fr); gap: 12px; }
    .stat__value { font-size: 1.55rem; }
    .stat { padding: 18px 14px; }
}

@media (min-width: 768px) {
    :root { --container: 720px; }
    .hero { padding: 72px 0 32px; }
    h1 { font-size: clamp(2.4rem, 4vw, 2.85rem); }
    .lead { font-size: 1.08rem; }
    .scan-card { padding: 30px 32px; }
    .section-card { padding: 24px 26px; }
    .modal__panel { padding: 28px; }
    .stealer-curtain__inner { padding: 36px; }
}

@media (min-width: 1024px) {
    :root { --container: 760px; }
    .hero { padding: 88px 0 40px; }
}

/* ============================================================================
   Reduced motion (OPT-5). Disable transforms, keep fades.
   ========================================================================= */
@media (prefers-reduced-motion: reduce) {
    * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
    html { scroll-behavior: auto; }
    .reveal { transform: none; }
    .recon__caret { animation: none; opacity: 1; }
    .score-bar__fill { transition: none; }
}

/* ============================================================================
   Dashboard landing (topbar + 2-col hero + metric panel + feature grid).
   Built on top of the existing token system.
   ========================================================================= */

/* ---- Topbar (mobile-first) ---- */
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 22px;
}
.topbar__meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

/* On phones: just the pulsing dot. Text reappears on tablet+. */
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0;
    padding: 7px;
    border-radius: 999px;
    background: var(--ok-soft);
    border: 1px solid rgba(59,189,198,0.25);
    color: var(--ok);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}
.status-pill__label {
    display: none;
}
@media (min-width: 560px) {
    .topbar { padding: 18px 0; margin-bottom: 28px; gap: 16px; }
    .status-pill { gap: 8px; padding: 6px 12px; }
    .status-pill__label { display: inline; }
}
@media (min-width: 880px) {
    .topbar { padding: 22px 0; margin-bottom: 32px; }
}
.status-pill__dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--ok);
    box-shadow: 0 0 0 4px rgba(59,189,198,0.18);
    animation: pulse-dot 1.8s ease-in-out infinite;
}
@keyframes pulse-dot {
    0%, 100% { box-shadow: 0 0 0 0 rgba(59,189,198,0.45); }
    50%      { box-shadow: 0 0 0 6px rgba(59,189,198,0); }
}

/* ---- 2-col dashboard grid ---- */
.dashboard-grid {
    display: grid;
    gap: 28px;
    grid-template-columns: 1fr;
    align-items: start;
    padding: 12px 0 8px;
}
@media (min-width: 960px) {
    .dashboard-grid {
        grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
        gap: 32px;
    }
}
.dashboard-grid__primary { text-align: left; }
.dashboard-grid__primary h1 { text-align: left; }
.dashboard-grid__primary .lead { margin: 0 0 24px; max-width: 560px; }

/* Override the centred hero defaults inside the dashboard layout */
#hero .hero { padding: 0; text-align: left; }

/* ---- Scan-card panel variant ---- */
.scan-card--panel {
    text-align: left;
    padding: 22px 22px 18px;
}
.scan-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 14px;
    margin-bottom: 14px;
    border-bottom: 1px solid var(--border);
}
.scan-card__title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text);
}
.scan-card__title .icon {
    width: 16px; height: 16px;
    color: var(--accent);
}
.scan-card__sub-pill {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    padding: 4px 8px;
    border-radius: 6px;
    background: var(--bg-soft);
    border: 1px solid var(--border-strong);
    color: var(--text-dim);
    letter-spacing: 0.04em;
}

/* Trust strip inside dashboard primary */
.dashboard-grid__primary .trust {
    justify-content: flex-start;
    margin-top: 22px;
}

/* ---- Metric panel (right column) ---- */
.metric-panel {
    background: linear-gradient(180deg, rgba(43,46,48,0.95) 0%, rgba(35,38,42,0.95) 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 22px 22px 18px;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}
.metric-panel::before {
    content: "";
    position: absolute;
    inset: -1px -1px auto -1px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-top-left-radius: var(--radius-lg);
    border-top-right-radius: var(--radius-lg);
}
.metric-panel__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}
.metric-panel__eyebrow {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-dim);
}
.metric-panel__live {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    color: var(--ok);
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.metric-panel__live-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--ok);
    animation: pulse-dot 1.8s ease-in-out infinite;
}
.metric-panel__title {
    font-family: var(--font-head);
    font-size: 1.15rem;
    margin: 0 0 16px;
    color: var(--text);
}

.metric-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 16px;
}
.metric-tile {
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px;
    transition: border-color var(--duration) var(--ease), transform var(--duration) var(--ease);
}
.metric-tile:hover {
    border-color: rgba(26,127,200,0.35);
    transform: translateY(-2px);
}
.metric-tile__icon {
    display: inline-flex;
    width: 30px; height: 30px;
    border-radius: 8px;
    background: var(--primary-soft);
    color: var(--accent);
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}
.metric-tile__icon .icon { width: 16px; height: 16px; }
.metric-tile__value {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 1.4rem;
    color: var(--text);
    line-height: 1.1;
}
.metric-tile__label {
    font-size: 0.78rem;
    color: var(--text-dim);
    margin-top: 2px;
}

.metric-panel__feed {
    list-style: none;
    margin: 0;
    padding: 12px 0 0;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.metric-panel__feed li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.82rem;
    color: var(--text-muted);
}
.metric-panel__feed em {
    font-style: normal;
    font-size: 0.72rem;
    color: var(--ok);
    margin-left: auto;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-weight: 700;
}
.dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.dot--ok { background: var(--ok); box-shadow: 0 0 0 3px rgba(59,189,198,0.16); }

/* ---- Feature grid (below the hero) ---- */
.feature-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    margin: 36px 0 12px;
}
@media (min-width: 720px) {
    .feature-grid { grid-template-columns: repeat(3, 1fr); }
}
.feature-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    transition: border-color var(--duration) var(--ease), transform var(--duration) var(--ease);
}
.feature-card:hover {
    border-color: rgba(59,189,198,0.32);
    transform: translateY(-2px);
}
.feature-card__icon {
    display: inline-flex;
    width: 36px; height: 36px;
    border-radius: 10px;
    background: var(--primary-soft);
    color: var(--accent);
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}
.feature-card__icon .icon { width: 18px; height: 18px; }
.feature-card h3 {
    font-family: var(--font-head);
    font-size: 1rem;
    margin: 0 0 6px;
}
.feature-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.55;
    margin: 0;
}

/* On dashboard layout, the recon + results sections should re-narrow */
#recon, #results {
    max-width: var(--container);
    margin-left: auto;
    margin-right: auto;
}

/* ============================================================================
   Scan banner + thinking-dots + animated step states.
   This is what the user sees while the API request is in flight, and what
   makes the wait feel intentional rather than frozen.
   ========================================================================= */

/* --- Reusable thinking dots (3 bouncing dots) --- */
.dots {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.dots span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    opacity: 0.35;
    animation: dot-bounce 1.4s ease-in-out infinite;
}
.dots span:nth-child(2) { animation-delay: 0.18s; }
.dots span:nth-child(3) { animation-delay: 0.36s; }
@keyframes dot-bounce {
    0%, 80%, 100% { opacity: 0.3; transform: translateY(0); }
    40%           { opacity: 1;   transform: translateY(-4px); }
}

/* --- Scan banner (above the recon terminal) --- */
.scan-banner {
    background: linear-gradient(180deg, rgba(43,46,48,0.95), rgba(35,38,42,0.95));
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 20px;
    margin-bottom: 16px;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}
.scan-banner::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--accent), var(--primary));
    background-size: 200% 100%;
    animation: scan-sweep 2.4s linear infinite;
}
@keyframes scan-sweep {
    0%   { background-position:   0% 0; }
    100% { background-position: 200% 0; }
}
.scan-banner__head {
    display: flex;
    align-items: center;
    gap: 14px;
}
.scan-banner__indicator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px; height: 36px;
    border-radius: 10px;
    background: var(--primary-soft);
    border: 1px solid rgba(26,127,200,0.28);
    flex-shrink: 0;
}
.scan-banner__text {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.scan-banner__title {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 0.92rem;
    color: var(--text);
    letter-spacing: 0.01em;
}
.scan-banner__phase {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--accent);
    margin-top: 2px;
    transition: opacity 220ms var(--ease);
}
.scan-banner__counter {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-dim);
    padding: 4px 8px;
    border-radius: 6px;
    background: var(--bg-soft);
    border: 1px solid var(--border-strong);
    letter-spacing: 0.04em;
    flex-shrink: 0;
}
.scan-banner__bar {
    margin-top: 14px;
    height: 4px;
    background: var(--bg-soft);
    border-radius: 999px;
    overflow: hidden;
}
.scan-banner__bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 999px;
    transition: width 380ms var(--ease);
    box-shadow: 0 0 12px rgba(59,189,198,0.5);
}

/* --- Step row states (inside the terminal) --- */
.recon__line[data-step] {
    display: flex;
    align-items: center;
    gap: 0;
    flex-wrap: wrap;
}
.recon__status {
    font-weight: 700;
    margin-left: 4px;
}
.recon__pad {
    color: var(--text-dim);
    white-space: pre;
}
.recon__inline-dots {
    display: none;
    align-items: center;
    gap: 3px;
    margin-left: 8px;
}
.recon__inline-dots span {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--accent);
    opacity: 0.35;
    animation: dot-bounce 1.4s ease-in-out infinite;
}
.recon__inline-dots span:nth-child(2) { animation-delay: 0.18s; }
.recon__inline-dots span:nth-child(3) { animation-delay: 0.36s; }

.recon__line--queued .recon__status {
    color: var(--text-dim);
    font-style: italic;
    font-weight: 400;
}
.recon__line--active .recon__status {
    color: var(--accent);
    font-style: italic;
    font-weight: 400;
}
.recon__line--active .recon__inline-dots {
    display: inline-flex;
}
.recon__line--active .label {
    color: var(--accent);
    text-shadow: 0 0 8px rgba(59,189,198,0.45);
}
.recon__line--done .recon__inline-dots {
    display: none;
}
.recon__line--done .label {
    opacity: 0.7;
}

/* The result-state colour utilities reuse the existing tokens */
.recon__status.ok    { color: var(--ok); font-style: normal; }
.recon__status.warn  { color: var(--warn); font-style: normal; }
.recon__status.miss  { color: var(--text-dim); font-style: normal; }
.recon__status.alert { color: var(--crisis); font-weight: 700; font-style: normal; }

/* ===================================================================
   Phase 1 (2026-05): Recommendation actions + alert signup + secondary row.
   Layered onto the existing HackCheck design tokens.
   =================================================================== */

/* --- Recommendation card additions ------------------------------- */

.rec__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
}
.rec__header h3 {
    margin: 0;
    flex: 1;
}

.rec__done {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: 1px solid rgba(245, 245, 245, 0.18);
    color: rgba(245, 245, 245, 0.72);
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    flex-shrink: 0;
    transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}
.rec__done .icon {
    width: 14px;
    height: 14px;
}
.rec__done:hover,
.rec__done:focus-visible {
    border-color: rgba(59, 189, 198, 0.55);
    color: #f5f5f5;
    outline: none;
}
.rec__done[aria-pressed="true"] {
    background: rgba(59, 189, 198, 0.18);
    border-color: rgba(59, 189, 198, 0.55);
    color: #3bbdc6;
}

.rec--done {
    opacity: 0.55;
}
.rec--done .rec__header h3,
.rec--done .rec__body > p {
    text-decoration: line-through;
    text-decoration-color: rgba(245, 245, 245, 0.35);
}

/* --- Actions row pill buttons ------------------------------------ */

.rec__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.rec__actions .tool-pill,
.rec__actions .service-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(245, 245, 245, 0.05);
    border: 1px solid rgba(245, 245, 245, 0.12);
    color: #f5f5f5;
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 600;
    transition: background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
}
.rec__actions .tool-pill:hover,
.rec__actions .tool-pill:focus-visible,
.rec__actions .service-pill:hover,
.rec__actions .service-pill:focus-visible {
    background: rgba(26, 127, 200, 0.18);
    border-color: rgba(26, 127, 200, 0.45);
    outline: none;
}
.rec__actions .service-pill {
    background: rgba(255, 107, 107, 0.10);
    border-color: rgba(255, 107, 107, 0.32);
    color: #ff9b9b;
}
.rec__actions .service-pill:hover,
.rec__actions .service-pill:focus-visible {
    background: rgba(255, 107, 107, 0.18);
    border-color: rgba(255, 107, 107, 0.55);
    color: #ffbcbc;
}

.rec__wa {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    background: #25D366;
    color: #fff;
    border: 1px solid #25D366;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 160ms ease, transform 160ms ease;
}
.rec__wa .icon {
    width: 14px;
    height: 14px;
    fill: currentColor;
}
.rec__wa:hover,
.rec__wa:focus-visible {
    background: #1ebd5b;
    outline: none;
}

/* --- Alert signup block ------------------------------------------ */

.alert-signup {
    background: rgba(37, 46, 48, 0.78);
    border: 1px solid rgba(245, 245, 245, 0.08);
    border-radius: 24px;
    padding: clamp(20px, 4vw, 32px);
    margin: 24px 0;
    text-align: center;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.24);
}
.alert-signup__eyebrow {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: #3bbdc6;
    margin-bottom: 10px;
}
.alert-signup h2 {
    font-family: 'Exo 2', sans-serif;
    font-size: clamp(1.3rem, 3vw, 1.7rem);
    margin: 0 0 8px;
    color: #f5f5f5;
}
.alert-signup__sub {
    color: rgba(245, 245, 245, 0.72);
    max-width: 48ch;
    margin: 0 auto 20px;
}
.alert-signup__form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 460px;
    margin: 0 auto;
    text-align: left;
}
.alert-signup__consent {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.85rem;
    color: rgba(245, 245, 245, 0.78);
    line-height: 1.4;
}
.alert-signup__consent input[type="checkbox"] {
    margin-top: 3px;
    flex-shrink: 0;
}
.alert-signup__privacy {
    font-size: 0.78rem;
    color: rgba(245, 245, 245, 0.55);
    margin: 0;
    text-align: center;
}
.alert-signup__privacy a {
    color: rgba(245, 245, 245, 0.85);
    text-decoration: underline;
}
.alert-signup__error {
    background: rgba(255, 107, 107, 0.12);
    border: 1px solid rgba(255, 107, 107, 0.35);
    color: #ff9b9b;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 0.88rem;
    text-align: center;
}
.alert-signup__success {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(59, 189, 198, 0.14);
    border: 1px solid rgba(59, 189, 198, 0.35);
    color: #3bbdc6;
    padding: 14px 22px;
    border-radius: 999px;
    font-weight: 600;
}
/* The form toggles `hidden` on this element via JS. Our display:inline-flex
   above would otherwise override the user-agent [hidden] rule and the success
   bubble would show permanently. */
.alert-signup__success[hidden] { display: none; }

/* --- Secondary actions row (under the alert signup) -------------- */

.results-secondary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 16px 24px;
    margin: 18px 0;
}
.results-secondary__wa {
    color: rgba(245, 245, 245, 0.72);
    font-size: 0.95rem;
    text-decoration: none;
    transition: color 160ms ease;
}
.results-secondary__wa:hover,
.results-secondary__wa:focus-visible {
    color: #25D366;
    outline: none;
}

/* ===================================================================
   Loading state — bug fix + Claude-style shimmering verb.

   FIX: <section id="recon"> visibility. JS toggles `.show` on the id'd
   <section>, but the legacy CSS at line 384 targeted `.recon.show` —
   the INNER <div class="recon">, which never received the class. Result:
   the terminal stayed hidden during scans, the user saw a blank page.

   The rules below bind visibility to the JS-managed id, and override the
   legacy display:none on the inner .recon when its parent section is
   active. Doing the same for #results stops the empty result cards from
   taking layout space before the scan completes.
   =================================================================== */
#recon { display: none; }
#recon.show { display: block; }
#recon.show .recon { display: block; }

#results { display: none; }
#results.show { display: block; }

/* -------------------------------------------------------------------
   Claude-verb-style loading headline. A single large shimmering phrase
   sits above the recon terminal. The phrase text is kept in sync with
   the scan-banner phase via setReconPhase() in app.js, so it rotates
   through "Querying breach databases…", "Scanning paste sites…", etc.
   ------------------------------------------------------------------- */
.thinking {
    text-align: center;
    padding: 28px 12px 12px;
    margin-bottom: 18px;
}
.thinking__verb {
    display: inline-block;
    font-family: 'Exo 2', sans-serif;
    font-weight: 700;
    font-size: clamp(1.45rem, 4vw, 2.1rem);
    letter-spacing: -0.01em;
    line-height: 1.25;
    background-image: linear-gradient(
        90deg,
        rgba(245, 245, 245, 0.28) 0%,
        rgba(245, 245, 245, 0.4)  35%,
        rgba(245, 245, 245, 1)    50%,
        rgba(245, 245, 245, 0.4)  65%,
        rgba(245, 245, 245, 0.28) 100%
    );
    background-size: 250% 100%;
    background-repeat: no-repeat;
    -webkit-background-clip: text;
            background-clip: text;
    color: transparent;
    animation: thinking-shimmer 2.4s linear infinite;
    transition: opacity 240ms var(--ease);
}
@keyframes thinking-shimmer {
    0%   { background-position: 250% 0; }
    100% { background-position: -150% 0; }
}
.thinking__hint {
    margin: 10px auto 0;
    color: var(--text-dim);
    font-size: 0.82rem;
    max-width: 36ch;
}
@media (prefers-reduced-motion: reduce) {
    .thinking__verb {
        animation: none;
        background-image: none;
        -webkit-background-clip: initial;
                background-clip: initial;
        color: var(--text);
    }
}
