/* Vatly — landing page */
.wrap { width: min(1180px, 100%); margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 32px; } }

section.wrap { padding-top: clamp(4rem, 9vw, 7.5rem); }
section h2 { max-width: 22ch; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .7rem 16px; padding-top: max(.7rem, env(safe-area-inset-top));
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent; transition: border-color .3s;
}
.nav.scrolled { border-bottom-color: var(--line); }
@media (min-width: 720px) { .nav { padding-left: 32px; padding-right: 32px; } }
.nav-links { display: none; gap: 1.6rem; font-weight: 600; font-size: .95rem; }
.nav-links a { text-decoration: none; color: var(--muted); }
.nav-links a:hover { color: var(--text); }
.nav-actions { display: flex; gap: .3rem; align-items: center; }
@media (min-width: 900px) { .nav-links { display: flex; } }
@media (max-width: 480px) { .nav-actions .btn-ghost[href] { display: none; } }

/* Hero */
.hero {
  position: relative;
  width: min(1180px, 100%); margin: 0 auto;
  display: grid; gap: 2.5rem; align-items: center;
  padding: clamp(2rem, 6vw, 4.5rem) 16px clamp(2rem, 5vw, 3rem);
}
.hero::before {
  /* faint spreadsheet grid behind the hero */
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 100% 34px, 120px 100%;
  mask-image: radial-gradient(ellipse 70% 65% at 30% 35%, #000 10%, transparent 75%);
  opacity: .7;
}
@media (min-width: 720px) { .hero { padding-left: 32px; padding-right: 32px; } }
@media (min-width: 980px) { .hero { grid-template-columns: 1.1fr .9fr; gap: 3.5rem; } }

.hero-title { font-size: clamp(2.5rem, 5.6vw, 4.6rem); line-height: 1.03; letter-spacing: -.035em; font-weight: 750; margin-bottom: 1.4rem; }
.hero-title .line { display: block; }
.hero-title .line + .line { color: var(--ledger); }
.hero-cta { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 2rem; }
.hero-note { margin-top: .9rem; }
@media (max-width: 520px) { .hero-cta .btn { flex: 1 1 100%; } }

/* Orchestrated entrance — the only page-load sequence */
.js .hero-title .line, .js .hero .lede, .js .hero-cta, .js .hero-note { opacity: 0; transform: translateY(22px); }
.js.ready .hero-title .line, .js.ready .hero .lede, .js.ready .hero-cta, .js.ready .hero-note {
  opacity: 1; transform: none; transition: opacity .9s var(--ease-out), transform .9s var(--ease-out);
}
.js.ready .hero-title .line:nth-child(2) { transition-delay: .12s; }
.js.ready .hero .lede { transition-delay: .26s; }
.js.ready .hero-cta { transition-delay: .36s; }
.js.ready .hero-note { transition-delay: .44s; }

/* Stage: printer → receipt → ledger */
.stage {
  position: relative; justify-self: center; width: min(460px, 100%);
  padding: 22px 22px 0; border-radius: 28px;
  background: radial-gradient(120% 90% at 50% 0%, #165643 0%, var(--pine) 60%);
  box-shadow: 0 40px 80px -40px rgba(14, 59, 46, .6);
  min-height: 560px;
}
.printer { position: relative; height: 26px; border-radius: 13px; background: #082A20; box-shadow: inset 0 2px 4px rgba(0,0,0,.5); }
.slot { position: absolute; left: 50%; top: 11px; width: 74%; height: 4px; transform: translateX(-50%); border-radius: 2px; background: #000; }
.paper-window { position: relative; height: 330px; margin: -12px auto 0; width: 76%; overflow: hidden; }
.receipt {
  position: absolute; left: 0; right: 0; top: 0;
  padding: 26px 18px 30px;
  background: #FDFDFB; color: #2A2F2C;
  font-family: var(--mono); font-size: 12.5px; line-height: 1.55;
  transform: translateY(-100%);
  -webkit-mask: linear-gradient(#000 0 0) top/100% calc(100% - 10px) no-repeat, conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom/16px 10px repeat-x;
          mask: linear-gradient(#000 0 0) top/100% calc(100% - 10px) no-repeat, conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom/16px 10px repeat-x;
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
}
.receipt .c { text-align: center; }
.receipt .b { font-weight: 500; }
.receipt .rule { border-top: 1px dashed #9AA39E; margin: 6px 0; }
.receipt .kv { display: flex; justify-content: space-between; gap: 8px; }
.receipt mark { background: linear-gradient(transparent 12%, var(--hi) 12% 88%, transparent 88%) no-repeat 0 0 / 0% 100%; color: inherit; padding: 0 1px; transition: background-size .35s var(--ease-out); }
.receipt mark.on { background-size: 100% 100%; }
.beam {
  position: absolute; left: -4%; right: -4%; top: 0; height: 3px; opacity: 0;
  background: var(--hi); border-radius: 2px;
  box-shadow: 0 0 14px 4px rgba(255, 225, 77, .65), 0 0 40px 12px rgba(255, 225, 77, .25);
}

.mini-ledger {
  position: absolute; left: 14px; right: 14px; bottom: -34px;
  background: var(--sheet); border-radius: 14px; overflow: hidden;
  box-shadow: var(--shadow-sheet), 0 0 0 1px var(--grid);
  font-size: .8rem;
}
.ml-head, .ml-row, .ml-foot { display: grid; grid-template-columns: 74px 1fr 64px 76px; gap: 8px; padding: 7px 12px; align-items: center; }
.ml-head { background: var(--ledger); color: #fff; font-weight: 650; font-size: .74rem; }
.ml-rows { height: 116px; overflow: hidden; display: flex; flex-direction: column; }
.ml-row { border-bottom: 1px solid var(--grid-2); white-space: nowrap; }
.ml-row span { overflow: hidden; text-overflow: ellipsis; }
.ml-row.new { animation: row-in .7s var(--ease-out); background: linear-gradient(90deg, var(--hi-soft), var(--hi-soft)) no-repeat 0 0 / 100% 100%; }
.ml-row.settle { transition: background-size 1.2s var(--ease-in-out); background-size: 0% 100%; }
.ml-foot { background: var(--grid-2); font-weight: 700; }
.ml-foot span:first-child { grid-column: 1 / 3; }
.r { text-align: right; }
@keyframes row-in { from { opacity: 0; transform: translateY(-100%); } }

@media (max-width: 979px) { .stage { margin-bottom: 40px; } }
@media (max-width: 420px) {
  .stage { min-height: 520px; padding: 16px 14px 0; }
  .paper-window { width: 86%; height: 300px; }
  .ml-head, .ml-row, .ml-foot { grid-template-columns: 66px 1fr 56px 68px; gap: 6px; padding: 7px 10px; }
}

/* Who */
.who-list { list-style: none; padding: 0; margin: 2.2rem 0 0; display: grid; gap: 1.8rem 2rem; }
@media (min-width: 720px) { .who-list { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .who-list { grid-template-columns: repeat(4, 1fr); } }
.who-list li { padding: 1.3rem; border-radius: 18px; background: var(--sheet); box-shadow: var(--shadow-card), 0 0 0 1px var(--line); }
.who-list h3 { margin-bottom: .45rem; }
.who-list p { color: var(--muted); font-size: .97rem; }

/* How */
.how-steps { list-style: none; padding: 0; margin: 2.4rem 0 0; display: grid; gap: 2rem; counter-reset: s; }
@media (min-width: 900px) { .how-steps { grid-template-columns: repeat(3, 1fr); gap: 2.5rem; } }
.how-steps li { position: relative; }
.step-n {
  display: inline-grid; place-items: center; width: 52px; height: 52px; margin-bottom: 1rem;
  border-radius: 50%; background: var(--hi); color: var(--ink);
  font-weight: 800; font-size: 1.3rem;
}
.how-steps h3 { font-size: 1.35rem; margin-bottom: .4rem; }
.how-steps p { color: var(--muted); max-width: 40ch; }

/* Proof */
.proof { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 980px) { .proof { grid-template-columns: .8fr 1.2fr; } }
.ticks { list-style: none; padding: 0; margin: 1.6rem 0 0; display: grid; gap: .8rem; }
.ticks li { position: relative; padding-left: 2rem; color: var(--muted); }
.ticks li::before { content: ''; position: absolute; left: 0; top: .35em; width: 18px; height: 10px; border-left: 3px solid var(--ledger); border-bottom: 3px solid var(--ledger); transform: rotate(-45deg); }
.xl { margin: 0; background: var(--sheet); border: 1px solid #C8D3CC; border-radius: 6px; box-shadow: var(--shadow-sheet); overflow-x: auto; font-family: Arial, Helvetica, sans-serif; font-size: 12.5px; }
.xl-title { background: var(--ledger-title); color: #fff; font-weight: 700; font-size: 14px; padding: 10px 12px; min-width: 620px; }
.xl-grid { min-width: 620px; }
.xl-row { display: grid; grid-template-columns: 40px 88px 1.3fr 1.3fr 70px 64px 74px; border-bottom: 1px solid #D5DED8; }
.xl-row span { padding: 7px 8px; border-right: 1px solid #E3E9E5; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xl-h { background: var(--ledger); color: #fff; font-weight: 700; }
.xl-h span { border-right-color: rgba(255,255,255,.2); }
.xl-flag span:last-child, .xl-flag { background: var(--hi-soft); }
.xl-t { background: #EAEAEA; font-weight: 700; }

/* Features */
.feat { display: grid; gap: 2rem 3rem; margin: 2.4rem 0 0; }
@media (min-width: 760px) { .feat { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1080px) { .feat { grid-template-columns: repeat(3, 1fr); } }
.feat dt { font-weight: 750; font-size: 1.1rem; margin-bottom: .3rem; }
.feat dd { margin: 0; color: var(--muted); }

/* Pricing sheet */
.pricing .lede { margin-top: .8rem; }
.price-sheet { margin-top: 2rem; background: var(--sheet); border-radius: var(--r-l); box-shadow: var(--shadow-sheet), 0 0 0 1px var(--grid); overflow: hidden; }
.ps-row { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr 150px; gap: 12px; align-items: center; padding: 16px 22px; border-bottom: 1px solid var(--grid); }
.ps-row:last-child { border-bottom: 0; }
.ps-h { background: var(--pine); color: #fff; font-weight: 650; font-size: .85rem; padding-top: 12px; padding-bottom: 12px; }
.ps-plan b { font-weight: 800; font-size: 1.2rem; display: block; }
.ps-plan small, .ps-addon small, .ps-quote small { display: block; color: var(--faint); font-size: .82rem; }
.ps-row .big { font-weight: 800; font-size: 1.35rem; }
.ps-row.popular { background: linear-gradient(90deg, rgba(46,125,91,.07), transparent 70%); }
.ps-row .tag { display: inline-block; margin-left: .4rem; padding: 1px 8px; border-radius: 99px; background: var(--ledger); color: #fff; font-size: .72rem; font-weight: 700; vertical-align: 3px; }
.ps-addon { cursor: pointer; background: var(--hi-soft); }
.ps-addon.on { background: var(--hi); }
.ps-quote { background: var(--grid-2); }
.price-flip { display: inline-block; }
.price-flip.bump { animation: bump .45s var(--ease-out); }
@keyframes bump { 40% { transform: translateY(-4px); color: var(--ledger); } }
@media (max-width: 760px) {
  .ps-h { display: none; }
  .ps-row { grid-template-columns: 1fr auto; grid-template-areas: 'plan price' 'meta cta'; row-gap: 6px; padding: 16px; }
  .ps-row > :nth-child(1) { grid-area: plan; }
  .ps-row > :nth-child(2) { grid-area: meta; text-align: left; color: var(--muted); font-size: .9rem; }
  .ps-row > :nth-child(3) { display: none; }
  .ps-row > :nth-child(4) { grid-area: price; }
  .ps-row > :nth-child(5) { grid-area: cta; }
  .ps-addon > :nth-child(2), .ps-quote > :nth-child(2), .ps-quote > :nth-child(4) { display: none; }
}

/* FAQ */
.faq-list { margin-top: 2rem; border-top: 1.5px solid var(--ink); max-width: 860px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 1.1rem 2.5rem 1.1rem 0; font-weight: 700; font-size: 1.08rem; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ''; position: absolute; right: 6px; top: 50%; width: 12px; height: 12px; border-right: 2.5px solid var(--ink); border-bottom: 2.5px solid var(--ink); transform: translateY(-70%) rotate(45deg); transition: transform .3s var(--ease-out); }
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq details p { padding: 0 0 1.2rem; color: var(--muted); max-width: 70ch; }
.faq details[open] p { animation: drop .4s var(--ease-out); }
@keyframes drop { from { opacity: 0; transform: translateY(-6px); } }

/* Closer */
.closer { text-align: left; padding-bottom: 1rem; }
.closer h2 { max-width: 18ch; margin-bottom: 1.6rem; font-size: clamp(1.9rem, 4.4vw, 3.2rem); }

/* Footer */
.foot { margin-top: clamp(4rem, 8vw, 6rem); padding-top: 2rem; padding-bottom: max(2rem, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); display: grid; gap: 1.2rem; }
.foot-brand { display: flex; flex-wrap: wrap; gap: 1.5rem; align-items: center; justify-content: space-between; }
.maker { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--muted); font-size: .9rem; }
.maker img { height: 28px; width: auto; }
.foot-links { display: flex; flex-wrap: wrap; gap: 1.4rem; font-weight: 600; }
.foot-links a { text-decoration: none; color: var(--muted); }
.foot-links a:hover { color: var(--text); }

/* Quote form */
.qform { display: grid; gap: .8rem; margin-top: 1rem; }
.qform .two { display: grid; gap: .8rem; }
@media (min-width: 520px) { .qform .two { grid-template-columns: 1fr 1fr; } }
