/* myledgerlyapp.com: Ledgerly's website. Light, navy and green, with motion on scroll. */
@font-face {
  font-family: 'Inter Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('fonts/inter-latin-wght-normal.woff2') format('woff2-variations');
}

:root {
  --navy: #0f172a;
  --navy-2: #13213d;
  --ink: #0f172a;
  --text: #1e293b;
  --muted: #5b6b82;
  --line: #e5eaf1;
  --soft: #f5f7fb;
  --green: #16a34a;
  --green-dark: #15803d;
  --teal: #09c19b;
  --radius: 14px;
  --donut-track: #e7ecf3;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
  overflow-x: clip;
  overscroll-behavior-x: none;
}

body {
  margin: 0;
  background: #fff;
  color: var(--text);
  font-family: 'Inter Variable', Inter, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--green-dark);
}

h1,
h2,
h3 {
  color: var(--ink);
  letter-spacing: -0.025em;
  line-height: 1.12;
}

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 16px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 50;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--navy);
  color: #fff;
}

.skip:focus {
  top: 12px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.lead {
  color: var(--muted);
  font-size: 1.1rem;
  margin: 0 0 28px;
  max-width: 32em;
}

.muted {
  color: var(--muted);
}

.fine {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 10px;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-sm {
  min-height: 42px;
  padding: 0 18px;
  font-size: 0.95rem;
}

.btn-primary {
  background: var(--green);
  color: #fff;
  box-shadow: 0 6px 18px rgb(22 163 74 / 0.25);
}

.btn-primary:hover {
  background: var(--green-dark);
  box-shadow: 0 10px 24px rgb(22 163 74 / 0.32);
}

.btn-outline {
  background: #fff;
  color: var(--ink);
  border-color: var(--line);
}

.btn-outline:hover {
  border-color: #cbd5e1;
}

.btn-dark {
  background: var(--navy);
  color: #fff;
}

.btn:focus-visible,
a:focus-visible,
input:focus-visible,
summary:focus-visible,
button:focus-visible {
  outline: 3px solid #4ade80;
  outline-offset: 2px;
}

.link-quiet {
  color: var(--ink);
  font-weight: 550;
  text-decoration: none;
}

/* ---------- Header ---------- */
.top {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgb(255 255 255 / 0.92);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

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

.top-row {
  display: flex;
  align-items: center;
  gap: 24px;
  padding-top: 14px;
  padding-bottom: 14px;
}

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

.brand img {
  display: block;
}

.top-nav {
  display: none;
  gap: 32px;
  margin-left: 40px;
}

.top-nav a {
  position: relative;
  color: var(--text);
  font-weight: 500;
  font-size: 0.95rem;
  text-decoration: none;
}

.top-nav a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 2px;
  border-radius: 2px;
  background: var(--green);
  transform: scaleX(0);
  transition: transform 0.25s ease;
}

.top-nav a.is-current::after,
.top-nav a:hover::after {
  transform: scaleX(1);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-left: auto;
}

/* Phones: a menu button opens the section links under the header (site.js). */
.top-menu,
.top-nav-signin {
  display: none;
}

@media (max-width: 899px) {
  .js .top-menu {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    margin-right: -8px;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: var(--ink);
    cursor: pointer;
  }

  .top-menu:focus-visible {
    outline: 3px solid rgb(22 163 74 / 0.45);
  }

  .top.is-open .top-nav {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin: 0;
    padding: 4px 16px 12px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 18px 30px -24px rgb(15 23 42 / 0.4);
  }

  .top.is-open .top-nav a {
    padding: 14px 0;
    font-size: 1.05rem;
    border-top: 1px solid var(--line);
  }

  .top.is-open .top-nav a:first-child {
    border-top: none;
  }

  .top.is-open .top-nav-signin {
    display: block;
  }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 40px 0 72px;
  background:
    radial-gradient(900px 420px at 85% 10%, rgb(9 193 155 / 0.07), transparent 70%),
    linear-gradient(180deg, #fbfcfe 0%, #f6f8fc 100%);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  gap: 44px;
  align-items: center;
}

.hero h1 {
  margin: 0 0 20px;
  font-size: clamp(2.4rem, 7vw, 3.6rem);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------- The app preview (built in HTML so its numbers can move) ---------- */
.mock {
  container-type: inline-size;
  display: flex;
  width: 100%;
  border-radius: 14px;
  background: #f7f9fc;
  border: 1px solid var(--line);
  box-shadow:
    0 30px 60px -20px rgb(15 23 42 / 0.28),
    0 12px 24px -12px rgb(15 23 42 / 0.12);
  overflow: hidden;
  font-size: 11px;
  line-height: 1.35;
  color: var(--text);
  text-align: left;
}

.mock-side {
  flex: 0 0 150px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 10px;
  background: var(--navy);
  color: #cbd5e1;
}

.mock-logo {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
  color: #fff;
  font-weight: 800;
  font-size: 12px;
}

.mock-logo img {
  border-radius: 4px;
}

.mock-user {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
  font-size: 9.5px;
}

.mock-user b,
.mock-user small {
  display: block;
}

.mock-user b {
  color: #fff;
}

.mock-user small {
  color: #94a3b8;
  font-size: 8.5px;
}

.mock-avatar {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--teal);
  color: #052e22;
  font-weight: 700;
  font-size: 8.5px;
  flex: none;
}

.mock-group {
  margin: 8px 6px 2px;
  color: #64748b;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.mock-nav {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 7px;
  border-radius: 6px;
  font-size: 10px;
  transition:
    background 0.35s ease,
    color 0.35s ease;
}

.mock-nav.is-active {
  background: rgb(9 193 155 / 0.16);
  color: #fff;
}

.mi {
  width: 11px;
  height: 11px;
  flex: none;
  background: currentColor;
  -webkit-mask: var(--icon) center / contain no-repeat;
  mask: var(--icon) center / contain no-repeat;
}

.mi-home {
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4'%3E%3Cpath d='M3 10.5 12 3l9 7.5V21h-6v-6H9v6H3z'/%3E%3C/svg%3E");
}

.mi-cal {
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M3 10h18M8 3v4M16 3v4'/%3E%3C/svg%3E");
}

.mi-swap {
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4'%3E%3Cpath d='M4 8h14l-4-4M20 16H6l4 4'/%3E%3C/svg%3E");
}

.mi-bars {
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4'%3E%3Cpath d='M5 20V12M12 20V5M19 20v-9'/%3E%3C/svg%3E");
}

.mi-target {
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3C/svg%3E");
}

.mi-gear {
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M12 2v3M12 19v3M2 12h3M19 12h3M5 5l2 2M17 17l2 2M5 19l2-2M17 7l2-2'/%3E%3C/svg%3E");
}

.mock-main {
  flex: 1;
  min-width: 0;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mock-hello,
.mock-name,
.mock-sub {
  margin: 0;
}

.mock-hello {
  color: var(--muted);
  font-size: 9.5px;
}

.mock-name {
  color: var(--ink);
  font-weight: 750;
  font-size: 14px;
}

.mock-sub {
  color: var(--muted);
  font-size: 9px;
  margin-bottom: 2px;
}

.mock-hero {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--navy), var(--navy-2));
  color: #cbd5e1;
}

.mock-hero > div + div {
  border-left: 1px solid rgb(255 255 255 / 0.1);
  padding-left: 10px;
}

.mock-hero small,
.mock-card small {
  display: block;
  font-size: 8.5px;
  font-weight: 600;
}

.mock-hero b {
  display: block;
  margin: 2px 0;
  color: #fff;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

.mock-hero em,
.mock-card em {
  display: block;
  font-style: normal;
  font-size: 8px;
  color: #94a3b8;
}

.mock-hero em.is-up {
  color: #4ade80;
}

.mock-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.mock-row-2 {
  grid-template-columns: 1fr 1fr;
}

.mock-card {
  min-width: 0;
  padding: 9px 10px;
  border-radius: 9px;
  background: #fff;
  border: 1px solid var(--line);
}

.mock-card small {
  color: var(--muted);
  margin-bottom: 2px;
}

.mock-card > b {
  display: block;
  color: var(--ink);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}

.mock-card em {
  color: var(--muted);
}

.is-good {
  color: var(--green) !important;
}

.mock-bar {
  display: block;
  height: 4px;
  margin: 5px 0 4px;
  border-radius: 4px;
  background: #edf1f6;
  overflow: hidden;
}

.mock-bar > span {
  display: block;
  height: 100%;
  width: var(--w, 0);
  border-radius: inherit;
  background: var(--teal);
  transition: width 0.9s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.js .reveal:not(.is-in) .mock-bar > span {
  width: 0;
}

.mock-bar > span[data-bar='spent'] {
  background: #3b6ea5;
}

.mock-where-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 4px;
}

.mock-donut {
  width: 92px;
  height: 92px;
  flex: none;
  transform: rotate(-90deg);
}

.mock-donut text {
  transform: rotate(90deg);
  transform-origin: 21px 21px;
  fill: var(--ink);
}

.mock-donut-big {
  font-size: 6px;
  font-weight: 750;
}

.mock-donut-small {
  font-size: 3.2px;
  fill: var(--muted) !important;
}

.mock-donut circle[data-seg] {
  transition:
    stroke-dasharray 0.9s cubic-bezier(0.2, 0.8, 0.2, 1),
    stroke-dashoffset 0.9s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.mock-legend {
  flex: 1;
  min-width: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 4px;
}

.mock-legend li {
  display: grid;
  grid-template-columns: 8px 1fr auto auto;
  align-items: center;
  gap: 6px;
  font-size: 9px;
  animation: pop-in 0.45s ease both;
}

.mock-legend i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.mock-legend span {
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mock-legend b {
  font-variant-numeric: tabular-nums;
}

.mock-legend em {
  font-style: normal;
  color: var(--muted);
  min-width: 26px;
  text-align: right;
}

.mock-tx {
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 4px;
}

.mock-tx li {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  font-size: 9px;
  animation: pop-in 0.45s ease both;
}

.mock-tx li span {
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mock-tx li b {
  font-variant-numeric: tabular-nums;
}

.mock-tx .in {
  color: var(--green);
}

.mock-empty {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 8.5px;
  text-align: center;
  animation: pop-in 0.45s ease both;
}

.mock-goal {
  margin-top: 5px;
  font-size: 9px;
  animation: pop-in 0.45s ease both;
}

.mock-goal div {
  display: flex;
  justify-content: space-between;
}

.mock-goal .mock-bar > span {
  background: var(--green);
}

@keyframes pop-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
}

/* A narrow preview drops the sidebar and the lower cards. */
@container (max-width: 520px) {
  .mock-side {
    display: none;
  }
}

@container (max-width: 380px) {
  .mock-hero {
    grid-template-columns: 1fr 1fr;
  }

  .mock-hero > div:nth-child(3) {
    display: none;
  }

  .mock-row-2 {
    display: none;
  }
}

/* ---------- Features ---------- */
.features {
  padding: 72px 0;
  background: #fff;
}

.features .wrap + .wrap {
  margin-top: 36px;
}

.feature-grid {
  display: grid;
  gap: 40px;
}

.feature h3 {
  margin: 18px 0 10px;
  font-size: 1.3rem;
}

.feature p {
  margin: 0;
  color: var(--muted);
  max-width: 22em;
}

.feature-icon {
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #eef2f8;
  color: var(--navy);
  transition:
    transform 0.4s ease,
    background 0.4s ease,
    color 0.4s ease;
}

.feature:hover .feature-icon {
  transform: translateY(-3px) rotate(-4deg);
  background: rgb(22 163 74 / 0.12);
  color: var(--green-dark);
}

/* ---------- How it works: three numbered steps ---------- */
.how {
  padding: 80px 0;
  background: var(--soft);
}

.how h2,
.features h2,
.pricing h2,
.faq h2 {
  margin: 0 0 20px;
  font-size: clamp(1.9rem, 5vw, 2.6rem);
}

.how-steps {
  display: grid;
  gap: 16px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.how-step {
  padding: 22px 22px 24px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: #fff;
}

.how-step h3 {
  margin: 14px 0 8px;
  font-size: 1.15rem;
}

.how-step p {
  margin: 0;
  color: var(--muted);
}

.how-num {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-weight: 750;
}

.promises {
  padding: 80px 0;
  background: var(--soft);
  text-align: center;
}

.promise-box {
  max-width: 760px;
}

.promise-mark {
  color: #6b7a99;
}

.promise-track {
  display: grid;
  margin: 18px 0 0;
}

.promise {
  grid-area: 1 / 1;
  margin: 0;
  opacity: 0;
  transform: translateY(10px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
  pointer-events: none;
}

.promise.is-active {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.promise p {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.2rem, 3.2vw, 1.55rem);
  line-height: 1.45;
  letter-spacing: -0.01em;
}

.promise-by {
  margin: 0 0 14px;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.95rem;
}

.promise-dots {
  display: flex;
  margin-top: 22px;
  justify-content: center;
  gap: 10px;
}

.promise-dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: #cbd5e1;
  cursor: pointer;
  transition:
    background 0.3s ease,
    width 0.3s ease;
}

.promise-dots button[aria-selected='true'] {
  width: 26px;
  border-radius: 6px;
  background: var(--navy);
}

/* ---------- Pricing ---------- */
.pricing {
  padding: 84px 0;
  background: #fff;
}

.pricing-grid {
  display: grid;
  gap: 24px;
  align-items: stretch;
}

.price-card,
.signup {
  padding: 30px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: #fff;
}

.price-card {
  box-shadow: 0 24px 50px -28px rgb(15 23 42 / 0.3);
}

.price {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 1.15rem;
}

.price b {
  font-size: 2.6rem;
  letter-spacing: -0.03em;
}

.price-note {
  margin: 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--soft);
  color: var(--muted);
  font-size: 0.92rem;
}

/* The app sign-up is part of the answer to "When are the apps coming?": a light panel, not the dark card. */
.faq .signup {
  margin: 14px 0 4px;
  padding: 18px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--soft);
  color: var(--text);
}

.faq .signup .eyebrow {
  margin: 0 0 4px;
  color: var(--green-dark);
}

.faq .signup h3 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 1.1rem;
}

.faq .signup input {
  border-color: var(--line);
  background: #fff;
  color: var(--ink);
}

.faq .signup input::placeholder {
  color: var(--muted);
}

.faq .signup .btn-dark {
  background: var(--navy);
  color: #fff;
}

.faq .signup .signup-note {
  color: var(--muted);
}

.faq .signup .signup-note.is-good {
  color: var(--green-dark);
}

.faq .signup .signup-note.is-bad {
  color: #b91c1c;
}

.plans {
  display: grid;
  gap: 14px;
  margin: 6px 0 18px;
}

@media (min-width: 560px) {
  .plans {
    grid-template-columns: 1fr 1fr;
  }
}

.plan {
  display: flex;
  flex-direction: column;
  padding: 18px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--soft);
}

.plan > b {
  display: block;
  color: var(--ink);
  font-size: 1.05rem;
}

.plan-premium {
  border-color: var(--green);
  background: #fff;
  box-shadow: 0 0 0 1px var(--green) inset;
}

.plan .price {
  margin: 4px 0 6px;
}

.plan .price b {
  font-size: 2rem;
}

.plan .btn {
  align-self: flex-start;
  margin-top: auto;
}

.plan ul {
  margin: 10px 0 18px;
  padding-left: 18px;
  color: var(--text);
  font-size: 0.93rem;
  line-height: 1.55;
}

.signup {
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: linear-gradient(160deg, var(--navy), var(--navy-2));
  color: #cbd5e1;
  border-color: transparent;
}

.signup .eyebrow {
  color: #4ade80;
}

.signup h3 {
  margin: 0 0 14px;
  color: #fff;
  font-size: 1.5rem;
}

.signup label {
  display: block;
  font-size: 0.95rem;
}

.signup-row {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.signup input {
  flex: 1;
  min-width: 0;
  min-height: 48px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid rgb(255 255 255 / 0.18);
  background: rgb(255 255 255 / 0.08);
  color: #fff;
  font: inherit;
  font-size: 16px;
}

.signup input::placeholder {
  color: #94a3b8;
}

.signup .btn-dark {
  background: #fff;
  color: var(--navy);
}

.signup-note {
  margin: 10px 0 0;
  font-size: 0.85rem;
  color: #94a3b8;
}

.signup-note.is-good {
  color: #86efac;
}

.signup-note.is-bad {
  color: #fca5a5;
}

/* ---------- Why I built Ledgerly (front page) and the About page ---------- */
.story {
  padding: 84px 0 60px;
}

.story-wrap {
  max-width: 720px;
}

.story h2 {
  margin: 6px 0 18px;
}

.story p {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

.story-sign {
  margin-top: 22px;
  font-weight: 650;
  color: var(--ink) !important;
}

.story-sign::before {
  content: '— ';
}

.story-link {
  display: inline-block;
  margin-top: 6px;
  color: var(--green-dark);
  font-weight: 600;
  text-decoration: none;
}

.story-link:hover {
  text-decoration: underline;
}

.about-narrow {
  max-width: 720px;
}

.about-hero {
  padding: 64px 0 56px;
  background: var(--soft);
  text-align: center;
}

.about-avatar {
  display: inline-grid;
  place-items: center;
  width: 72px;
  height: 72px;
  margin-bottom: 18px;
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
  font-size: 1.9rem;
  font-weight: 700;
}

.about-hero .eyebrow {
  margin: 0;
}

.about-hero h1 {
  margin: 8px 0 14px;
  font-size: clamp(2.2rem, 6vw, 3.2rem);
}

.about-lead {
  max-width: 560px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 1.15rem;
  line-height: 1.6;
}

.about-story {
  padding: 64px 0 72px;
}

.about-story h2 {
  margin: 48px 0 14px;
  font-size: 1.5rem;
}

.about-story h2:first-child {
  margin-top: 0;
}

.about-story p {
  margin: 0 0 16px;
  font-size: 1.075rem;
  line-height: 1.75;
}

.about-quote {
  margin: 28px 0 0;
  padding: 20px 24px;
  border-left: 4px solid var(--teal);
  border-radius: 0 12px 12px 0;
  background: #effbf7;
  color: var(--ink);
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.5;
}

.about-promises {
  padding: 72px 0;
  background: var(--soft);
}

.about-promises h2 {
  margin: 0 0 32px;
  font-size: 1.75rem;
  text-align: center;
}

.about-grid {
  display: grid;
  gap: 16px;
  max-width: 880px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
}

.about-grid li {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.about-grid h3 {
  margin: 14px 0 6px;
  font-size: 1.1rem;
}

.about-grid p {
  margin: 0;
  color: var(--muted);
}

.about-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #effbf7;
  color: #0a8f74;
}

.about-cta {
  padding: 72px 0 88px;
  text-align: center;
}

.about-cta h2 {
  margin: 0 0 12px;
  font-size: 1.75rem;
}

.about-cta p {
  margin: 0 auto 28px;
  max-width: 480px;
  color: var(--muted);
  font-size: 1.075rem;
}

.about-cta .cta-row {
  justify-content: center;
}

.about-cta .about-sign {
  margin: 32px auto 0;
  color: var(--ink);
  font-weight: 650;
}

.about-sign::before {
  content: '— ';
}

@media (min-width: 640px) {
  .about-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 420px) {
  .about-cta .cta-row .btn {
    flex: 1 1 100%;
  }
}

/* ---------- FAQ ---------- */
.faq {
  padding: 24px 0 84px;
}

.faq-wrap {
  max-width: 780px;
}

.faq details {
  border-bottom: 1px solid var(--line);
  padding: 16px 0;
}

.faq summary {
  cursor: pointer;
  font-weight: 650;
  color: var(--ink);
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: '+';
  color: var(--muted);
  font-size: 1.3rem;
  line-height: 1;
  transition: transform 0.25s ease;
}

.faq details[open] summary::after {
  transform: rotate(45deg);
}

.faq details p {
  margin: 10px 0 0;
  color: var(--muted);
}

/* ---------- Footer ---------- */
.foot {
  background: #0d1a33;
  color: #94a3b8;
  font-size: 0.92rem;
}

.foot-top {
  display: grid;
  gap: 24px;
  padding-top: 44px;
  padding-bottom: 32px;
}

.foot .brand-light {
  color: #fff;
  font-size: 1.3rem;
}

.foot-top p {
  margin: 10px 0 0;
  line-height: 1.5;
}

.foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 30px;
  align-self: center;
}

.foot a {
  color: #cbd5e1;
  text-decoration: none;
}

.foot a:hover {
  color: #fff;
}

.foot .btn-primary {
  color: #fff;
  justify-self: start;
  align-self: center;
}

.foot-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding-top: 18px;
  padding-bottom: 28px;
  border-top: 1px solid rgb(255 255 255 / 0.08);
  font-size: 0.82rem;
}

.foot-bottom span:last-child {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

.foot-usage {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.foot-usage:hover {
  text-decoration: underline;
}

/* ---------- Motion: things rise into place as they scroll into view ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition:
    opacity 0.7s ease var(--d, 0ms),
    transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) var(--d, 0ms);
}

.js .reveal.from-right {
  transform: translateX(36px);
}

/* On phones nothing slides in sideways, so nothing ever sits past the edge
   of the screen and the page can't be dragged left or right. */
@media (max-width: 899px) {
  .js .reveal.from-right {
    transform: translateY(26px);
  }
}

.js .reveal.is-in {
  opacity: 1;
  transform: none;
}

.hero-visual .mock {
  transform: perspective(1400px) rotateY(-6deg) rotateX(2deg);
  transition: transform 0.6s ease;
}

.hero-visual:hover .mock {
  transform: perspective(1400px) rotateY(-2deg) rotateX(1deg);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .js .reveal,
  .js .reveal.from-right {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .hero-visual .mock,
  .hero-visual:hover .mock {
    transform: none;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- Larger screens ---------- */
@media (min-width: 760px) {
  /* Three cards a row on a six-column grid (each card spans two), so a last row of two can
     sit in the middle instead of leaving a gap on the right. */
  .feature-grid {
    grid-template-columns: repeat(6, 1fr);
    gap: 48px 0;
  }

  .feature {
    grid-column: span 2;
    padding: 0 32px;
  }

  .feature + .feature {
    border-left: 1px solid var(--line);
  }

  /* No divider before the first card of each row. */
  .feature:nth-child(3n + 1) {
    border-left: none;
  }

  /* Two cards left over on the last row: start them one column in, so they're centered. */
  .feature:nth-child(3n + 1):nth-last-child(2) {
    grid-column: 2 / span 2;
  }

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

  .foot-top {
    grid-template-columns: 1.2fr 2fr auto;
    align-items: start;
  }
}

@media (min-width: 900px) {
  .top-nav {
    display: flex;
  }

  .hero {
    padding: 56px 0 96px;
  }

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

  .hero h1 {
    font-size: clamp(2.6rem, 4.4vw, 3.5rem);
  }
}

@media (max-width: 520px) {
  .top-actions .link-quiet {
    display: none;
  }

  .signup-row {
    flex-direction: column;
  }

  .cta-row .btn {
    flex: 1 1 100%;
  }
}

/* Support chat: our own button until Crisp is opened (Crisp loads only then). */
.chat-launcher {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 60;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border: none;
  border-radius: 999px;
  background: var(--green);
  color: #fff;
  font: inherit;
  font-weight: 700;
  box-shadow: 0 10px 28px rgb(15 23 42 / 0.18);
  cursor: pointer;
}

.chat-launcher:hover {
  background: var(--green-dark);
}

.chat-launcher:focus-visible {
  outline: 3px solid rgb(22 163 74 / 0.35);
  outline-offset: 3px;
}

@media (max-width: 560px) {
  .chat-launcher {
    right: 14px;
    bottom: 14px;
    padding: 12px 14px;
  }
}

/* ---------- Ledgerly in your AI chat (ai.html, and the front page's AI section) ---------- */
.ai-hero {
  padding: 56px 0 72px;
  background: linear-gradient(180deg, #f2fbf8 0%, #fff 100%);
}
.ai-hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  margin: 0.2em 0 0.35em;
}
.ai-hero-grid,
.ai-home-grid {
  display: grid;
  gap: 40px;
  align-items: start;
}
/* A chat, drawn plainly: the person's message, then Ledgerly's card as the answer. */
.chat {
  margin: 0;
  padding: 18px;
  border-radius: 22px;
  background: var(--soft);
  border: 1px solid var(--line);
  max-width: 456px;
  justify-self: center;
  width: 100%;
}
.chat-you {
  margin: 0 0 14px auto;
  width: fit-content;
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 18px 18px 4px 18px;
  background: var(--navy);
  color: #fff;
  font-size: 0.95rem;
  line-height: 1.4;
}
.chat-card {
  display: block;
  width: 100%;
  max-width: 420px;
  border-radius: 16px;
  box-shadow: 0 18px 40px -20px rgb(15 23 42 / 0.35);
  background: #fff;
}
/* Tall cards are cut off at the bottom with a fade, so each example stays a glance. */
.ask .chat-card,
.chat .chat-card {
  max-height: 560px;
  object-fit: cover;
  object-position: top;
  -webkit-mask-image: linear-gradient(180deg, #000 82%, transparent);
  mask-image: linear-gradient(180deg, #000 82%, transparent);
}
.ai-asks,
.ai-bank,
.ai-try,
.ai-why,
.ai-connect {
  padding: 72px 0;
}
.ai-bank {
  background: var(--soft);
}
.ai-asks h2,
.ai-bank h2,
.ai-try h2,
.ai-why h2,
.ai-connect h2,
.ai-home h2 {
  font-size: clamp(1.7rem, 3.4vw, 2.4rem);
  margin: 0.2em 0 0.4em;
}
.ask {
  display: grid;
  gap: 24px;
  align-items: start;
  padding: 40px 0;
  border-top: 1px solid var(--line);
}
.ask:first-of-type {
  margin-top: 28px;
}
.ask h3 {
  font-size: 1.35rem;
  margin: 0 0 14px;
}
.ask-copy .chat-you {
  margin: 0 0 14px;
}
.ask .chat-card {
  justify-self: center;
}
.ask-more {
  margin: 24px 0 0;
  padding: 24px 0 0;
  border-top: 1px solid var(--line);
  list-style: none;
  display: grid;
  gap: 12px;
}
.try-list {
  margin: 24px 0 16px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}
.try-list li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 12px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}
.try-list b {
  grid-column: 1;
}
.try-text {
  grid-column: 1;
  color: var(--muted);
}
.try-copy {
  grid-column: 2;
  grid-row: 1 / span 2;
  font: inherit;
  font-size: 0.9rem;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: inherit;
  cursor: pointer;
}
.ai-why {
  background: var(--soft);
}
.why-grid,
.connect-grid {
  display: grid;
  gap: 18px;
  margin-top: 28px;
}
.why-grid article,
.connect-grid article {
  padding: 22px;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid var(--line);
}
.why-grid h3,
.connect-grid h3 {
  margin: 0 0 8px;
  font-size: 1.1rem;
}
.why-grid p,
.connect-grid p {
  margin: 0;
  color: var(--muted);
}
.connect-grid ol {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 8px;
  color: var(--muted);
}
.connect-grid code,
.ai-connect code {
  font-size: 0.85em;
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--soft);
  border: 1px solid var(--line);
  overflow-wrap: anywhere;
}
.ai-connect .fine {
  margin-top: 24px;
}
/* The front page's AI section. */
.ai-home {
  padding: 84px 0;
  background: linear-gradient(180deg, #fff 0%, #f2fbf8 100%);
}
/* Lists with a green tick (the front page's AI section). */
.checks {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 14px;
}

.checks li {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
}

.checks svg {
  color: var(--green);
  flex: none;
}

.ai-home .checks {
  margin: 22px 0 26px;
}
@media (min-width: 900px) {
  .ai-hero-grid,
  .ai-home-grid {
    grid-template-columns: 1.1fr 1fr;
    gap: 56px;
  }
  .ask {
    grid-template-columns: 1fr 420px;
    gap: 56px;
  }
  .ask:nth-of-type(even) {
    grid-template-columns: 420px 1fr;
  }
  .ask:nth-of-type(even) .ask-copy {
    order: 2;
  }
  .why-grid,
  .connect-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .ask-more {
    grid-template-columns: 1fr 1fr;
  }
}
/* /ai: two ways to connect, then a short note for coding assistants. */
@media (min-width: 900px) {
  .connect-grid {
    grid-template-columns: 1fr 1fr;
  }
}
.connect-more {
  margin-top: 16px;
  padding: 14px 18px;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid var(--line);
}
.connect-more summary {
  font-weight: 600;
  cursor: pointer;
}
.connect-more p {
  margin: 10px 0 0;
  color: var(--muted);
}
