:root {
  --bg: #0a0c10;
  --ink: #f4f1ea;
  --muted: #b7b3a8;
  --line: rgba(244, 241, 234, 0.14);
  --panel: rgba(12, 14, 18, 0.72);
  --accent: #c4a35a;
  --accent-ink: #14110c;
  --ok: #8fbf9f;
  --radius: 4px;
  --font: "Manrope", "Segoe UI", sans-serif;
  --display: "Unbounded", "Manrope", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
}

.ambient {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background: #0a0c10;
}
.ambient-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 58% 45%;
  transform: scale(1.04);
  filter: saturate(0.92) contrast(1.05);
  animation: drift 28s ease-in-out infinite alternate;
}
.ambient-veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(8, 10, 14, 0.55) 0%, rgba(8, 10, 14, 0.72) 42%, rgba(8, 10, 14, 0.92) 100%),
    linear-gradient(90deg, rgba(8, 10, 14, 0.78) 0%, rgba(8, 10, 14, 0.35) 55%, rgba(8, 10, 14, 0.55) 100%);
}
body.is-result .ambient-photo { opacity: 0.22; filter: saturate(0.7) blur(2px); }
body.is-quiz .ambient-photo { opacity: 0.35; }

@keyframes drift {
  from { transform: scale(1.04) translate3d(0, 0, 0); }
  to { transform: scale(1.08) translate3d(-1.5%, -1%, 0); }
}

.shell {
  width: min(760px, calc(100% - 28px));
  margin: 0 auto;
  padding: 22px 0 40px;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 28px;
  flex-shrink: 0;
}
.brand {
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.brand span { color: var(--accent); }
.tagline {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hidden { display: none !important; }

.screen-start {
  flex: 1;
  display: flex;
  align-items: flex-end;
  padding-bottom: 18px;
  animation: rise 0.55s ease both;
}
.hero-copy { max-width: 34rem; }
.hero-copy h1 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.85rem, 7vw, 2.75rem);
  line-height: 1.12;
  margin: 0 0 14px;
  letter-spacing: -0.02em;
}
.lead {
  color: var(--muted);
  margin: 0 0 24px;
  font-size: 1.02rem;
  max-width: 34ch;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 22px 18px;
  backdrop-filter: blur(14px);
  animation: rise 0.35s ease both;
  margin: auto 0;
  width: 100%;
}

h1, h2 {
  margin: 0 0 12px;
  line-height: 1.2;
  font-weight: 650;
}
h2 {
  font-family: var(--display);
  font-size: clamp(1.15rem, 3.8vw, 1.4rem);
  font-weight: 600;
}
.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: var(--radius);
  padding: 14px 22px;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, opacity 0.18s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn.primary {
  background: var(--accent);
  color: var(--accent-ink);
  width: 100%;
  max-width: 280px;
}
.btn.primary:hover { background: #d4b56c; }
.btn.ghost {
  width: 100%;
  max-width: 280px;
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
}
.btn.ghost:hover { color: var(--ink); border-color: rgba(244, 241, 234, 0.28); }

.progress {
  height: 3px;
  background: rgba(244, 241, 234, 0.1);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 14px;
}
.progress-bar {
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width 0.28s ease;
}
.step-label {
  color: var(--muted);
  font-size: 0.82rem;
  margin: 0 0 8px;
  letter-spacing: 0.04em;
}

.options { display: grid; gap: 10px; margin-top: 16px; }
.option {
  text-align: left;
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--ink);
  border-radius: 10px;
  padding: 14px 15px;
  font: inherit;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}
.option:hover, .option:focus-visible {
  border-color: rgba(196, 163, 90, 0.7);
  background: rgba(196, 163, 90, 0.08);
  outline: none;
  transform: translateY(-1px);
}
.option strong { display: block; margin-bottom: 2px; font-weight: 650; }
.option span { color: var(--muted); font-size: 0.9rem; }

.result {
  animation: rise 0.45s ease both;
  margin: auto 0;
  width: 100%;
}
.result-photo {
  margin: 0 0 18px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #0c0e12;
  aspect-ratio: 16 / 9;
}
.result-photo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
  animation: reveal 0.7s ease both;
}
.result-body .lead { max-width: none; margin-bottom: 14px; }
.why {
  margin: 0 0 22px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}
.why li {
  position: relative;
  padding-left: 16px;
  color: var(--muted);
  font-size: 0.96rem;
}
.why li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 7px;
  height: 7px;
  border-radius: 1px;
  background: var(--accent);
  opacity: 0.85;
}

.actions {
  display: grid;
  gap: 10px;
  margin-bottom: 8px;
}

.alts {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.alts h3 {
  margin: 0 0 12px;
  font-size: 0.86rem;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.alt-list { display: grid; gap: 10px; }
.alt-link {
  color: var(--ink);
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 96px 1fr;
  min-height: 72px;
  background: rgba(255, 255, 255, 0.03);
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.alt-link:hover {
  border-color: rgba(196, 163, 90, 0.55);
  transform: translateY(-1px);
}
.alt-link img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
  background: #0c0e12;
  padding: 4px;
}
.alt-meta {
  padding: 12px 12px 12px 14px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
}
.alt-meta strong { font-weight: 650; }
.alt-meta small { color: var(--muted); }

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
@keyframes reveal {
  from { opacity: 0; transform: scale(1.03); }
  to { opacity: 1; transform: none; }
}

/* Mobile result (~390px): compact + sticky primary CTA */
@media (max-width: 719px) {
  body.is-result .shell {
    padding: 14px 0 calc(12px + env(safe-area-inset-bottom, 0px));
    min-height: 100dvh;
  }
  body.is-result .top {
    margin-bottom: 12px;
  }
  body.is-result .tagline {
    font-size: 0.72rem;
  }
  .result {
    margin: 0;
    padding-bottom: 4px;
  }
  .result-photo {
    aspect-ratio: 2.2 / 1;
    max-height: 128px;
    margin-bottom: 10px;
    border-radius: 10px;
  }
  .result-body .eyebrow {
    margin-bottom: 4px;
    font-size: 0.72rem;
  }
  .result-body h1 {
    font-family: var(--display);
    font-size: clamp(1.2rem, 5.6vw, 1.45rem);
    font-weight: 600;
    margin: 0 0 6px;
  }
  .result-body .lead {
    font-size: 0.9rem;
    margin-bottom: 8px;
    line-height: 1.4;
  }
  .why {
    gap: 5px;
    margin-bottom: 12px;
  }
  .why li {
    font-size: 0.86rem;
    padding-left: 14px;
    line-height: 1.35;
  }
  .actions {
    position: sticky;
    bottom: 0;
    z-index: 8;
    gap: 8px;
    margin: 0;
    padding: 10px 0 calc(10px + env(safe-area-inset-bottom, 0px));
    background:
      linear-gradient(180deg, rgba(10, 12, 16, 0) 0%, rgba(10, 12, 16, 0.88) 22%, rgba(10, 12, 16, 0.97) 55%);
  }
  .actions .btn.primary,
  .actions .btn.ghost {
    max-width: none;
    width: 100%;
    padding: 13px 18px;
  }
  .actions .btn.ghost {
    padding: 10px 18px;
    font-weight: 600;
  }
  .alts {
    margin-top: 14px;
    padding-top: 12px;
  }
  .alts h3 {
    margin-bottom: 8px;
    font-size: 0.78rem;
  }
  .alt-link {
    grid-template-columns: 76px 1fr;
    min-height: 58px;
  }
  .alt-meta {
    padding: 8px 10px;
  }
  .alt-meta strong {
    font-size: 0.92rem;
  }
}

@media (min-width: 720px) {
  .shell {
    width: min(880px, calc(100% - 48px));
    padding: 32px 0 56px;
  }
  .screen-start { align-items: center; padding-bottom: 48px; }
  .panel { padding: 28px 26px; }
  .result {
    display: grid;
    grid-template-columns: 1.2fr 0.9fr;
    gap: 28px;
    align-items: center;
  }
  .result-photo {
    margin: 0;
    aspect-ratio: 16 / 10;
    min-height: 0;
    max-height: min(52vh, 460px);
  }
  .actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
  }
  .btn.primary, .btn.ghost { width: auto; }
  .alt-list {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ambient-photo,
  .screen-start,
  .panel,
  .result,
  .result-photo img { animation: none; }
}
