/* /use-cases/investors/: homepage sections and cards (home.css), plus a
   split hero with an example deal check and a dataset table. */

/* ════ HERO ═══════════════════════════════════════════════════
   Copy on the left, an example listing run through Studio's checks on
   the right. Below 960px the card stacks under the copy. */
.inv-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--ab-bg);
  color: var(--ab-ink);
  border-bottom: 1px solid var(--ab-border);
}

.inv-hero-dots {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: radial-gradient(rgba(18, 20, 26, 0.13) 1px, transparent 1.4px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse 60% 70% at 75% 50%, #000 15%, transparent 80%);
  mask-image: radial-gradient(ellipse 60% 70% at 75% 50%, #000 15%, transparent 80%);
  opacity: 0.7;
}

.inv-hero-inner {
  display: grid;
  gap: clamp(2.5rem, 6vw, 3.5rem);
  align-items: center;
  padding-top: calc(var(--hero-pad-top) + clamp(1.5rem, 4vw, 3rem));
  padding-bottom: clamp(3rem, 7vw, 5rem);
}

@media (min-width: 960px) {
  .inv-hero-inner {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: clamp(3rem, 5vw, 5rem);
    min-height: clamp(36rem, 82svh, 46rem);
  }
}

.inv-hero-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.1rem;
}

.inv-hero-title {
  margin: 0;
  font-size: clamp(2.3rem, 1.35rem + 3.4vw, 3.6rem);
  line-height: 1.08;
  font-weight: 500;
  letter-spacing: -0.03em;
  color: var(--ab-ink);
  text-wrap: pretty;
}

.inv-hero-lead {
  margin: 0;
  max-width: 32rem;
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--ab-ink-secondary);
  text-wrap: pretty;
}

.inv-hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem;
  margin-top: 0.5rem;
}

@media (max-width: 640px) {
  /* Let the heading use the full width: "Bali real estate / data." instead of a narrow two-word column. */
  .inv-hero-title { font-size: clamp(2.25rem, 1.2rem + 5.4vw, 2.75rem); }
  .inv-hero-actions { width: 100%; justify-content: center; gap: 0.75rem 1.25rem; }
  .inv-hero-actions .btn-atlas { width: 100%; justify-content: center; }
}

/* ── Studio loop ──────────────────────────────────────────── */
.inv-hero-media {
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(18, 20, 26, 0.08);
  border-radius: 1.25rem;
  background: #12141a;
  box-shadow:
    0 1px 2px rgba(18, 20, 26, 0.04),
    0 1.6rem 3rem -1.6rem rgba(18, 20, 26, 0.3);
}

.inv-hero-media video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1280 / 777;
  object-fit: cover;
}

@media (prefers-reduced-motion: no-preference) {
  .inv-hero-media { animation: inv-rise 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both; }
}

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

/* ════ INSIGHTS ═══════════════════════════════════════════════
   Three different chart forms so the cards don't read as one. */

/* 01: nights booked, one cell per night of a 30-night month */
.inv-nights {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.9rem;
}

.inv-nights-row {
  display: grid;
  grid-template-columns: 6.25rem minmax(0, 1fr) 4.6rem;
  align-items: center;
  gap: 0.75rem;
  color: var(--ins-muted);
}

.inv-nights-row b {
  font-family: var(--ins-mono);
  font-weight: 600;
  letter-spacing: -0.03em;
  text-align: right;
  color: var(--ins-ink);
}

.inv-nights-row b small {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--ins-muted);
}

.inv-nights-row.is-top { color: var(--ins-ink); font-weight: 600; }
.inv-nights-row.is-top b { color: var(--ins-terra); }

.inv-nights-cal {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 2px;
}

.inv-nights-cal i {
  aspect-ratio: 1;
  border-radius: 2px;
  background: var(--ins-panel);
  box-shadow: inset 0 0 0 1px rgba(18, 20, 26, 0.06);
}

.inv-nights-cal i.is-on {
  background: var(--ins-terra-soft);
  box-shadow: none;
  transform: scale(0.4);
  opacity: 0;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.35s ease;
}

.inv-nights-row.is-top .inv-nights-cal i.is-on { background: var(--ins-terra); }
.ins.is-in .inv-nights-cal i.is-on { transform: none; opacity: 1; }
.inv-nights-row:nth-child(2) .inv-nights-cal i { transition-delay: 0.1s; }
.inv-nights-row:nth-child(3) .inv-nights-cal i { transition-delay: 0.2s; }
.inv-nights-row:nth-child(4) .inv-nights-cal i { transition-delay: 0.3s; }

.ins-legend i.is-plan { background: var(--ins-terra-soft); border-radius: 2px; }
.ins-legend i.is-ready { border-radius: 2px; }

/* 02: scatter, nightly rate (x) against occupancy (y) */
.inv-scatter {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 0.4rem 0.5rem;
  flex: 1;
  min-height: 12.5rem;
}

.inv-scatter-y {
  grid-row: 1;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  text-align: right;
  font-size: 0.7rem;
  color: var(--ins-muted);
}

.inv-scatter-x {
  grid-column: 2;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.7rem;
  color: var(--ins-muted);
}

.inv-scatter-plot {
  position: relative;
  border-left: 1px solid rgba(18, 20, 26, 0.14);
  border-bottom: 1px solid rgba(18, 20, 26, 0.14);
  border-radius: 0 0 0 4px;
  background-image: linear-gradient(rgba(18, 20, 26, 0.05) 1px, transparent 1px);
  background-size: 100% 25%;
}

.inv-dot {
  position: absolute;
  left: calc(var(--x) * 1%);
  bottom: calc(var(--y) * 1%);
  width: 0.7rem;
  height: 0.7rem;
  translate: -50% 50%;
  border-radius: 50%;
  background: var(--ins-green);
  opacity: 0;
  transform: scale(0.3);
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.4s ease;
}

.inv-dot.is-hot { background: var(--ins-terra); width: 0.85rem; height: 0.85rem; }
.ins.is-in .inv-dot { opacity: 1; transform: none; }

.inv-dot b,
.inv-dot em {
  position: absolute;
  left: calc(100% + 0.4rem);
  white-space: nowrap;
  font-style: normal;
  line-height: 1.15;
}

.inv-dot b { bottom: 50%; font-size: 0.75rem; font-weight: 600; color: var(--ins-ink); }
.inv-dot em { top: 50%; font-family: var(--ins-mono); font-size: 0.66rem; color: var(--ins-muted); }

.inv-dot.is-left b,
.inv-dot.is-left em { left: auto; right: calc(100% + 0.4rem); text-align: right; }

/* Dots near the right edge put their label on the left, or centred around the dot. */
.inv-dot.is-hot:not(.is-above) b,
.inv-dot.is-hot:not(.is-above) em { left: auto; right: calc(100% + 0.4rem); text-align: right; }

.inv-dot.is-above b,
.inv-dot.is-above em { left: 50%; translate: -50% 0; }
.inv-dot.is-above b { bottom: calc(100% + 0.25rem); }
.inv-dot.is-above em { top: calc(100% + 0.25rem); }

/* 03: asking-price distribution, dot columns on a line (as in Studio) */
.inv-dist {
  flex: 1;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.5rem;
  min-height: 7.5rem;
}

.inv-dist-end {
  font-family: var(--ins-mono);
  font-size: 0.7rem;
  color: var(--ins-muted);
}

.inv-dist-cols {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.inv-dist-cols::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: rgba(18, 20, 26, 0.18);
}

.inv-dist-cols span {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.inv-dist-cols i {
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: #cfcfcf;
  opacity: 0;
  transform: scale(0.3);
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.35s ease;
}

.inv-dist-cols .is-median i { background: var(--ins-terra); }
.ins.is-in .inv-dist-cols i { opacity: 1; transform: none; }
.inv-dist-cols span:nth-child(3n+2) i { transition-delay: 0.08s; }
.inv-dist-cols span:nth-child(3n) i { transition-delay: 0.16s; }

.ins-legend i.is-med { background: var(--ins-terra); border-radius: 2px; }
.ins-legend i.is-dot { background: #cfcfcf; border-radius: 2px; }

.inv-brackets {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
}

.inv-brackets li {
  display: grid;
  gap: 0.15rem;
  padding: 0.65rem 0.7rem;
  border-radius: 0.9rem;
  background: var(--ins-panel);
}

.inv-brackets span,
.inv-brackets em {
  font-size: 0.7rem;
  font-style: normal;
  color: var(--ins-muted);
}

.inv-brackets b {
  font-family: var(--ins-mono);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  white-space: nowrap;
}

.inv-brackets li:first-child b { color: var(--ins-terra); }

.ins-note a {
  color: var(--ab-ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .inv-nights-cal i.is-on,
  .inv-dot,
  .inv-dist-cols i { transform: none; opacity: 1; transition: none; }
}

/* ════ DATASET TABLE ══════════════════════════════════════════ */
.capabilities .stats-ribbon { margin-bottom: clamp(2rem, 4vw, 2.75rem); }

.inv-table-wrap {
  margin-bottom: clamp(2.5rem, 5vw, 3.5rem);
  border-top: 1px solid var(--ab-border);
}

.inv-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
  line-height: 1.5;
}

.inv-table thead th {
  padding: 0.9rem 1.5rem 0.9rem 0;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: left;
  color: var(--ab-ink-muted);
  border-bottom: 1px solid var(--ab-border);
}

.inv-table tbody th,
.inv-table td {
  padding: 1.25rem 1.5rem 1.25rem 0;
  vertical-align: top;
  text-align: left;
  border-bottom: 1px solid var(--ab-border);
}

.inv-table tbody th {
  width: 22%;
  font-weight: 600;
  color: var(--ab-ink);
  white-space: nowrap;
}

.inv-table tbody th i {
  margin-right: 0.55rem;
  font-size: 1.1rem;
  vertical-align: -0.15em;
  color: var(--ab-accent);
}

.inv-table td { color: var(--ab-ink-muted); }
.inv-table td:last-child { width: 32%; color: var(--ab-ink-secondary); }

/* Phones: each row becomes a stacked block. */
@media (max-width: 719.98px) {
  .inv-table thead { display: none; }
  .inv-table,
  .inv-table tbody,
  .inv-table tr,
  .inv-table th,
  .inv-table td { display: block; width: auto !important; }
  .inv-table tr { padding: 1.15rem 0; border-bottom: 1px solid var(--ab-border); }
  .inv-table tbody th,
  .inv-table td { padding: 0; border: 0; }
  .inv-table td { margin-top: 0.4rem; }
  .inv-table td:last-child::before {
    content: "Use it to ";
    color: var(--ab-ink);
    font-weight: 500;
  }
}

/* ════ WORKFLOW + ACCESS ══════════════════════════════════════ */
.inv-steps-list { counter-reset: none; }

@media (min-width: 640px) and (max-width: 1199.98px) {
  .inv-steps-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.inv-step-num {
  display: block;
  margin-bottom: 0.9rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--ab-accent);
}

/* Home's audiences section sits on white; the "Go deeper" grid sits on the page tone. */
#inv-deeper .audience-link { background: var(--ab-bg-raised); }

.faq-accordion-panel-inner a {
  color: var(--ab-ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}
