@import url('https://fonts.googleapis.com/css2?family=Sora:wght@400;600;700;800&family=IBM+Plex+Sans:wght@400;500;600&display=swap');

:root {
  --maroon: #780000;
  --red: #c1121f;
  --cream: #ffffff;
  --navy: #003049;
  --steel: #669bbc;
  --display: 'Sora', sans-serif;
  --body: 'IBM Plex Sans', sans-serif;
}

* { box-sizing: border-box; }

/* .hero declares its own display:flex, which otherwise ties in specificity
   with the browser's default [hidden] rule and can win - force hidden to
   always actually hide, regardless of what else targets the element. */
[hidden] { display: none !important; }

html, body {
  height: 100%;
  margin: 0;
  overflow: hidden;
}

body {
  background: var(--navy);
  color: var(--cream);
  font-family: var(--body);
}

.hero {
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: 32px clamp(24px, 5vw, 72px);
}

.logo {
  height: 34px;
  width: auto;
  align-self: flex-start;
}

.hero-body {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(24px, 4vw, 64px);
}

.hero-copy {
  max-width: 640px;
  margin-left: clamp(20px, 8vw, 120px);
}

.eyebrow {
  display: none; /* deliberately no eyebrow label - see artifact-design guidance */
}

h1 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(32px, 4.2vw, 56px);
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0 0 20px;
  color: var(--cream);
}

.subhead {
  font-size: clamp(14px, 1.1vw, 19px);
  line-height: 1.55;
  color: var(--steel);
  margin: 0 0 36px;
  white-space: nowrap;
}

.scan-form {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.scan-form input[type="text"] {
  flex: 1 1 260px;
  min-width: 0;
  padding: 16px 18px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: var(--cream);
  color: var(--navy);
  font-family: var(--body);
  font-size: 16px;
}

.scan-form input[type="text"]::placeholder {
  color: #7a6a52;
}

.scan-form input[type="text"]:focus {
  outline: none;
  border-color: var(--steel);
  box-shadow: 0 0 0 3px rgba(102, 155, 188, 0.45);
}

.scan-form button {
  flex: 0 0 auto;
  padding: 16px 28px;
  border-radius: 10px;
  border: none;
  background: var(--red);
  color: var(--cream);
  font-family: var(--body);
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.scan-form button:hover {
  background: var(--maroon);
}

.scan-form button:focus-visible {
  outline: 3px solid var(--steel);
  outline-offset: 2px;
}

.disclaimer {
  white-space: normal;
  margin: 14px 0 0;
}

.form-error {
  color: var(--red);
  font-family: var(--body);
  font-size: 14px;
  font-weight: 600;
  margin: 10px 0 0;
}

/* ---------------------------------------------------------------------
   Results view
   --------------------------------------------------------------------- */

.results-view {
  height: 100vh;
  height: 100dvh;
  overflow-y: auto;
  padding: 32px clamp(24px, 5vw, 72px) 64px;
}

.results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}

.back-btn {
  background: none;
  border: 1px solid var(--steel);
  color: var(--cream);
  font-family: var(--body);
  font-size: 14px;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 8px;
  cursor: pointer;
}

.back-btn:hover {
  background: rgba(102, 155, 188, 0.15);
}

.results-inner {
  max-width: 760px;
  margin: 0 auto;
}

#resultsHeading {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(22px, 2.6vw, 30px);
  color: var(--cream);
  margin: 0 0 28px;
}

.results-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.result-card {
  background: #ffffff;
  border-radius: 14px;
  padding: 20px 22px;
  border-left: 6px solid var(--steel);
}

.result-card.severity-success { border-left-color: #2f9e44; }
.result-card.severity-info { border-left-color: var(--steel); }
.result-card.severity-warning { border-left-color: #c97a1b; }
.result-card.severity-critical { border-left-color: var(--red); }
.result-card.severity-error { border-left-color: var(--maroon); }

.result-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.result-label {
  font-family: var(--display);
  font-weight: 700;
  font-size: 16px;
  color: var(--navy);
}

.result-chip {
  flex: 0 0 auto;
  font-family: var(--body);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 4px 10px;
  border-radius: 999px;
  color: #ffffff;
}

.chip-success { background: #2f9e44; }
.chip-info { background: var(--steel); }
.chip-warning { background: #c97a1b; }
.chip-critical { background: var(--red); }
.chip-error { background: var(--maroon); }
.chip-running { background: #9aa5ad; }

.result-message {
  font-family: var(--body);
  font-weight: 600;
  font-size: 15px;
  color: var(--navy);
  margin-top: 10px;
}

.result-recommendation {
  font-family: var(--body);
  font-size: 14px;
  color: #45525a;
  margin-top: 6px;
  line-height: 1.5;
}

.result-issues {
  margin: 12px 0 0;
  padding-left: 20px;
  font-family: var(--body);
  font-size: 13px;
  color: #45525a;
  line-height: 1.6;
}

.result-issues li {
  margin-bottom: 4px;
}

@media (max-width: 860px) {
  .results-view {
    padding: 24px 20px 48px;
  }
}

.image-slot {
  height: 100%;
  min-height: 0;
  border-radius: 20px;
  overflow: hidden;
}

.image-slot img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

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

  .hero {
    height: auto;
    min-height: 100dvh;
    padding: 24px 20px 40px;
  }

  .hero-body {
    grid-template-columns: 1fr;
  }

  .image-slot {
    min-height: 220px;
    order: 2;
  }

  .hero-copy {
    order: 1;
    margin-left: 0;
  }
}
