/* Real Agent Calculators hub (shares design system with ./income-calculator and ./rev-share-calculator) */

:root {
  --navy: #0B1D36;
  --navy-deep: #061224;
  --navy-mid: #132A4A;
  --gold: #C5A572;
  --gold-soft: #D4BC94;
  --gold-deep: #A8894F;
  --white: #FFFFFF;
  --off-white: #F7F5F1;
  --cloud: #F0EEE9;
  --text: #1A1A1A;
  --text-muted: #5C6570;
  --border: #E5E1D8;
  --accent-blue: #E8F1F8;
  --accent-pink: #F8EBEF;
  --success: #1B7A4E;
  --more: #C0392B;
  --t1: #C5A572;
  --t2: #0B1D36;
  --t3: #3E5C86;
  --t4: #7A93B5;
  --t5: #B4C3D8;
  --shadow: 0 8px 30px rgba(11, 29, 54, 0.08);
  --shadow-lg: 0 16px 50px rgba(11, 29, 54, 0.12);
  --radius: 16px;
  --radius-sm: 10px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--off-white);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--gold-deep); }

/* -- Header (same as calculators) -- */
.hero {
  background: linear-gradient(165deg, var(--navy-deep) 0%, var(--navy) 55%, var(--navy-mid) 100%);
  color: var(--white);
  padding: 2.5rem 1.25rem 8.5rem;
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 85% 20%, rgba(197, 165, 114, 0.18), transparent 60%),
    radial-gradient(ellipse 40% 40% at 10% 80%, rgba(197, 165, 114, 0.08), transparent 50%);
  pointer-events: none;
}

.hero-inner {
  max-width: 1100px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.hero-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 3.25rem;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.brand-home { display: block; line-height: 0; border-radius: 4px; }
.brand-home:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }

.real-logo {
  display: block;
  height: 38px;
  width: auto;
}

.real-logo-footer {
  height: 32px;
  opacity: 0.95;
}

.tagline {
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-soft);
  font-weight: 600;
  border-left: 1px solid rgba(197, 165, 114, 0.35);
  padding-left: 1rem;
}

.hero-nav { display: flex; gap: 1.25rem; align-items: center; flex-wrap: wrap; }

.hero-link {
  color: rgba(255,255,255,0.7);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid rgba(197, 165, 114, 0.4);
  padding-bottom: 0.1rem;
}

.hero-link:hover { color: var(--gold-soft); }

.eyebrow-pill {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-soft);
  border: 1px solid rgba(197, 165, 114, 0.4);
  border-radius: 999px;
  padding: 0.3rem 0.8rem;
  margin-bottom: 1.1rem;
}

.hero h1 {
  font-size: clamp(2.2rem, 6vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.05;
  max-width: 14ch;
  margin-bottom: 1rem;
}

.hero h1 .gold {
  background: linear-gradient(100deg, var(--gold-soft) 0%, var(--gold) 60%, var(--gold-deep) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  font-size: clamp(1rem, 2.2vw, 1.25rem);
  color: rgba(255,255,255,0.72);
  max-width: 44ch;
  font-weight: 400;
}

.hero-points {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.75rem;
  margin-top: 1.75rem;
}

.hero-points li {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.92rem;
  font-weight: 500;
  color: rgba(255,255,255,0.85);
}

.hero-points svg { flex-shrink: 0; }

/* -- Calculator cards (overlap hero) -- */
.calc-grid {
  max-width: 1100px;
  margin: -5.5rem auto 0;
  padding: 0 1.25rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  position: relative;
  z-index: 2;
}

.calc-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--white);
  border-radius: 22px;
  padding: 1.75rem 1.75rem 1.85rem;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(197, 165, 114, 0.15);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.calc-card:hover,
.calc-card:focus-within {
  transform: translateY(-4px);
  box-shadow: 0 24px 60px rgba(11, 29, 54, 0.16);
  border-color: rgba(197, 165, 114, 0.55);
}

.calc-visual {
  height: 132px;
  border-radius: 14px;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 1.1rem 1.25rem;
  position: relative;
  overflow: hidden;
}

.calc-visual.v-income { background: linear-gradient(160deg, var(--accent-blue) 0%, var(--off-white) 100%); }
.calc-visual.v-rev { background: linear-gradient(160deg, var(--accent-pink) 0%, var(--off-white) 100%); align-items: center; }

/* Income visual: current vs Real bars */
.bars { display: flex; align-items: flex-end; gap: 1.25rem; height: 100%; }
.bar-col { display: flex; flex-direction: column; align-items: center; gap: 0.4rem; height: 100%; justify-content: flex-end; }
.bar {
  width: 56px;
  border-radius: 8px 8px 4px 4px;
  transform-origin: bottom;
  animation: grow 0.9s cubic-bezier(.2,.8,.2,1) both;
}
.bar.b-cur { height: 46%; background: #C9D3DF; }
.bar.b-real { height: 86%; background: linear-gradient(180deg, var(--gold-soft), var(--gold)); animation-delay: 0.15s; }
.bar-tag { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); }
.bar-col.real .bar-tag { color: var(--gold-deep); }
.bars-plus {
  align-self: center;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.02em;
}
.bars-plus span { color: var(--more); }

/* Rev share visual: 5 tiers of dots */
.tiers { display: flex; flex-direction: column; gap: 0.42rem; width: 100%; max-width: 300px; }
.tier-row { display: flex; align-items: center; gap: 0.6rem; }
.tier-row .t-label { font-size: 0.66rem; font-weight: 700; letter-spacing: 0.06em; color: var(--text-muted); width: 3.4rem; text-transform: uppercase; }
.tier-row .t-dots { display: flex; gap: 4px; flex-wrap: nowrap; overflow: hidden; }
.t-dots i { width: 9px; height: 9px; border-radius: 50%; display: block; animation: pop 0.5s ease both; }
.tier-row.r1 i { background: var(--t1); }
.tier-row.r2 i { background: var(--t2); animation-delay: 0.08s; }
.tier-row.r3 i { background: var(--t3); animation-delay: 0.16s; }
.tier-row.r4 i { background: var(--t4); animation-delay: 0.24s; }
.tier-row.r5 i { background: var(--t5); animation-delay: 0.32s; }
.tier-row .t-pct { margin-left: auto; font-size: 0.72rem; font-weight: 700; color: var(--navy); font-variant-numeric: tabular-nums; }

.card-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin-bottom: 0.5rem;
}

.calc-card h2 {
  font-size: clamp(1.4rem, 2.6vw, 1.75rem);
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin-bottom: 0.6rem;
}

.calc-desc {
  color: var(--text-muted);
  font-size: 0.98rem;
  margin-bottom: 1.15rem;
}

.feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-bottom: 1.6rem;
}

.feature-list li {
  position: relative;
  padding-left: 1.6rem;
  font-size: 0.93rem;
  color: var(--text);
}

.feature-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.18em;
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 50%;
  background: rgba(197, 165, 114, 0.18) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.3l2.2 2.2 4.8-5' fill='none' stroke='%23A8894F' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 0.8rem no-repeat;
}

.calc-cta { margin-top: auto; display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.9rem 1.5rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.98rem;
  border: none;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
  text-decoration: none;
}

.btn:active { transform: scale(0.98); }
.btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.btn-primary {
  background: var(--navy);
  color: var(--white);
  box-shadow: 0 4px 14px rgba(11, 29, 54, 0.25);
}

.btn-primary:hover { background: var(--navy-mid); }

.btn-gold {
  background: var(--gold);
  color: var(--navy-deep);
  box-shadow: 0 4px 14px rgba(168, 137, 79, 0.3);
}

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

.btn-ghost-light {
  background: transparent;
  color: var(--white);
  border: 1.5px solid rgba(255,255,255,0.3);
}

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

.btn .arrow { transition: transform 0.2s ease; }
.calc-card:hover .btn .arrow, .btn:hover .arrow { transform: translateX(3px); }

/* Whole card is clickable via the CTA */
/* No transform on press: a transform would make the button the containing block and shrink the overlay mid-click */
.calc-card .btn.stretched:active { transform: none; }
.calc-card .stretched::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 22px;
}

.calc-note { font-size: 0.8rem; color: var(--text-muted); }

/* -- Main -- */
.wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 4rem 1.25rem 3.5rem;
}

.section-head { text-align: center; margin-bottom: 2rem; }

.section-eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin-bottom: 0.5rem;
}

.section-title {
  font-size: clamp(1.6rem, 3.4vw, 2.25rem);
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 0.6rem;
}

.section-desc {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 52ch;
  margin: 0 auto;
}

/* -- At-a-glance strip -- */
.glance-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.glance-item {
  padding: 1.6rem 1.25rem 1.5rem;
  border-right: 1px solid var(--border);
}

.glance-item:last-child { border-right: none; }

.glance-big {
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 0.15rem;
  font-variant-numeric: tabular-nums;
}

.glance-big .unit { color: var(--gold-deep); }

.glance-lbl {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin-bottom: 0.55rem;
}

.glance-text {
  font-size: 0.86rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.glance-text strong { color: var(--navy); font-weight: 700; }

.glance-foot {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 1rem;
}

.glance-foot a { color: var(--navy); font-weight: 600; }

/* -- Closing CTA -- */
.closer {
  margin-top: 3.5rem;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 100%);
  color: var(--white);
  border-radius: 22px;
  padding: 2.75rem 1.5rem;
  text-align: center;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.closer::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 50% 80% at 50% 0%, rgba(197, 165, 114, 0.22), transparent 70%);
  pointer-events: none;
}

.closer > * { position: relative; z-index: 1; }

.closer h2 {
  font-size: clamp(1.5rem, 3.2vw, 2.1rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 0.5rem;
}

.closer p {
  color: rgba(255,255,255,0.72);
  max-width: 48ch;
  margin: 0 auto;
}

.closer .btn-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

/* -- Footer (same as calculators) -- */
.footer {
  background: var(--navy-deep);
  color: rgba(255,255,255,0.65);
  padding: 2.25rem 1.25rem;
  font-size: 0.78rem;
  line-height: 1.6;
}

.footer-inner { max-width: 1100px; margin: 0 auto; }

.footer strong { color: var(--gold-soft); font-weight: 600; }

.footer p { margin-bottom: 0.65rem; }
.footer p:last-child { margin-bottom: 0; }

.footer a { color: var(--gold-soft); }

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1rem;
  color: var(--gold-soft);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
}

/* -- Motion -- */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes pop { from { opacity: 0; transform: scale(0.4); } to { opacity: 1; transform: none; } }

.rise { animation: rise 0.7s cubic-bezier(.2,.8,.2,1) both; }
.rise.d1 { animation-delay: 0.08s; }
.rise.d2 { animation-delay: 0.16s; }
.rise.d3 { animation-delay: 0.24s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* -- Responsive -- */
@media (max-width: 960px) {
  .glance-strip { grid-template-columns: repeat(3, 1fr); }
  .glance-item { border-bottom: 1px solid var(--border); }
  .glance-item:nth-child(3) { border-right: none; }
  .glance-item:nth-child(n+4) { border-bottom: none; }
}

@media (max-width: 800px) {
  .tagline { border-left: none; padding-left: 0; width: 100%; }
  .calc-grid { grid-template-columns: 1fr; margin-top: -4rem; }
  .hero { padding-bottom: 6.5rem; }
  .hero-top { margin-bottom: 2.5rem; }
  .wrap { padding-top: 3rem; }
}

@media (max-width: 640px) {
  .glance-strip { grid-template-columns: 1fr 1fr; }
  .glance-item { border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
  .glance-item:nth-child(3) { border-right: 1px solid var(--border); }
  .glance-item:nth-child(even) { border-right: none; }
  .glance-item:nth-child(n+4) { border-bottom: 1px solid var(--border); }
  .glance-item:last-child { grid-column: 1 / -1; border-bottom: none; border-right: none; }
}

@media (max-width: 480px) {
  .hero-top { flex-direction: column; align-items: flex-start; }
  .hero-nav .hero-link.calc-link { display: none; }
  .tagline { border-left: none; padding-left: 0; }
  .calc-card { padding: 1.35rem 1.25rem 1.5rem; }
  .calc-visual { height: 116px; }
  .calc-cta .btn, .closer .btn { width: 100%; }
  .glance-item { padding: 1.25rem 1rem; }
}
