/* ═══════════════════════════════════════════════════
   AGENCY VALUATION CALCULATOR — style.css
   Primary: #6A0BE4  Dark: #5a09c4  Light: #f0ebff  Lightest: #f7f4ff
   ═══════════════════════════════════════════════════ */

/* ── TOKENS ─────────────────────────────────────── */
:root {
  --p:      #6A0BE4;
  --p-d:    #5a09c4;
  --p-lt:   #f0ebff;
  --p-llt:  #f7f4ff;
  --p-glow: rgba(106,11,228,.18);
  --success:#10b981;
  --warn:   #f59e0b;
  --danger: #ef4444;
  --teal:   #0891b2;
  --text:   #0d0820;
  --text2:  #4a4468;
  --text3:  #9490b5;
  --border: #e5e0f5;
  --bg:     #ffffff;
  --bg2:    #f9f8ff;
  --bg3:    #f3f1fb;
  --r-sm:   6px;
  --r-md:   12px;
  --r-lg:   18px;
  --r-xl:   24px;
  --sh-sm:  0 1px 4px rgba(106,11,228,.06);
  --sh-md:  0 4px 20px rgba(106,11,228,.10);
  --sh-lg:  0 8px 40px rgba(106,11,228,.14);
  --ease:   cubic-bezier(.4,0,.2,1);
  --font:   'Inter', sans-serif;
}

/* ── RESET ───────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 15px; }
body { font-family: var(--font); color: var(--text); background: var(--bg2); line-height: 1.6; }
a { text-decoration: none; color: inherit; }
ul, ol { padding-left: 1.4em; }
button { font-family: var(--font); cursor: pointer; }

/* ── HERO ────────────────────────────────────────── */
#hero {
  background: linear-gradient(145deg, #0e0520 0%, #1e0550 45%, #6A0BE4 100%);
  padding: 72px 24px 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
#hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 65% 75% at 50% 115%, rgba(106,11,228,.5) 0%, transparent 65%);
  pointer-events: none;
}
#hero::after {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 360px; height: 360px;
  background: radial-gradient(circle, rgba(196,181,253,.12) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}
.hero-inner { position: relative; z-index: 1; max-width: 700px; margin: 0 auto; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(255,255,255,.10); border: 1px solid rgba(255,255,255,.20);
  color: #e2d9ff; font-size: 11.5px; font-weight: 600; letter-spacing: .5px;
  padding: 5px 15px; border-radius: 20px; margin-bottom: 22px;
}
.hero-badge-dot {
  width: 7px; height: 7px; background: #a78bfa;
  border-radius: 50%; animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.4;transform:scale(.8)} }
#hero h1 {
  font-size: clamp(24px, 3.6vw, 46px);
  font-weight: 800; color: #fff;
  line-height: 1.08; letter-spacing: -.6px; margin-bottom: 16px;
}
#hero h1 span { color: #c4b5fd; }
#hero p { font-size: 16px; color: rgba(255,255,255,.65); max-width: 540px; margin: 0 auto 28px; line-height: 1.7; }
.hero-stats {
  display: flex; gap: 32px; justify-content: center; flex-wrap: wrap;
}
.hero-stat { text-align: center; }
.hero-stat-val { font-size: 22px; font-weight: 800; color: #c4b5fd; letter-spacing: -.3px; }
.hero-stat-label { font-size: 11px; color: rgba(255,255,255,.5); font-weight: 500; margin-top: 2px; }

/* ── METHOD SELECTOR BAR ─────────────────────────── */
#methodBar {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  position: sticky; top: 0; z-index: 50;
  box-shadow: 0 2px 12px rgba(106,11,228,.07);
}
.method-bar-inner {
  max-width: 1280px; margin: 0 auto;
  display: flex; gap: 0; overflow-x: auto;
}
.method-tab {
  flex: 1; min-width: 140px;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 16px 12px 14px;
  border: none; background: transparent;
  font-size: 12.5px; font-weight: 600; color: var(--text3);
  border-bottom: 3px solid transparent;
  transition: color .18s, border-color .18s;
  white-space: nowrap;
}
.method-tab:hover { color: var(--p); }
.method-tab.active { color: var(--p); border-bottom-color: var(--p); }
.method-tab-icon {
  width: 34px; height: 34px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg3); color: var(--text3);
  transition: background .18s, color .18s;
  font-size: 16px;
}
.method-tab.active .method-tab-icon,
.method-tab:hover .method-tab-icon { background: var(--p-lt); color: var(--p); }

/* ── MAIN LAYOUT ─────────────────────────────────── */
#mainWrap {
  max-width: 1280px; margin: 0 auto;
  display: grid;
  grid-template-columns: 55% 1fr;
  gap: 28px;
  padding: 36px 24px 64px;
  align-items: flex-start;
}

/* ── LEFT — INPUT COLUMN ─────────────────────────── */
#inputCol { display: flex; flex-direction: column; gap: 16px; }

/* ── METHOD ACCORDION CARD ───────────────────────── */
.method-card {
  background: var(--bg); border: 1.5px solid var(--border);
  border-radius: var(--r-lg); overflow: hidden;
  transition: border-color .2s, box-shadow .2s;
}
.method-card:focus-within,
.method-card.open { border-color: var(--p); box-shadow: 0 0 0 3px var(--p-lt); }
.method-card-header {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 20px; cursor: pointer; user-select: none;
  border-bottom: 1.5px solid transparent; transition: border-color .2s;
}
.method-card.open .method-card-header { border-bottom-color: var(--border); }
.method-card-icon {
  width: 40px; height: 40px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; font-size: 18px;
  background: var(--p-lt); color: var(--p);
}
.method-card-info { flex: 1; }
.method-card-title { font-size: 14px; font-weight: 700; color: var(--text); line-height: 1.2; }
.method-card-sub { font-size: 11.5px; color: var(--text3); margin-top: 2px; }
.method-card-value {
  font-size: 15px; font-weight: 800; color: var(--p);
  background: var(--p-llt); padding: 5px 12px; border-radius: 20px;
  letter-spacing: -.2px; transition: opacity .2s;
}
.method-card-value.empty { color: var(--text3); background: var(--bg3); font-weight: 500; font-size: 13px; }
.method-card-chevron {
  width: 24px; height: 24px; color: var(--text3);
  transition: transform .3s var(--ease), color .2s;
  flex-shrink: 0;
}
.method-card.open .method-card-chevron { transform: rotate(180deg); color: var(--p); }
.method-card-body {
  max-height: 0; overflow: hidden;
  transition: max-height .35s var(--ease), padding .3s var(--ease);
  padding: 0 20px;
}
.method-card.open .method-card-body { max-height: 600px; padding: 20px; }

/* ── COMMON INPUTS CARD ──────────────────────────── */
.common-card {
  background: linear-gradient(135deg, var(--p-llt), var(--p-lt));
  border: 1.5px solid rgba(106,11,228,.2);
  border-radius: var(--r-lg); padding: 20px;
}
.common-card-title {
  font-size: 11px; font-weight: 800; text-transform: uppercase;
  letter-spacing: 1px; color: var(--p); margin-bottom: 16px;
  display: flex; align-items: center; gap: 6px;
}

/* ── FORM CONTROLS ───────────────────────────────── */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-row-3 { grid-template-columns: 1fr 1fr 1fr; }
.form-group { margin-bottom: 14px; }
.form-group:last-child { margin-bottom: 0; }
label {
  display: block; font-size: 12px; font-weight: 600;
  color: var(--text2); margin-bottom: 5px;
}
.input-wrap { position: relative; display: flex; }
.input-pre, .input-suf {
  display: flex; align-items: center; padding: 0 10px;
  background: var(--bg3); border: 1.5px solid var(--border);
  font-size: 12.5px; color: var(--text3); font-weight: 600;
  white-space: nowrap; flex-shrink: 0;
}
.input-pre { border-right: none; border-radius: var(--r-sm) 0 0 var(--r-sm); }
.input-suf { border-left: none; border-radius: 0 var(--r-sm) var(--r-sm) 0; }
input[type="number"],
input[type="text"],
select {
  width: 100%; padding: 9px 11px;
  border: 1.5px solid var(--border); border-radius: var(--r-sm);
  font-family: var(--font); font-size: 13.5px;
  color: var(--text); background: var(--bg); outline: none;
  transition: border-color .18s, box-shadow .18s;
}
.input-wrap input[type="number"],
.input-wrap input[type="text"] { border-radius: 0; flex: 1; }
input:focus, select:focus {
  border-color: var(--p);
  box-shadow: 0 0 0 3px rgba(106,11,228,.1);
}
input::placeholder { color: var(--text3); font-weight: 400; }
select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='13' viewBox='0 0 24 24' fill='none' stroke='%239490b5' stroke-width='2' stroke-linecap='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 30px; cursor: pointer;
}
.hint { font-size: 11px; color: var(--text3); margin-top: 4px; }

/* ── RIGHT — SUMMARY PANEL ───────────────────────── */
#summaryCol { position: sticky; top: 72px; }
.summary-panel {
  background: var(--bg);
  border: 1.5px solid rgba(106,11,228,.2);
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: var(--sh-lg);
}
.summary-header {
  background: linear-gradient(135deg, #0e0520 0%, #260963 55%, #6A0BE4 100%);
  padding: 18px 22px;
  display: flex; align-items: center; justify-content: space-between;
}
.summary-header-left { display: flex; align-items: center; gap: 8px; }
.summary-dot { width: 9px; height: 9px; border-radius: 50%; }
.summary-dot.r { background: #ff5f57; box-shadow: 0 0 5px #ff5f57aa; }
.summary-dot.y { background: #febc2e; box-shadow: 0 0 5px #febc2eaa; }
.summary-dot.g { background: #28c840; box-shadow: 0 0 5px #28c840aa; }
.summary-title { font-size: 13px; font-weight: 700; color: rgba(255,255,255,.85); letter-spacing: .3px; margin-left: 6px; }
.live-badge {
  font-size: 10px; font-weight: 700; letter-spacing: 1px;
  text-transform: uppercase; color: #a78bfa;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.15);
  padding: 3px 10px; border-radius: 20px;
}
.summary-body { padding: 20px; }

/* ── 4-METHOD GRID ───────────────────────────────── */
.methods-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  margin-bottom: 16px;
}
.method-result-card {
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: 12px 14px;
  transition: border-color .2s, box-shadow .2s;
}
.method-result-card.highlight { border-color: var(--p); background: var(--p-llt); box-shadow: 0 0 0 2px rgba(106,11,228,.08); }
.mrc-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .8px; color: var(--text3); margin-bottom: 6px; }
.mrc-val { font-size: 18px; font-weight: 800; color: var(--text); letter-spacing: -.3px; }
.mrc-val.has-val { color: var(--p); }
.mrc-sub { font-size: 10.5px; color: var(--text3); margin-top: 3px; }

/* ── BLENDED VALUATION ───────────────────────────── */
.blended-box {
  background: linear-gradient(135deg, var(--p), var(--p-d));
  border-radius: var(--r-lg); padding: 18px 20px;
  text-align: center; margin-bottom: 14px; color: #fff;
  position: relative; overflow: hidden;
}
.blended-box::before {
  content: '';
  position: absolute; top: -40%; right: -20%;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(255,255,255,.12), transparent 70%);
  border-radius: 50%; pointer-events: none;
}
.blended-label { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 1.2px; opacity: .75; margin-bottom: 6px; }
.blended-val { font-size: 34px; font-weight: 800; letter-spacing: -.5px; line-height: 1.05; }
.blended-sub { font-size: 12px; opacity: .65; margin-top: 4px; }

/* ── RANGE BAR ───────────────────────────────────── */
.range-box {
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: 14px 16px; margin-bottom: 12px;
}
.range-title { font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .7px; color: var(--text3); margin-bottom: 10px; }
.range-track { height: 8px; background: var(--border); border-radius: 4px; overflow: hidden; margin-bottom: 8px; position: relative; }
.range-fill { height: 100%; background: linear-gradient(90deg, var(--p), #a78bfa); border-radius: 4px; width: 100%; transition: width .5s var(--ease); }
.range-labels { display: flex; justify-content: space-between; font-size: 11.5px; font-weight: 700; }
.range-low { color: var(--p); }
.range-high { color: var(--p-d); }

/* ── BUYER MATCH ─────────────────────────────────── */
.buyer-box {
  border: 1px solid var(--border); border-left: 4px solid var(--p);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  padding: 12px 14px; margin-bottom: 12px;
  background: var(--bg);
}
.buyer-box-label { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .7px; color: var(--text3); margin-bottom: 5px; }
.buyer-box-val { font-size: 13px; font-weight: 600; color: var(--text); line-height: 1.5; }

/* ── CONFIDENCE SCORE ────────────────────────────── */
.confidence-row { display: flex; align-items: center; gap: 10px; }
.confidence-label { font-size: 11px; font-weight: 600; color: var(--text2); white-space: nowrap; }
.confidence-bar-wrap { flex: 1; height: 8px; background: var(--border); border-radius: 4px; overflow: hidden; }
.confidence-bar { height: 100%; border-radius: 4px; transition: width .6s var(--ease), background .4s; }
.confidence-pct { font-size: 12px; font-weight: 800; color: var(--p); white-space: nowrap; }

/* ── CONTENT SECTIONS ────────────────────────────── */
.content-section { background: var(--bg); border-top: 1px solid var(--border); }
.content-inner { max-width: 960px; margin: 0 auto; padding: 72px 24px; }
.section-eyebrow {
  display: inline-block; background: var(--p-lt); color: var(--p);
  font-size: 11px; font-weight: 800; letter-spacing: 1px;
  text-transform: uppercase; padding: 5px 16px; border-radius: 20px; margin-bottom: 16px;
}
.section-h2 {
  font-size: clamp(24px, 3vw, 36px); font-weight: 800;
  color: var(--text); margin-bottom: 14px; letter-spacing: -.4px; line-height: 1.15;
}
.section-lead { font-size: 16px; color: var(--text2); line-height: 1.7; max-width: 640px; }

/* ── INFO GRID ───────────────────────────────────── */
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 40px; }
.info-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 24px;
  transition: box-shadow .2s, transform .2s;
}
.info-card:hover { box-shadow: var(--sh-md); transform: translateY(-2px); }
.info-card-icon {
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--p-lt); color: var(--p); font-size: 20px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
}
.info-card h3 { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.info-card p { font-size: 13.5px; color: var(--text2); line-height: 1.65; }

/* ── METHODS EXPLAINER ───────────────────────────── */
.methods-explainer { margin-top: 40px; display: flex; flex-direction: column; gap: 12px; }
.method-explain {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 24px 28px;
  display: flex; align-items: flex-start; gap: 18px;
}
.method-explain-num {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--p); color: #fff; font-size: 14px; font-weight: 800;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.method-explain-body h3 { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.method-explain-body p { font-size: 13.5px; color: var(--text2); line-height: 1.65; }
.formula-inline {
  display: inline-block; background: var(--p-llt); border: 1px solid var(--p-lt);
  border-radius: 6px; padding: 3px 8px; font-family: monospace;
  font-size: 12.5px; color: var(--p); font-weight: 600; margin-top: 6px;
}

/* ── FAQ ─────────────────────────────────────────── */
.faq-section { background: var(--bg3); }
.faq-inner { max-width: 760px; margin: 0 auto; padding: 72px 24px; }
.faq-list { display: flex; flex-direction: column; gap: 10px; margin-top: 36px; }
.faq-item {
  background: var(--bg); border: 1.5px solid var(--border);
  border-radius: var(--r-md); overflow: hidden;
  transition: border-color .2s, box-shadow .2s;
}
.faq-item.open { border-color: var(--p); box-shadow: 0 0 0 3px rgba(106,11,228,.07); }
.faq-q {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; cursor: pointer; user-select: none; gap: 12px;
}
.faq-q-text { font-size: 14.5px; font-weight: 600; color: var(--text); flex: 1; line-height: 1.4; }
.faq-q-icon {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
  background: var(--bg3); color: var(--text3);
  display: flex; align-items: center; justify-content: center;
  transition: background .2s, color .2s, transform .3s var(--ease);
}
.faq-item.open .faq-q-icon { background: var(--p); color: #fff; transform: rotate(45deg); }
.faq-a {
  max-height: 0; overflow: hidden;
  transition: max-height .35s var(--ease), padding .35s var(--ease);
  padding: 0 20px;
}
.faq-a.open { max-height: 600px; padding-bottom: 18px; }
.faq-a p { font-size: 13.5px; color: var(--text2); line-height: 1.7; }

/* ── DARK CTA BANNER ─────────────────────────────── */
.cta-banner {
  background: linear-gradient(145deg, #0e0520 0%, #260963 55%, #6A0BE4 100%);
  padding: 64px 24px; text-align: center; position: relative; overflow: hidden;
}
.cta-banner::before {
  content: ''; position: absolute; inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 28px 28px; pointer-events: none;
}
.cta-inner { position: relative; z-index: 1; max-width: 580px; margin: 0 auto; }
.cta-banner h2 { font-size: clamp(22px, 3vw, 34px); font-weight: 800; color: #fff; margin-bottom: 12px; }
.cta-banner p { font-size: 15px; color: rgba(255,255,255,.55); margin-bottom: 28px; line-height: 1.65; }
.cta-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: #c4b5fd; color: #0e0520;
  font-size: 14px; font-weight: 800; padding: 14px 32px;
  border-radius: var(--r-md); border: none; cursor: pointer;
  transition: background .2s, transform .15s;
  text-decoration: none;
}
.cta-btn:hover { background: #ddd6fe; transform: translateY(-2px); }

/* ── RESPONSIVE ──────────────────────────────────── */
@media (max-width: 1100px) {
  #mainWrap { grid-template-columns: 1fr; }
  #summaryCol { position: static; }
}
@media (max-width: 768px) {
  .form-row { grid-template-columns: 1fr; }
  .form-row-3 { grid-template-columns: 1fr 1fr; }
  .methods-grid { grid-template-columns: 1fr 1fr; }
  .info-grid { grid-template-columns: 1fr; }
  .method-explain { flex-direction: column; gap: 12px; }
  .hero-stats { gap: 20px; }
}
@media (max-width: 540px) {
  #mainWrap { padding: 20px 16px 40px; }
  .methods-grid { grid-template-columns: 1fr 1fr; }
  .form-row-3 { grid-template-columns: 1fr; }
  .method-bar-inner { gap: 0; }
  .method-tab { min-width: 100px; font-size: 11px; padding: 12px 8px 10px; }
  .hero-stats { gap: 16px; }
}
