:root {
  --void: #030303;
  --black: #060605;
  --graphite: #17140f;
  --graphite-2: #0e0c09;
  --gold-bright: #f6c452;
  --gold: #d4a017;
  --gold-deep: #96731a;
  --champagne: #c9a34e;
  --offwhite: #f3efe6;
  --gray: #8b8b8b;
  --line: rgba(212, 160, 23, 0.22);
  --danger: #e07a5f;
  --success: #7fb069;
  --ease: cubic-bezier(.22,1,.36,1);
}

* { box-sizing: border-box; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

html { background: var(--void); }

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, system-ui, -apple-system, sans-serif;
  color: var(--offwhite);
  position: relative;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 18% -6%, rgba(246, 196, 82, 0.14), transparent 38%),
    radial-gradient(circle at 104% 96%, rgba(201, 163, 78, 0.09), transparent 34%),
    radial-gradient(circle at 50% 50%, rgba(255,255,255,.02), transparent 60%),
    var(--void);
}

/* ambient cinematic glow — slow breathing light, nods to the aperture mark in the DSIRE icon */
body::before {
  content: "";
  position: fixed;
  inset: -20vh -20vw;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(38vw 38vw at 12% 8%, rgba(246,196,82,.08), transparent 60%),
    radial-gradient(46vw 46vw at 92% 100%, rgba(212,160,23,.06), transparent 60%);
  animation: driftGlow 22s var(--ease) infinite alternate;
}

/* fine grain, keeps the black from feeling flat / plasticky */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

@keyframes driftGlow {
  0%   { transform: translate(0,0) scale(1); }
  100% { transform: translate(-2%, 2%) scale(1.06); }
}

/* ===== night sky background — quiet twinkling stars with an occasional shooting star ===== */
.starfield {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background: transparent;
}

.star {
  position: absolute;
  border-radius: 50%;
  background: #fdf7e8;
  will-change: opacity, transform;
  animation-name: twinkle;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
}
.star.gold { background: var(--gold-bright); box-shadow: 0 0 5px 1px rgba(246,196,82,.5); }

@keyframes twinkle {
  0%, 100% { opacity: var(--min-op, .15); transform: scale(.85); }
  50%      { opacity: var(--max-op, .95); transform: scale(1); }
}

.shooting-star {
  position: absolute;
  top: 0; left: 0;
  width: 140px;
  height: 2px;
  border-radius: 99px;
  background: linear-gradient(90deg, rgba(255,255,255,0), var(--gold-bright) 70%, #fff);
  filter: drop-shadow(0 0 6px rgba(246,196,82,.85));
  opacity: 0;
  transform: translate(var(--sx), var(--sy)) rotate(var(--angle)) scaleX(0);
  transform-origin: right center;
  animation-name: shoot;
  animation-timing-function: cubic-bezier(.3,.7,.4,1);
  animation-iteration-count: infinite;
}

@keyframes shoot {
  0%   { opacity: 0; transform: translate(var(--sx), var(--sy)) rotate(var(--angle)) scaleX(0); }
  3%   { opacity: 1; }
  16%  { opacity: 1; transform: translate(calc(var(--sx) + var(--tx)), calc(var(--sy) + var(--ty))) rotate(var(--angle)) scaleX(1); }
  24%  { opacity: 0; transform: translate(calc(var(--sx) + var(--tx) * 1.15), calc(var(--sy) + var(--ty) * 1.15)) rotate(var(--angle)) scaleX(1); }
  100% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .star { animation: none; opacity: .5; }
  .shooting-star { animation: none; opacity: 0; }
}

button, input, select { font: inherit; }
button { cursor: pointer; }

.app-shell {
  width: min(100%, 1100px);
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 0 20px;
  position: relative;
  z-index: 1;
}

.topbar {
  height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  display: block;
  width: auto;
  height: 26px;
  max-width: min(160px, 42vw);
  object-fit: contain;
  object-position: left center;
}
.topbar-label {
  color: var(--champagne);
  font-size: 12px;
  letter-spacing: .34em;
  position: relative;
  padding-left: 16px;
}
.topbar-label::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  width: 8px; height: 8px;
  margin-top: -4px;
  border-radius: 50%;
  background: var(--gold-bright);
  box-shadow: 0 0 10px 2px rgba(246,196,82,.6);
  animation: pulseDot 2.4s ease-in-out infinite;
}
@keyframes pulseDot {
  0%, 100% { opacity: .55; transform: scale(.8); }
  50% { opacity: 1; transform: scale(1.1); }
}

main { flex: 1; display: grid; place-items: center; padding: 48px 0; }
footer { padding: 28px 0; color: var(--gray); font-size: 12px; text-align: center; border-top: 1px solid rgba(255,255,255,.05); }
footer span { color: var(--champagne); }

.card {
  width: 100%;
  background: linear-gradient(165deg, rgba(23,20,15,.97), rgba(6,6,5,.99));
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: clamp(24px, 5vw, 54px);
  box-shadow: 0 30px 90px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.04);
  position: relative;
  overflow: hidden;
  animation: cardIn .6s var(--ease) both;
}

/* faint rotating aperture-blade motif echoing the DSIRE icon, tucked in the corner */
.card::before {
  content: "";
  position: absolute;
  top: -140px; right: -140px;
  width: 320px; height: 320px;
  background: conic-gradient(from 0deg, transparent 0deg, rgba(246,196,82,.10) 18deg, transparent 40deg, transparent 90deg, rgba(212,160,23,.07) 108deg, transparent 130deg, transparent 220deg, rgba(246,196,82,.08) 238deg, transparent 260deg);
  border-radius: 50%;
  pointer-events: none;
  animation: rotateAperture 40s linear infinite;
  opacity: .8;
}

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

@keyframes cardIn {
  from { opacity: 0; transform: translateY(14px) scale(.985); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.hero { max-width: 880px; text-align: center; }
.eyebrow {
  color: var(--champagne);
  text-transform: uppercase;
  letter-spacing: .24em;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  animation: fadeUp .5s var(--ease) both;
}
.eyebrow::before { content: ""; width: 16px; height: 1px; background: linear-gradient(90deg, transparent, var(--gold-bright)); }
.eyebrow::after { content: ""; width: 16px; height: 1px; background: linear-gradient(90deg, var(--gold-bright), transparent); }

h1 {
  margin: 18px 0 14px;
  font-size: clamp(38px, 7vw, 72px);
  line-height: .98;
  letter-spacing: -.05em;
  animation: fadeUp .6s .05s var(--ease) both;
  background: linear-gradient(180deg, #fff 0%, var(--offwhite) 45%, var(--champagne) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
h2 { margin: 8px 0 14px; font-size: clamp(26px, 4vw, 42px); letter-spacing: -.03em; animation: fadeUp .5s var(--ease) both; }
p { color: #c8c4bc; line-height: 1.7; }
.hero p { max-width: 680px; margin: 0 auto 30px; font-size: 17px; animation: fadeUp .6s .1s var(--ease) both; }

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

.btn {
  border: 0;
  border-radius: 14px;
  padding: 15px 22px;
  font-weight: 800;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), opacity .2s, background .2s, border-color .2s;
}
.btn:active { transform: translateY(0) scale(.98); }
.btn:disabled { opacity: .4; cursor: not-allowed; transform: none; box-shadow: none; }

.btn-primary {
  background: linear-gradient(135deg, var(--gold-bright), var(--gold) 55%, var(--gold-deep));
  color: #100c02;
  box-shadow: 0 8px 24px rgba(212,160,23,.18);
}
.btn-primary::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(115deg, transparent 20%, rgba(255,255,255,.55) 38%, transparent 55%);
  transform: translateX(-120%);
  transition: transform .7s var(--ease);
}
.btn-primary:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(212,160,23,.32); }
.btn-primary:hover:not(:disabled)::before { transform: translateX(120%); }

.btn-secondary {
  background: rgba(255,255,255,.02);
  color: var(--offwhite);
  border: 1px solid rgba(243,239,230,.18);
}
.btn-secondary:hover:not(:disabled) { border-color: rgba(201,163,78,.55); background: rgba(201,163,78,.06); transform: translateY(-2px); }

.btn-row { display: flex; gap: 12px; justify-content: space-between; margin-top: 28px; flex-wrap: wrap; }

.mini-info { display: flex; justify-content: center; gap: 22px; margin-top: 24px; color: var(--gray); font-size: 13px; flex-wrap: wrap; animation: fadeUp .6s .16s var(--ease) both; }
.mini-info span { display: inline-flex; align-items: center; gap: 7px; }
.mini-info span::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--gold); }

.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.field { display: flex; flex-direction: column; gap: 8px; opacity: 0; animation: fadeUp .5s var(--ease) forwards; }
.field.full { grid-column: 1 / -1; }
label { font-size: 13px; color: #ddd8ce; font-weight: 600; }
input, select {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.04);
  color: var(--offwhite);
  padding: 14px 15px;
  outline: none;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
input:hover, select:hover { border-color: rgba(255,255,255,.2); }
input:focus, select:focus { border-color: var(--champagne); box-shadow: 0 0 0 4px rgba(201,163,78,.12); background: rgba(255,255,255,.06); }
option { background: var(--graphite); }

.progress-wrap { margin-bottom: 28px; }
.progress-meta { display: flex; justify-content: space-between; color: var(--gray); font-size: 12px; margin-bottom: 9px; }
.progress-meta span:last-child { color: var(--champagne); font-weight: 700; }
.progress { height: 7px; border-radius: 99px; background: rgba(255,255,255,.07); overflow: hidden; position: relative; }
.progress > div {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold), var(--gold-bright));
  transition: width .45s var(--ease);
  position: relative;
  overflow: hidden;
}
.progress > div::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.55), transparent);
  transform: translateX(-100%);
  animation: shimmer 1.8s ease-in-out infinite;
}
@keyframes shimmer { to { transform: translateX(220%); } }

.pillar-badge {
  display: inline-flex; width: 42px; height: 42px; align-items: center; justify-content: center;
  border-radius: 12px; background: rgba(212,160,23,.12); border: 1px solid var(--line);
  color: var(--champagne); font-weight: 800;
  animation: badgeIn .45s var(--ease) both;
}
@keyframes badgeIn { from { opacity: 0; transform: scale(.6) rotate(-8deg); } to { opacity: 1; transform: scale(1) rotate(0); } }

.question-title { font-size: clamp(23px, 4vw, 34px); line-height: 1.25; margin: 18px 0 22px; animation: fadeUp .45s .05s var(--ease) both; }
.options { display: grid; gap: 10px; }
.option {
  text-align: left;
  width: 100%;
  color: var(--offwhite);
  padding: 15px 16px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.025);
  border-radius: 13px;
  display: flex;
  align-items: center;
  gap: 12px;
  opacity: 0;
  animation: fadeUp .4s var(--ease) forwards;
  transition: border-color .2s, background .2s, transform .18s var(--ease);
}
.option:hover { border-color: rgba(201,163,78,.55); transform: translateX(3px); }
.option.active { border-color: var(--champagne); background: rgba(201,163,78,.12); box-shadow: 0 0 0 3px rgba(201,163,78,.08), 0 8px 22px rgba(212,160,23,.12); }
.option.active .option-score { background: linear-gradient(135deg, var(--gold-bright), var(--gold)); color: #100c02; }
.option-score { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; background: rgba(255,255,255,.06); font-size: 12px; color: var(--champagne); font-weight: 800; transition: background .2s, color .2s; flex-shrink: 0; }

.result-head { display: grid; grid-template-columns: 220px 1fr; gap: 32px; align-items: center; }
.score-circle {
  width: 210px; height: 210px; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--gold-bright) var(--score-angle), rgba(255,255,255,.06) 0);
  position: relative;
  transition: background 1s var(--ease);
  animation: ringGlow 3.2s ease-in-out 1.1s infinite;
}
@keyframes ringGlow {
  0%, 100% { filter: drop-shadow(0 0 0 rgba(246,196,82,0)); }
  50% { filter: drop-shadow(0 0 18px rgba(246,196,82,.35)); }
}
.score-circle::after { content: ""; position: absolute; inset: 13px; border-radius: 50%; background: var(--graphite); box-shadow: inset 0 1px 0 rgba(255,255,255,.05); }
.score-value { position: relative; z-index: 1; text-align: center; }
.score-value strong { display: block; font-size: 64px; line-height: 1; font-variant-numeric: tabular-nums; }
.score-value span { color: var(--gray); font-size: 13px; }
.classification {
  color: var(--champagne); font-weight: 800; letter-spacing: .05em; text-transform: uppercase; font-size: 12px;
  animation: fadeUp .5s var(--ease) both;
}

.bars { display: grid; gap: 14px; margin: 34px 0; }
.bar-row { display: grid; grid-template-columns: 125px 1fr 56px; gap: 12px; align-items: center; opacity: 0; animation: fadeUp .5s var(--ease) forwards; }
.bar-label { font-size: 13px; color: #e2ddd3; }
.bar-track { height: 10px; background: rgba(255,255,255,.07); border-radius: 99px; overflow: hidden; }
.bar-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold), var(--gold-bright));
  border-radius: inherit;
  transition: width 1s var(--ease);
}
.bar-score { font-weight: 800; color: var(--champagne); font-size: 13px; text-align: right; }

.recommendation {
  border: 1px solid var(--line);
  background: rgba(212,160,23,.055);
  border-radius: 18px;
  padding: 24px;
  position: relative;
  overflow: hidden;
  opacity: 0;
  animation: fadeUp .55s .3s var(--ease) forwards;
}
.recommendation::before {
  content: "";
  position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: linear-gradient(180deg, var(--gold-bright), var(--gold-deep));
}
.recommendation h3 { margin: 0 0 10px; font-size: 22px; }
.recommendation ul { margin: 14px 0 0; padding-left: 20px; color: #cbc6bc; line-height: 1.8; }
.recommendation li { opacity: 0; animation: fadeUp .4s var(--ease) forwards; }

.result-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 24px; }
.disclaimer { margin-top: 20px; color: var(--gold-bright); font-size: 16px; font-weight:700; text-align:center; line-height:1.5; }

/* screen-level enter transition, toggled by app.js on every render */
.screen-enter { animation: screenIn .45s var(--ease) both; }
@keyframes screenIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* option select feedback ripple */
.option .check {
  margin-left: auto;
  width: 20px; height: 20px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--gold-bright);
  color: #100c02;
  font-size: 12px;
  font-weight: 900;
  transform: scale(0);
  transition: transform .25s var(--ease);
}
.option.active .check { transform: scale(1); }

@media (max-width: 720px) {
  .app-shell { padding: 0 14px; }
  main { padding: 28px 0; }
  .topbar { height: 68px; }
  .brand-mark { width: 30px; height: 30px; }
  .brand-logo { height: 22px; max-width: 46vw; }
  .topbar-label { display: none; }
  .form-grid { grid-template-columns: 1fr; }
  .field.full { grid-column: auto; }
  .result-head { grid-template-columns: 1fr; text-align: center; }
  .score-circle { margin: auto; width: 180px; height: 180px; }
  .score-value strong { font-size: 54px; }
  .bar-row { grid-template-columns: 92px 1fr 45px; }
  .result-actions { grid-template-columns: 1fr; }
  .btn-row .btn { flex: 1; }
}
