/* Story pages: each homepage card turned into a chaptered story.
   Shared receipt world; colours come from the page theme class (see bottom). */

.story {
  --ink: #111;
  background: var(--soft);
}

/* Header */
.ato-top { background: linear-gradient(160deg, var(--bg1), var(--bg2)); overflow: hidden; color: var(--hero-ink); }
.story .bar .mark, .story .bar-links a:not(.bar-cta) { color: var(--hero-ink); }
.story .bar-cta { background: var(--hero-ink); color: var(--bg2); }
.story .menu-toggle { background: var(--hero-ink); } .story .menu-toggle span { background: var(--bg2); }

/* ---------- Receipt primitive ---------- */
.receipt {
  position: relative; background: #fff; border: 2.5px solid var(--ink); border-radius: 12px;
  box-shadow: 8px 8px 0 var(--ink); padding: 22px 24px;
}
.r-head { margin: 0 0 12px; font-size: 13px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; display: flex; align-items: center; gap: 10px; }
.r-head span:not(.dot) { margin-left: auto; letter-spacing: 0; text-transform: none; font-weight: 600; font-size: 12.5px; color: var(--accd); background: var(--soft); padding: 3px 10px; border-radius: 999px; }
.r-row, .r-total { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 11px 0; border-bottom: 1.5px dashed #C9C9C9; font-weight: 650; font-variant-numeric: tabular-nums; }
.r-row i { font-style: normal; color: var(--strike); font-weight: 900; }
.r-total { border: 0; padding-top: 14px; font-size: 1.2em; font-weight: 800; }
.r-total b { color: var(--strike); }
.r-item { padding: 14px 0; border-bottom: 1.5px dashed #C9C9C9; }
.r-item:last-of-type { border-bottom: 0; }
.r-item b { display: block; font-size: 17px; letter-spacing: -0.01em; margin-bottom: 4px; }
.r-item span { display: block; font-size: 15px; color: #3b3b3b; line-height: 1.5; }
.r-item i { font-style: normal; font-weight: 800; color: var(--accd); }
.r-foot { margin: 14px 0 0; padding-top: 14px; border-top: 1.5px dashed #C9C9C9; font-size: 14px; color: #3b3b3b; }
.stamp {
  display: inline-block; font-weight: 900; letter-spacing: .02em; color: var(--stamp-fg); background: var(--stamp-bg); border: 2.5px solid var(--ink);
  padding: 6px 16px 8px; border-radius: 8px; box-shadow: 4px 4px 0 rgba(0,0,0,.18); rotate: 6deg;
}

/* Strike lines that draw across the amounts */
.receipt s { text-decoration: none; position: relative; color: #3b3b3b; }
.receipt s::after { content: ""; position: absolute; left: -5px; right: -5px; top: 52%; height: 3px; border-radius: 3px; background: var(--strike); transform: scaleX(0); transform-origin: left; transition: transform .55s cubic-bezier(.65,0,.35,1); }
.play s::after, .in s::after { transform: scaleX(1); }
.hero-receipt .r-row:nth-child(1) s::after { transition-delay: .5s; }
.hero-receipt .r-row:nth-child(2) s::after { transition-delay: .8s; }
.hero-receipt .r-row:nth-child(3) s::after { transition-delay: 1.1s; }
.hero-receipt .r-row:nth-child(4) s::after { transition-delay: 1.4s; }

/* ---------- Hero ---------- */
.a-hero { padding: 40px 24px 96px; }
.a-hero-in { max-width: 1180px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.a-crumb { margin: 0 0 22px; font-size: 14px; font-weight: 600; color: var(--hero-ink); opacity: .85; }
.a-crumb a { text-decoration: underline; text-underline-offset: 3px; }
.a-crumb .tag { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 17px; }
.a-hero h1 { margin: 0; font-size: clamp(52px, 6.6vw, 104px); font-weight: 900; letter-spacing: -0.05em; line-height: .92; }
.a-lead { margin: 24px 0 0; max-width: 42ch; font-size: 19px; line-height: 1.5; color: var(--hero-ink); opacity: .9; font-weight: 500; }
.a-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.a-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 52px; padding: 0 22px; border-radius: 12px; background: var(--ink); color: #fff; font-weight: 750; font-size: 16px; border: 2.5px solid var(--ink); box-shadow: 5px 5px 0 rgba(17,17,17,.25); cursor: pointer; transition: transform .15s, box-shadow .15s; }
.a-btn:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 rgba(17,17,17,.25); }
.a-btn.ghost { background: #fff; color: var(--ink); }
.breathe-big { margin: 42px 0 0; font-family: var(--serif); font-style: italic; font-size: clamp(30px, 3vw, 42px); color: var(--hero-ink); }
.chap .breathe-big { color: var(--ink); }

.a-hero-art { position: relative; padding: 40px 0 0; }
.hero-receipt { rotate: -3deg; font-size: 19px; padding: 26px 30px; max-width: 460px; margin-left: auto; }
.hero-stamp { position: absolute; z-index: 2; top: 0; right: -6px; font-size: 38px; opacity: 0; transform: scale(2.2); animation: slam .5s cubic-bezier(.2,1.6,.4,1) 1.9s forwards; }
@keyframes slam { to { opacity: 1; transform: scale(1); } }
.hero-receipt .r-total b { display: inline-block; opacity: 0; transform: scale(.4); animation: slam .45s cubic-bezier(.2,1.6,.4,1) 1.7s forwards; }
.a-note { margin: 18px 0 0; text-align: right; font-size: 12px; color: var(--hero-ink); opacity: .7; }

/* ---------- Chapters ---------- */
.chap { padding: 110px 24px; }
.chap-white { background: #fff; }
.chap-in { max-width: 1180px; margin: 0 auto; }
.chap-mark { margin: 0 0 16px; font-family: var(--serif); font-style: italic; font-size: 22px; color: var(--accd); }
.chap h2 { margin: 0; font-size: clamp(38px, 4.6vw, 68px); font-weight: 900; letter-spacing: -0.045em; line-height: .98; }
.chap h2 em { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -0.01em; color: var(--accd); }
.zero { color: var(--accd); }

/* 01 pile */
.pile { margin-top: 48px; display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.tilt-l { rotate: -1.5deg; }
.tilt-r { rotate: 1.2deg; margin-top: 40px; }

/* 02 when */
.when { margin-top: 48px; display: grid; grid-template-columns: 1.2fr 1fr; gap: 30px; align-items: start; }
.when-yes { background: var(--soft); }
.when-no { background: #FFF6F1; box-shadow: 8px 8px 0 #CF4323; border-color: #CF4323; }
.when-no .r-item i { color: #B33A1E; }
.dot { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 13px; }
.dot.yes { background: var(--accd); } .dot.no { background: #CF4323; }

/* 03 steps */
.steps { list-style: none; padding: 0; margin: 48px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.steps li { display: flex; flex-direction: column; gap: 8px; }
.steps li:nth-child(2) { rotate: .8deg; } .steps li:nth-child(3) { rotate: -.8deg; }
.step-n { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: #fff; font-weight: 800; margin-bottom: 6px; }
.steps b { font-size: 20px; letter-spacing: -0.02em; }
.steps p { margin: 0; color: #3b3b3b; font-size: 15px; }
.mini { margin-top: auto; padding-top: 14px; border-top: 1.5px dashed #C9C9C9; display: flex; justify-content: space-between; font-weight: 800; font-variant-numeric: tabular-nums; font-size: 18px; }
.mini.done b { color: var(--accd); }
.step-stamp { position: absolute; top: -18px; right: -14px; font-size: 22px; opacity: 0; transform: scale(2); transition: opacity .3s .9s, transform .45s cubic-bezier(.2,1.6,.4,1) .9s; }
.steps.in .step-stamp { opacity: 1; transform: scale(1); }

/* 04 ticket stubs */
.tickets { margin-top: 48px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.ticket {
  position: relative; display: flex; flex-direction: column; gap: 10px; padding: 28px 26px 24px;
  background: var(--t1); border: 2.5px solid var(--ink); border-radius: 12px; box-shadow: 8px 8px 0 var(--ink);
}
.ticket::before, .ticket::after { content: ""; position: absolute; top: 58%; width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 2.5px solid var(--ink); }
.ticket::before { left: -13px; clip-path: inset(0 0 0 50%); }
.ticket::after { right: -13px; clip-path: inset(0 50% 0 0); }
.ticket b { font-size: 21px; letter-spacing: -0.02em; }
.ticket p { margin: 0; font-size: 15px; color: #2a2a2a; }
.ticket em { margin-top: auto; padding-top: 14px; border-top: 2px dashed rgba(17,17,17,.35); font-family: var(--serif); font-size: 19px; color: var(--ink); }
.ticket:nth-child(2) { background: var(--t2); }
.ticket:nth-child(3) { background: #fff; }

/* 05 know */
.know { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; align-items: start; }
.know .receipt:first-child { rotate: -1deg; }
.know .receipt:last-child { rotate: 1deg; margin-top: 30px; }

/* End: enquiry docket */
.chap-end { background: linear-gradient(180deg, var(--soft), var(--t1)); }
.end { max-width: 780px; text-align: center; }
.docket { margin-top: 36px; text-align: left; padding: 24px; }
.docket textarea { display: block; width: 100%; min-height: 120px; resize: vertical; border: 0; border-bottom: 1.5px dashed #C9C9C9; outline: none; font-size: 18px; line-height: 1.5; padding: 4px 0 14px; background: transparent; }
.docket textarea::placeholder { color: #8A867D; }
.docket-foot { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding-top: 16px; flex-wrap: wrap; }
.docket-foot > span { font-size: 13px; color: #555; }
.docket.nudge, .ask-card.nudge { animation: nudge .4s; }
.end .answer { text-align: left; margin-top: 24px; border: 2.5px solid var(--ink); box-shadow: 8px 8px 0 var(--strike); }
.end-breathe { margin-top: 56px; }

/* FAQ */
.faq-in { display: grid; grid-template-columns: .8fr 1.2fr; gap: 56px; align-items: start; }
.faq-r details { border-bottom: 1.5px dashed #BDBDBD; }
.faq-r details:first-child { border-top: 1.5px dashed #BDBDBD; }
.faq-r summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 16px; padding: 20px 2px; font-size: 17px; font-weight: 700; }
.faq-r summary::-webkit-details-marker { display: none; }
.faq-r summary::after { content: "+"; font-size: 24px; line-height: 1; color: var(--accd); transition: transform .2s; }
.faq-r details[open] summary::after { transform: rotate(45deg); }
.faq-r p { margin: 0 2px 20px; color: #3b3b3b; }

.story .foot { background: var(--soft); }

/* Scroll reveal (only for the receipts that tell the story) */
.reveal-on .pile .receipt, .reveal-on .steps li, .reveal-on .tickets .ticket { opacity: 0; transform: translateY(24px); transition: opacity .6s cubic-bezier(.16,1,.3,1), transform .6s cubic-bezier(.16,1,.3,1); }
.reveal-on .in .receipt, .reveal-on .steps.in li, .reveal-on .tickets.in .ticket { opacity: 1; transform: none; }
.reveal-on .steps.in li:nth-child(2), .reveal-on .tickets.in .ticket:nth-child(2), .reveal-on .pile.in .receipt:nth-child(2) { transition-delay: .12s; }
.reveal-on .steps.in li:nth-child(3), .reveal-on .tickets.in .ticket:nth-child(3) { transition-delay: .24s; }

@media (max-width: 960px) {
  .a-hero-in, .pile, .when, .know, .faq-in { grid-template-columns: 1fr; }
  .steps, .tickets { grid-template-columns: 1fr; }
  .hero-receipt { margin: 0 auto; }
  .tilt-r, .know .receipt:last-child { margin-top: 0; }
}
@media (max-width: 640px) {
  .a-hero { padding: 24px 16px 64px; }
  .chap { padding: 72px 16px; }
  .receipt { padding: 18px; box-shadow: 6px 6px 0 var(--ink); }
  .hero-receipt { font-size: 15px; padding: 18px 20px; }
  .hero-stamp { font-size: 26px; right: 4px; }
  .a-ctas .a-btn { width: 100%; justify-content: center; }
  .docket-foot .a-btn { width: 100%; justify-content: center; }
  .when-no { box-shadow: 6px 6px 0 #CF4323; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-stamp, .hero-receipt .r-total b, .step-stamp { opacity: 1 !important; transform: none !important; animation: none !important; }
  .receipt s::after { transform: scaleX(1); transition: none; }
  .reveal-on .pile .receipt, .reveal-on .steps li, .reveal-on .tickets .ticket { opacity: 1; transform: none; }
}


/* ---------- Hero art: the homepage tile, framed like a card and scaled up ---------- */
.art-wrap { position: relative; width: 435px; height: 560px; margin: 10px 0 0 auto; }
.art { position: absolute; left: 0; top: 16px; width: 300px; height: 375px; transform: scale(1.45) rotate(-2.5deg); transform-origin: top left; }
.art .viz { width: 300px; height: 375px; aspect-ratio: auto; border: 2px solid var(--ink); border-radius: 10px; box-shadow: 5px 5px 0 var(--ink); }
.art .vt { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -0.01em; font-size: 26px; }
.art-wrap .hero-stamp { top: 0; right: -18px; }
@media (max-width: 960px) { .art-wrap { margin: 10px auto 0; } }
@media (max-width: 640px) {
  .art { transform: scale(1) rotate(-2deg); }
  .art-wrap { width: 300px; height: 410px; }
  .art-wrap .hero-stamp { right: -6px; }
}

/* ---------- Themes ---------- */
.t-refi   { --bg1:#EDE6FF; --bg2:#B9A3FF; --soft:#F5F1FF; --t1:#D9CCFF; --t2:#EDE7FF; --strike:#6B3CFF; --accd:#4B22D6; --stamp-bg:#6B3CFF; --stamp-fg:#fff; --hero-ink:#111; }
.t-asset  { --bg1:#8C63FF; --bg2:#5A2FE0; --soft:#F3EFFF; --t1:#D8FF3C; --t2:#E9D9FF; --strike:#6B3CFF; --accd:#5A2FE0; --stamp-bg:#D8FF3C; --stamp-fg:#111; --hero-ink:#fff; }
.t-prop   { --bg1:#D8F0FF; --bg2:#8FD3FF; --soft:#F0F8FF; --t1:#BFE6FF; --t2:#E2F3FF; --strike:#2E6BFF; --accd:#1D4DB8; --stamp-bg:#2E6BFF; --stamp-fg:#fff; --hero-ink:#111; }
.t-grow   { --bg1:#ECFF8A; --bg2:#D8FF3C; --soft:#F8FFE3; --t1:#D8FF3C; --t2:#EEFFB0; --strike:#5A8F00; --accd:#476F00; --stamp-bg:#111; --stamp-fg:#D8FF3C; --hero-ink:#111; }
.t-cash   { --bg1:#FFA6E0; --bg2:#FF5FC8; --soft:#FFF1FA; --t1:#FFC2EA; --t2:#FFE3F5; --strike:#E0218F; --accd:#B3126F; --stamp-bg:#FF2D2D; --stamp-fg:#fff; --hero-ink:#111; }
.t-trade  { --bg1:#2A56B8; --bg2:#0E2A6B; --soft:#EFF4FF; --t1:#BFD2FF; --t2:#FFE0C7; --strike:#2E6BFF; --accd:#1F4FD1; --stamp-bg:#FF8A3D; --stamp-fg:#111; --hero-ink:#fff; }
.t-dev    { --bg1:#3B68FF; --bg2:#1D4DFF; --soft:#EFF3FF; --t1:#C9D6FF; --t2:#EDFFB8; --strike:#1D4DFF; --accd:#1D4DFF; --stamp-bg:#D8FF3C; --stamp-fg:#111; --hero-ink:#fff; }
.t-now    { --bg1:#2A2A2A; --bg2:#0E0E0E; --soft:#FFF4EC; --t1:#FFD2BE; --t2:#FFE9DE; --strike:#FF4D2E; --accd:#C93A1B; --stamp-bg:#FF4D2E; --stamp-fg:#fff; --hero-ink:#fff; }
.t-merge  { --bg1:#FFE2AE; --bg2:#FFC870; --soft:#FFF8EA; --t1:#FFD58D; --t2:#FFE9C4; --strike:#FF4D2E; --accd:#C2410C; --stamp-bg:#2E6BFF; --stamp-fg:#fff; --hero-ink:#111; }

/* Dark heroes: primary button flips to white, ghost goes outline */
.t-asset .a-hero .a-btn, .t-trade .a-hero .a-btn, .t-dev .a-hero .a-btn, .t-now .a-hero .a-btn { background: #fff; color: var(--ink); border-color: var(--ink); }
.t-asset .a-hero .a-btn.ghost, .t-trade .a-hero .a-btn.ghost, .t-dev .a-hero .a-btn.ghost, .t-now .a-hero .a-btn.ghost { background: transparent; color: #fff; border-color: #fff; box-shadow: none; }
.art .vt { max-width: 70%; }
