/* ─────────────────────────────────────────────────────────────
   Sunology — TTMC Baromètre Culture
   Design system : dark-first, EDFF00 accent, glass surfaces
   ───────────────────────────────────────────────────────────── */

/* ── Fonts ───────────────────────────────────────────────────── */
@font-face {
  font-family: 'Britanica';
  src: url('assets/fonts/Britanica-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Britanica';
  src: url('assets/fonts/Britanica-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Britanica';
  src: url('assets/fonts/Britanica-Black.woff2') format('woff2');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('assets/fonts/Inter-Light.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('assets/fonts/Inter-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('assets/fonts/Inter-SemiBold.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('assets/fonts/Inter-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ── Tokens ──────────────────────────────────────────────────── */
:root {
  --sun-black: #000000;
  --sun-white: #FFFFFF;
  --sun-grey: #A5A5A5;
  --sun-accent: #EDFF00;
  --sun-blue: #0000FF;
  --sun-near-black: #191919;
  --sun-light-grey: #E7E6E6;

  --sun-positive: #00B050;
  --sun-negative: #FF0000;

  --sun-glass-bg: rgba(231, 230, 230, 0.05);
  --sun-glass-border-solid: rgba(255, 255, 255, 0.08);

  --sun-glow: 0 0 20px rgba(237, 255, 0, 0.36);
  --sun-glow-strong: 0 0 40px rgba(237, 255, 0, 0.5);

  --font-heading: 'Britanica', 'Arial Black', sans-serif;
  --font-body: 'Inter', Arial, sans-serif;

  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-pill: 9999px;
}

/* ── Reset ───────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
button { background: none; border: none; cursor: pointer; font-family: inherit; color: inherit; }
input, textarea, select { font-family: inherit; }
a { color: inherit; text-decoration: none; }

/* ── Page ────────────────────────────────────────────────────── */
html, body { min-height: 100%; }
body.sun-page {
  background: var(--sun-black);
  color: var(--sun-white);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
  position: relative;
  overflow-x: hidden;
}

/* Gradient mesh ambient light — fixed full-bleed */
.mesh-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: url('assets/gradient-mesh-dark.png') center/cover no-repeat;
}

/* ── Top bar ─────────────────────────────────────────────────── */
.topbar {
  position: relative;
  z-index: 10;
  padding: var(--space-lg) var(--space-lg) var(--space-md);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(8px);
  background: rgba(0, 0, 0, 0.6);
}
.topbar-inner {
  max-width: 880px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}
.logo { height: 22px; width: auto; }

.section-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: rgba(231, 230, 230, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-family: var(--font-body);
  font-size: 10px;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Progress bar */
.progress-wrap {
  max-width: 880px;
  margin: var(--space-md) auto 0;
}
.progress-track {
  height: 3px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-pill);
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  width: 14%;
  background: linear-gradient(90deg, var(--sun-accent), rgba(237, 255, 0, 0.6));
  border-radius: var(--radius-pill);
  box-shadow: 0 0 10px rgba(237, 255, 0, 0.5);
  transition: width 400ms cubic-bezier(0.4, 0, 0.2, 1);
}
.progress-label {
  margin-top: 8px;
  font-size: 10px;
  color: var(--sun-grey);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-align: right;
}

/* ── Container & steps ──────────────────────────────────────── */
.container {
  position: relative;
  z-index: 1;
  max-width: 880px;
  margin: 0 auto;
  padding: var(--space-2xl) var(--space-lg) var(--space-2xl);
}

.step {
  display: none;
  animation: slideIn 400ms cubic-bezier(0.16, 1, 0.3, 1);
}
.step.active { display: block; }

@keyframes slideIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.step-tag {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  color: var(--sun-accent);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: var(--space-md);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: rgba(237, 255, 0, 0.08);
  border: 1px solid rgba(237, 255, 0, 0.2);
}

/* ── Typography ──────────────────────────────────────────────── */
.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(48px, 9vw, 88px);
  font-weight: 400;
  line-height: 0.9;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-lg);
}
.step-title {
  font-family: var(--font-heading);
  font-size: clamp(36px, 6vw, 56px);
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-md);
}
.value-title {
  font-family: var(--font-heading);
  font-size: clamp(48px, 8vw, 80px);
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-md);
}
.accent-keyword {
  color: var(--sun-accent);
  font-weight: 700;
}
.value-pitch {
  font-family: var(--font-body);
  font-size: 16px;
  font-style: italic;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: var(--space-2xl);
  max-width: 600px;
}
.lead {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.8);
  max-width: 640px;
  margin-bottom: var(--space-xl);
  line-height: 1.55;
}
.step-sub {
  font-size: 14px;
  color: var(--sun-grey);
  max-width: 600px;
  margin-bottom: var(--space-xl);
  line-height: 1.55;
}

/* ── Info grid (step 0) ──────────────────────────────────────── */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--space-md);
  margin: var(--space-xl) 0;
}
.info-card {
  background: var(--sun-glass-bg);
  border: 1px solid var(--sun-glass-border-solid);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  backdrop-filter: blur(10px);
  position: relative;
}
.info-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--sun-accent), transparent);
  border-top-left-radius: var(--radius-md);
}
.info-num {
  font-family: var(--font-heading);
  font-size: 40px;
  font-weight: 700;
  color: var(--sun-white);
  line-height: 1;
}
.info-unit {
  font-size: 18px;
  font-weight: 400;
  margin-left: 4px;
  color: rgba(255, 255, 255, 0.6);
}
.info-label {
  margin-top: 6px;
  font-size: 11px;
  color: var(--sun-grey);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ── Disclaimer & closing cards ──────────────────────────────── */
.disclaimer, .closing-card {
  display: flex;
  gap: var(--space-md);
  align-items: flex-start;
  background: var(--sun-glass-bg);
  border: 1px solid var(--sun-glass-border-solid);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  margin: var(--space-xl) 0;
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.85);
}
.disclaimer-bar, .closing-bar {
  flex-shrink: 0;
  width: 3px;
  background: var(--sun-accent);
  align-self: stretch;
  border-radius: 2px;
  box-shadow: 0 0 12px rgba(237, 255, 0, 0.4);
}

/* ── Form rows ───────────────────────────────────────────────── */
.form-row {
  margin-bottom: var(--space-xl);
}
.form-label {
  display: block;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  color: var(--sun-white);
  margin-bottom: var(--space-sm);
  letter-spacing: 0.01em;
}
.req {
  color: var(--sun-accent);
  margin-left: 2px;
}
.opt {
  color: var(--sun-grey);
  font-weight: 400;
  font-size: 11px;
  margin-left: 4px;
}
.hint-inline {
  color: var(--sun-grey);
  font-weight: 400;
  font-size: 11px;
}
.form-hint {
  display: block;
  margin-top: 6px;
  font-size: 11px;
  color: var(--sun-grey);
}
.form-hint.warn { color: var(--sun-negative); }
.form-hint.ok { color: var(--sun-positive); }

/* ── Chips ───────────────────────────────────────────────────── */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chips-vertical {
  flex-direction: column;
  align-items: stretch;
}
.chip {
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.85);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  transition: all 180ms ease;
  text-align: left;
}
.chip:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}
.chip.selected {
  background: rgba(237, 255, 0, 0.15);
  border-color: var(--sun-accent);
  color: var(--sun-accent);
  box-shadow: 0 0 12px rgba(237, 255, 0, 0.3);
}
.chip.disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}

/* ── Text input ──────────────────────────────────────────────── */
.text-input, .textarea {
  display: block;
  width: 100%;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  color: var(--sun-white);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
  resize: vertical;
  transition: border-color 180ms ease, background-color 180ms ease;
}
.text-input:focus, .textarea:focus {
  outline: none;
  border-color: rgba(237, 255, 0, 0.5);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 0 3px rgba(237, 255, 0, 0.1);
}
.textarea { min-height: 110px; }
.text-input::placeholder, .textarea::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

/* ── Rating block ─────────────────────────────────────────────── */
.rating-instruction {
  background: rgba(237, 255, 0, 0.04);
  border-left: 3px solid var(--sun-accent);
  padding: var(--space-md) var(--space-lg);
  margin-bottom: var(--space-xl);
  font-size: 13px;
  color: rgba(255, 255, 255, 0.85);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  line-height: 1.6;
}
.rating-scale {
  display: inline-block;
  margin-top: 6px;
  font-size: 11px;
  color: var(--sun-grey);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.rating-block {
  background: var(--sun-glass-bg);
  border: 1px solid var(--sun-glass-border-solid);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  margin-bottom: var(--space-md);
  backdrop-filter: blur(8px);
  transition: border-color 200ms ease, box-shadow 200ms ease;
}
.rating-block.touched {
  border-color: rgba(237, 255, 0, 0.3);
  box-shadow: 0 0 16px rgba(237, 255, 0, 0.08);
}
.behavior-num {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  color: var(--sun-accent);
  letter-spacing: 0.08em;
  margin-bottom: 8px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: rgba(237, 255, 0, 0.1);
  border: 1px solid rgba(237, 255, 0, 0.25);
}
.behavior-text {
  font-size: 15px;
  color: var(--sun-white);
  margin-bottom: var(--space-md);
  line-height: 1.5;
}
.rating-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.rating-btn {
  flex: 1;
  min-width: 32px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  transition: all 150ms ease;
  display: flex;
  align-items: center;
  justify-content: center;
}
.rating-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--sun-white);
  border-color: rgba(255, 255, 255, 0.2);
}
.rating-btn.selected {
  background: var(--sun-accent);
  color: var(--sun-black);
  border-color: var(--sun-accent);
  box-shadow: 0 0 16px rgba(237, 255, 0, 0.5);
  transform: scale(1.05);
}

/* ── Forced-choice block ─────────────────────────────────────── */
.forced-choice {
  margin-top: var(--space-2xl);
  padding-top: var(--space-lg);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* ── Buttons & nav ──────────────────────────────────────────── */
.step-nav {
  display: flex;
  justify-content: space-between;
  gap: var(--space-md);
  margin-top: var(--space-2xl);
}
.step-nav-right { justify-content: flex-end; }
.step-nav-center { justify-content: center; }

.btn-primary, .btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: all 180ms ease;
  cursor: pointer;
}
.btn-primary {
  background: var(--sun-accent);
  color: var(--sun-black);
  box-shadow: var(--sun-glow);
}
.btn-primary:hover {
  background: var(--sun-white);
  box-shadow: var(--sun-glow-strong);
  transform: translateY(-1px);
}
.btn-primary:disabled {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.3);
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}
.btn-secondary {
  background: transparent;
  color: var(--sun-white);
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.4);
}
.arrow { font-size: 16px; }

/* ── Recap (step 6) ──────────────────────────────────────────── */
.hero-score {
  text-align: center;
  background: var(--sun-glass-bg);
  border: 1px solid var(--sun-glass-border-solid);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl) var(--space-lg);
  margin: var(--space-xl) 0;
  position: relative;
  overflow: hidden;
}
.hero-score::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--sun-accent), transparent);
}
.hero-score-label {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sun-grey);
  margin-bottom: var(--space-md);
}
.hero-score-value {
  font-family: var(--font-heading);
  font-size: clamp(72px, 14vw, 120px);
  font-weight: 700;
  line-height: 1;
  color: var(--sun-accent);
  text-shadow: 0 0 40px rgba(237, 255, 0, 0.4);
}
.score-unit, .kpi-unit {
  font-family: var(--font-heading);
  font-size: 0.4em;
  color: var(--sun-grey);
  font-weight: 400;
  margin-left: 6px;
}
.hero-score-bench {
  margin-top: var(--space-md);
  font-size: 13px;
  color: var(--sun-grey);
  min-height: 18px;
}
.hero-score-bench.has-bench {
  color: rgba(255, 255, 255, 0.7);
}

.recap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-md);
  margin: var(--space-xl) 0;
}
.kpi-card {
  background: var(--sun-glass-bg);
  border: 1px solid var(--sun-glass-border-solid);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  position: relative;
  backdrop-filter: blur(8px);
}
.kpi-bar {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--sun-accent), transparent);
  border-top-left-radius: var(--radius-md);
}
.kpi-label {
  font-family: var(--font-body);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sun-grey);
  margin-bottom: var(--space-sm);
}
.kpi-value {
  font-family: var(--font-heading);
  font-size: 44px;
  font-weight: 700;
  color: var(--sun-white);
  line-height: 1;
}
.kpi-bench {
  margin-top: 8px;
  font-size: 11px;
  color: var(--sun-grey);
  min-height: 16px;
}
.kpi-bench.delta-positive { color: var(--sun-positive); font-weight: 600; }
.kpi-bench.delta-negative { color: var(--sun-negative); font-weight: 600; }

/* ── Overlay & toast ─────────────────────────────────────────── */
.overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
}
.overlay.active { display: flex; }
.overlay-content {
  text-align: center;
}
.spinner {
  width: 48px;
  height: 48px;
  border: 3px solid rgba(237, 255, 0, 0.2);
  border-top-color: var(--sun-accent);
  border-radius: 50%;
  animation: spin 800ms linear infinite;
  margin: 0 auto var(--space-md);
  box-shadow: 0 0 20px rgba(237, 255, 0, 0.3);
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
.overlay-text {
  font-size: 13px;
  color: var(--sun-grey);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(255, 0, 0, 0.95);
  color: var(--sun-white);
  padding: 14px 24px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: all 250ms cubic-bezier(0.16, 1, 0.3, 1);
  max-width: calc(100vw - 48px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}
.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 640px) {
  .topbar { padding: var(--space-md); }
  .logo { height: 18px; }
  .container { padding: var(--space-xl) var(--space-md) var(--space-2xl); }
  .hero-title { font-size: 44px; }
  .value-title { font-size: 44px; }
  .info-grid { grid-template-columns: 1fr 1fr; }
  .info-num { font-size: 32px; }
  .rating-row { gap: 4px; }
  .rating-btn { min-width: 28px; font-size: 13px; height: 40px; }
  .step-nav { flex-direction: column-reverse; }
  .step-nav .btn-primary, .step-nav .btn-secondary { width: 100%; justify-content: center; }
  .recap-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 380px) {
  .info-grid { grid-template-columns: 1fr; }
  .recap-grid { grid-template-columns: 1fr; }
}
