/* ============================================================
   Fiscalina landing — "the page runs on a ledger"
   Palette from the logo: navy ink, teal, paper white, ledger red.
   Type: Bricolage Grotesque (display) · Public Sans (body) · IBM Plex Mono (figures)
   ============================================================ */

@font-face {
  font-family: 'Bricolage Grotesque';
  src: url('/assets/landing/fonts/bricolage-var.woff2') format('woff2');
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: 'Public Sans';
  src: url('/assets/landing/fonts/publicsans-var.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('/assets/landing/fonts/plexmono-400.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('/assets/landing/fonts/plexmono-500.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('/assets/landing/fonts/plexmono-600.woff2') format('woff2');
  font-weight: 600;
  font-display: swap;
}

:root {
  --ink: #13293f;
  --ink-soft: #3d5568;
  --ink-faint: #6b8093;
  --navy: #1a4469;
  --navy-deep: #12314d;
  --teal: #379ca3;
  --teal-deep: #26767c;
  --teal-tint: #e9f5f6;
  --paper: #f7f9fa;
  --card: #ffffff;
  --rule: #d9e2e8;
  --rule-soft: #e7edf1;
  --red-ink: #b23a2e;
  --shadow-lg: 0 24px 60px -18px rgba(19, 41, 63, 0.28);
  --shadow-md: 0 10px 30px -12px rgba(19, 41, 63, 0.22);
  --font-display: 'Bricolage Grotesque', 'Public Sans', system-ui, sans-serif;
  --font-body: 'Public Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, 'Cascadia Mono', monospace;
  --shell: 1160px;
}

/* ---------- reset-lite ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.08; margin: 0 0 0.5em; letter-spacing: -0.015em; }
h2 { font-size: clamp(1.9rem, 3.4vw, 2.7rem); font-weight: 700; }
h3 { font-size: 1.12rem; font-weight: 650; }
p { margin: 0 0 1em; }
a { color: var(--teal-deep); }
button { font: inherit; }
.mono { font-family: var(--font-mono); font-size: 0.82em; letter-spacing: 0.01em; }
:focus-visible { outline: 2.5px solid var(--teal); outline-offset: 3px; border-radius: 3px; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

.shell { max-width: var(--shell); margin: 0 auto; padding: 0 28px; }

/* ---------- the ledger margin rule (the signature) ----------
   A thin red vertical, like the margin line on ledger paper, runs down the
   left of every content column; account-code eyebrows hang against it. */
.ledger { position: relative; }
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal-deep);
  margin: 0 0 14px;
}
.eyebrow.light { color: #8fd0d4; }
@media (min-width: 1024px) {
  .ledger { border-left: 1px solid rgba(178, 58, 46, 0.38); padding-left: 34px; }
  .ledger .eyebrow { position: relative; }
  .ledger .eyebrow::before {
    content: '';
    position: absolute; left: -38px; top: 50%;
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--paper);
    border: 2px solid rgba(178, 58, 46, 0.55);
    transform: translateY(-50%);
  }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1.5px solid transparent; border-radius: 10px;
  padding: 10px 20px; font-weight: 600; font-size: 0.98rem;
  text-decoration: none; cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--navy); color: #fff; box-shadow: 0 6px 18px -8px rgba(26, 68, 105, 0.7); }
.btn-primary:hover { background: var(--navy-deep); box-shadow: 0 10px 24px -8px rgba(26, 68, 105, 0.75); }
.btn-ghost { background: transparent; color: var(--navy); border-color: var(--rule); }
.btn-ghost:hover { border-color: var(--navy); }
.btn-light { background: #fff; color: var(--navy-deep); }
.btn-light:hover { background: var(--teal-tint); }
.btn-lg { padding: 14px 28px; font-size: 1.05rem; border-radius: 12px; }
.btn-block { width: 100%; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(247, 249, 250, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.nav.is-scrolled { border-color: var(--rule-soft); box-shadow: 0 6px 24px -18px rgba(19, 41, 63, 0.4); }
.nav-inner {
  max-width: var(--shell); margin: 0 auto; padding: 14px 28px;
  display: flex; align-items: center; gap: 28px;
}
.nav-logo img { width: 150px; height: auto; }
.nav-links { display: flex; gap: 26px; margin-left: 12px; }
.nav-links a {
  color: var(--ink-soft); text-decoration: none; font-weight: 550; font-size: 0.95rem;
  border-bottom: 2px solid transparent; padding-bottom: 2px;
}
.nav-links a:hover { color: var(--navy); border-bottom-color: var(--teal); }
.nav-actions { margin-left: auto; display: flex; gap: 12px; align-items: center; }
@media (max-width: 760px) {
  .nav-links { display: none; }
  .nav-logo img { width: 124px; }
}

/* ---------- hero ---------- */
.hero { padding: 74px 0 36px; overflow: clip; }
.hero-eyebrow { margin-bottom: 20px; }
.hero-title {
  font-size: clamp(2.5rem, 6vw, 4.35rem);
  font-weight: 750;
  letter-spacing: -0.025em;
  margin-bottom: 22px;
}
.hero-sub { max-width: 620px; font-size: 1.16rem; color: var(--ink-soft); margin-bottom: 30px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.hero-note { color: var(--ink-faint); font-size: 0.8rem; }

.hero-stage { position: relative; max-width: 1240px; margin: 46px auto 0; padding: 0 28px; }
.hero-shot { box-shadow: var(--shadow-lg); }
.hero-chip {
  position: absolute; border-radius: 10px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--rule-soft);
  background: #fff;
}
.chip-timer { width: clamp(180px, 18vw, 258px); top: 34%; right: -14px; }
.chip-card { width: clamp(200px, 21vw, 288px); bottom: 10%; left: -6px; }
@media (max-width: 760px) { .hero-chip { display: none; } .hero { padding-top: 48px; } }

/* browser frame */
.browser-frame {
  margin: 0; border-radius: 14px; overflow: hidden;
  border: 1px solid var(--rule);
  background: #fff;
}
.browser-bar {
  display: flex; align-items: center; gap: 7px;
  padding: 10px 14px; background: #eef2f5; border-bottom: 1px solid var(--rule-soft);
}
.browser-bar .dot { width: 10px; height: 10px; border-radius: 50%; background: #cdd8df; }
.browser-url {
  margin-left: 12px; font-size: 0.72rem; color: var(--ink-faint);
  background: #fff; border: 1px solid var(--rule-soft); border-radius: 6px; padding: 2px 12px;
}

/* proof strip */
.proof {
  display: flex; flex-wrap: wrap; gap: 10px 38px;
  margin-top: 44px; padding: 18px 0 10px;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule-soft);
  padding-bottom: 16px;
  color: var(--ink-soft); font-size: 0.85rem;
}
.proof-item b { color: var(--navy); font-weight: 600; font-variant-numeric: tabular-nums; }
.proof-caption { margin-top: 10px; font-size: 0.82rem; color: var(--ink-faint); }

/* ---------- features ---------- */
.tour-anchor { scroll-margin-top: 90px; }
.feature { padding: 84px 0; }
.feature.alt { background: #fff; border-top: 1px solid var(--rule-soft); border-bottom: 1px solid var(--rule-soft); }
.feature.alt .ledger .eyebrow::before { background: #fff; }
.split { display: grid; grid-template-columns: minmax(320px, 5fr) 7fr; gap: 54px; align-items: center; }
.split.flip { grid-template-columns: 7fr minmax(320px, 5fr); }
.split.flip .feature-copy { order: 2; }
.split.flip .feature-shot { order: 1; }
@media (max-width: 980px) {
  .split, .split.flip { grid-template-columns: 1fr; gap: 30px; }
  .split.flip .feature-copy { order: 1; }
  .split.flip .feature-shot { order: 2; }
  .feature { padding: 56px 0; }
}
.feature-copy p { color: var(--ink-soft); }
.feature-shot { box-shadow: var(--shadow-md); }
.ticks { list-style: none; margin: 18px 0 0; padding: 0; }
.ticks li {
  position: relative; padding: 7px 0 7px 30px; color: var(--ink-soft);
  border-bottom: 1px solid var(--rule-soft); font-size: 0.97rem;
}
.ticks li:last-child { border-bottom: 0; }
.ticks li::before {
  content: '✓'; position: absolute; left: 4px; top: 7px;
  color: var(--teal); font-weight: 700;
}
.mini-chip { margin: 22px 0 0; }
.mini-chip img {
  border: 1px solid var(--rule-soft); border-radius: 10px; box-shadow: var(--shadow-md); background: #fff;
}

/* ---------- designer band ---------- */
.band { padding: 90px 0; background: linear-gradient(180deg, var(--teal-tint), var(--paper) 85%); }
.band-head { max-width: 640px; }
.band-sub { color: var(--ink-soft); }
.band-shot { margin-top: 34px; box-shadow: var(--shadow-lg); }

/* ---------- detail grid ---------- */
.grid-section { padding: 88px 0 70px; }
.detail-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; margin-top: 34px;
}
@media (max-width: 980px) { .detail-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .detail-grid { grid-template-columns: 1fr; } }
.detail-card {
  background: #fff; border: 1px solid var(--rule-soft); border-radius: 14px; overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.detail-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.detail-card img { height: 168px; width: 100%; object-fit: cover; object-position: top center; border-bottom: 1px solid var(--rule-soft); }
.detail-card h3 { margin: 16px 18px 6px; }
.detail-card p { margin: 0 18px 18px; font-size: 0.9rem; color: var(--ink-soft); }

/* ---------- photo band ---------- */
.photo-band { position: relative; overflow: hidden; }
.photo-band img { width: 100%; height: 420px; object-fit: cover; object-position: center 40%; }
.photo-band::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(18, 49, 77, 0.88) 20%, rgba(18, 49, 77, 0.45) 65%, rgba(18, 49, 77, 0.25));
}
.photo-quote {
  position: absolute; inset: 0; z-index: 2;
  display: flex; align-items: center;
  max-width: var(--shell); margin: 0 auto; padding: 0 28px;
}
.photo-quote p {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.6vw, 1.9rem);
  font-weight: 600; line-height: 1.35; color: #fff; max-width: 640px;
  text-wrap: balance;
}

/* ---------- pricing invoice ---------- */
.pricing { padding: 96px 0; }
.pricing-sub { color: var(--ink-soft); max-width: 560px; }
.invoice-doc {
  margin-top: 38px;
  background: #fffdf8; /* ledger paper, faintly warm */
  border: 1px solid #e5ddcb;
  border-radius: 6px;
  box-shadow: var(--shadow-lg);
  padding: clamp(24px, 4.5vw, 52px);
  max-width: 760px;
}
.invoice-head { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; margin-bottom: 30px; }
.invoice-head img { margin-bottom: 12px; }
.invoice-title {
  font-family: var(--font-display); font-size: 2rem; font-weight: 800;
  letter-spacing: 0.06em; margin: 0 0 8px; color: var(--navy);
  border-bottom: 3px double var(--navy); padding-bottom: 4px;
}
.invoice-right { text-align: right; }
.invoice-meta { color: var(--ink-faint); font-size: 0.72rem; line-height: 1.7; margin: 0; }
.invoice-firm { color: var(--ink); }

.plan-toggle {
  display: inline-flex; border: 1px solid #d8cfb8; border-radius: 10px; overflow: hidden; margin-bottom: 22px;
  background: #f4efe3;
}
.toggle-btn {
  border: 0; background: transparent; padding: 9px 18px; cursor: pointer;
  font-weight: 600; font-size: 0.92rem; color: var(--ink-soft);
}
.toggle-btn.is-active { background: var(--navy); color: #fff; }

.invoice-table { width: 100%; border-collapse: collapse; }
.invoice-table th {
  text-align: left; font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--ink-faint); font-weight: 600;
  border-bottom: 2px solid var(--ink); padding: 8px 4px;
}
.invoice-table th.num, .invoice-table td.num { text-align: right; }
.invoice-table tbody td {
  padding: 12px 4px; border-bottom: 1px solid #e8e1cf; font-size: 0.98rem; color: var(--ink-soft);
}
.invoice-table td.mono { font-variant-numeric: tabular-nums; color: var(--ink); }
.invoice-table .credit td { color: var(--red-ink); }
.invoice-table .credit td.mono { color: var(--red-ink); font-weight: 500; }
.total-row td {
  padding: 16px 4px 6px; font-weight: 700; color: var(--ink); font-size: 1.05rem;
}
.total-row .total-amount {
  font-size: 1.2rem; font-weight: 600;
  border-bottom: 3px double var(--ink); /* the accountant's total rule */
  padding-bottom: 6px;
}
.invoice-foot { margin-top: 30px; display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.invoice-small { flex: 1 1 260px; font-size: 0.8rem; color: var(--ink-faint); margin: 0; }
.pricing-fine { margin-top: 26px; color: var(--ink-faint); font-size: 0.78rem; }

/* posting animation for swapped plan lines */
.invoice-table.posting tbody tr, .invoice-table.posting tfoot tr { animation: post-line 0.45s ease both; }
.invoice-table.posting tbody tr:nth-child(2) { animation-delay: 0.06s; }
.invoice-table.posting tbody tr:nth-child(3) { animation-delay: 0.12s; }
.invoice-table.posting tbody tr:nth-child(4) { animation-delay: 0.18s; }
.invoice-table.posting tfoot tr { animation-delay: 0.26s; }
@keyframes post-line {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: none; }
}

/* ---------- faq ---------- */
.faq { padding: 20px 0 96px; }
.faq-list { max-width: 760px; margin-top: 26px; }
.faq-list details {
  background: #fff; border: 1px solid var(--rule-soft); border-radius: 12px;
  padding: 4px 22px; margin-bottom: 12px;
}
.faq-list summary {
  cursor: pointer; font-weight: 600; padding: 14px 0; list-style: none; position: relative; padding-right: 34px;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: '+'; position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  font-family: var(--font-mono); font-size: 1.2rem; color: var(--teal-deep);
  transition: transform 0.2s ease;
}
.faq-list details[open] summary::after { content: '−'; }
.faq-list details p { color: var(--ink-soft); padding-bottom: 16px; margin: 0; font-size: 0.97rem; }

/* ---------- cta band + footer ---------- */
.cta-band {
  background: var(--navy-deep);
  color: #fff; padding: 92px 0; text-align: left;
  background-image: radial-gradient(1000px 380px at 85% -10%, rgba(55, 156, 163, 0.28), transparent 70%);
}
.cta-band h2 { color: #fff; font-size: clamp(2rem, 4vw, 3rem); }
.cta-sub { color: #b5c8d6; max-width: 520px; margin-bottom: 28px; }

.footer { background: var(--navy-deep); color: #b5c8d6; border-top: 1px solid rgba(255, 255, 255, 0.08); }
.footer-inner { display: flex; justify-content: space-between; gap: 30px; padding-top: 44px; padding-bottom: 26px; flex-wrap: wrap; }
.footer-tag { margin-top: 12px; font-size: 0.9rem; color: #8aa3b5; }
.footer-links { display: flex; gap: 24px; align-items: flex-start; flex-wrap: wrap; }
.footer-links a { color: #cfdde7; text-decoration: none; font-size: 0.92rem; }
.footer-links a:hover { color: #fff; text-decoration: underline; }
.footer-fine { text-align: center; padding: 18px 28px 30px; font-size: 0.7rem; color: #6d8699; margin: 0; }

/* ---------- modal ---------- */
.modal { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 20px; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(18, 49, 77, 0.55); backdrop-filter: blur(3px); }
.modal-card {
  position: relative; z-index: 2; width: min(440px, 100%);
  background: #fff; border-radius: 16px; padding: 30px 30px 24px;
  box-shadow: var(--shadow-lg);
  animation: modal-in 0.28s cubic-bezier(0.2, 0.9, 0.3, 1.05) both;
}
@keyframes modal-in { from { opacity: 0; transform: translateY(14px) scale(0.98); } }
.modal-x {
  position: absolute; top: 12px; right: 14px; border: 0; background: none;
  font-size: 1.5rem; line-height: 1; color: var(--ink-faint); cursor: pointer; padding: 6px;
}
.modal-card h3 { font-size: 1.45rem; margin-bottom: 6px; }
.modal-sub { color: var(--ink-soft); font-size: 0.92rem; margin-bottom: 18px; }
.modal-card label { display: block; font-weight: 600; font-size: 0.85rem; margin-bottom: 14px; }
.modal-card input {
  display: block; width: 100%; margin-top: 5px;
  border: 1.5px solid var(--rule); border-radius: 9px; padding: 10px 12px;
  font: inherit; font-weight: 400; color: var(--ink); background: #fff;
}
.modal-card input:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(55, 156, 163, 0.18); }
.form-error {
  background: #fdeeec; color: var(--red-ink); border: 1px solid #f2c9c3;
  border-radius: 8px; padding: 9px 12px; font-size: 0.85rem;
}
.modal-fine { text-align: center; font-size: 0.85rem; color: var(--ink-faint); margin: 14px 0 0; }

/* ---------- reveal-on-scroll ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.65s ease, transform 0.65s cubic-bezier(0.2, 0.7, 0.3, 1); }
.reveal.d1 { transition-delay: 0.08s; }
.reveal.d2 { transition-delay: 0.16s; }
.reveal.d3 { transition-delay: 0.24s; }
.reveal.d4 { transition-delay: 0.32s; }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  [data-parallax] { transform: none !important; }
  .invoice-table.posting tbody tr, .invoice-table.posting tfoot tr { animation: none; }
  .modal-card { animation: none; }
  .detail-card, .btn { transition: none; }
}
