:root {
  --midnight: #0F1C2E;
  --slate: #5B6675;
  --mist: #F6F7F8;
  --white: #FFFFFF;
  --line: #D9DDE3;
  --brass: #9C7A3C;
  --status-amber: #B7791F;
  --status-green: #2F6B4F;

  --font-sans: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  --font-sans-ar: "IBM Plex Sans Arabic", "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;

  --max-width: 1120px;
  --text-max-width: 640px;
  --radius: 4px;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: light;
}

html, body {
  overflow-x: hidden;
}

body {
  margin: 0;
  background: var(--white);
  color: var(--midnight);
  font-family: var(--font-sans);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-weight: 500;
  margin: 0;
  color: var(--midnight);
}

h1 {
  font-size: 34px;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

h2 {
  font-size: 28px;
  line-height: 1.2;
}

h3 {
  font-size: 19px;
  line-height: 1.3;
}

p {
  margin: 0;
}

a {
  color: inherit;
}

img, table {
  max-width: 100%;
}

/* Layout */

.wrap {
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: 20px;
}

.wrap-narrow {
  max-width: calc(var(--text-max-width) + 40px);
  margin-inline: 0;
}

.section {
  padding-block: 44px;
}

.section-alt {
  background: var(--mist);
}

.section-light {
  padding-block: 56px;
}

.section-dark {
  background: var(--midnight);
  color: var(--white);
  padding-block: 80px;
}

.section-dark h2 {
  color: var(--white);
}

.section-dark p {
  color: #C7CDD6;
}

.section-intro,
.investor-copy p:not(.small-note) {
  max-width: var(--text-max-width);
  color: var(--slate);
}

h2 + .section-intro {
  margin-block-start: 16px;
}

/* Skip link */

.skip-link {
  position: absolute;
  inset-inline-start: -9999px;
  top: 0;
  background: var(--midnight);
  color: var(--white);
  padding: 8px 16px;
  z-index: 100;
}

.skip-link:focus {
  inset-inline-start: 12px;
  top: 12px;
}

/* Focus visibility */

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 2px;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  background: var(--white);
  z-index: 50;
  border-bottom: 1px solid transparent;
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 20px;
}

.wordmark {
  font-weight: 600;
  font-size: 20px;
  text-decoration: none;
  color: var(--midnight);
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 12px;
}

@media (min-width: 560px) {
  .header-nav {
    gap: 28px;
  }
}

@media (max-width: 400px) {
  .wrap {
    padding-inline: 16px;
  }

  .header-nav {
    font-size: 14px;
  }

  .header-nav .button {
    padding: 10px 14px;
  }
}

.header-nav a:not(.button) {
  text-decoration: none;
  color: var(--midnight);
}

.header-nav a:not(.button):hover {
  color: var(--brass);
}

/* Buttons and links */

.button {
  display: inline-block;
  text-decoration: none;
  font-weight: 500;
  padding: 12px 22px;
  border-radius: var(--radius);
  line-height: 1.2;
}

.button-primary {
  background: var(--brass);
  color: var(--white);
}

.button-primary:hover {
  background: #86692f;
}

.link-quiet {
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 3px;
  color: var(--midnight);
}

.link-quiet:hover {
  text-decoration-color: var(--brass);
}

.link-on-dark {
  color: var(--white);
  text-decoration: underline;
  text-decoration-color: var(--brass);
  text-underline-offset: 3px;
}

/* Hero */

.hero {
  padding-block-start: 56px;
}

.hero-inner {
  display: grid;
  gap: 48px;
}

/* Grid items default to min-width: auto, which lets a wide intrinsic-size
   child (like the nowrap payment table) push the whole page wider than the
   viewport instead of being clipped by its own overflow-x: auto wrapper. */
.hero-inner > *,
.investor-inner > *,
.three-col > *,
.steps > *,
.rules-list > *,
.timeline > * {
  min-width: 0;
}

.hero-copy .lede {
  margin-block-start: 20px;
  max-width: var(--text-max-width);
  color: var(--slate);
  font-size: 18px;
}

.hero-actions {
  margin-block-start: 32px;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.hero-visual {
  min-width: 0;
}

.schedule {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}

.schedule-title {
  font-weight: 500;
  margin-block-end: 16px;
}

.schedule-investor {
  font-weight: 400;
  color: var(--slate);
}

.schedule-table-wrap {
  overflow-x: auto;
}

.schedule-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  white-space: nowrap;
}

.schedule-table th,
.schedule-table td {
  text-align: start;
  padding: 10px 12px;
  border-block-end: 1px solid var(--line);
}

.schedule-table th {
  color: var(--slate);
  font-weight: 500;
  font-size: 13px;
}

.schedule-table tbody tr:last-child td {
  border-block-end: none;
}

.status {
  font-size: 14px;
  font-weight: 500;
}

.status-paid { color: var(--status-green); }
.status-overdue { color: var(--status-amber); }
.status-upcoming { color: var(--slate); }

.schedule-event {
  margin-block-start: 16px;
  font-size: 14px;
  color: var(--slate);
}

/* Status transition, hero only */

[data-status-cell],
[data-status-note] {
  transition: none;
}

@media (prefers-reduced-motion: no-preference) {
  .status-transition [data-status-cell],
  .status-transition [data-status-note] {
    transition: opacity 0.4s ease;
  }
}

/* Three-column problem section */

.three-col {
  margin-block-start: 48px;
  display: grid;
  gap: 32px;
}

.col {
  border-block-start: 1px solid var(--line);
  padding-block-start: 20px;
}

.col h3 {
  margin-block-end: 8px;
}

.col p {
  color: var(--slate);
}

/* How it works steps */

.steps {
  list-style: none;
  margin: 48px 0 0;
  padding: 0;
  display: grid;
  gap: 40px;
}

.step {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.step-number {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--brass);
  color: var(--brass);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
  font-size: 15px;
}

.step h3 {
  margin-block-end: 6px;
}

.step p {
  color: var(--slate);
}

.step a {
  color: var(--midnight);
  text-decoration: underline;
  text-decoration-color: var(--brass);
  text-underline-offset: 3px;
}

/* Investor view */

.investor-inner {
  display: grid;
  gap: 40px;
}

.investor-copy p {
  margin-block-start: 16px;
}

.small-note {
  color: var(--slate);
  font-size: 14px;
}

.lang-tabs {
  display: flex;
  gap: 4px;
  border-block-end: 1px solid var(--line);
  margin-block-end: 20px;
}

.lang-tab {
  font-family: inherit;
  font-size: 15px;
  background: none;
  border: none;
  padding: 10px 4px;
  margin-inline-end: 20px;
  color: var(--slate);
  cursor: pointer;
  border-block-end: 2px solid transparent;
  margin-block-end: -1px;
}

.lang-tab.is-active {
  color: var(--midnight);
  border-block-end-color: var(--brass);
}

.message-panel[hidden] {
  display: none;
}

.bubble {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  max-width: 420px;
}

.bubble-sender {
  font-size: 13px;
  font-weight: 500;
  color: var(--slate);
  margin-block-end: 8px;
}

.bubble p:not(.bubble-sender) {
  color: var(--midnight);
}

.placeholder-copy {
  color: var(--slate);
  font-style: italic;
}

.quick-replies {
  margin-block-start: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.quick-reply {
  display: inline-block;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 6px 12px;
  font-size: 14px;
  color: var(--midnight);
}

/* What happens to each late payment — timeline */

.timeline {
  list-style: none;
  margin: 48px 0 0;
  padding: 0;
  display: grid;
  gap: 28px;
}

.timeline-point {
  position: relative;
  padding-inline-start: 24px;
}

.timeline-dot {
  position: absolute;
  inset-inline-start: 0;
  top: 7px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--midnight);
}

.timeline-point::before {
  content: "";
  position: absolute;
  inset-inline-start: 4px;
  top: 20px;
  bottom: -28px;
  width: 1px;
  background: var(--line);
}

.timeline-point:last-child::before {
  display: none;
}

.timeline-content h3 {
  margin-block-end: 6px;
}

.timeline-content p {
  color: var(--slate);
}

.timeline-closing {
  margin-block-start: 40px;
  color: var(--slate);
  max-width: var(--text-max-width);
}

/* Rules and records */

.rules-list {
  margin-block-start: 48px;
  display: grid;
  gap: 24px 48px;
}

.rule {
  border-block-start: 1px solid var(--line);
  padding-block-start: 16px;
}

.rule h3 {
  margin-block-end: 6px;
}

.rule p {
  color: var(--slate);
}

/* Channels */

.channels-table {
  margin-block-start: 40px;
  width: 100%;
  border-collapse: collapse;
  max-width: var(--text-max-width);
}

.channels-table td {
  padding: 16px 0;
  border-block-end: 1px solid var(--line);
}

.channels-table td:last-child {
  text-align: end;
}

/* Beyond real estate */

.section-light h2 {
  font-size: 24px;
}

.section-light p {
  margin-block-start: 16px;
  color: var(--slate);
}

/* Pilot CTA */

.section-dark .pilot-actions {
  margin-block-start: 32px;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.pilot-alt {
  color: #C7CDD6;
}

/* Footer */

.site-footer {
  background: var(--midnight);
  color: #C7CDD6;
  padding-block: 56px;
}

.wordmark-footer {
  color: var(--white);
}

.footer-tagline {
  margin-block-start: 16px;
  max-width: var(--text-max-width);
}

.footer-links {
  margin-block-start: 32px;
  display: flex;
  gap: 24px;
}

.footer-links a {
  color: #C7CDD6;
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--white);
}

.footer-copyright {
  margin-block-start: 32px;
  font-size: 14px;
  color: var(--slate);
}

/* Privacy / 404 pages */

.simple-page {
  padding-block: 96px;
  min-height: 60vh;
}

.simple-page h1 {
  margin-block-end: 24px;
}

.simple-page p {
  color: var(--slate);
  max-width: var(--text-max-width);
  margin-block-end: 16px;
}

.simple-page .button {
  margin-block-start: 8px;
}

/* Desktop */

@media (min-width: 860px) {
  body {
    font-size: 18px;
  }

  h1 {
    font-size: 52px;
  }

  h2 {
    font-size: 32px;
  }

  .section {
    padding-block: 78px;
  }

  .section-dark {
    padding-block: 96px;
  }

  .hero {
    padding-block-start: 96px;
  }

  .hero-inner {
    grid-template-columns: minmax(0, 460px) minmax(0, 1fr);
    align-items: center;
    gap: 64px;
  }

  .three-col {
    grid-template-columns: repeat(3, 1fr);
  }

  .steps {
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
  }

  .step {
    flex-direction: column;
    gap: 16px;
  }

  .investor-inner {
    grid-template-columns: minmax(0, 420px) minmax(0, 1fr);
    gap: 80px;
  }

  .rules-list {
    grid-template-columns: repeat(2, 1fr);
  }

  .timeline {
    grid-template-columns: repeat(5, 1fr);
    gap: 24px;
    position: relative;
  }

  .timeline::before {
    content: "";
    position: absolute;
    inset-inline: 4px;
    top: 4px;
    height: 1px;
    background: var(--line);
  }

  .timeline-point {
    padding-inline-start: 0;
    padding-block-start: 24px;
  }

  .timeline-point::before {
    display: none;
  }

  .timeline-dot {
    top: 0;
    inset-inline-start: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}
