/* Capraisal Teaser — ported from design/Capraisal Teaser.dc.html */

:root {
  --ink: #15161c;
  --ink-soft: #40445a;
  --muted: #5b5f70;
  --muted-2: #6b7082;
  --muted-3: #8b8fa0;
  --brand: #4a45c9;
  --brand-strong: #2f2b8f;
  --brand-soft: #a49ffb;
  --bg: #f2f3f7;
  --card-bg: #fafaff;
  --line: #e4e5ee;
  --line-soft: #ecedf5;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg);
  overflow: hidden;
}

body {
  font-family: Manrope, "Helvetica Neue", sans-serif;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-strong); }
::selection { background: #ddd9ff; }
input::placeholder { color: #a2a7ba; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* ---------- Shell ---------- */

.shell {
  position: relative;
  height: 100dvh;
  min-height: 640px;
  padding: 28px 40px;
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  gap: 20px;
  background: var(--bg);
  overflow: hidden;
}

.bg { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.bg-orb { position: absolute; border-radius: 50%; }
.bg-orb--1 {
  top: -380px; right: -220px; width: 980px; height: 980px;
  background: radial-gradient(circle, rgba(74,69,201,0.16) 0%, rgba(74,69,201,0.06) 44%, rgba(242,243,247,0) 70%);
}
.bg-orb--2 {
  bottom: -420px; left: -280px; width: 820px; height: 820px;
  background: radial-gradient(circle, rgba(163,158,255,0.14) 0%, rgba(242,243,247,0) 68%);
}

/* ---------- Masthead ---------- */

.masthead {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand { font-size: 19px; font-weight: 800; letter-spacing: -0.03em; }

/* ---------- Split layout ---------- */

.split {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}

.intro {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 22px;
}

.badge {
  background: #e8e6ff;
  color: var(--brand);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 12.5px;
  font-weight: 600;
}

.headline {
  margin: 0;
  font-size: 58px;
  line-height: 0.98;
  letter-spacing: -0.05em;
  font-weight: 700;
  max-width: 10em;
  text-wrap: balance;
}
.headline .accent { color: var(--brand); }

.subhead {
  margin: 0;
  font-size: 17.5px;
  line-height: 1.55;
  color: var(--muted);
  max-width: 26em;
  text-wrap: pretty;
}

/* ---------- Signup ---------- */

.signup {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 6px 6px 20px;
  box-shadow: 0 18px 40px -30px rgba(21,22,28,0.55);
  width: 100%;
  max-width: 460px;
}
.signup-input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  font-family: Manrope, sans-serif;
  font-size: 15.5px;
  color: var(--ink);
  padding: 10px 0;
}
.signup-btn {
  border: none;
  cursor: pointer;
  background: var(--brand);
  color: #ffffff;
  border-radius: 999px;
  padding: 13px 24px;
  font-family: Manrope, sans-serif;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  transition: background 0.2s ease;
}
.signup-btn:hover { background: var(--brand-strong); }
.signup-btn:disabled { cursor: default; opacity: 0.9; }

.note { font-size: 13px; color: var(--muted-3); }
.note--error { color: #c2410c; }

/* Honeypot — visually removed but still submittable, kept off assistive tech. */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

/* ---------- Floating card ---------- */

.card-wrap {
  position: relative;
  width: 100%;
  max-width: 452px;
  margin: 0 auto;
  perspective: 1600px;
  animation: float 9s ease-in-out infinite;
}

.card-tilt {
  position: relative;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 8px;
  transform-style: preserve-3d;
  will-change: transform;
  /* Resting pose (matches design defaults: ry 8deg, rx 1.8deg) */
  transform: rotateY(8deg) rotateX(1.8deg);
  box-shadow: -19px 43px 80px -46px rgba(21,22,28,0.5), 0 6px 18px -14px rgba(21,22,28,0.22);
  transition: transform 1.1s cubic-bezier(.2,.7,.3,1), box-shadow 0.6s ease;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--line-soft);
  border-radius: 15px;
  overflow: hidden;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line-soft);
}
.card-head-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.card-title { font-size: 13.5px; font-weight: 700; letter-spacing: -0.02em; }
.card-sub { font-size: 11.5px; color: var(--muted-3); }
.card-id { font-family: "IBM Plex Mono", monospace; font-size: 11px; color: var(--muted-3); }

.card-top {
  display: grid;
  grid-template-columns: minmax(0,1fr) 186px;
  align-items: stretch;
  border-bottom: 1px solid var(--line-soft);
}
.value-block {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
  padding: 16px;
}
.stat-pair { display: flex; flex-direction: column; gap: 5px; }
.field-label { font-size: 12px; font-weight: 600; color: var(--muted-3); }
.value-big { font-size: 30px; font-weight: 700; letter-spacing: -0.04em; line-height: 1; }
.value-cap { font-size: 19px; font-weight: 700; letter-spacing: -0.03em; color: var(--brand); line-height: 1; }

/* ---------- Map ---------- */

.map {
  position: relative;
  overflow: hidden;
  border-left: 1px solid var(--line-soft);
  background: #eef0f6;
  min-height: 124px;
}
.map-tiles {
  position: absolute;
  top: 0;
  left: 0;
  width: 768px;
  height: 768px;
  display: grid;
  grid-template-columns: repeat(3, 256px);
  grid-template-rows: repeat(3, 256px);
  transform: translate(-393px, -424px);
  filter: saturate(0.55) contrast(0.96) brightness(1.04);
}
.map-tile { width: 256px; height: 256px; background-size: 256px 256px; }
.map-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(250,250,255,0.3) 0%, rgba(250,250,255,0) 45%, rgba(250,250,255,0.5) 100%);
}
.map-marker {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 13px;
  height: 13px;
  margin: -6.5px 0 0 -6.5px;
  border-radius: 50%;
  background: var(--brand);
  border: 2.5px solid #ffffff;
  box-shadow: 0 0 0 6px rgba(74,69,201,0.18), 0 6px 14px -6px rgba(21,22,28,0.6);
}
.map-attr {
  position: absolute;
  right: 6px;
  bottom: 5px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 8.5px;
  color: #7d8398;
  background: rgba(255,255,255,0.7);
  border-radius: 4px;
  padding: 1px 4px;
}
.map-badge {
  position: absolute;
  left: 8px;
  top: 8px;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--ink-soft);
  background: rgba(255,255,255,0.85);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 8px;
}

/* ---------- Card detail ---------- */

.card-detail { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 14px; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.detail-col { display: flex; flex-direction: column; gap: 7px; }
.detail-head {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted-3);
}
.detail-head--accent { color: var(--brand); }
.detail-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  border-top: 1px solid #eceef6;
  padding-top: 5px;
}
.detail-label { font-size: 11.5px; color: var(--muted-2); }
.detail-value { font-size: 12px; font-weight: 600; letter-spacing: -0.015em; white-space: nowrap; }

.scenarios { display: flex; flex-direction: column; gap: 7px; }
.scenario-bars { display: flex; gap: 3px; height: 9px; }
.scenario-bar { border-radius: 999px; }
.scenario-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.scenario-item { display: flex; align-items: center; gap: 7px; }
.scenario-dot { width: 9px; height: 9px; border-radius: 50%; }
.scenario-label { font-size: 11.5px; color: var(--ink-soft); }
.scenario-pct { font-size: 11.5px; font-weight: 700; letter-spacing: -0.015em; }

/* ---------- Stats row ---------- */

.stats {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 32px;
  width: 100%;
  border-top: 1px solid #e0e2ec;
  padding-top: 20px;
}
.stat { display: flex; flex-direction: column; gap: 3px; }
.stat-num { font-size: 28px; font-weight: 700; letter-spacing: -0.045em; line-height: 1; color: var(--brand); }
.stat-label { font-size: 12.5px; font-weight: 600; letter-spacing: -0.015em; }

/* ---------- Footer ---------- */

.foot {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  border-top: 1px solid #e0e2ec;
  padding-top: 16px;
  font-size: 13px;
  color: var(--muted-3);
}
.foot-links { display: flex; gap: 22px; }
.foot-links a { color: var(--muted); }

/* ---------- Responsive ---------- */

@media (min-width: 1400px) { .shell { padding-left: 80px; padding-right: 80px; } }
@media (min-width: 1700px) { .shell { padding-left: 120px; padding-right: 120px; } }
@media (min-width: 2100px) { .shell { padding-left: 180px; padding-right: 180px; } }

@media (max-width: 1000px) {
  html, body { overflow: auto; }
  .shell { height: auto; min-height: 100dvh; overflow: visible; }
  .split {
    grid-template-columns: 1fr;
    gap: 28px;
    align-content: start;
    justify-items: center;
  }
  .intro { align-items: center; text-align: center; }
  .intro .subhead, .intro .headline { margin-left: auto; margin-right: auto; }
  .stats { text-align: center; justify-items: center; }
  .stat { align-items: center; }
  .foot { justify-content: center; text-align: center; }
  .card-wrap { max-width: 420px; }
  .headline { font-size: 44px; }
}

@media (max-height: 700px) {
  html, body { overflow: auto; }
  .shell { height: auto; min-height: 100dvh; overflow: visible; }
}

@media (max-width: 560px) {
  .shell { padding: 20px 16px; }
  .headline { font-size: 34px; }
  .signup {
    flex-direction: column;
    align-items: stretch;
    border-radius: 18px;
    padding: 8px;
    gap: 8px;
  }
  .signup-input { padding: 12px; }
  .signup-btn { border-radius: 12px; padding: 14px 24px; }
  .stats { grid-template-columns: 1fr 1fr; gap: 18px; }
  .foot { flex-direction: column; align-items: flex-start; gap: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .card-wrap { animation: none; }
  .card-tilt { transition: none; }
}
