/* Freedom Scorecard v2.0 - custom layer on top of Tailwind CDN */

:root {
  --navy: #0d1621;
  --cyan: #00f0ff;
  --silver: #c7d0db;
  --steel: #8a99ab;
}

html {
  scroll-behavior: smooth;
}

body {
  background: radial-gradient(1200px 700px at 50% -10%, #142338 0%, #0d1621 55%);
  overflow-x: hidden;
}

/* ---------- Blueprint grid backdrop ---------- */
.blueprint-grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(0, 240, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 240, 255, 0.045) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(circle at 50% 20%, black 0%, transparent 80%);
  -webkit-mask-image: radial-gradient(circle at 50% 20%, black 0%, transparent 80%);
}

.glow-orb {
  position: fixed;
  border-radius: 9999px;
  filter: blur(120px);
  opacity: 0.4;
  z-index: 0;
  pointer-events: none;
}
.glow-orb--one {
  width: 420px;
  height: 420px;
  background: rgba(0, 240, 255, 0.18);
  top: -120px;
  right: -80px;
}
.glow-orb--two {
  width: 380px;
  height: 380px;
  background: rgba(30, 90, 160, 0.35);
  bottom: -140px;
  left: -100px;
}

/* ---------- Steps / transitions ---------- */
.step {
  animation: fadeUp 0.45s ease both;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

.glow-text {
  text-shadow: 0 0 22px rgba(0, 240, 255, 0.55);
}

/* ---------- Chips ---------- */
.chip {
  border: 1px solid rgba(0, 240, 255, 0.22);
  background: rgba(0, 240, 255, 0.05);
  border-radius: 9999px;
  padding: 0.35rem 0.85rem;
  color: var(--silver);
}

/* ---------- Cards ---------- */
.card {
  background: linear-gradient(180deg, rgba(21, 37, 55, 0.9), rgba(17, 31, 46, 0.9));
  border: 1px solid rgba(0, 240, 255, 0.14);
  border-radius: 16px;
  padding: 1.75rem;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.02), 0 24px 60px -30px rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(6px);
}

/* ---------- Pillar cards ---------- */
.pillar-card {
  position: relative;
  background: rgba(17, 31, 46, 0.6);
  border: 1px solid rgba(138, 153, 171, 0.16);
  border-radius: 14px;
  padding: 1.4rem 1.4rem 1.4rem 1.4rem;
  transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s;
}
.pillar-card:hover {
  border-color: rgba(0, 240, 255, 0.5);
  transform: translateY(-3px);
  box-shadow: 0 18px 40px -24px rgba(0, 240, 255, 0.5);
}
.pillar-index {
  font-family: 'Orbitron', sans-serif;
  font-weight: 700;
  color: rgba(0, 240, 255, 0.35);
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  margin-bottom: 0.5rem;
}
.pillar-title {
  font-family: 'Orbitron', sans-serif;
  color: #fff;
  font-size: 1.05rem;
  margin-bottom: 0.4rem;
}
.pillar-copy {
  color: var(--steel);
  font-size: 0.9rem;
  line-height: 1.5;
}

/* ---------- Buttons ---------- */
.btn-primary {
  font-family: 'Orbitron', sans-serif;
  letter-spacing: 0.12em;
  font-weight: 700;
  font-size: 0.9rem;
  color: #041016;
  background: linear-gradient(180deg, #4dfbff, #00f0ff);
  border: none;
  border-radius: 10px;
  padding: 0.95rem 2.2rem;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.25s, filter 0.2s;
  box-shadow: 0 0 26px rgba(0, 240, 255, 0.45), inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 42px rgba(0, 240, 255, 0.7);
  filter: brightness(1.05);
}
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: grayscale(0.4);
  box-shadow: none;
}

.btn-ghost {
  color: var(--steel);
  background: transparent;
  border: none;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: color 0.2s;
}
.btn-ghost:hover { color: var(--cyan); }

/* ---------- Track options ---------- */
.track-option {
  display: block;
  width: 100%;
  text-align: left;
  background: rgba(17, 31, 46, 0.7);
  border: 1px solid rgba(138, 153, 171, 0.2);
  border-radius: 14px;
  padding: 1.25rem 1.4rem;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s, background 0.2s;
}
.track-option:hover {
  border-color: var(--cyan);
  transform: translateX(4px);
  box-shadow: 0 12px 30px -18px rgba(0, 240, 255, 0.6);
}
.track-tag {
  display: block;
  font-family: 'Orbitron', sans-serif;
  color: var(--cyan);
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  margin-bottom: 0.35rem;
}
.track-copy {
  display: block;
  color: var(--silver);
  font-size: 0.95rem;
  line-height: 1.5;
}

/* ---------- Progress ---------- */
.progress-track {
  height: 6px;
  background: rgba(138, 153, 171, 0.15);
  border-radius: 9999px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #007a85, #00f0ff);
  border-radius: 9999px;
  box-shadow: 0 0 14px rgba(0, 240, 255, 0.6);
  transition: width 0.4s ease;
}

/* ---------- Scale answer buttons ---------- */
.scale-btn {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  width: 100%;
  text-align: left;
  background: rgba(13, 22, 33, 0.6);
  border: 1px solid rgba(138, 153, 171, 0.22);
  border-radius: 12px;
  padding: 1rem 1.1rem;
  color: var(--silver);
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s, transform 0.18s;
}
.scale-btn:hover {
  border-color: rgba(0, 240, 255, 0.6);
  transform: translateY(-2px);
}
.scale-btn.selected {
  border-color: var(--cyan);
  background: rgba(0, 240, 255, 0.08);
  box-shadow: 0 0 22px -6px rgba(0, 240, 255, 0.6);
}
.scale-num {
  flex: 0 0 auto;
  height: 34px;
  width: 34px;
  border-radius: 8px;
  border: 1px solid rgba(0, 240, 255, 0.4);
  color: var(--cyan);
  font-family: 'Orbitron', sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}
.scale-btn.selected .scale-num {
  background: var(--cyan);
  color: #041016;
}

/* ---------- Form fields ---------- */
.field-label {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--steel);
  margin-bottom: 0.5rem;
}
.field-input {
  width: 100%;
  background: rgba(13, 22, 33, 0.8);
  border: 1px solid rgba(138, 153, 171, 0.3);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  color: #fff;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field-input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(0, 240, 255, 0.15);
}

/* ---------- Result stat cards ---------- */
.stat-card {
  background: rgba(17, 31, 46, 0.8);
  border: 1px solid rgba(0, 240, 255, 0.16);
  border-radius: 14px;
  padding: 1.25rem;
  text-align: center;
}
.stat-label {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--steel);
  margin-bottom: 0.6rem;
}
.stat-value {
  font-family: 'Orbitron', sans-serif;
  font-weight: 700;
  color: #fff;
  font-size: 2.2rem;
  line-height: 1;
}

.mini-stat {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(13, 22, 33, 0.6);
  border: 1px solid rgba(138, 153, 171, 0.16);
  border-radius: 10px;
  padding: 0.6rem 0.85rem;
}
.mini-stat span { color: var(--steel); }
.mini-stat b { color: var(--cyan); font-family: 'Orbitron', sans-serif; }

/* ---------- Loading scanner ---------- */
#loading.flex { display: flex; }
.scanner {
  height: 64px;
  width: 64px;
  border-radius: 50%;
  border: 3px solid rgba(0, 240, 255, 0.15);
  border-top-color: var(--cyan);
  animation: spin 0.9s linear infinite;
  box-shadow: 0 0 24px rgba(0, 240, 255, 0.4);
}
@keyframes spin { to { transform: rotate(360deg); } }
