/*
 * Intelli-Accounting marketing site.
 *
 * Colours are the brand tokens (branding/brand-tokens.css) — cream ledger paper, steel blue,
 * brick — kept in sync by hand because this page ships without a build step. One stylesheet, no
 * framework, no external requests: the page holds nothing that would need a cookie banner, and it
 * loads on a bad connection in a Karoo dorp, which is the actual audience.
 *
 * Dark mode follows the reader's own setting. In the product itself the dark theme is a paid
 * entitlement; on a public page that would be silly, so it is simply respected here.
 */

:root {
  --surface:      #F0E4CE;
  --surface-2:    #E5D6B8;
  --paper:        #FBF5E9;
  --ink:          #2A2522;
  --ink-dim:      #6B5E50;
  --accent:       #3F5A78;
  --accent-deep:  #2C455F;
  --brick:        #A03A2E;
  --success:      #2A6B4A;
  --line:         rgba(42, 37, 34, .14);
  --shadow:       0 1px 2px rgba(42, 37, 34, .06), 0 8px 24px rgba(42, 37, 34, .07);
  --measure:      68ch;
}

@media (prefers-color-scheme: dark) {
  :root {
    --surface:     #23201E;
    --surface-2:   #2E2A27;
    --paper:       #1B1917;
    --ink:         #ECE6DC;
    --ink-dim:     #9A8F80;
    --accent:      #C97864;
    --accent-deep: #E0A392;
    --brick:       #D67860;
    --success:     #6BC09A;
    --line:        rgba(236, 230, 220, .16);
    --shadow:      0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .35);
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 clamp(1rem, 0.96rem + 0.2vw, 1.075rem)/1.65 ui-sans-serif, system-ui, -apple-system,
        "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 { line-height: 1.2; letter-spacing: -0.015em; margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: clamp(2.1rem, 1.5rem + 3vw, 3.4rem); letter-spacing: -0.03em; }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2.1rem); }
h3 { font-size: 1.1rem; }
p  { margin: 0 0 1em; max-width: var(--measure); }

a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-deep); }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: .6rem 1rem;
  z-index: 10;
}
.skip:focus { left: 0; }

.wrap { width: min(72rem, 100% - 2.5rem); margin-inline: auto; }
.wrap.narrow { width: min(48rem, 100% - 2.5rem); }

/* ---- header ---- */
header.site {
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  position: sticky;
  top: 0;
  backdrop-filter: blur(8px);
  z-index: 5;
}
.bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .7rem 0; }
.brand { display: inline-flex; align-items: center; gap: .6rem; color: inherit; text-decoration: none; font-size: 1.05rem; }
.brand img { display: block; }
.brand b { font-weight: 700; }
.bar nav { display: flex; align-items: center; gap: 1.25rem; font-size: .95rem; }
.bar nav a { text-decoration: none; color: var(--ink-dim); }
.bar nav a:hover { color: var(--ink); }
.cta-small {
  background: var(--accent);
  color: #fff !important;
  padding: .45rem .85rem;
  border-radius: 7px;
  font-weight: 600;
}
.cta-small:hover { background: var(--accent-deep); }
@media (max-width: 34rem) {
  .bar nav a:not(.cta-small) { display: none; }
}

/* ---- hero ---- */
.hero { padding: clamp(3rem, 8vw, 6rem) 0 clamp(2.5rem, 6vw, 4.5rem); }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .76rem;
  font-weight: 700;
  color: var(--brick);
  margin-bottom: 1rem;
}
.lede { font-size: clamp(1.1rem, 1rem + .5vw, 1.3rem); color: var(--ink-dim); max-width: 58ch; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.75rem 0 1rem; }

.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  padding: .7rem 1.3rem;
  border-radius: 8px;
  box-shadow: var(--shadow);
}
.btn:hover { background: var(--accent-deep); color: #fff; }
.btn.ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: none;
}
.btn.ghost:hover { background: var(--surface-2); color: var(--ink); }

.fine { font-size: .87rem; color: var(--ink-dim); max-width: 60ch; }

/* ---- bands ---- */
.band { padding: clamp(2.5rem, 6vw, 4.5rem) 0; border-top: 1px solid var(--line); }
.band.alt { background: var(--surface); }
.section-lede { color: var(--ink-dim); margin-bottom: 2rem; }

.cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.25rem;
  /* Six cards: capped at three across so they land as two even rows rather than 4 + 2. */
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
}
@media (min-width: 62rem) {
  .cards { grid-template-columns: repeat(3, 1fr); }
}
.cards li {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.35rem 1.4rem;
  box-shadow: var(--shadow);
}
.cards h3 { color: var(--accent); }
.cards p { margin: 0; color: var(--ink-dim); font-size: .97rem; }

/* ---- honest section ---- */
.two { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr)); margin-bottom: 1.5rem; }
.two h3 { display: flex; align-items: center; gap: .5rem; }
.ok::before    { content: "✓"; color: var(--success); font-weight: 700; }
.todo::before  { content: "◌"; color: var(--brick); font-weight: 700; }

.ticks { list-style: none; margin: 0; padding: 0; }
.ticks li {
  padding: .5rem 0 .5rem 1.4rem;
  border-bottom: 1px solid var(--line);
  position: relative;
  font-size: .96rem;
  color: var(--ink-dim);
}
.ticks li::before { content: "—"; position: absolute; left: 0; color: var(--line); }
.ticks li:last-child { border-bottom: 0; }
.todo-list b { color: var(--ink); }

/* ---- call to action ---- */
.band.cta { background: var(--surface); }
.band.cta .actions { margin-bottom: 1rem; }

/* ---- footer ---- */
footer.site { border-top: 1px solid var(--line); padding: 2rem 0 3rem; }
.foot p { margin: 0 0 .35rem; }

@media print {
  header.site, .actions, .skip { display: none; }
  body { background: #fff; color: #000; }
}

/* ---------------------------------------------------------------------------
   FAQ. Native <details> rather than a scripted accordion: no JavaScript, works
   with keyboard and with the browser's own find-in-page, and degrades to plain
   visible text if anything about the CSS fails to load.
   --------------------------------------------------------------------------- */
.faq { margin-top: 1.5rem; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer;
  padding: .95rem 2rem .95rem 0;
  font-weight: 600;
  color: var(--ink);
  list-style: none;
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  position: absolute;
  right: .4rem;
  top: 1.35rem;
  width: .55rem;
  height: .55rem;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(45deg);
  transition: transform .18s ease;
}
.faq details[open] summary::after { transform: rotate(-135deg); }
.faq summary:hover { color: var(--accent); }
.faq summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.faq details > p {
  margin: 0 0 .9rem;
  color: var(--ink-dim);
  padding-right: 2rem;
}
.faq details > p:last-child { padding-bottom: .4rem; }
@media (prefers-reduced-motion: reduce) {
  .faq summary::after { transition: none; }
}

/* ---------------------------------------------------------------------------
   Pilot offer + form.
   --------------------------------------------------------------------------- */
.offer {
  border: 1px solid var(--line);
  border-left: 3px solid var(--success);
  background: var(--paper);
  padding: 1.1rem 1.3rem;
  margin: 0 0 1.6rem;
  border-radius: 2px;
}
.offer-lead { margin: 0 0 .6rem; font-size: 1.08rem; }
.offer-fine { margin: 0; font-size: .92rem; color: var(--ink-dim); }

.pform { margin: 1.6rem 0 1rem; max-width: 34rem; }
.pf-row { display: flex; flex-direction: column; gap: .35rem; margin-bottom: 1rem; }
.pf-row label { font-weight: 600; font-size: .92rem; }
.pform input[type="text"],
.pform input[type="email"],
.pform textarea {
  font: inherit;
  font-size: .96rem;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: .6rem .7rem;
  width: 100%;
}
.pform textarea { resize: vertical; }
.pform input:focus-visible,
.pform textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}
.pf-row.pf-inline { flex-direction: row; align-items: center; gap: .55rem; }
.pf-row.pf-inline label { font-weight: 400; }
.pf-row.pf-inline input { accent-color: var(--accent); width: 1rem; height: 1rem; }

/* Off-screen rather than display:none - bots increasingly skip hidden fields. */
.pf-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.pform button[disabled] { opacity: .6; cursor: progress; }
.pf-status { margin: .7rem 0 0; font-size: .93rem; min-height: 1.3em; }
.pf-status.err { color: var(--brick); }
.pf-status.ok  { color: var(--success); font-weight: 600; }
.cf-turnstile { margin: .3rem 0 1rem; }

/* The eligibility answer is the only FAQ item with a list in it. */
.faq details ul {
  margin: 0 0 .9rem;
  padding-left: 1.15rem;
  color: var(--ink-dim);
}
.faq details ul li { margin-bottom: .4rem; }
