/* === Base & Reset === */
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600;800&display=swap');

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --brand: #4F3D63;
  --bg-dark: #120b1d;
  --bg-mid: #251839;
  --text: #f0eef2;
  --text-muted: #a89bb5;
  --accent-orange: #E85D3A;
  --accent-blue: #38BDF8;
  --accent-amber: #FBBF24;
  --accent-green: #22c55e;
}

html, body {
  height: 100%;
  font-family: 'Open Sans', sans-serif;
  background: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-mid) 100%);
  color: var(--text);
  overflow-x: hidden;
}

/* === Landing Page === */
.landing {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 2rem;
  padding-bottom: 12rem;
  overflow: hidden;
}

.landing::before {
  content: '';
  position: absolute;
  top: 30%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(79, 61, 99, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.chart-bg {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 50%;
  pointer-events: none;
  z-index: 0;
}

.chart-bg svg {
  width: 100%;
  height: 100%;
}

.landing-content {
  position: relative;
  z-index: 1;
  max-width: 640px;
}

.landing-logo {
  width: 320px;
  margin-bottom: 2.5rem;
  opacity: 0.9;
}

.landing-intro {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.landing-title {
  font-size: clamp(3rem, 8vw, 5rem);
  font-weight: 800;
  letter-spacing: 0.05em;
  text-decoration: underline;
  text-decoration-color: var(--brand);
  text-underline-offset: 0.15em;
  text-decoration-thickness: 4px;
  margin-bottom: 0.5rem;
}

.landing-tagline {
  font-size: 1.125rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  font-style: italic;
}

.landing-description {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.cta-button {
  display: inline-block;
  padding: 1rem 2.5rem;
  background: var(--brand);
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: 0.05em;
  border-radius: 4px;
  transition: background 0.2s, transform 0.2s;
  border: none;
  cursor: pointer;
}

.cta-button:hover {
  background: #634d7d;
  transform: translateY(-1px);
}

.chart-legend {
  position: absolute;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.7rem;
  color: var(--text-muted);
}

.chart-legend-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.chart-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* === Survey Page === */
.survey {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 2rem;
}

.survey-container {
  max-width: 600px;
  width: 100%;
}

.survey-progress {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.survey-progress-bar {
  width: 100%;
  height: 3px;
  background: rgba(79, 61, 99, 0.3);
  border-radius: 2px;
  margin-top: 0.75rem;
  overflow: hidden;
}

.survey-progress-fill {
  height: 100%;
  background: var(--brand);
  border-radius: 2px;
  transition: width 0.4s ease;
}

.survey-question {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.survey-question.active {
  opacity: 1;
  transform: translateY(0);
}

.survey-question-text {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  line-height: 1.4;
}

.survey-options {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.survey-option {
  padding: 1rem 1.25rem;
  background: rgba(79, 61, 99, 0.15);
  border: 1px solid rgba(79, 61, 99, 0.3);
  border-radius: 6px;
  color: var(--text);
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
  text-align: left;
  font-family: inherit;
  width: 100%;
}

.survey-option:hover {
  background: rgba(79, 61, 99, 0.3);
  border-color: var(--brand);
  transform: translateX(4px);
}

.survey-option.selected {
  background: var(--brand);
  border-color: var(--brand);
}

.survey-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 2rem;
}

.survey-nav-btn {
  padding: 0.6rem 1.5rem;
  background: transparent;
  border: 1px solid rgba(79, 61, 99, 0.4);
  border-radius: 4px;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.survey-nav-btn:hover:not(:disabled) {
  background: rgba(79, 61, 99, 0.2);
  color: var(--text);
  border-color: var(--brand);
}

.survey-nav-next {
  background: var(--brand);
  border-color: var(--brand);
  color: var(--text);
  font-weight: 600;
}

.survey-nav-next:hover:not(:disabled) {
  background: #634d7d;
}

.survey-nav-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* === Loading Page === */
.loading {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 2rem;
}

.loading-container {
  max-width: 500px;
  width: 100%;
}

.loading-title {
  font-size: 1.5rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 2.5rem;
  letter-spacing: 0.05em;
}

.loading-stages {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.loading-stage {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  transition: color 0.3s;
}

.loading-stage.active {
  color: var(--text);
}

.loading-stage.complete {
  color: var(--accent-green);
}

.stage-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stage-icon-pending {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(79, 61, 99, 0.4);
}

.stage-icon-active {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--brand);
  animation: pulse 1.2s ease-in-out infinite;
}

.stage-icon-check {
  color: var(--accent-green);
  font-size: 1.1rem;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.3); }
}

.loading-progress {
  width: 100%;
  height: 3px;
  background: rgba(79, 61, 99, 0.3);
  border-radius: 2px;
  margin-bottom: 1.5rem;
  overflow: hidden;
}

.loading-progress-fill {
  height: 100%;
  background: var(--brand);
  border-radius: 2px;
  transition: width 0.5s ease;
  width: 0%;
}

.loading-subtext {
  text-align: center;
  font-family: 'Courier New', monospace;
  font-size: 0.8rem;
  color: var(--text-muted);
  min-height: 1.2em;
  transition: opacity 0.3s;
}

/* === Report Page === */
.report {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 2rem;
}

.report-container {
  max-width: 720px;
  width: 100%;
  text-align: center;
}

.report-logo {
  width: 180px;
  margin-bottom: 1.5rem;
  opacity: 0.7;
}

.report-title {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  margin-bottom: 1.5rem;
}

.report-video {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 */
  margin-bottom: 1.5rem;
  border-radius: 8px;
  overflow: hidden;
  background: #000;
}

.report-video iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.report-subtitle {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.report-cta {
  font-size: 0.9rem;
  padding: 0.75rem 2rem;
}

/* === Responsive === */
@media (max-width: 640px) {
  .landing-title {
    font-size: 2.5rem;
  }

  .landing-description {
    font-size: 0.9rem;
  }

  .chart-legend {
    bottom: 0.75rem;
    right: 0.75rem;
    font-size: 0.6rem;
  }
}
