/* =============================================================
   EstateEase — calm midnight blue, soft white, gentle teal
   ============================================================= */

:root {
  --bg: #0e1b33;
  --bg-elevated: #142544;
  --bg-card: #16284b;
  --bg-card-hover: #1a2e57;
  --border: #243a64;
  --border-soft: #1f3257;
  --ink: #f1f4fb;
  --ink-soft: #cdd5e6;
  --ink-muted: #93a0bf;
  --ink-quiet: #6e7c9c;
  --teal: #6ec9c0;
  --teal-strong: #87d6cd;
  --teal-soft: rgba(110, 201, 192, 0.12);
  --teal-soft-strong: rgba(110, 201, 192, 0.22);
  --warm: #e0c08a;
  --warm-soft: rgba(224, 192, 138, 0.14);
  --error: #e69a9a;
  --error-soft: rgba(230, 154, 154, 0.12);
  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 18px;
  --shadow-soft: 0 18px 50px -22px rgba(0, 0, 0, 0.55);
  --transition: 320ms cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

body {
  background:
    radial-gradient(1100px 600px at 20% -10%, rgba(110, 201, 192, 0.07), transparent 60%),
    radial-gradient(900px 500px at 110% 10%, rgba(80, 110, 200, 0.07), transparent 60%),
    var(--bg);
  display: flex;
  flex-direction: column;
}

a {
  color: var(--teal);
  text-decoration: none;
}
a:hover { color: var(--teal-strong); }

h1, h2, h3 {
  color: var(--ink);
  margin: 0;
}

p {
  color: var(--ink-soft);
}

/* ---------- header ---------- */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 32px;
  max-width: 1140px;
  margin: 0 auto;
  width: 100%;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 600;
  letter-spacing: 0.1px;
}

.brand-icon {
  width: 26px;
  height: 26px;
  color: var(--teal);
}

.brand-name {
  font-size: 17px;
}

.site-nav {
  display: flex;
  gap: 28px;
}

.nav-link {
  color: var(--ink-muted);
  font-size: 14.5px;
  padding: 4px 2px;
  border-bottom: 1.5px solid transparent;
  transition: color var(--transition), border-color var(--transition);
}
.nav-link:hover { color: var(--ink); }
.nav-link.active {
  color: var(--ink);
  border-bottom-color: var(--teal);
}

.auth-controls {
  display: flex;
  align-items: center;
  gap: 14px;
}

.auth-anonymous, .auth-logged-in {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-tag {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-soft);
  font-size: 14px;
}
.user-tag-tier {
  font-size: 11.5px;
  padding: 2px 9px;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.user-tag-tier.pro {
  background: var(--teal-soft-strong);
  color: var(--teal-strong);
}

/* ---------- buttons ---------- */

.primary-btn, .ghost-btn, .cta-btn, .link-btn {
  font: inherit;
  cursor: pointer;
  border: 0;
  border-radius: var(--radius-sm);
  padding: 11px 20px;
  transition: background var(--transition), color var(--transition), border-color var(--transition), transform var(--transition);
}

.primary-btn {
  background: var(--teal);
  color: #0a1424;
  font-weight: 600;
}
.primary-btn:hover { background: var(--teal-strong); }
.primary-btn:active { transform: translateY(1px); }
.primary-btn:disabled { opacity: 0.55; cursor: not-allowed; }
.primary-btn.large {
  padding: 14px 26px;
  font-size: 16px;
}
.primary-btn.full-width {
  width: 100%;
  display: block;
}

.ghost-btn {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--border);
}
.ghost-btn:hover { border-color: var(--teal); color: var(--teal-strong); }
.ghost-btn.full-width {
  width: 100%;
  display: block;
}

.cta-btn {
  background: var(--teal);
  color: #0a1424;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.cta-btn:hover { background: var(--teal-strong); }
.cta-btn svg { width: 18px; height: 18px; }

.link-btn {
  background: transparent;
  color: var(--ink-soft);
  padding: 4px 0;
  font-size: 14.5px;
}
.link-btn:hover { color: var(--ink); }
.link-btn.small { font-size: 13.5px; }

/* ---------- views & layout ---------- */

.view {
  max-width: 760px;
  margin: 0 auto;
  padding: 20px 28px 80px;
  width: 100%;
  animation: fade-in 420ms ease;
}

/* ---------- hero ---------- */

.hero {
  text-align: center;
  padding: 50px 0 36px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 12px;
  color: var(--teal);
  margin: 0 0 18px;
}

.hero-title {
  font-size: 38px;
  line-height: 1.18;
  font-weight: 700;
  margin: 0 0 18px;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.hero-sub {
  font-size: 17px;
  color: var(--ink-soft);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.55;
}

.hero-cta-row {
  margin-top: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.hero-cta-note {
  color: var(--ink-quiet);
  font-size: 13.5px;
}

.hero-reassurance {
  margin: 44px auto 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  max-width: 720px;
}

.reassurance-item {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 16px 18px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.reassurance-emphasis {
  color: var(--teal-strong);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.01em;
}
.reassurance-tail {
  color: var(--ink-muted);
  font-size: 13.5px;
}

.pricing-hero {
  padding: 36px 0 28px;
}

/* ---------- cards ---------- */

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 32px 30px;
  margin-bottom: 22px;
  box-shadow: var(--shadow-soft);
}

.card-heading {
  font-size: 19px;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 6px;
}

.muted { color: var(--ink-muted); }
.muted.small { font-size: 14px; }

/* ---------- conversation ---------- */

.conversation-card {
  padding: 30px 30px 26px;
}

.conversation-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.progress {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
.progress-label {
  color: var(--ink-muted);
  font-size: 12.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.progress-track {
  height: 4px;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.05);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--teal);
  width: 0;
  transition: width 480ms cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 100px;
}

.conversation-body {
  min-height: 280px;
  transition: opacity 260ms ease;
}

.question-block {
  display: flex;
  flex-direction: column;
  gap: 22px;
  animation: gentle-fade 380ms ease;
}

.question-title {
  font-size: 24px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.3;
  margin: 0;
}

.question-subtitle {
  font-size: 14.5px;
  color: var(--ink-muted);
  line-height: 1.55;
  margin: -10px 0 0;
}

.choice-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.choice-option {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  background: rgba(255, 255, 255, 0.02);
  border: 1.5px solid var(--border-soft);
  color: var(--ink);
  border-radius: var(--radius);
  padding: 16px 18px;
  text-align: left;
  cursor: pointer;
  font: inherit;
  transition: background var(--transition), border-color var(--transition), transform 160ms ease;
}
.choice-option:hover {
  background: var(--bg-card-hover);
  border-color: var(--teal);
}
.choice-option:active { transform: translateY(1px); }
.choice-option.selected {
  border-color: var(--teal);
  background: var(--teal-soft);
}
.choice-label {
  font-size: 15.5px;
  font-weight: 500;
}
.choice-subtext {
  font-size: 13.5px;
  color: var(--ink-muted);
}

.text-input-row {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.money-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.02);
  border: 1.5px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 4px 4px 4px 18px;
  transition: border-color var(--transition);
}
.money-input-wrapper:focus-within {
  border-color: var(--teal);
}
.money-prefix {
  color: var(--ink-muted);
  font-size: 18px;
  margin-right: 4px;
}
.money-input {
  flex: 1;
  background: transparent;
  border: 0;
  outline: none;
  font: inherit;
  color: var(--ink);
  font-size: 18px;
  padding: 14px 8px;
}

.text-input {
  background: rgba(255, 255, 255, 0.02);
  border: 1.5px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 14px 18px;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  outline: none;
  width: 100%;
  transition: border-color var(--transition);
}
.text-input:focus { border-color: var(--teal); }

.question-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.question-actions .skip-btn { color: var(--ink-quiet); }

#conversation-back-btn { visibility: visible; }
#conversation-back-btn.hidden-back { visibility: hidden; }

.conversation-usage-row {
  margin-top: 22px;
  display: flex;
  justify-content: center;
}

/* ---------- usage pill ---------- */

.usage-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink-muted);
  font-size: 13px;
  border: 1px solid var(--border-soft);
}
.usage-pill.warning {
  background: var(--warm-soft);
  color: var(--warm);
  border-color: rgba(224, 192, 138, 0.3);
}
.usage-pill.exhausted {
  background: var(--error-soft);
  color: var(--error);
  border-color: rgba(230, 154, 154, 0.3);
}

/* ---------- loading ---------- */

.loading-card {
  text-align: center;
  padding: 36px 24px;
  animation: gentle-fade 480ms ease;
}

.thinking {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.thinking-dots {
  display: flex;
  gap: 8px;
}
.thinking-dots span {
  width: 8px;
  height: 8px;
  border-radius: 100px;
  background: var(--teal);
  opacity: 0.5;
  animation: pulse 1.4s ease-in-out infinite;
}
.thinking-dots span:nth-child(2) { animation-delay: 0.2s; }
.thinking-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes pulse {
  0%, 80%, 100% { transform: scale(0.85); opacity: 0.4; }
  40% { transform: scale(1.1); opacity: 1; }
}

.thinking-text {
  color: var(--ink-soft);
  font-size: 15px;
  transition: opacity 240ms ease;
  margin: 0;
}

/* ---------- result ---------- */

.result-card {
  animation: soft-rise 580ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.result-title {
  font-size: 24px;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 18px;
}

.result-greeting {
  font-size: 17px;
  color: var(--ink);
  line-height: 1.6;
  margin: 0 0 6px;
}

.result-heading {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--teal);
  margin: 28px 0 12px;
  font-weight: 600;
}

.result-paragraph {
  color: var(--ink-soft);
  font-size: 15.5px;
  line-height: 1.7;
  margin: 0;
}

.result-reliefs {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.relief-item {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.relief-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 6px;
}
.relief-explanation {
  font-size: 14.5px;
  color: var(--ink-soft);
  margin: 0;
  line-height: 1.6;
}

.result-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.result-list li {
  position: relative;
  padding-left: 22px;
  color: var(--ink-soft);
  font-size: 15.5px;
  line-height: 1.65;
}
.result-list li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 0.7em;
  width: 8px;
  height: 8px;
  border-radius: 100px;
  background: var(--teal);
  opacity: 0.85;
}

.result-microdisclaimer {
  margin-top: 32px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.02);
  border-left: 2px solid var(--teal);
  border-radius: 4px;
  font-size: 13.5px;
  color: var(--ink-muted);
  line-height: 1.55;
}

/* ---------- report (pdf section) ---------- */

.report-card {
  animation: soft-rise 620ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.report-header {
  margin-bottom: 18px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}
.field label {
  font-size: 13.5px;
  color: var(--ink-soft);
}
.field input, .field textarea {
  background: rgba(255, 255, 255, 0.02);
  border: 1.5px solid var(--border-soft);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  outline: none;
  transition: border-color var(--transition);
}
.field input:focus, .field textarea:focus { border-color: var(--teal); }
.field textarea { resize: vertical; min-height: 90px; }

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.row.right { justify-content: flex-end; }

.enterprise-link {
  text-align: center;
  color: var(--ink-muted);
  font-size: 14px;
  margin: 6px 0 0;
}

/* ---------- error ---------- */

.error-card {
  background: var(--error-soft);
  border: 1px solid rgba(230, 154, 154, 0.4);
  color: var(--error);
  padding: 16px 18px;
}
.error-card p { color: var(--error); margin: 0; font-size: 14.5px; }

.form-error {
  color: var(--error);
  font-size: 13.5px;
  margin: 4px 0 8px;
}
.form-success {
  color: var(--teal-strong);
  font-size: 13.5px;
  margin: 4px 0 8px;
}

/* ---------- pricing ---------- */

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 8px;
}

.tier-card {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
}
.tier-card-pro {
  border-color: var(--teal);
  box-shadow: 0 0 0 1px var(--teal);
}
.tier-flag {
  position: absolute;
  top: -11px;
  left: 24px;
  background: var(--teal);
  color: #0a1424;
  font-size: 11.5px;
  padding: 3px 10px;
  border-radius: 100px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.tier-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}
.tier-price {
  margin: 0;
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.tier-price .amount {
  font-size: 32px;
  font-weight: 600;
  color: var(--ink);
}
.tier-price .period {
  color: var(--ink-muted);
  font-size: 14px;
}
.tier-features {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.tier-features li {
  color: var(--ink-soft);
  font-size: 14px;
  padding-left: 18px;
  position: relative;
}
.tier-features li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--teal);
}

/* ---------- modals ---------- */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8, 14, 28, 0.78);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 24px;
  animation: fade-in 220ms ease;
}

.modal {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 30px;
  max-width: 440px;
  width: 100%;
  position: relative;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.6);
}

.modal h2 { font-size: 20px; margin: 0 0 6px; }
.modal p { font-size: 14.5px; color: var(--ink-soft); margin: 0 0 18px; }

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: transparent;
  border: 0;
  color: var(--ink-muted);
  font-size: 22px;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 100px;
  line-height: 1;
  transition: background var(--transition), color var(--transition);
}
.modal-close:hover { background: rgba(255, 255, 255, 0.05); color: var(--ink); }

.modal-switch {
  font-size: 14px;
  color: var(--ink-muted);
  margin-top: 14px;
  text-align: center;
}
.modal-switch .link-btn { color: var(--teal-strong); padding: 0; font-size: 14px; }

.modal-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 18px;
}

.upgrade-features {
  list-style: none;
  padding: 0;
  margin: 0 0 4px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.upgrade-features li {
  color: var(--ink-soft);
  font-size: 14px;
  padding-left: 18px;
  position: relative;
}
.upgrade-features li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--teal);
}

/* ---------- footer ---------- */

.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--border-soft);
  padding: 22px 28px;
  text-align: center;
}
.footer-disclaimer {
  color: var(--ink-quiet);
  font-size: 13px;
  margin: 0;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

/* ---------- helpers ---------- */

.hidden { display: none !important; }

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

@keyframes soft-rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- responsive ---------- */

@media (max-width: 720px) {
  .site-header { padding: 18px 22px; flex-wrap: wrap; gap: 14px; }
  .site-nav { order: 3; width: 100%; justify-content: center; }
  .view { padding: 16px 18px 60px; }
  .hero { padding: 30px 0 24px; }
  .hero-title { font-size: 28px; }
  .hero-sub { font-size: 15.5px; }
  .hero-reassurance { grid-template-columns: 1fr; gap: 12px; }
  .pricing-grid { grid-template-columns: 1fr; }
  .card { padding: 24px 22px; }
  .conversation-card { padding: 24px 22px; }
  .question-title { font-size: 20px; }
}
