:root {
  --bottle: #0e3b2e;
  --paper: #fbfbf8;
  --rule: #dde5df;
  --lime: #c8f169;
  --ink: #16201c;
  --muted: #5d6b64;
  --red: #c2412d;
  --radius: 14px;
  --shell: 1160px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Geist", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.5;
}

a {
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
  border-radius: var(--radius);
  object-fit: cover;
}

h1,
h2,
h3,
h4 {
  font-family: "Instrument Serif", Georgia, serif;
  font-weight: 400;
  margin: 0 0 0.5rem;
  line-height: 1.08;
  letter-spacing: 0.01em;
}

h1 {
  font-size: clamp(2.1rem, 4vw, 4rem);
}

h2 {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
}

h3 {
  font-size: clamp(1.35rem, 2.2vw, 1.7rem);
}

p {
  margin: 0;
}

.shell {
  width: min(var(--shell), calc(100% - 3rem));
  margin: 0 auto;
}

.mono,
.ledger-value,
[data-kind] {
  font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-variant-numeric: tabular-nums;
}

.muted {
  color: var(--muted);
}

.skip-link {
  position: absolute;
  top: -60px;
  left: 10px;
  background: var(--bottle);
  color: var(--paper);
  padding: 0.8rem 1rem;
  border-radius: 8px;
  z-index: 99;
}

.skip-link:focus {
  top: 10px;
}

:focus-visible {
  outline: 3px solid var(--lime);
  outline-offset: 3px;
}

.site-header {
  background: rgba(251, 251, 248, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
  position: sticky;
  top: 0;
  z-index: 30;
}

.topbar {
  min-height: 76px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
}

.logo,
.logo-mark {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 1.45rem;
  text-decoration: none;
}

.desktop-nav {
  display: flex;
  justify-content: center;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.nav-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  padding: 0 0.9rem;
  border-radius: 999px;
  font-size: 0.95rem;
}

.nav-link[aria-current="page"] {
  border-bottom: 3px double var(--bottle);
  border-radius: 0;
  font-weight: 600;
}

.menu-toggle {
  display: none;
  min-height: 44px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 0 1rem;
  background: var(--paper);
  font-weight: 500;
}

.topbar-cta {
  margin-left: 0.5rem;
}

.mobile-drawer {
  border-top: 1px solid var(--rule);
  background: var(--paper);
}

.mobile-nav {
  width: min(var(--shell), calc(100% - 3rem));
  margin: 0 auto;
  display: grid;
  gap: 0.35rem;
  padding: 0.9rem 0 1.2rem;
}

.mobile-nav .nav-link {
  border: 1px solid var(--rule);
  border-radius: 10px;
  justify-content: center;
}

.btn {
  min-height: 44px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  gap: 0.45rem;
  padding: 0 1.2rem;
  font-weight: 600;
  border: 1px solid transparent;
  font-size: 0.95rem;
}

.btn--primary {
  background: var(--bottle);
  color: var(--paper);
}

.btn--ghost {
  border-color: var(--rule);
  color: var(--ink);
  background: transparent;
}

.btn--lime {
  background: var(--lime);
  color: var(--bottle);
}

.section {
  padding: 4.4rem 0;
}

.section h2 + .section-intro,
.section .section-intro {
  max-width: 62ch;
  color: var(--muted);
  margin-bottom: 1.25rem;
}

.hero {
  padding-top: 2.6rem;
  min-height: min(92vh, 760px);
  display: grid;
  align-items: center;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 1.6rem;
  align-items: start;
}

.hero-copy p {
  max-width: 57ch;
  font-size: 1.08rem;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  gap: 0.65rem;
  margin-top: 1.3rem;
  flex-wrap: wrap;
}

.ledger-card,
.card,
.list-card,
.deadline-panel,
.portal-box,
.contact-card {
  border: 1px solid var(--rule);
  background: #fff;
  border-radius: var(--radius);
}

.ledger-card {
  padding: 1.15rem;
}

.ledger-title {
  font-weight: 600;
  margin-bottom: 0.65rem;
}

.ledger-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.7rem;
  padding: 0.72rem 0;
  border-bottom: 1px solid var(--rule);
  align-items: baseline;
}

.leader {
  border-bottom: 1px dotted #aeb9b2;
  transform: translateY(-0.2rem);
}

.ledger-row strong {
  text-align: right;
}

.ledger-total {
  margin-top: 0.9rem;
  border-bottom: 3px double var(--bottle);
  display: flex;
  justify-content: space-between;
  font-weight: 600;
  padding-bottom: 0.45rem;
}

.trust-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
  margin-top: 1.6rem;
}

.trust-item {
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 0.95rem;
}

.trust-item strong {
  display: block;
  font-size: 1.3rem;
  border-bottom: 3px double var(--bottle);
  width: fit-content;
  margin-bottom: 0.25rem;
}

.grid-3,
.grid-4,
.grid-2,
.pricing-grid,
.team-grid,
.resource-grid,
.testimonial-grid,
.industry-grid {
  display: grid;
  gap: 1rem;
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3,
.pricing-grid,
.resource-grid,
.testimonial-grid,
.industry-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-4,
.team-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.card,
.list-card {
  padding: 1rem;
}

.card h3,
.list-card h3,
.list-card h4 {
  margin-bottom: 0.4rem;
}

.list-card p,
.card p {
  color: var(--muted);
}

.list-card .btn,
.card .btn {
  margin-top: 0.9rem;
}

.industry-card img,
.team-card img,
.service-hero img,
.detail-grid img {
  width: 100%;
  aspect-ratio: 4 / 3;
}

.team-card img {
  aspect-ratio: 3 / 4;
  margin-bottom: 0.8rem;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 0.4rem;
  font-weight: 600;
}

.pricing-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
  flex-wrap: wrap;
}

.billing-toggle {
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 0.25rem;
  display: inline-flex;
  gap: 0.3rem;
}

.billing-toggle button {
  min-height: 40px;
  border: 0;
  background: transparent;
  border-radius: 999px;
  padding: 0 0.95rem;
  font-weight: 600;
}

.billing-toggle button[aria-pressed="true"] {
  background: var(--lime);
  color: var(--bottle);
}

.price-chip {
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 1.1rem;
  border-bottom: 3px double var(--bottle);
  width: fit-content;
  margin-top: 0.55rem;
}

.ledger-list {
  margin-top: 0.75rem;
}

.ledger-list .ledger-row {
  padding: 0.62rem 0;
}

.deadline-panel {
  padding: 1rem;
}

.deadline-panel .ledger-row time {
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 0.88rem;
  white-space: nowrap;
}

.timeline {
  counter-reset: steps;
}

.timeline-item {
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1rem;
}

.timeline-item h3 {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.timeline-item h3::before {
  counter-increment: steps;
  content: "0" counter(steps);
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 0.8rem;
  color: var(--muted);
}

.dark-cta {
  background: var(--bottle);
  color: var(--paper);
}

.dark-cta .section-intro,
.dark-cta p {
  color: rgba(251, 251, 248, 0.84);
}

.detail-hero,
.legal {
  padding-top: 2.6rem;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1.2rem;
}

.ledger-box {
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1rem;
  margin-top: 1rem;
}

.pricing-table-wrap {
  overflow: auto;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: #fff;
}

.pricing-table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
}

.pricing-table thead th {
  position: sticky;
  top: 76px;
  background: var(--paper);
  z-index: 3;
  border-bottom: 3px double var(--bottle);
}

.pricing-table th,
.pricing-table td {
  border-bottom: 1px solid var(--rule);
  padding: 0.78rem;
  text-align: left;
  vertical-align: top;
}

.pricing-table td:nth-child(n + 2) {
  text-align: center;
}

.faq-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.resource-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
}

.checklist-box,
.portal-box,
.contact-card {
  padding: 1rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.92rem;
  color: var(--muted);
}

input,
select,
textarea {
  min-height: 44px;
  border-radius: 10px;
  border: 1px solid var(--rule);
  background: #fff;
  padding: 0.6rem 0.72rem;
  font: inherit;
  color: var(--ink);
}

textarea {
  min-height: 140px;
  resize: vertical;
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: 1rem;
}

.site-footer {
  border-top: 1px solid var(--rule);
  margin-top: 4rem;
  padding: 2rem 0 1.3rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.footer-heading {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 0.3rem;
}

.site-footer a {
  display: block;
  min-height: 44px;
  align-content: center;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.site-footer a:hover {
  border-color: var(--rule);
}

.footer-meta {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.9rem;
}

.error-balance {
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1.2rem;
  max-width: 560px;
  margin-top: 1.2rem;
}

.error-balance .ledger-total {
  margin-top: 1rem;
}

.js [data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 460ms ease, transform 460ms ease;
}

.js [data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 810px) {
  .shell,
  .mobile-nav {
    width: min(var(--shell), calc(100% - 2rem));
  }

  .desktop-nav,
  .topbar-cta {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
    justify-self: end;
  }

  .topbar {
    grid-template-columns: 1fr auto;
  }

  .hero {
    min-height: auto;
  }

  .hero-grid,
  .grid-4,
  .grid-3,
  .team-grid,
  .resource-grid,
  .testimonial-grid,
  .industry-grid,
  .grid-2,
  .detail-grid,
  .contact-grid,
  .form-grid,
  .faq-grid,
  .footer-grid,
  .trust-strip {
    grid-template-columns: 1fr;
  }

  .pricing-table {
    min-width: 100%;
  }

  .pricing-table thead th {
    position: static;
    border-bottom: 1px solid var(--rule);
  }

  .pricing-table-wrap {
    border: 0;
    background: transparent;
  }

  .pricing-table,
  .pricing-table tbody,
  .pricing-table tr,
  .pricing-table td,
  .pricing-table th,
  .pricing-table thead {
    display: block;
    width: 100%;
  }

  .pricing-table thead {
    display: none;
  }

  .pricing-table tr {
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    margin-bottom: 0.85rem;
    overflow: hidden;
    background: #fff;
  }

  .pricing-table td {
    border: 0;
    border-bottom: 1px solid var(--rule);
    text-align: left;
  }

  .pricing-table td::before {
    content: attr(data-label);
    display: block;
    font-size: 0.8rem;
    color: var(--muted);
    margin-bottom: 0.2rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
  }

  .pricing-table td:last-child {
    border-bottom: 0;
  }

  .section {
    padding: 3.4rem 0;
  }

  .site-footer {
    margin-top: 3rem;
  }
}

@media (max-width: 390px) {
  body {
    overflow-x: hidden;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .billing-toggle {
    width: 100%;
    justify-content: space-between;
  }

  .billing-toggle button {
    flex: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto;
  }

  .js [data-reveal] {
    transition: none;
    opacity: 1;
    transform: none;
  }
}

/* QA fixes (Claude): ledger rows must shrink on phones; tap targets >= 44px */
.ledger-row { grid-template-columns: minmax(0, max-content) minmax(0.75rem, 1fr) max-content; }
.ledger-row > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.ledger-row strong { min-width: 0; }
.logo { display: inline-flex; align-items: center; min-height: 44px; }
.billing-toggle button { min-height: 44px; }
@media (max-width: 600px) {
  .ledger-row { grid-template-columns: minmax(0, 1fr) minmax(0, auto); gap: 0.5rem; }
  .ledger-row .leader { display: none; }
  .ledger-row strong { text-align: right; overflow-wrap: anywhere; max-width: 60vw; }
}
