/* Pay Back website. Colours match src/theme.ts (Option L: Stone, Graphite and Emerald). */
:root {
  --background: #e7e5e2;
  --surface: #f7f6f4;
  --surface-muted: #eceae6;
  --text: #161616;
  --text-secondary: #55524d;
  --divider: #e2dfda;
  --primary: #00875a;
  --primary-pressed: #006e49;
  --on-primary: #ffffff;
  --inverse: #161616;
  --on-inverse: #ffffff;
  --inverse-tile: #2a2a2a;
  --radius-card: 24px;
  --max: 1080px;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--primary);
}

a:hover {
  color: var(--primary-pressed);
}

:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
  border-radius: 6px;
}

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

.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  left: 16px;
  top: 16px;
  background: var(--surface);
  padding: 8px 12px;
  z-index: 10;
}

/* Header */
.site-header {
  padding: 20px 0;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -0.3px;
}

.brand img {
  width: 36px;
  height: 36px;
  border-radius: 10px;
}

.nav {
  display: flex;
  gap: 20px;
  font-weight: 600;
  font-size: 15px;
}

.nav a {
  color: var(--text-secondary);
  text-decoration: none;
}

.nav a:hover {
  color: var(--text);
}

/* Hero */
.hero {
  padding: 56px 0 72px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 48px;
  align-items: center;
}

.eyebrow {
  display: inline-block;
  background: var(--surface);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  margin: 0 0 20px;
}

h1 {
  font-size: clamp(40px, 7vw, 68px);
  line-height: 1.04;
  letter-spacing: -2px;
  font-weight: 800;
  margin: 0 0 20px;
}

h1 .accent {
  color: var(--primary);
}

.lead {
  font-size: 19px;
  color: var(--text-secondary);
  max-width: 34ch;
  margin: 0 0 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 56px;
  padding: 0 26px;
  border-radius: 28px;
  background: var(--inverse);
  color: var(--on-inverse);
  font-weight: 700;
  text-decoration: none;
}

.button:hover {
  color: var(--on-inverse);
  background: var(--inverse-tile);
}

.note {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 14px 0 0;
}

/* Phone card mock */
.phone {
  background: var(--inverse);
  border-radius: 40px;
  padding: 14px;
  max-width: 340px;
  margin-left: auto;
  box-shadow: 0 30px 60px -30px rgba(22, 22, 22, 0.45);
}

.screen {
  background: var(--background);
  border-radius: 28px;
  padding: 22px 18px;
  display: grid;
  gap: 12px;
}

.tile {
  background: var(--inverse-tile);
  color: var(--on-inverse);
  border-radius: 20px;
  padding: 18px;
}

.tile small {
  display: block;
  opacity: 0.7;
  font-size: 13px;
}

.tile strong {
  display: block;
  font-size: 32px;
  letter-spacing: -1px;
  font-weight: 800;
}

.row {
  background: var(--surface);
  border-radius: 18px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 15px;
}

.row .who {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--inverse);
  color: var(--on-inverse);
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
}

.row .amt {
  font-weight: 800;
  color: var(--primary);
}

.row .sub {
  display: block;
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 400;
}

/* Sections */
section {
  padding: 64px 0;
}

h2 {
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.1;
  letter-spacing: -1px;
  font-weight: 800;
  margin: 0 0 12px;
}

.section-lead {
  color: var(--text-secondary);
  font-size: 18px;
  max-width: 52ch;
  margin: 0 0 32px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.card {
  background: var(--surface);
  border-radius: var(--radius-card);
  padding: 26px;
}

.card .num {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: var(--surface-muted);
  display: grid;
  place-items: center;
  font-weight: 800;
  margin-bottom: 16px;
}

.card h3 {
  margin: 0 0 8px;
  font-size: 20px;
  letter-spacing: -0.3px;
}

.card p {
  margin: 0;
  color: var(--text-secondary);
}

.band {
  background: var(--inverse);
  color: var(--on-inverse);
  border-radius: 32px;
  padding: 44px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.band h2 {
  color: var(--on-inverse);
}

.band p {
  color: rgba(255, 255, 255, 0.75);
  margin: 0;
}

.band ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
}

.band li {
  background: var(--inverse-tile);
  border-radius: 16px;
  padding: 14px 16px;
}

.contact {
  text-align: center;
}

.contact .section-lead {
  margin-left: auto;
  margin-right: auto;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--divider);
  padding: 28px 0 40px;
  font-size: 14px;
  color: var(--text-secondary);
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
}

.site-footer a {
  color: var(--text-secondary);
}

/* Legal page */
.legal {
  padding: 32px 0 64px;
}

.legal article {
  background: var(--surface);
  border-radius: var(--radius-card);
  padding: clamp(22px, 5vw, 48px);
  max-width: 780px;
}

.legal h1 {
  font-size: clamp(32px, 5vw, 44px);
  letter-spacing: -1px;
}

.legal h2 {
  font-size: 22px;
  letter-spacing: -0.3px;
  margin: 32px 0 8px;
}

.legal p,
.legal li {
  color: var(--text-secondary);
}

.legal strong {
  color: var(--text);
}

.draft {
  background: var(--surface-muted);
  border-radius: 14px;
  padding: 12px 16px;
  font-size: 14px;
  margin: 0 0 24px;
}

/* Reveal animation start state (only when JS runs and motion is allowed) */
.js .reveal {
  opacity: 0;
  transform: translateY(24px);
}

@media (prefers-reduced-motion: reduce) {
  .js .reveal {
    opacity: 1;
    transform: none;
  }
}

/* Small screens */
@media (max-width: 820px) {
  .hero {
    padding: 24px 0 48px;
  }

  .hero-grid,
  .band {
    grid-template-columns: 1fr;
  }

  .phone {
    margin: 0 auto;
  }

  .cards {
    grid-template-columns: 1fr;
  }

  .band {
    padding: 28px 22px;
  }

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

/* Narrow phones: keep the header on one line. */
@media (max-width: 480px) {
  .brand {
    font-size: 17px;
    white-space: nowrap;
  }

  .nav {
    gap: 12px;
    white-space: nowrap;
  }

  .nav a[href$="#how"] {
    display: none;
  }
}
