:root {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  color: #000;
  background-color: #f5f5f5;
  line-height: 1.5;
  font-weight: 400;
  color-scheme: light;
  --border: rgba(0, 0, 0, 0.1);
  --accent: #500000;
  --accent-dark: #400000;
  --success: #500000;
  --danger: #500000;
  --card-bg: #fff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--background, #f4f6fb);
  color: inherit;
  min-height: 100vh;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.hero {
  background: linear-gradient(135deg, #500000 0%, #000 100%);
  color: white;
  padding: 4rem 1.5rem 5rem;
}

.hero__content {
  max-width: 720px;
  margin: 0 auto;
}

.hero__logo {
  margin-bottom: 1.5rem;
}

.hero__logo img {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  background: white;
  padding: 4px;
}

.hero__eyebrow {
  letter-spacing: 0.02em;
  text-transform: uppercase;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.75);
}

.hero h1 {
  font-size: clamp(2.4rem, 4vw, 3.4rem);
  margin: 0.5rem 0 1rem;
}

.hero p {
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.1rem;
}

.hero__cta {
  margin-top: 1.5rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero__cta .ghost,
.hero__cta .primary,
.hero__cta .clinic-access {
  border-radius: 999px;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
}

.hero__cta .ghost {
  background: rgba(255, 255, 255, 0.12);
  color: white;
}

.hero__cta .primary {
  background: white;
  color: #000;
}

.hero__cta .clinic-access {
  background: #ff6b35;
  color: white;
  border: none;
  box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
  transition: all 0.2s ease;
}

.hero__cta .clinic-access:hover {
  background: #e55a2b;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(255, 107, 53, 0.4);
}

main {
  padding: 2rem clamp(1.5rem, 4vw, 4rem) 4rem;
  margin-top: -3.5rem;
}

.upload-card,
.results,
.info {
  margin-bottom: 2rem;
}

.upload-card {
  background: var(--card-bg);
  border-radius: 24px;
  padding: clamp(1.5rem, 3vw, 2.5rem);
  box-shadow: 0 20px 60px rgba(6, 18, 33, 0.08);
}

.upload-card h2 {
  margin-top: 0;
}

.muted {
  color: #666;
}

.small {
  font-size: 0.9rem;
}

.dropzone {
  margin: 1.5rem 0;
  border: 2px dashed var(--border);
  border-radius: 18px;
  padding: 2rem;
  transition: border-color 0.2s ease, background 0.2s ease;
  background: rgba(80, 0, 0, 0.05);
  position: relative;
}

.dropzone__body {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.dropzone.dragover {
  border-color: var(--accent);
  background: rgba(80, 0, 0, 0.12);
}



.dropzone.disabled {
  opacity: 0.45;
  pointer-events: none;
}

.dropzone .icon {
  font-size: 2.5rem;
}

.secondary {
  border-radius: 12px;
  padding: 0.65rem 1.4rem;
  border: 1px solid rgba(0, 0, 0, 0.18);
  background: transparent;
  font-weight: 500;
}

.status {
  font-weight: 500;
}



.progress {
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
  font-weight: 600;
  color: #000;
}

.progress[hidden] {
  display: none !important;
}

.spinner {
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 50%;
  border: 3px solid rgba(0, 0, 0, 0.15);
  border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
}

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

.error {
  color: var(--danger);
  font-weight: 600;
}

.results {
  background: transparent;
}

.results__grid {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(280px, 2fr);
  gap: 2rem;
}

.viewer,
.scores {
  background: var(--card-bg);
  border-radius: 24px;
  padding: 1.5rem;
  box-shadow: 0 15px 40px rgba(6, 18, 33, 0.08);
}

.viewer__canvas {
  border-radius: 16px;
  background: #0f131b;
  aspect-ratio: 4 / 3;
  position: relative;
  overflow: hidden;
}

.viewer__canvas img,
.viewer__canvas canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.legend {
  font-weight: 500;
  margin-top: 1rem;
}

.score-card {
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 18px;
  padding: 1rem 1.25rem;
  margin-block: 0.75rem;
}

.label {
  text-transform: uppercase;
  font-size: 0.8rem;
  color: #666;
  letter-spacing: 0.08em;
}

.score {
  font-size: 2rem;
  font-weight: 600;
  margin: 0.3rem 0;
}

.redacted {
  position: relative;
  color: transparent;
}

.redacted::after {
  content: 'Limited Demo';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  letter-spacing: 0.05em;
  color: rgba(0, 0, 0, 0.7);
  background: repeating-linear-gradient(
      -45deg,
      rgba(0, 0, 0, 0.08),
      rgba(0, 0, 0, 0.08) 10px,
      transparent 10px,
      transparent 20px
    ),
    rgba(255, 255, 255, 0.9);
  border-radius: 12px;
  padding: 0.25rem 0.5rem;
}

.app-cta {
  margin-top: 1.5rem;
}

.app-cta__buttons {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.store {
  border-radius: 14px;
  padding: 0.85rem 1.2rem;
  background: #000;
  color: white;
  font-weight: 600;
  text-align: center;
}

.store:nth-child(2) {
  background: #500000;
}

.clinic-access-secondary {
  border-radius: 14px;
  padding: 0.85rem 1.2rem;
  background: #ff6b35;
  color: white;
  font-weight: 600;
  text-align: center;
  transition: all 0.2s ease;
}

.clinic-access-secondary:hover {
  background: #e55a2b;
  transform: translateY(-1px);
}

.disclaimer {
  font-size: 0.85rem;
  color: #666;
  margin-top: 1.25rem;
  font-style: italic;
}

.info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.info__card {
  background: var(--card-bg);
  border-radius: 20px;
  padding: 1.5rem;
  box-shadow: 0 10px 30px rgba(6, 18, 33, 0.07);
}

.info__card ul {
  padding-left: 1.25rem;
}

@media (max-width: 900px) {
  .results__grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .upload-card,
  .viewer,
  .scores,
  .info__card {
    border-radius: 16px;
  }

  .dropzone {
    padding: 1.25rem;
  }
}
