/* ═══════════════════════════════════════════════════════════ */
/*  DESIGN TOKENS                                              */
/* ═══════════════════════════════════════════════════════════ */
:root {
  --color-bg:          #0a0a0f;
  --color-bg-card:     rgba(255,255,255,0.04);
  --color-border:      rgba(255,255,255,0.08);
  --color-border-h:    rgba(255,255,255,0.16);
  --gold-300:          #ffd966;
  --gold-400:          #f5c842;
  --gold-500:          #e6b800;
  --gold-600:          #c9a000;
  --text-primary:      #f0efe8;
  --text-secondary:    rgba(240,239,232,0.65);
  --text-muted:        rgba(240,239,232,0.40);
  --gradient-gold:     linear-gradient(135deg, #f5c842 0%, #e6b800 50%, #c9a000 100%);
  --gradient-hero:     linear-gradient(160deg, #0a0a0f 0%, #14101e 40%, #0d0b16 100%);
  --gradient-card:     linear-gradient(145deg, rgba(245,200,66,0.08) 0%, rgba(255,255,255,0.02) 100%);
  --gradient-glow:     radial-gradient(ellipse 60% 40% at 50% 0%, rgba(245,200,66,0.12) 0%, transparent 70%);
  --ease-spring:       cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-smooth:       cubic-bezier(0.4, 0, 0.2, 1);
  --ease-decel:        cubic-bezier(0.0, 0.0, 0.2, 1);
  --radius-sm:         8px;
  --radius-md:         14px;
  --radius-lg:         20px;
  --radius-xl:         28px;
  --radius-full:       9999px;
  --shadow-glow:       0 0 40px rgba(245,200,66,0.15), 0 0 80px rgba(245,200,66,0.06);
  --shadow-card:       0 2px 1px rgba(0,0,0,0.5), 0 8px 32px rgba(0,0,0,0.4);
  --shadow-btn:        0 4px 24px rgba(245,200,66,0.25);
}

/* ═══════════════════════════════════════════════════════════ */
/*  RESET & BASE                                               */
/* ═══════════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  background: var(--color-bg);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

/* ═══════════════════════════════════════════════════════════ */
/*  TYPOGRAPHY                                                 */
/* ═══════════════════════════════════════════════════════════ */
.font-display { font-family: 'Playfair Display', Georgia, serif; }
h1, h2, h3, h4 { line-height: 1.15; letter-spacing: -0.02em; }

.text-gradient {
  background: var(--gradient-gold);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ═══════════════════════════════════════════════════════════ */
/*  LAYOUT                                                     */
/* ═══════════════════════════════════════════════════════════ */
.container        { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 720px;  margin: 0 auto; padding: 0 24px; }
section { padding: 80px 0; }

/* ═══════════════════════════════════════════════════════════ */
/*  BUTTONS                                                    */
/* ═══════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-full);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  border: none;
  transition: all 0.22s var(--ease-spring);
  text-decoration: none;
}

.btn-gold {
  background: var(--gradient-gold);
  color: #0a0a0f;
  box-shadow: var(--shadow-btn);
}
.btn-gold:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 32px rgba(245,200,66,0.4), 0 0 0 1px rgba(245,200,66,0.2);
}
.btn-gold:active  { transform: scale(0.98); }
.btn-gold:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.btn-ghost {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--color-border-h);
}
.btn-ghost:hover {
  background: var(--color-bg-card);
  border-color: var(--gold-400);
  color: var(--gold-400);
}
.btn-ghost:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-lg { padding: 18px 40px; font-size: 1.05rem; }

/* ═══════════════════════════════════════════════════════════ */
/*  FORM                                                       */
/* ═══════════════════════════════════════════════════════════ */
.input {
  width: 100%;
  background: rgba(255,255,255,0.05);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  font-family: inherit;
  font-size: 1rem;
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.input::placeholder { color: var(--text-muted); }
.input:focus {
  border-color: var(--gold-400);
  background: rgba(245,200,66,0.04);
  box-shadow: 0 0 0 3px rgba(245,200,66,0.12);
}

/* ═══════════════════════════════════════════════════════════ */
/*  NAVBAR                                                     */
/* ═══════════════════════════════════════════════════════════ */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 16px 0;
  background: rgba(10,10,15,0.8);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.navbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.navbar__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.navbar__logo-star {
  width: 28px; height: 28px;
  background: var(--gradient-gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

/* ═══════════════════════════════════════════════════════════ */
/*  HERO                                                       */
/* ═══════════════════════════════════════════════════════════ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  position: relative;
  overflow: hidden;
  padding: 140px 0 80px;
}
.hero__glow {
  position: absolute;
  top: -200px; left: 50%;
  transform: translateX(-50%);
  width: 800px; height: 600px;
  background: var(--gradient-glow);
  pointer-events: none;
  z-index: 0;
}
#starfield {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.hero__content {
  position: relative;
  z-index: 1;
  text-align: center;
  width: 100%;
}
.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(245,200,66,0.08);
  border: 1px solid rgba(245,200,66,0.2);
  border-radius: var(--radius-full);
  padding: 6px 16px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-400);
  margin-bottom: 28px;
}
.hero__title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(2.8rem, 7vw, 5.5rem);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
}
.hero__subtitle {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 48px;
  line-height: 1.65;
}

/* ═══════════════════════════════════════════════════════════ */
/*  CALCULATOR                                                 */
/* ═══════════════════════════════════════════════════════════ */
.calculator-wrap {
  background: var(--gradient-card);
  border: 1px solid rgba(245,200,66,0.12);
  border-radius: var(--radius-xl);
  padding: 48px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-card), var(--shadow-glow);
}
.calculator-wrap::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(245,200,66,0.4), transparent);
}

.example-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 28px;
}
.example-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  text-align: center;
  margin-bottom: 10px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--color-border);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s var(--ease-spring);
  color: var(--text-secondary);
  font-family: inherit;
}
.chip:hover {
  border-color: var(--gold-400);
  color: var(--gold-400);
  background: rgba(245,200,66,0.05);
  transform: translateY(-2px);
}

.input-wrap {
  position: relative;
  margin-bottom: 0;
}
.input-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 8px;
}
.name-input {
  text-align: center;
  font-size: 1.1rem !important;
  padding: 16px 44px !important;
}
.clear-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 1rem;
  padding: 4px;
  display: none;
}
.clear-btn.visible { display: block; }

/* Score row */
.score-row {
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 16px;
  gap: 16px;
}
.score-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-style: italic;
}
.score-dial-wrap {
  position: relative;
  width: 72px;
  height: 72px;
  flex-shrink: 0;
  display: none;
}
.score-dial-wrap.visible { display: block; }
.score-dial-svg { transform: rotate(-90deg); }
.score-dial-inner {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.score-dial-number {
  font-size: 1.3rem;
  font-weight: 900;
  font-family: 'Playfair Display', serif;
  line-height: 1;
}
.score-info { text-align: left; min-width: 0; display: none; }
.score-info.visible { display: block; }
.score-label-text {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 2px;
}
.score-full-name {
  font-family: 'Playfair Display', serif;
  font-size: clamp(0.95rem, 2.5vw, 1.15rem);
  font-weight: 900;
  color: var(--text-primary);
}
.score-tagline {
  font-size: 0.78rem;
  color: var(--text-secondary);
  font-style: italic;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Breakdown */
.breakdown-wrap {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin-top: 20px;
  display: none;
}
.breakdown-wrap.visible { display: block; }
.breakdown-item { margin-bottom: 14px; }
.breakdown-item:last-child { margin-bottom: 0; }
.breakdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 5px;
}
.breakdown-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  flex: 1;
  min-width: 0;
}
.breakdown-score {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--gold-400);
  flex-shrink: 0;
  min-width: 28px;
  text-align: right;
}
.progress-track {
  background: rgba(255,255,255,0.06);
  border-radius: var(--radius-full);
  height: 6px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: var(--gradient-gold);
  transition: width 1.2s var(--ease-decel);
  transform-origin: left;
}

/* ═══════════════════════════════════════════════════════════ */
/*  POSTER CARD                                                */
/* ═══════════════════════════════════════════════════════════ */
.poster-outer {
  display: flex;
  justify-content: center;
  margin-top: 20px;
  display: none;
}
.poster-outer.visible { display: flex; }

.poster-card {
  width: 100%;
  max-width: 500px;
  border-radius: 24px;
  padding: 60px 40px 40px;
  position: relative;
  overflow: hidden;
  font-family: 'Space Grotesk', sans-serif;
  text-align: center;
}

.poster-top-line {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
}
.poster-glow {
  position: absolute;
  top: -60px; left: 50%;
  transform: translateX(-50%);
  width: 280px; height: 280px;
  pointer-events: none;
}
.poster-corner {
  position: absolute;
  width: 4px; height: 4px;
  border-radius: 50%;
}
.poster-eyebrow {
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.poster-name {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.8rem, 6vw, 2.6rem);
  font-weight: 900;
  color: #F0EFE8;
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin-bottom: 10px;
}
.poster-tagline {
  font-size: 0.85rem;
  color: rgba(240,239,232,0.45);
  font-style: italic;
  line-height: 1.5;
  margin-bottom: 28px;
}
.poster-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}
.poster-divider-line { flex: 1; height: 1px; }
.poster-divider-dot { font-size: 0.7rem; }
.poster-score-number {
  font-family: 'Playfair Display', serif;
  font-size: clamp(4.5rem, 15vw, 6rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.04em;
  margin-bottom: 4px;
}
.poster-out-of {
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  font-weight: 600;
  margin-bottom: 16px;
}
.poster-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 5px 16px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ═══════════════════════════════════════════════════════════ */
/*  ACTION BUTTONS                                             */
/* ═══════════════════════════════════════════════════════════ */
.action-row {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
  display: none;
}
.action-row.visible { display: flex; }

/* ═══════════════════════════════════════════════════════════ */
/*  HOW IT WORKS                                               */
/* ═══════════════════════════════════════════════════════════ */
.how-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 48px;
}
.how-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  transition: all 0.25s var(--ease-spring);
}
.how-card:hover {
  border-color: rgba(245,200,66,0.2);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.3);
}
.how-card__icon {
  width: 48px; height: 48px;
  background: rgba(245,200,66,0.08);
  border: 1px solid rgba(245,200,66,0.15);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 16px;
}
.how-card__title { font-size: 0.95rem; font-weight: 700; margin-bottom: 6px; }
.how-card__desc  { font-size: 0.82rem; color: var(--text-muted); line-height: 1.6; }

/* ═══════════════════════════════════════════════════════════ */
/*  SECTION HEADER                                             */
/* ═══════════════════════════════════════════════════════════ */
.section-header  { text-align: center; margin-bottom: 16px; }
.section-eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-400);
  margin-bottom: 12px;
}
.section-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 900;
  letter-spacing: -0.02em;
}
.section-subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 500px;
  margin: 12px auto 0;
  line-height: 1.65;
}

/* ═══════════════════════════════════════════════════════════ */
/*  DIVIDER / FOOTER                                           */
/* ═══════════════════════════════════════════════════════════ */
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
}
.footer {
  padding: 40px 0;
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-muted);
  border-top: 1px solid var(--color-border);
}

/* ═══════════════════════════════════════════════════════════ */
/*  ANIMATIONS                                                 */
/* ═══════════════════════════════════════════════════════════ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-8px); }
}
.animate-fade-up  { animation: fadeInUp 0.6s var(--ease-decel) both; }
.animate-float    { animation: float 4s ease-in-out infinite; }

/* ═══════════════════════════════════════════════════════════ */
/*  GENERATED NAME PAGE                                        */
/* ═══════════════════════════════════════════════════════════ */
.result-hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 120px 0 60px;
}
.result-hero .container { width: 100%; }

.cta-box {
  background: var(--gradient-card);
  border: 1px solid rgba(245,200,66,0.12);
  border-radius: var(--radius-xl);
  padding: 56px 40px;
  position: relative;
  overflow: hidden;
  text-align: center;
}
.cta-box::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(245,200,66,0.4), transparent);
}

/* ═══════════════════════════════════════════════════════════ */
/*  RESPONSIVE                                                 */
/* ═══════════════════════════════════════════════════════════ */
@media (max-width: 600px) {
  .calculator-wrap { padding: 24px 16px; }
  .hero { padding: 130px 0 60px; }
  .poster-card { padding: 48px 24px 32px; }
}

/* ═══════════════════════════════════════════════════════════ */
/*  SCROLLBAR                                                  */
/* ═══════════════════════════════════════════════════════════ */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--color-bg); }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(245,200,66,0.3); }
