/* ============================================
   FUNDING GRADE — Premium Fintech Stylesheet
   Aesthetic: Refined financial authority
   Palette: Deep navy + gold + warm white
   Typography: Cormorant Garamond + IBM Plex Sans
   ============================================ */

:root {
  --navy:       #0A1628;
  --navy-mid:   #112240;
  --navy-light: #1a3357;
  --gold:       #C9A84C;
  --gold-light: #e8c97a;
  --gold-dim:   #8a6e2f;
  --white:      #F5F1EB;
  --white-dim:  #c8c0b4;
  --green:      #4CAF82;
  --amber:      #E8A033;
  --red:        #E05252;
  --radius:     12px;
  --shadow:     0 8px 40px rgba(0,0,0,0.35);
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--navy);
  color: var(--white);
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ---- LAYOUT ---- */
.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- HEADER ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 22, 40, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(201, 168, 76, 0.15);
  padding: 16px 0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--white);
}

.logo span { color: var(--gold); }

.header-nav a {
  color: var(--white-dim);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  margin-left: 28px;
  transition: color var(--transition);
}

.header-nav a:hover { color: var(--gold); }

/* ---- HERO ---- */
.hero {
  padding: 80px 0 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 700px;
  background: radial-gradient(ellipse, rgba(201,168,76,0.07) 0%, transparent 70%);
  pointer-events: none;
}

.hero-badge {
  display: inline-block;
  background: rgba(201, 168, 76, 0.12);
  border: 1px solid rgba(201, 168, 76, 0.35);
  color: var(--gold-light);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 6px 16px;
  border-radius: 100px;
  margin-bottom: 28px;
}

.hero h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2.4rem, 6vw, 3.8rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--white);
  margin-bottom: 20px;
}

.hero h1 em {
  font-style: italic;
  color: var(--gold);
}

.hero-sub {
  max-width: 560px;
  margin: 0 auto 36px;
  color: var(--white-dim);
  font-size: 1.05rem;
  line-height: 1.7;
}

.btn-primary {
  display: inline-block;
  background: var(--gold);
  color: var(--navy);
  font-family: 'IBM Plex Sans', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  padding: 14px 36px;
  border-radius: 8px;
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  box-shadow: 0 4px 24px rgba(201, 168, 76, 0.3);
}

.btn-primary:hover {
  background: var(--gold-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(201, 168, 76, 0.4);
}

.hero-trust {
  margin-top: 20px;
  font-size: 0.8rem;
  color: var(--white-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  opacity: 0.75;
}

/* ---- ESTIMATOR SECTION ---- */
.estimator-section {
  padding: 40px 0 80px;
}

.estimator-card {
  background: var(--navy-mid);
  border: 1px solid rgba(201, 168, 76, 0.15);
  border-radius: 20px;
  padding: 48px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  min-height: 460px;
}

.estimator-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold-dim), var(--gold), var(--gold-dim));
}

/* ---- PROGRESS ---- */
.progress-wrap {
  background: rgba(255,255,255,0.07);
  border-radius: 100px;
  height: 4px;
  margin-bottom: 10px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-dim), var(--gold));
  border-radius: 100px;
  width: 12.5%;
  transition: width 0.4s ease;
}

.progress-label {
  font-size: 0.75rem;
  color: var(--white-dim);
  margin-bottom: 36px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ---- FORM STEPS ---- */
.form-step {
  display: none;
  animation: fadeIn 0.3s ease;
}

.form-step.active { display: block; }

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

.step-icon {
  font-size: 2rem;
  margin-bottom: 16px;
}

.form-step h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 8px;
  line-height: 1.3;
}

.step-hint {
  font-size: 0.875rem;
  color: var(--white-dim);
  margin-bottom: 28px;
}

/* ---- OPTION CARDS ---- */
.options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 32px;
}

.options-grid--2col { grid-template-columns: repeat(2, 1fr); }
.options-grid--3col { grid-template-columns: repeat(3, 1fr); }

.option-card {
  position: relative;
  cursor: pointer;
}

.option-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.option-card span {
  display: block;
  padding: 14px 16px;
  border: 1.5px solid rgba(255,255,255,0.1);
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--white-dim);
  text-align: center;
  transition: all var(--transition);
  background: rgba(255,255,255,0.03);
  user-select: none;
}

.option-card:hover span {
  border-color: rgba(201, 168, 76, 0.4);
  color: var(--white);
  background: rgba(201, 168, 76, 0.06);
}

.option-card input:checked + span {
  border-color: var(--gold);
  color: var(--navy);
  background: var(--gold);
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(201, 168, 76, 0.25);
}

/* ---- STEP NAV ---- */
.step-nav {
  display: flex;
  gap: 12px;
  align-items: center;
}

.btn-next, .btn-submit {
  background: var(--gold);
  color: var(--navy);
  border: none;
  padding: 12px 28px;
  border-radius: 8px;
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  letter-spacing: 0.02em;
}

.btn-next:hover, .btn-submit:hover {
  background: var(--gold-light);
  transform: translateY(-1px);
}

.btn-back {
  background: transparent;
  color: var(--white-dim);
  border: 1px solid rgba(255,255,255,0.15);
  padding: 12px 20px;
  border-radius: 8px;
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-back:hover {
  color: var(--white);
  border-color: rgba(255,255,255,0.3);
}

/* ---- LOADING ---- */
.loading-state {
  text-align: center;
  padding: 60px 20px;
}

.spinner {
  width: 48px;
  height: 48px;
  border: 3px solid rgba(201, 168, 76, 0.15);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
  margin: 0 auto 24px;
}

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

.loading-text {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.4rem;
  color: var(--white);
  margin-bottom: 8px;
}

.loading-sub {
  font-size: 0.875rem;
  color: var(--white-dim);
}

.dots::after {
  content: '';
  animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
  0%   { content: ''; }
  25%  { content: '.'; }
  50%  { content: '..'; }
  75%  { content: '...'; }
  100% { content: ''; }
}

/* ---- RESULTS ---- */
.results-state {
  animation: fadeIn 0.5s ease;
}

.score-reveal {
  text-align: center;
  margin-bottom: 48px;
}

.score-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gold);
  margin-bottom: 20px;
}

.score-ring {
  position: relative;
  width: 160px;
  height: 160px;
  margin: 0 auto 20px;
}

.score-svg {
  width: 160px;
  height: 160px;
  transform: rotate(-90deg);
}

.score-track {
  fill: none;
  stroke: rgba(255,255,255,0.08);
  stroke-width: 8;
}

.score-fill {
  fill: none;
  stroke: var(--gold);
  stroke-width: 8;
  stroke-linecap: round;
  stroke-dasharray: 339.3;
  stroke-dashoffset: 339.3;
  transition: stroke-dashoffset 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.score-number {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.8rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1;
}

.score-verdict {
  display: inline-block;
  padding: 8px 20px;
  border-radius: 100px;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.02em;
}

.verdict--strong   { background: rgba(76, 175, 130, 0.15); color: var(--green); border: 1px solid rgba(76,175,130,0.3); }
.verdict--promising { background: rgba(201, 168, 76, 0.15); color: var(--gold-light); border: 1px solid rgba(201,168,76,0.3); }
.verdict--needs-work { background: rgba(232, 160, 51, 0.15); color: var(--amber); border: 1px solid rgba(232,160,51,0.3); }
.verdict--not-ready  { background: rgba(224, 82, 82, 0.15); color: var(--red); border: 1px solid rgba(224,82,82,0.3); }

/* ---- AI BREAKDOWN ---- */
.ai-breakdown {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(201, 168, 76, 0.12);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 28px;
}

.ai-breakdown h3,
.next-steps h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--gold-light);
  margin-bottom: 16px;
}

.breakdown-content {
  color: var(--white-dim);
  font-size: 0.95rem;
  line-height: 1.8;
  white-space: pre-wrap;
}

/* ---- NEXT STEPS / AFFILIATES ---- */
.next-steps {
  margin-bottom: 28px;
}

.affiliate-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.affiliate-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius);
  padding: 16px 20px;
  text-decoration: none;
  transition: all var(--transition);
  flex-wrap: wrap;
  gap: 8px;
}

.affiliate-link:hover {
  border-color: rgba(201, 168, 76, 0.3);
  background: rgba(201, 168, 76, 0.05);
}

.affiliate-name {
  font-weight: 600;
  color: var(--white);
  font-size: 0.95rem;
}

.affiliate-desc {
  font-size: 0.8rem;
  color: var(--white-dim);
  margin-top: 2px;
}

.affiliate-cta {
  font-size: 0.8rem;
  color: var(--gold);
  font-weight: 600;
  white-space: nowrap;
}

/* ---- DISCLAIMER ---- */
.disclaimer {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.3);
  line-height: 1.6;
  margin-bottom: 24px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.btn-restart {
  background: transparent;
  color: var(--white-dim);
  border: 1px solid rgba(255,255,255,0.15);
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 0.875rem;
  transition: all var(--transition);
}

.btn-restart:hover {
  color: var(--white);
  border-color: rgba(255,255,255,0.3);
}

/* ---- HOW IT WORKS ---- */
.how-section {
  padding: 80px 0;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.section-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.2rem;
  font-weight: 600;
  text-align: center;
  color: var(--white);
  margin-bottom: 48px;
}

.steps-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.how-step { text-align: center; }

.how-num {
  font-family: 'Cormorant Garamond', serif;
  font-size: 3rem;
  font-weight: 700;
  color: rgba(201, 168, 76, 0.2);
  line-height: 1;
  margin-bottom: 12px;
}

.how-step h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.2rem;
  color: var(--white);
  margin-bottom: 8px;
}

.how-step p {
  font-size: 0.875rem;
  color: var(--white-dim);
  line-height: 1.7;
}

/* ---- FAQ ---- */
.faq-section {
  padding: 80px 0;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.faq-inner { max-width: 680px; }

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.faq-item {
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

.faq-q {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  background: none;
  border: none;
  color: var(--white);
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 18px 0;
  cursor: pointer;
  text-align: left;
  transition: color var(--transition);
  gap: 16px;
}

.faq-q:hover { color: var(--gold-light); }

.faq-q span {
  font-size: 1.3rem;
  color: var(--gold);
  transition: transform var(--transition);
  flex-shrink: 0;
}

.faq-q.open span { transform: rotate(45deg); }

.faq-a {
  display: none;
  font-size: 0.875rem;
  color: var(--white-dim);
  line-height: 1.8;
  padding-bottom: 18px;
}

.faq-a.open { display: block; }

/* ---- FOOTER ---- */
.site-footer {
  padding: 48px 0;
  border-top: 1px solid rgba(255,255,255,0.06);
  text-align: center;
}

.footer-brand {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 6px;
}

.footer-brand span { color: var(--gold); }

.footer-tagline {
  font-size: 0.875rem;
  color: var(--white-dim);
  font-style: italic;
  margin-bottom: 12px;
}

.footer-legal {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.25);
}

/* ---- AD SLOT ---- */
.ad-slot--bottom {
  text-align: center;
  padding: 16px;
  min-height: 90px;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 640px) {
  .estimator-card { padding: 28px 20px; }
  .steps-row { grid-template-columns: 1fr; gap: 24px; }
  .options-grid--3col { grid-template-columns: repeat(2, 1fr); }
  .options-grid--2col { grid-template-columns: 1fr; }
  .header-nav { display: none; }
  .hero { padding: 48px 0 40px; }
}
