/* ─── Variables ──────────────────────────────────────────────────────────── */
:root {
  --bg:           #0a0a0a;
  --surface:      #141414;
  --surface2:     #1c1c1c;
  --border:       #272727;
  --text:         #e8e6e1;
  --muted:        #7a7875;
  --gold:         #c9a060;
  --gold-light:   #e0b87a;
  --radius:       4px;
  --max-w:        480px;
  --transition:   0.18s ease;
}

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

html { font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 300;
  line-height: 1.6;
  min-height: 100dvh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

#app {
  width: 100%;
  max-width: var(--max-w);
  min-height: 100dvh;
  padding: 0 20px env(safe-area-inset-bottom, 0);
}

/* ─── Typography ─────────────────────────────────────────────────────────── */
h1, h2, .result__name {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

/* ─── Screens ────────────────────────────────────────────────────────────── */
.screen {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  padding-top: 48px;
  padding-bottom: 40px;
}

/* Intro */
.screen--intro {
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 0;
}

.intro__eyebrow {
  font-size: 21px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 24px;
}

.eyebrow-p1::after { content: ' · '; }

@media (max-width: 480px) {
  .intro__eyebrow    { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 17px; }
  .eyebrow-p1::after { content: ''; }
  .question__stem    { font-size: 25px; }
  .result__eyebrow   { font-size: 17px; }
  .result__card-label { font-size: 17px; }
  .exercises__label  { font-size: 17px; }
  .email__headline   { font-size: 17px; }
}

.intro__authority {
  font-size: 13px;
  font-weight: 500;
  font-style: italic;
  line-height: 1.75;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold);
  text-align: center;
  margin-bottom: 32px;
}

.intro__title {
  font-size: clamp(42px, 10vw, 56px);
  color: var(--text);
  margin-bottom: 20px;
}

.intro__sub {
  font-size: 18px;
  color: #ffffff;
  margin-bottom: 40px;
}

.intro__note {
  font-size: 13px;
  color: #ffffff;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-top: 40px;
}

/* Question */
.screen--question {
  padding-top: 0;
}

.progress-bar {
  height: 2px;
  background: var(--border);
  width: 100%;
  position: sticky;
  top: 0;
  z-index: 10;
}

.progress-bar__fill {
  height: 100%;
  background: var(--gold);
  transition: width 0.3s ease;
}

.question__nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 36px;
  margin-bottom: 28px;
}

.question__counter {
  font-size: 33px;
  font-family: 'Cormorant Garamond', Georgia, serif;
  letter-spacing: 0.05em;
  color: var(--muted);
  text-align: center;
}

.visual-header {
  text-align: center;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 300;
  font-size: 21px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  line-height: 1.7;
}

.back-btn {
  background: none;
  border: none;
  color: var(--muted);
  font-family: inherit;
  font-size: 14px;
  cursor: pointer;
  padding: 4px 0;
  transition: color var(--transition);
  -webkit-tap-highlight-color: transparent;
}

.back-btn:hover { color: var(--text); }

.back-btn--placeholder {
  width: 48px;
}

.question__stem {
  font-size: clamp(22px, 5.5vw, 28px);
  color: var(--text);
  margin-bottom: 32px;
  font-weight: 400;
}

.answers {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.answer-btn {
  display: block;
  width: 100%;
  min-height: 56px;
  padding: 14px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: inherit;
  font-size: 18px;
  font-weight: 300;
  text-align: left;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition), color var(--transition);
  -webkit-tap-highlight-color: transparent;
}

.answer-btn:active,
.answer-btn--selected {
  border-color: var(--gold);
  background: var(--surface2);
  color: var(--gold-light);
}

@media (hover: hover) {
  .answer-btn:hover {
    border-color: var(--gold);
    background: var(--surface2);
    color: var(--gold-light);
  }
}

/* Calculating */
.screen--calculating {
  justify-content: center;
  align-items: center;
  gap: 24px;
}

.calculating__spinner {
  width: 36px;
  height: 36px;
  border: 1.5px solid var(--border);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.calculating__text {
  font-size: 14px;
  color: var(--muted);
  letter-spacing: 0.06em;
}

/* Result */
.screen--result {
  padding-top: 48px;
  gap: 0;
  text-align: center;
}

/* Archetype image */
.archetype-img-wrap {
  width: 100%;
  aspect-ratio: 1 / 1;
  margin-bottom: 32px;
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}

.archetype-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.archetype-img-placeholder {
  display: none;
  position: absolute;
  inset: 0;
  align-items: center;
  justify-content: center;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 80px;
  color: var(--gold);
  opacity: 0.3;
  background: var(--surface2);
}

.result__eyebrow {
  font-size: 21px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
}

.result__name {
  font-size: clamp(40px, 10vw, 52px);
  margin-bottom: 20px;
}

.result__creativity-type {
  font-size: 15.18px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 20px;
}

.result__killer-line {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 18px;
  font-style: italic;
  color: var(--muted);
  line-height: 1.6;
  text-align: center;
  margin-bottom: 24px;
  padding: 0 8px;
}

.result__divider {
  width: 40px;
  height: 1px;
  background: var(--gold);
  margin: 0 auto 28px;
}

.result__profile {
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  text-align: justify;
  margin-bottom: 36px;
}

.result__killerline {
  font-size: 17px;
  line-height: 1.65;
  color: var(--muted);
  margin-bottom: 28px;
  font-style: italic;
}

.result__cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 36px;
}

.result__card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}

.result__card--wide {
  grid-column: 1 / -1;
}

.result__card-label {
  font-size: 21px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
}

.result__card-text {
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  text-align: justify;
}

/* Exercises */
.exercises {
  margin-bottom: 40px;
}

.exercises__label {
  font-size: 21px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
  text-align: center;
}

.exercises__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.exercise-item {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

.exercise-num {
  font-size: 11px;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
  letter-spacing: 0.05em;
}

.exercise-name {
  font-size: 16px;
  color: var(--text);
}

/* Temporal tell insight */
.result__tell {
  font-size: 14.95px;
  font-style: italic;
  color: var(--gold);
  opacity: 0.8;
  line-height: 1.55;
  text-align: center;
  margin-bottom: 20px;
}

/* Teaser */
.result__teaser {
  font-size: 16px;
  font-style: italic;
  color: var(--text);
  line-height: 1.65;
  text-align: center;
  margin-bottom: 32px;
}

/* Email section */
.email-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px;
  margin-bottom: 20px;
}

.email__headline {
  font-size: 21px;
  font-family: 'Cormorant Garamond', Georgia, serif;
  margin-bottom: 16px;
}

.email__divider {
  width: 32px;
  height: 1px;
  background: #fff;
  margin: 0 auto 20px;
}

.email__sub {
  font-size: 16px;
  color: var(--text);
  margin-top: 14px;
  text-align: center;
}

.email__domain-row {
  margin-bottom: 16px;
}

.email__field-label {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  display: block;
  margin-bottom: 10px;
}

.email__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition);
  -webkit-tap-highlight-color: transparent;
}

.chip:hover,
.chip--active {
  border-color: var(--gold);
  color: var(--gold-light);
}

.email__form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}

.email__input {
  width: 100%;
  height: 52px;
  padding: 0 16px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  outline: none;
  transition: border-color var(--transition);
}

.email__input:focus { border-color: var(--gold); }
.email__input::placeholder { color: var(--text); }

.email__privacy {
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
  text-align: center;
}

/* Share */
.share-row {
  display: flex;
  justify-content: center;
  padding-bottom: 40px;
}

/* Confirmed */
.screen--confirmed {
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 16px;
}

.confirmed__icon {
  width: 52px;
  height: 52px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  font-size: 20px;
  margin-bottom: 8px;
}

.confirmed__title {
  font-size: 32px;
  font-family: 'Cormorant Garamond', Georgia, serif;
}

.confirmed__sub {
  font-size: 15px;
  color: var(--muted);
  max-width: 300px;
  line-height: 1.6;
}

.confirmed__next {
  font-size: 12px;
  color: var(--muted);
  opacity: 0.6;
  text-align: center;
  margin-top: 4px;
}

/* ─── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 52px;
  padding: 0 28px;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
  -webkit-tap-highlight-color: transparent;
  border: none;
}

#startBtn { font-size: 16px; }

.btn--primary {
  background: var(--gold);
  color: #000;
  font-weight: 700;
  font-size: 16px;
  width: 100%;
}

.btn--primary:hover { background: var(--gold-light); }

.btn--ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}

.btn--ghost:hover {
  border-color: var(--gold);
  color: var(--gold-light);
}

/* ─── Modal ──────────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 100;
}

.modal-overlay--visible { opacity: 1; }

.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  max-width: 360px;
  width: 100%;
  text-align: center;
}

.modal__title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 24px;
  color: var(--text);
  margin-bottom: 12px;
}

.modal__message {
  font-size: 18px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 28px;
}

.modal__btn { max-width: 200px; margin: 0 auto; }

/* ─── Toast ──────────────────────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 13px;
  padding: 10px 20px;
  border-radius: 24px;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
  white-space: nowrap;
}

.toast--visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ─── Share card overlay ──────────────────────────────────────────────────── */
.share-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.96);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  z-index: 200;
  padding: 24px 16px;
  overflow-y: auto;
}

.share-card {
  width: 280px;
  background: #0a0a0a;
  border: 2px solid var(--gold);
  border-radius: 12px;
  padding: 20px 20px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  box-shadow:
    0 0 0 5px #0a0a0a,
    0 0 0 6px rgba(201,160,96,0.3),
    0 20px 60px rgba(0,0,0,0.8);
}

.share-card::before {
  content: '';
  position: absolute;
  inset: 5px;
  border: 1px solid rgba(201,160,96,0.2);
  border-radius: 8px;
  pointer-events: none;
}

.card__logo {
  font-family: 'Inter', sans-serif;
  font-size: 8px;
  font-weight: 400;
  letter-spacing: 0.28em;
  color: var(--gold);
  text-align: center;
  margin-bottom: 16px;
}

.card__divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--gold), transparent);
  opacity: 0.4;
  margin: 10px 0;
}

.card__eyebrow {
  font-size: 7.5px;
  letter-spacing: 0.22em;
  color: var(--gold);
  text-align: center;
  margin-bottom: 6px;
}

.card__name {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 30px;
  font-weight: 400;
  color: var(--text);
  text-align: center;
  line-height: 1.1;
  margin-bottom: 5px;
}

.card__gives {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 13.5px;
  font-style: italic;
  color: var(--gold-light);
  text-align: center;
}

.card__image {
  width: 100%;
  overflow: hidden;
  display: block;
  margin: 0;
}

.card__image img {
  width: 100%;
  height: auto;
  display: block;
}

.card__image-placeholder {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 48px;
  color: rgba(201,160,96,0.12);
  letter-spacing: 0.05em;
}

.card__desc {
  text-align: center;
}

.card__desc p {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 12px;
  font-style: italic;
  color: var(--text);
  line-height: 1.55;
  opacity: 0.85;
}

.card__url {
  font-size: 7.5px;
  letter-spacing: 0.2em;
  color: var(--gold);
  opacity: 0.6;
  text-align: center;
}

.share-overlay__actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.share-hint {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-align: center;
}

.share-overlay__btns {
  display: flex;
  gap: 12px;
}

/* ─── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 360px) {
  .result__cards { grid-template-columns: 1fr; }
}

/* Mobile-only intro adjustments */
br.mob        { display: none; }
.desktop-sep  { display: inline; }
.mobile-br    { display: none; }

@media (max-width: 768px) {
  br.mob        { display: inline; }
  .desktop-sep  { display: none; }
  .mobile-br    { display: inline; }
}

@media (max-width: 768px) {
  /* More breathing room */
  #app { padding: 0 28px env(safe-area-inset-bottom, 0); }

  /* Equal-width cards */
  .result__cards {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
  .result__card { width: 100%; }

  /* Smaller card labels */
  .result__card-label { font-size: 13px; letter-spacing: 0.1em; }
}
