/* Homepage (website/home.ts): hero with the quote being written, steps, demo frame, navy band, tools, FAQ and closing call. Tokens and the header, footer and buttons are in site.css. */
.home { --wrap: 1240px; --orange-soft: #FFF1D6; --sheet-shadow: 0 1px 2px rgba(0,0,0,.05), 0 18px 50px -20px rgba(20,33,61,.25); }
.home .wrap { padding: 0 clamp(16px, 3vw, 40px); }
/* Top-level sections only: the demo's quote document is a <section> too and must not get this padding. */
/* Anchors land with the heading 24px under the 68px sticky header: header + 24 - section padding. */
.home main > section { padding: 84px 0; scroll-margin-top: 8px; }
.home .kicker { font: 600 13px/1.3 Inter, sans-serif; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
.home h2 { font-size: clamp(30px, 3.6vw, 44px); line-height: 1.08; max-width: 18em; text-wrap: balance; }
.home-lead { font-size: 19px; color: var(--muted); max-width: 34em; margin: 22px 0 28px; }

/* hero */
.home-hero { padding: 56px 0 72px; overflow-x: clip; }
.home-hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.home-eyebrow { display: inline-flex; align-items: center; gap: 8px; font: 600 13px/1.3 Inter, sans-serif; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 0 0 18px; }
.home-eyebrow i { width: 8px; height: 8px; border-radius: 50%; background: var(--orange); flex: none; }
.home h1 { font-size: clamp(40px, 5.6vw, 68px); line-height: 1.02; }
.home h1 .u { white-space: nowrap; background: linear-gradient(var(--orange), var(--orange)) 0 100% / 0 .09em no-repeat; padding-bottom: .04em; animation: home-underline .7s .35s cubic-bezier(.4,0,.2,1) forwards; }
@keyframes home-underline { to { background-size: 100% .09em; } }
.home-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.home-hero .home-lead { margin-top: 30px; }
.home-hero .fine { margin-top: 16px; max-width: 34em; }

/* the quote being written: lines fade up one after the other, the status in the header turns from "writing" to "ready" (about 3.5 s, plays once; the markup is the finished state) */
.home-sheet-wrap { position: relative; }
.sheet { position: relative; background: var(--surface); border-radius: 18px; box-shadow: var(--sheet-shadow); padding: 24px; font-size: 14.5px; line-height: 1.5; }
.sheet-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 10px 12px; border-bottom: 1px solid var(--line); padding-bottom: 14px; margin-bottom: 12px; }
.sheet-head > div:first-child { flex: 1 1 150px; }
.sheet-head b { font: 600 18px Outfit, sans-serif; color: var(--navy); }
.sheet-head small { display: block; color: var(--muted); font-size: 13px; }
.sheet-line { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; padding: 9px 0; border-bottom: 1px dashed var(--line); }
.sheet-line .t { display: block; font-weight: 600; color: var(--navy); }
.sheet-line .s { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.sheet-line .p { font-variant-numeric: tabular-nums; font-weight: 600; text-align: right; white-space: nowrap; color: var(--navy); }
.src { display: inline-block; font-size: 11px; border-radius: 6px; padding: 1px 6px; background: var(--navy-soft); color: var(--navy-2); }
.sheet-status { display: grid; justify-items: end; flex: none; font: 600 12px/1.2 Inter, sans-serif; white-space: nowrap; }
.sheet-status > span { grid-area: 1 / 1; display: inline-flex; align-items: center; gap: 8px; border-radius: 99px; padding: 6px 12px; min-height: 28px; }
.st-writing { background: var(--paper); color: var(--muted); opacity: 0; visibility: hidden; }
.sheet[data-play] .st-writing { animation: home-writing 3.2s both; }
/* waiting for the sheet to scroll into view (home.ts arms it): the blank sheet and the "writing" status */
.sheet[data-armed]:not([data-play]) .st-writing { opacity: 1; visibility: visible; }
.sheet[data-armed]:not([data-play]) :is(.st-done, .rv, .sheet-sums) { opacity: 0; }
.st-done { background: var(--navy-soft); color: var(--navy); }
.sheet[data-play] .st-done { animation: home-in .4s 3.1s both; }
.comb .cell { fill: #E3E1DA; }
.sheet[data-play] .comb .cell { animation: home-cell 1s ease-in-out 3; }
.sheet[data-play] .comb .cell:nth-child(2) { animation-delay: .15s; }
.sheet[data-play] .comb .cell:nth-child(3) { animation-delay: .3s; }
@keyframes home-cell { 0%, 100% { fill: #E3E1DA; } 35% { fill: var(--orange); } }
@keyframes home-writing { 0% { opacity: 0; visibility: visible; } 6%, 92% { opacity: 1; visibility: visible; } 100% { opacity: 0; visibility: hidden; } }
.tick { flex: none; width: 16px; height: 16px; padding: 2px; border-radius: 50%; background: var(--orange); }
.tick path { fill: none; stroke: var(--navy); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.sheet[data-play] .sheet-line .rv { animation: home-in .55s calc(.4s + var(--n) * .4s) cubic-bezier(.2,.7,.2,1) both; }
.sheet[data-play] .sheet-line .p { animation-delay: calc(.52s + var(--n) * .4s); }
@keyframes home-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.sheet-sums { display: grid; gap: 4px; padding-top: 10px; font-variant-numeric: tabular-nums; color: var(--muted); font-size: 13.5px; }
.sheet[data-play] .sheet-sums { animation: home-in .5s 2.9s cubic-bezier(.2,.7,.2,1) both; }
.sheet-sums > div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.sheet-total { padding-top: 6px; font: 600 17px Outfit, sans-serif; color: var(--navy); }
.sheet-total .sum { font-size: 22px; }

/* steps */
.home-how { padding-top: 40px; }
.home .steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 40px; }
.home .step { background: var(--surface); border-radius: 18px; padding: 26px; }
.step .ic { width: 56px; height: 56px; border-radius: 16px; background: var(--surface-2); display: grid; place-items: center; margin-bottom: 18px; }
.step .ic svg path[fill="#14213D"] { fill: var(--ic-body); }
.step .ic svg path[stroke="#14213D"] { stroke: var(--ic-body); }
.home .step .n { display: block; width: auto; height: auto; background: none; border-radius: 0; font: 600 13px Inter, sans-serif; color: var(--accent-ink); margin-bottom: 6px; }
.home .step h3 { font-size: 21px; margin-bottom: 6px; }
.home .step p { color: var(--muted); font-size: 16px; margin: 0; }

/* demo */
.home main > .home-demo { padding: 24px 0 56px; scroll-margin-top: 68px; }
.home-demo-head { display: grid; grid-template-columns: auto 1fr; column-gap: 40px; align-items: end; margin-bottom: 18px; }
.home-demo-head .kicker { grid-column: 1 / -1; }
.home-demo-head h2 { white-space: nowrap; }
.home .home-demo-head .home-lead { margin: 0; font-size: 17px; max-width: 36em; }
/* The "Demo" anchors land on the window itself, with the heading block above it clear of the sticky header (phones: only the header). */
.home-demo-frame { scroll-margin-top: 191px; }
.home-demo-frame .demo { max-width: none; }

/* navy band */
.home-own { background: var(--brand-navy); color: #F5F3EE; }
.home-own .kicker { color: #AAB3C7; }
.home-own h2 { color: #fff; }
.home-split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.home-ticks { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 14px; }
.home-ticks li { display: grid; grid-template-columns: 22px 1fr; gap: 12px; font-size: 17px; }
.home-ticks li::before { content: ""; width: 22px; height: 22px; border-radius: 7px; margin-top: 2px; background: var(--orange) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2314213D' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center/16px no-repeat; }
.home-ticks b { color: #fff; font-weight: 600; }
.home-ticks span { color: #C6CCDA; }
.sources { background: var(--navy-2); border-radius: 18px; padding: 22px; display: grid; gap: 10px; }
.srcrow { display: flex; justify-content: space-between; align-items: center; gap: 12px; background: rgba(255,255,255,.06); border-radius: 12px; padding: 12px 14px; font-size: 15px; color: #fff; }
.srcrow small { display: block; color: #C3CADA; font-size: 12.5px; }
.chip { font: 600 12px Inter, sans-serif; border-radius: 99px; padding: 4px 10px; background: var(--orange); color: var(--brand-navy); white-space: nowrap; }
.chip.b { background: rgba(255,255,255,.14); color: #fff; }

/* free tools */
.home .tools { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 34px; }
.tool { background: var(--surface); border-radius: 16px; padding: 20px; text-decoration: none; display: flex; flex-direction: column; gap: 6px; border: 1.5px solid transparent; transition: border-color .2s, transform .2s; }
.tool:hover { border-color: var(--orange); transform: translateY(-2px); }
.tool b { font: 600 17px Outfit, sans-serif; color: var(--navy); }
.tool span { font-size: 14.5px; color: var(--muted); }
.tool em { font: 600 14px Outfit, sans-serif; font-style: normal; color: var(--navy); margin-top: auto; padding-top: 8px; }
.home-all-row { margin: 22px 0 0; }
.home-all { display: inline-flex; align-items: center; min-height: 44px; font: 600 16px Outfit, sans-serif; color: var(--navy); text-decoration-color: var(--orange); text-decoration-thickness: 2px; text-underline-offset: 5px; }

/* FAQ */
.home-faq { padding-top: 20px; }
.home .faq { max-width: 760px; margin: 28px 0 0; }
.home details { background: var(--surface); border: 0; border-radius: 14px; padding: 0 20px; margin-bottom: 10px; }
.home summary { padding: 18px 0; font: 600 17px Outfit, sans-serif; }
.home summary::after { content: "+"; color: var(--orange); font: 600 24px/1 Outfit, sans-serif; transition: none; }
.home details[open] summary::after { content: "–"; transform: none; }
.home details p { color: var(--muted); padding: 0 0 20px; }

/* closing call */
.home main > .page-cta { padding: 20px 0 72px; }

@media (max-width: 900px) {
  .home-hero { padding: 28px 0 56px; }
  .home-hero-grid, .home-split { grid-template-columns: 1fr; gap: 36px; }
  .home .tools { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .home-demo-head { grid-template-columns: 1fr; row-gap: 10px; }
  .home-demo-head h2 { white-space: normal; }
  .home-demo-frame { scroll-margin-top: 80px; }
}
@media (max-width: 860px) {
  .home .steps { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .home main > section { padding: 56px 0; scroll-margin-top: 36px; }
  .home-how { padding-top: 24px; }
  .sheet { padding: 20px 18px; }
  .sheet-status { justify-items: start; }
  .srcrow { font-size: 14px; }
}
@media (max-width: 480px) {
  .home .tools { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .home-hero * { animation: none !important; }
  .home h1 .u { background-size: 100% .09em; }
  .tool { transition: none; }
}
