/* =========================================================
   Kahel website — styles.css
   Order: tokens, base, layout, components, sections, utilities
   Brand tokens are PROVISIONAL until official assets arrive:
   change the values in :root only.
   ========================================================= */

:root {
  --kahel: #E3711B;          /* sampled from the official logo */
  --kahel-deep: #B54708;
  --kahel-tint: #FFF1E6;
  --ink: #1B2A3A;
  --ink-soft: #4A5A6B;
  --rule: #DCE2E8;
  --paper: #FFFFFF;
  --mist: #F4F6F8;
  --balanced: #1F7A58;
  --due: #B42318;

  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --fs-sm: 0.875rem;
  --fs-base: 1rem;
  --fs-md: 1.125rem;
  --fs-lg: 1.375rem;
  --fs-xl: 1.75rem;
  --fs-2xl: 2.25rem;
  --fs-3xl: 3rem;

  --r-control: 6px;
  --r-panel: 10px;
  --lift: 0 1px 2px rgba(27, 42, 58, .08), 0 8px 24px rgba(27, 42, 58, .06);

  --wrap: 1160px;
  --gutter: 24px;
  --section: 96px;
}

@media (max-width: 760px) {
  :root { --fs-3xl: 2.25rem; --fs-2xl: 1.75rem; --section: 64px; --gutter: 20px; }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--fs-base);
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
}
img, svg { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; font-weight: 800; letter-spacing: -0.015em; }
h1 { font-size: var(--fs-3xl); }
h2 { font-size: var(--fs-2xl); }
h3 { font-size: var(--fs-lg); font-weight: 700; letter-spacing: -0.005em; }
p { margin: 0 0 1em; max-width: 68ch; }
a { color: var(--kahel-deep); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--kahel); outline-offset: 2px; border-radius: 2px; }
.num { font-variant-numeric: tabular-nums lining-nums; }

.skip {
  position: absolute; left: 12px; top: -48px; z-index: 50;
  background: var(--ink); color: var(--paper); padding: 10px 14px; border-radius: var(--r-control);
}
.skip:focus { top: 12px; }

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: var(--section) 0; }
.section--mist { background: var(--mist); }
.section--ink { background: var(--ink); color: var(--paper); }
.section-head { max-width: 720px; margin-bottom: 48px; }
.section-head p { color: var(--ink-soft); font-size: var(--fs-md); }
.section--ink .section-head p { color: #C9D3DD; }

/* ---------- Header ---------- */
.site-header { border-bottom: 1px solid var(--rule); background: var(--paper); position: sticky; top: 0; z-index: 20; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 24px; }
.wordmark { font-weight: 800; font-size: 1.5rem; color: var(--ink); text-decoration: none; letter-spacing: -0.03em; }
.wordmark:hover { color: var(--ink); }
.nav { display: flex; align-items: center; gap: 28px; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 500; font-size: var(--fs-sm); }
.nav a:hover { color: var(--kahel-deep); }
.nav a[aria-current="page"] { color: var(--kahel-deep); }
.nav-toggle { display: none; }

@media (max-width: 900px) {
  .nav-toggle {
    display: inline-flex; align-items: center; gap: 8px;
    background: none; border: 1px solid var(--rule); border-radius: var(--r-control);
    padding: 8px 12px; font: inherit; font-weight: 600; color: var(--ink); cursor: pointer;
  }
  .nav {
    display: none; position: absolute; left: 0; right: 0; top: 68px;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--rule); box-shadow: var(--lift);
    padding: 8px var(--gutter) 20px;
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 14px 0; font-size: var(--fs-base); border-bottom: 1px solid var(--rule); }
  .nav .btn { margin-top: 16px; border-bottom: 0; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 22px; border-radius: var(--r-control);
  font: inherit; font-weight: 700; font-size: var(--fs-base);
  text-decoration: none; cursor: pointer; border: 2px solid transparent;
}
.btn--primary { background: var(--kahel); color: var(--paper); }
.btn--primary:hover { background: var(--kahel-deep); color: var(--paper); }
.btn--secondary { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--secondary:hover { background: var(--ink); color: var(--paper); }
.nav .btn { min-height: 40px; padding: 0 16px; font-size: var(--fs-sm); color: var(--paper); }
.btn[disabled] { opacity: .6; cursor: progress; }

/* ---------- Form chip ---------- */
.chip {
  display: inline-block; padding: 2px 10px; border-radius: 999px;
  background: var(--mist); border: 1px solid var(--rule);
  font-size: var(--fs-sm); font-weight: 600; color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.chip--lit { border-color: var(--kahel); background: var(--kahel-tint); color: var(--kahel-deep); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }

/* ---------- Hero ---------- */
.hero { padding: 72px 0 var(--section); }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: 64px; align-items: center; }
.hero-lede { font-size: var(--fs-md); color: var(--ink-soft); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 16px; }
.hero-note { font-size: var(--fs-sm); color: var(--ink-soft); }
@media (max-width: 900px) { .hero .wrap { grid-template-columns: 1fr; gap: 40px; } .hero { padding-top: 40px; } }

/* Signature: document becomes a balanced entry */
.entry-demo {
  background: var(--paper); border: 1px solid var(--rule); border-radius: var(--r-panel);
  box-shadow: var(--lift); padding: 24px; font-variant-numeric: tabular-nums lining-nums;
}
.doc { border: 1px dashed var(--rule); border-radius: var(--r-control); padding: 16px; margin-bottom: 20px; }
.doc-title { font-weight: 700; margin: 0 0 4px; }
.doc-meta { font-size: var(--fs-sm); color: var(--ink-soft); margin: 0 0 12px; }
.doc-rows { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; font-size: var(--fs-sm); margin: 0; }
.doc-rows dt { color: var(--ink-soft); }
.doc-rows dd { margin: 0; text-align: right; }
.doc-rows .doc-total { font-weight: 700; color: var(--ink); }

.ledger { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.ledger caption { text-align: left; font-weight: 700; padding-bottom: 8px; font-size: var(--fs-base); }
.ledger th { text-align: left; font-weight: 600; color: var(--ink-soft); border-bottom: 1px solid var(--rule); padding: 6px 0; }
.ledger td { padding: 8px 0; border-bottom: 1px solid var(--rule); }
.ledger .amt { text-align: right; width: 22%; }
.ledger .cr-acct { padding-left: 24px; }
.ledger tfoot td { font-weight: 800; border-bottom: 3px double var(--ink); border-top: 1px solid var(--ink); }
.entry-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; flex-wrap: wrap; }
.balanced { display: inline-flex; align-items: center; gap: 6px; color: var(--balanced); font-weight: 700; font-size: var(--fs-sm); }
.balanced svg { width: 18px; height: 18px; }

@media (prefers-reduced-motion: no-preference) {
  .js .entry-demo .line { opacity: 0; transform: translateY(4px); animation: lineIn .35s ease-out forwards; }
  .js .entry-demo .line:nth-child(1) { animation-delay: .6s; }
  .js .entry-demo .line:nth-child(2) { animation-delay: .9s; }
  .js .entry-demo .line:nth-child(3) { animation-delay: 1.2s; }
  .js .entry-demo tfoot, .js .entry-demo .balanced { opacity: 0; animation: lineIn .35s ease-out 1.6s forwards; }
  .js .entry-demo .chip--lit { animation: chipLit .5s ease-out 2s both; }
  @keyframes lineIn { to { opacity: 1; transform: none; } }
  @keyframes chipLit {
    from { background: var(--mist); border-color: var(--rule); color: var(--ink); }
    to { background: var(--kahel-tint); border-color: var(--kahel); color: var(--kahel-deep); }
  }
}

/* ---------- The year's rhythm (a real sequence) ---------- */
.rhythm { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin: 0; padding: 0; list-style: none; counter-reset: step; border-top: 3px solid var(--ink); }
.rhythm > li { padding: 24px 24px 8px 0; border-right: 1px solid var(--rule); }
.rhythm > li + li { padding-left: 24px; }
.rhythm > li:last-child { border-right: 0; }
.rhythm h3 { display: flex; align-items: baseline; gap: 10px; }
.rhythm h3::before { counter-increment: step; content: counter(step); color: var(--kahel-deep); font-size: var(--fs-md); }
.rhythm ul { margin: 0 0 16px; padding-left: 18px; color: var(--ink-soft); }
.rhythm ul li { margin-bottom: 6px; }
@media (max-width: 900px) {
  .rhythm { grid-template-columns: 1fr 1fr; }
  .rhythm > li { border-right: 0; border-bottom: 1px solid var(--rule); padding-left: 0 !important; padding-right: 16px; }
}
@media (max-width: 560px) { .rhythm { grid-template-columns: 1fr; } }

/* ---------- Audience switch + features ---------- */
.switch { display: inline-flex; border: 1px solid var(--rule); border-radius: var(--r-control); padding: 4px; background: var(--paper); margin-bottom: 40px; }
.switch button {
  font: inherit; font-weight: 600; font-size: var(--fs-sm); border: 0; background: none; color: var(--ink-soft);
  padding: 8px 16px; border-radius: 4px; cursor: pointer; min-height: 40px;
}
.switch button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.features { display: grid; grid-template-columns: 1fr 1fr; gap: 48px 64px; }
.feature h3 { margin-bottom: 8px; }
.feature p { color: var(--ink-soft); }
.feature .chips { margin-top: 12px; }
[data-audience="owner"] .for-cpa, [data-audience="cpa"] .for-owner { display: none; }
@media (max-width: 760px) { .features { grid-template-columns: 1fr; gap: 36px; } }

/* ---------- Pricing ---------- */
.plans { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--rule); border-radius: var(--r-panel); background: var(--paper); overflow: hidden; }
.plan { padding: 28px 24px; border-right: 1px solid var(--rule); display: flex; flex-direction: column; }
.plan:last-child { border-right: 0; background: var(--mist); }
.plan h3 { margin-bottom: 4px; }
.price { font-size: var(--fs-xl); font-weight: 800; margin: 8px 0 0; font-variant-numeric: tabular-nums lining-nums; }
.price small { font-size: var(--fs-sm); font-weight: 500; color: var(--ink-soft); }
.limits { list-style: none; padding: 16px 0; margin: 16px 0 24px; border-top: 1px solid var(--rule); border-bottom: 3px double var(--rule); font-size: var(--fs-sm); }
.limits li { display: flex; justify-content: space-between; padding: 4px 0; font-variant-numeric: tabular-nums; }
.plan .btn { margin-top: auto; }
.includes { margin-top: 40px; columns: 2; column-gap: 48px; padding-left: 18px; color: var(--ink-soft); }
.includes li { margin-bottom: 8px; break-inside: avoid; }
@media (max-width: 960px) { .plans { grid-template-columns: 1fr 1fr; } .plan:nth-child(2) { border-right: 0; } .plan:nth-child(-n+2) { border-bottom: 1px solid var(--rule); } }
@media (max-width: 560px) { .plans { grid-template-columns: 1fr; } .plan { border-right: 0; border-bottom: 1px solid var(--rule); } .includes { columns: 1; } }

/* ---------- Data safety ---------- */
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.facts h3 { font-size: var(--fs-md); }
.facts p { color: #C9D3DD; }
@media (max-width: 860px) { .facts { grid-template-columns: 1fr; gap: 28px; } }

/* ---------- FAQ ---------- */
.faq { max-width: 820px; border-top: 1px solid var(--rule); }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary {
  cursor: pointer; list-style: none; padding: 20px 40px 20px 0; position: relative;
  font-weight: 700; font-size: var(--fs-md);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 16px; font-size: 1.5rem; font-weight: 500; color: var(--kahel-deep); }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--ink-soft); padding-bottom: 12px; }

/* ---------- Lead form ---------- */
.signup { display: grid; grid-template-columns: 1fr 1.2fr; gap: 64px; align-items: start; }
@media (max-width: 900px) { .signup { grid-template-columns: 1fr; gap: 32px; } }
.form { background: var(--paper); border: 1px solid var(--rule); border-radius: var(--r-panel); padding: 28px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field--full { grid-column: 1 / -1; }
@media (max-width: 560px) { .form-grid { grid-template-columns: 1fr; } .form { padding: 20px; } }
.field label, .field legend { font-weight: 600; font-size: var(--fs-sm); }
.field input, .field select, .field textarea {
  font: inherit; color: var(--ink); background: var(--paper);
  border: 1px solid #B9C3CD; border-radius: var(--r-control); padding: 11px 12px; min-height: 46px; width: 100%;
}
.field textarea { min-height: 96px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid var(--kahel); outline-offset: 0; border-color: var(--kahel); }
.field [aria-invalid="true"] { border-color: var(--due); }
.field-error { color: var(--due); font-size: var(--fs-sm); min-height: 0; margin: 0; }
.radios { display: flex; flex-wrap: wrap; gap: 8px 20px; border: 0; padding: 0; margin: 0; }
.radios label { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; font-size: var(--fs-base); }
.radios input { width: 18px; height: 18px; min-height: 0; accent-color: var(--kahel); }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: var(--fs-sm); color: var(--ink-soft); }
.consent input { width: 18px; height: 18px; margin-top: 2px; flex: none; accent-color: var(--kahel); }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin: 16px 0 0; font-weight: 600; }
.form-status.is-ok { color: var(--balanced); }
.form-status.is-error { color: var(--due); }
.form .btn { margin-top: 20px; width: 100%; }

/* ---------- CTA band ---------- */
.cta-band { text-align: center; }
.cta-band p { margin-left: auto; margin-right: auto; color: #C9D3DD; }
.cta-band .hero-actions { justify-content: center; }
.section--ink .btn--secondary { color: var(--paper); border-color: var(--paper); }
.section--ink .btn--secondary:hover { background: var(--paper); color: var(--ink); }

/* ---------- Prose pages ---------- */
.prose { max-width: 760px; }
.prose h2 { font-size: var(--fs-xl); margin-top: 40px; }
.prose ul { padding-left: 20px; }
.prose li { margin-bottom: 6px; }
.notice { background: var(--kahel-tint); border-left: 4px solid var(--kahel); padding: 14px 16px; border-radius: 4px; margin: 0 0 24px; }

/* ---------- Two-column list (accountants) ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px 64px; }
.split p { color: var(--ink-soft); }
@media (max-width: 760px) { .split { grid-template-columns: 1fr; gap: 32px; } }
.checks { counter-reset: chk; list-style: none; padding: 0; margin: 0; border-top: 3px solid var(--ink); }
.checks li { padding: 14px 0 14px 40px; border-bottom: 1px solid var(--rule); position: relative; }
.checks li::before { counter-increment: chk; content: counter(chk); position: absolute; left: 0; top: 14px; font-weight: 800; color: var(--kahel-deep); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--rule); padding: 48px 0 32px; font-size: var(--fs-sm); color: var(--ink-soft); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
.site-footer h2 { font-size: var(--fs-base); color: var(--ink); }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { color: var(--ink-soft); }
.site-footer a:hover { color: var(--kahel-deep); }
.footer-base { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--rule); }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > div:first-child { grid-column: 1 / -1; } }

[hidden] { display: none !important; }

.hero-solo { display: block !important; }

/* Mobile fit for the hero entry */
.entry-demo { margin: 0; }
.ledger .amt { padding-left: 12px; white-space: nowrap; }
@media (max-width: 560px) {
  .entry-demo { padding: 16px; }
  .doc { padding: 12px; }
  .ledger { font-size: 0.8125rem; }
  .ledger .cr-acct { padding-left: 12px; }
}
.footer-base { max-width: none; }
.site-footer .wordmark { color: var(--ink); }
fieldset.field { border: 0; padding: 0; margin: 0; min-width: 0; }
section[id] { scroll-margin-top: 76px; }

/* Logo: shown at a fixed height, width follows the file's shape */
.logo { height: 40px; width: auto; max-width: 180px; object-fit: contain; }
.site-footer .logo { height: 40px; margin-bottom: 12px; }
@media (max-width: 560px) { .logo { height: 34px; } }

/* ---------- Header Login button ---------- */
.nav .btn--secondary { color: var(--ink); }
.nav .btn--secondary:hover { color: var(--paper); }

/* ---------- Pro lifetime offer ---------- */
.offer { margin-top: 14px; padding: 12px; background: var(--kahel-tint); border: 1px solid var(--kahel); border-radius: var(--r-control); }
.offer-title { margin: 0 0 8px; font-size: var(--fs-sm); font-weight: 700; color: var(--kahel-deep); }
.meter { height: 8px; background: var(--paper); border-radius: 999px; overflow: hidden; border: 1px solid var(--rule); }
.meter span { display: block; height: 100%; background: var(--kahel); }
.offer-count { margin: 6px 0 0; font-size: var(--fs-sm); font-weight: 600; }
.plan .limits { margin-top: 14px; }

/* ---------- Get access steps (a real sequence) ---------- */
.steps { list-style: none; counter-reset: s; padding: 0; margin: 32px auto 8px; max-width: 960px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; text-align: left; }
.steps li { counter-increment: s; border-top: 3px solid var(--kahel); padding-top: 14px; color: #C9D3DD; }
.steps li::before { content: counter(s); display: block; font-weight: 800; font-size: var(--fs-lg); color: var(--paper); margin-bottom: 4px; }
.steps strong { color: var(--paper); display: block; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }

/* ---------- Product tour ---------- */
.tour-hero { padding-bottom: 48px; }
.tour-nav { margin-top: 24px; }
.tour-nav .chip { text-decoration: none; padding: 6px 14px; }
.tour-nav .chip:hover { border-color: var(--kahel); color: var(--kahel-deep); }
.tour-item { padding: 40px 0; border-top: 1px solid var(--rule); }
.tour-item:first-of-type { border-top: 0; padding-top: 16px; }
.tour-text { max-width: 720px; margin-bottom: 20px; }
.tour-text h3 { margin-bottom: 8px; }
.tour-text p { color: var(--ink-soft); margin-bottom: 10px; }
.shot { margin: 0; padding: 16px; background: var(--paper); border: 1px solid var(--rule); border-radius: var(--r-panel); box-shadow: var(--lift); }
.section:not(.section--mist) .shot { background: var(--mist); }
.shot a { display: block; cursor: zoom-in; }
.shot img { display: block; width: 100%; height: auto; margin: 0 auto; border: 1px solid var(--rule); border-radius: 6px; background: var(--paper); }
.tour-link { margin: 40px 0 0; font-weight: 600; }
@media (max-width: 760px) {
  .shot { padding: 8px; }
  .shot::after { content: "Tap to enlarge"; display: block; text-align: center; font-size: var(--fs-sm); color: var(--ink-soft); margin-top: 6px; }
}

/* Struck-through annual plan next to the lifetime offer */
.price s { color: var(--ink-soft); text-decoration-thickness: 1.5px; }
.price [data-term] { color: var(--kahel-deep); font-weight: 700; }
.price small { display: block; margin-top: 2px; font-size: var(--fs-sm); }
