:root {
  color-scheme: light;
  --brand: #6717cd;
  --brand-2: #2871fa;
  --ink: #101218;
  --muted: #6b7280;
  --soft: #f6f7f8;
  --line: rgba(16, 18, 24, 0.11);
  --panel: rgba(255, 255, 255, 0.88);
  --green: #13a36f;
  --green-bg: #e9fbf2;
  --red: #dc2626;
  --red-bg: #fff0f0;
  --amber: #d97706;
  --amber-bg: #fff7ed;
  font-family: Lato, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
}

body {
  margin: 0;
  overflow: hidden;
  background: var(--soft);
  color: var(--ink);
}

.app-shell {
  position: relative;
  min-height: 100dvh;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(103, 23, 205, 0.46) 0%, rgba(40, 113, 250, 0.18) 32%, rgba(255, 255, 255, 0) 62%),
    radial-gradient(circle at 12% 18%, rgba(103, 23, 205, 0.17), transparent 28%),
    radial-gradient(circle at 85% 14%, rgba(40, 113, 250, 0.15), transparent 26%),
    linear-gradient(135deg, #ffffff 0%, #f6f7f8 52%, #eef1ff 100%);
  transition: background 450ms ease;
}

.app-shell.result-clean {
  background:
    radial-gradient(circle at 16% 18%, rgba(19, 163, 111, 0.22), transparent 30%),
    linear-gradient(135deg, #ffffff 0%, var(--green-bg) 100%);
}

.app-shell.result-alert {
  background:
    radial-gradient(circle at 16% 18%, rgba(220, 38, 38, 0.22), transparent 30%),
    linear-gradient(135deg, #ffffff 0%, var(--red-bg) 100%);
}

.app-header {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  height: 76px;
  padding: 20px clamp(18px, 4vw, 52px);
}

.brand-logo {
  width: min(280px, 58vw);
  height: auto;
  display: block;
  filter: drop-shadow(0 10px 22px rgba(16, 18, 24, 0.16));
}

.language {
  display: inline-flex;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 12px 35px rgba(16, 18, 24, 0.07);
}

.lang-btn {
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  padding: 9px 13px;
  cursor: pointer;
  font-weight: 900;
}

.lang-btn.active {
  background: var(--ink);
  color: #fff;
}

.screen {
  position: absolute;
  inset: 76px 0 0;
  display: grid;
  align-items: center;
  padding: clamp(18px, 4vw, 52px);
  opacity: 0;
  pointer-events: none;
  transform: translateY(18px) scale(0.985);
  transition: opacity 360ms ease, transform 360ms ease;
}

.app-shell[data-screen="start"] [data-panel="start"],
.app-shell[data-screen="scan"] [data-panel="scan"],
.app-shell[data-screen="result"] [data-panel="result"] {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.start-screen {
  grid-template-columns: 1.08fr 0.92fr;
  gap: clamp(24px, 5vw, 70px);
}

.hero-copy {
  max-width: 720px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--brand);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  font-family: "Red Hat Display", Inter, ui-sans-serif, system-ui, sans-serif;
}

h1 {
  margin-bottom: 18px;
  font-size: clamp(2.3rem, 6vw, 5.6rem);
  line-height: 0.98;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 12px;
  font-size: clamp(1.45rem, 3vw, 2.7rem);
  line-height: 1.05;
}

.hero-copy p:not(.eyebrow),
.lead-copy p,
.result-summary {
  color: #3f4652;
  font-size: clamp(1rem, 1.6vw, 1.25rem);
  line-height: 1.55;
}

.scan-card,
.progress-card,
.result-card,
.evidence-card,
.lead-drawer {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: 0 24px 80px rgba(16, 18, 24, 0.12);
  backdrop-filter: blur(18px);
}

.scan-card {
  padding: clamp(22px, 4vw, 34px);
}

label {
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-weight: 900;
}

.input-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin-top: 10px;
}

input,
textarea {
  width: 100%;
  border: 1px solid rgba(16, 18, 24, 0.16);
  border-radius: 12px;
  padding: 14px 15px;
  color: var(--ink);
  font: inherit;
  background: #fff;
  outline: none;
}

input:focus,
textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(103, 23, 205, 0.12);
}

button,
.secondary-link {
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);
  color: #fff;
  padding: 14px 18px;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  white-space: nowrap;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

button:hover,
.secondary-link:hover {
  background: linear-gradient(135deg, #5713b0 0%, #1f63e2 100%);
  box-shadow: 0 14px 34px rgba(103, 23, 205, 0.2);
  transform: translateY(-1px);
}

button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.trust-row span,
.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 10px;
  background: #eef0ff;
  color: var(--brand);
  font-size: 0.82rem;
  font-weight: 900;
}

.scan-screen {
  grid-template-columns: minmax(260px, 0.8fr) minmax(320px, 1.1fr);
  gap: clamp(24px, 5vw, 80px);
}

.scan-orbit {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 420px;
}

.radar {
  width: min(58vw, 420px);
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    conic-gradient(from 0deg, rgba(103, 23, 205, 0), rgba(103, 23, 205, 0.34), rgba(40, 113, 250, 0.28), rgba(103, 23, 205, 0)),
    radial-gradient(circle, rgba(255, 255, 255, 0.9) 0 22%, rgba(103, 23, 205, 0.08) 23% 100%);
  border: 1px solid rgba(103, 23, 205, 0.18);
  box-shadow: inset 0 0 0 42px rgba(255, 255, 255, 0.45), 0 35px 100px rgba(103, 23, 205, 0.16);
  animation: radarSpin 2.2s linear infinite;
}

.scan-domain {
  position: absolute;
  max-width: min(76%, 340px);
  padding: 13px 16px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@keyframes radarSpin {
  to {
    transform: rotate(360deg);
  }
}

.progress-card {
  padding: clamp(20px, 4vw, 34px);
}

.progress-list {
  display: grid;
  gap: 10px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.progress-item {
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(246, 247, 248, 0.9);
  color: #535b68;
}

.progress-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #e5e7eb;
  color: #777;
  font-size: 0.85rem;
  font-weight: 900;
}

.progress-item.active {
  color: var(--ink);
  background: #eef0ff;
}

.progress-item.active .progress-dot {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);
  color: #fff;
  animation: pulse 1s ease-in-out infinite;
}

.progress-item.done .progress-dot {
  background: var(--green);
  color: #fff;
}

@keyframes pulse {
  50% {
    transform: scale(1.12);
    box-shadow: 0 0 0 8px rgba(103, 23, 205, 0.12);
  }
}

.result-layout {
  display: grid;
  grid-template-columns: minmax(300px, 0.82fr) minmax(360px, 1.18fr);
  gap: 18px;
  height: 100%;
  align-items: stretch;
}

.result-screen {
  padding-bottom: 248px;
}

.result-card,
.evidence-card {
  padding: clamp(20px, 3vw, 30px);
  overflow: hidden;
}

.result-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.status-mark {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  color: #fff;
  font-size: 2.4rem;
  font-weight: 900;
  box-shadow: 0 24px 65px rgba(16, 18, 24, 0.16);
}

.status-mark.clean {
  background: var(--green);
}

.status-mark.suspicious {
  background: var(--amber);
}

.status-mark.likely_hacked,
.status-mark.urgent {
  background: var(--red);
}

.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 18px;
}

.stat {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 13px;
  background: rgba(255, 255, 255, 0.68);
}

.stat strong {
  display: block;
  font-size: 1.55rem;
}

.evidence-list {
  display: grid;
  gap: 10px;
  max-height: calc(100dvh - 470px);
  overflow: auto;
  padding-right: 4px;
}

.finding {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.72);
}

.finding h3 {
  margin: 9px 0;
  font-size: 0.96rem;
  overflow-wrap: anywhere;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  color: var(--muted);
  font-size: 0.82rem;
}

.proof {
  margin-top: 9px;
  padding: 10px;
  border-radius: 10px;
  background: #f5f6fa;
  overflow-wrap: anywhere;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78rem;
  line-height: 1.45;
}

.lead-drawer {
  position: absolute;
  z-index: 10;
  left: clamp(14px, 3vw, 42px);
  right: clamp(14px, 3vw, 42px);
  bottom: 16px;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 18px;
  padding: 14px 18px;
  transform: translateY(0);
}

.lead-drawer h2 {
  font-size: clamp(1.25rem, 2vw, 2rem);
  margin-bottom: 8px;
}

.lead-copy p:not(.eyebrow) {
  font-size: 1rem;
  margin-bottom: 10px;
}

.lead-drawer.hidden {
  display: none;
}

.lead-form {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.lead-form input,
.lead-form textarea {
  padding: 10px 12px;
}

.lead-form button {
  padding: 11px 14px;
}

.lead-form label:nth-of-type(4),
.lead-form button,
.form-status {
  grid-column: 1 / -1;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.secondary-link {
  background: #eef0ff;
  color: var(--brand);
  box-shadow: none;
}

.secondary-link:hover {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);
  color: #fff;
}

.form-status,
.muted {
  color: var(--muted);
}

.error {
  color: var(--red);
}

@media (max-width: 860px) {
  body {
    overflow: auto;
  }

  .app-shell {
    min-height: 100dvh;
    overflow: visible;
  }

  .screen {
    position: relative;
    inset: auto;
    min-height: calc(100dvh - 76px);
    display: none;
  }

  .result-screen {
    padding-bottom: 18px;
  }

  .app-shell[data-screen="start"] [data-panel="start"],
  .app-shell[data-screen="scan"] [data-panel="scan"],
  .app-shell[data-screen="result"] [data-panel="result"] {
    display: grid;
  }

  .start-screen,
  .scan-screen,
  .result-layout,
  .lead-drawer {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: clamp(2.2rem, 13vw, 4rem);
  }

  .input-row,
  .lead-form {
    grid-template-columns: 1fr;
  }

  button,
  .secondary-link {
    width: 100%;
  }

  .lead-drawer {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    margin: 0 14px 16px;
  }

  .evidence-list {
    max-height: none;
  }
}
