/* ==========================================================================
   Tax Planning: "Keep more of what you've earned". Ink and mint, fine line diagrams.
   Signature: pinned money-flow diagram (--pin drives every stage) + stacked cards with drawn diagrams.
   ========================================================================== */

/* ---------- 1. Hero ---------------------------------------------------- */
.tx-hero { overflow: hidden; min-height: min(92svh, 860px); display: flex; align-items: flex-start; padding-bottom: clamp(240px, 30vw, 420px); }
.tx-hero__flow { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: clamp(300px, 38vw, 540px); pointer-events: none; }
.tx-hero__flow path { fill: none; stroke: var(--lime-hi); stroke-width: 2; stroke-linecap: round; opacity: .55; }
.tx-hero__flow .l1, .tx-hero__flow .l5 { opacity: .32; }
.tx-hero__flow .l3 { stroke-width: 3.5; opacity: .95; stroke: var(--lime); }
.tx-hero__flow .end { fill: var(--lime); stroke: none; }
.tx-hero__in { position: relative; z-index: 1; }
.tx-hero .tag { margin-bottom: 22px; }
.tx-hero__h { font-size: clamp(3.4rem, 10.6vw, 9.4rem); letter-spacing: -.055em; color: var(--on-dark); }
.tx-hero__tag { margin-top: clamp(18px, 2.4vw, 30px); max-width: 26ch; color: var(--lime); }
.tx-hero__act { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }
.tx-hero__jump { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 30px; }
.tx-hero__jl { font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--on-dark-2); margin-right: 8px; }
.tx-hero__jump a { padding: 7px 14px; border: 1px solid rgba(246,248,246,.28); border-radius: 99px; font-size: 14px; font-weight: 500; color: var(--on-dark); background: rgba(12,19,16,.6); transition: background .3s var(--ease), border-color .3s var(--ease), color .3s var(--ease); }
.tx-hero__jump a:hover { background: var(--lime-hi); border-color: var(--lime-hi); color: var(--ink); }

/* ---------- 2. Money flow (pinned) ------------------------------------- */
.tx-flow { --a: clamp(0, (var(--pin, 1) - .04) / .24, 1); --b: clamp(0, (var(--pin, 1) - .28) / .34, 1); --c: clamp(0, (var(--pin, 1) - .62) / .26, 1); --lk: clamp(0, (var(--pin, 1) - .3) / .56, 1); }
.tx-flow__stage { display: flex; align-items: center; }
.tx-flow__in { display: flex; flex-direction: column; gap: clamp(8px, 1.6vh, 20px); }
.tx-flow__top { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(20px, 5vw, 80px); align-items: end; }
.tx-flow__top .tag { margin-bottom: 14px; }
.tx-flow__h { max-width: 12ch; }
.tx-flow__lead { max-width: 58ch; font-size: clamp(1rem, 1.3vw, 1.18rem); }
.tx-flow__fig { margin: 0; }
.tx-flow__svg { width: 100%; height: auto; max-height: calc(100vh - var(--nav-h) - 280px); overflow: visible; color: var(--text); }
.tx-flow__svg--tall { display: none; }
.fl-ghost path { stroke: var(--mint-2); stroke-width: 12; }
.fl-ghost path:first-child, .fl-ghost path:last-child { stroke-width: 18; }
.fl-live path { stroke: var(--green); stroke-width: 12; stroke-dasharray: 1 2; }
.fl-live .fl-in, .fl-live .fl-out { stroke: var(--green-dark); stroke-width: 18; }
.fl-live .fl-in { stroke-dashoffset: calc(1 - var(--a)); }
.fl-live .fl-ch { stroke-dashoffset: calc(1 - var(--b)); }
.fl-live .fl-ch--b { stroke: var(--lime); }
.fl-live .fl-out { stroke-dashoffset: calc(1 - var(--c)); }
.fl-leaks .leak { fill: var(--green-dark); transform-box: fill-box; transform-origin: 50% 0; transform: scale(calc(1 - .86 * var(--lk))); opacity: calc(1 - .55 * var(--lk)); }
.fl-node circle { fill: var(--green-dark); }
.fl-node--out .halo { fill: var(--lime); fill-opacity: .35; transform-box: fill-box; transform-origin: center; transform: scale(calc(.4 + .6 * var(--c))); opacity: var(--c); }
.fl-node--out .core { fill: var(--green-dark); transform-box: fill-box; transform-origin: center; transform: scale(calc(.5 + .5 * var(--c))); }
.fl-txt text { fill: var(--text); }
.fl-txt .t-in { opacity: clamp(0, var(--a) * 3, 1); }
.fl-txt .t-a, .fl-txt .t-b, .fl-txt .t-c { opacity: var(--b); }
.fl-txt .t-out { opacity: var(--c); }
.tx-flow__cap { display: flex; align-items: center; gap: 12px; margin-top: 6px; font-size: 14px; color: var(--text-2); }

@media (max-width: 899px) {
  .tx-flow { padding-block: var(--sp-6); }
  .tx-flow__top { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .tx-flow__svg { max-height: none; }
  .tx-flow__svg--wide { display: none; }
  .tx-flow__svg--tall { display: block; max-width: 340px; margin-inline: auto; }
  .tx-flow__cap { flex-wrap: wrap; justify-content: center; text-align: center; margin-top: 18px; }
}

/* ---------- 3. Five stacked cards -------------------------------------- */
.tx-five { padding-bottom: clamp(48px, 6vw, 96px); }
.tx-five__head { margin-bottom: clamp(32px, 4vw, 64px); }
.tx-five__head .tag { margin-bottom: 18px; }
.tx-card { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(24px, 4vw, 72px); align-items: center; min-height: min(62vh, 520px); box-shadow: 0 24px 60px rgba(12, 19, 16, .18); }
.tx-card--2, .tx-card--4 { grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); }
.tx-card--2 .tx-card__tx, .tx-card--4 .tx-card__tx { order: 2; }
.tx-card__n { display: block; margin-bottom: 8px; font-size: clamp(3.6rem, 8vw, 7rem); font-weight: 600; line-height: .9; letter-spacing: -.05em; }
.tx-card .d2 { font-size: clamp(1.7rem, 3.2vw, 2.7rem); }
.tx-card .body-lg { margin: 16px 0 24px; max-width: 46ch; color: var(--s-muted); }
.tx-card .tl { color: var(--s-link); }
.tx-card__art { width: 100%; max-width: 440px; height: auto; justify-self: center; color: var(--s-fg); overflow: visible; }
.tx-card__art path, .tx-card__art circle { fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.tx-card__art .soft { stroke-width: 1.5; stroke-dasharray: 3 6; }
.tx-card__art .base { stroke-width: 1.5; }
.tx-card__art .acc { stroke: var(--s-link); stroke-width: 3.2; }
.tx-card__art circle.acc { fill: var(--s-link); }
.tx-card--5 .tx-card__art .acc[d*="q-12"] { fill: none; }
.tx-card .outline { color: transparent; -webkit-text-stroke: 1.5px var(--s-link); }
@media (max-width: 899px) {
  .tx-card, .tx-card--2, .tx-card--4 { grid-template-columns: minmax(0, 1fr); min-height: 0; margin-bottom: 16px; position: relative; top: auto !important; }
  .tx-card--2 .tx-card__tx, .tx-card--4 .tx-card__tx { order: 0; }
  .tx-card__art { max-width: 300px; }
}

/* ---------- 4. Hub ----------------------------------------------------- */
.tx-hub__grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(32px, 6vw, 100px); align-items: center; }
.tx-hub__tx .tag { margin-bottom: 20px; }
.tx-hub__tx .body-lg { margin-top: 20px; }
.tx-hub__map { position: relative; width: 100%; max-width: 600px; aspect-ratio: 1; justify-self: center; }
.tx-hub__spokes { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; color: var(--green-ink); }
.tx-hub__spokes path, .tx-hub__spokes circle { fill: none; stroke: currentColor; stroke-width: .5; stroke-linecap: round; }
.tx-hub__spokes .orbit { stroke-dasharray: .8 1.6; stroke-width: .35; }
.tx-hub__core { position: absolute; left: 50%; top: 50%; width: 22%; aspect-ratio: 1; translate: -50% -50%; display: grid; place-items: center; border-radius: 50%; background: var(--green-deep); color: var(--on-dark); box-shadow: 0 0 0 10px rgba(1, 53, 34, .1); }
.tx-hub__core span { font-size: clamp(1.3rem, 2.6vw, 2.2rem); font-weight: 600; letter-spacing: -.04em; }
.tx-hub__nodes { position: absolute; inset: 0; }
.tx-node { position: absolute; width: max-content; display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; transform: translate(-50%, -50%); border-radius: 99px; background: #fff; border: 1px solid var(--sand-2); box-shadow: 0 10px 28px rgba(1, 53, 34, .12); font-size: 15px; font-weight: 600; color: var(--text); white-space: nowrap; transition: background .3s var(--ease), color .3s var(--ease), box-shadow .3s var(--ease); }
.tx-node svg { flex: none; color: var(--green-ink); transition: color .3s var(--ease); }
.tx-node:hover { background: var(--green-deep); color: var(--on-dark); }
.tx-node:hover svg { color: var(--lime-hi); }
@media (max-width: 899px) {
  .tx-hub__grid { grid-template-columns: minmax(0, 1fr); }
  .tx-hub__map { aspect-ratio: auto; max-width: none; display: grid; gap: 14px; justify-items: center; }
  .tx-hub__spokes { display: none; }
  .tx-hub__core { position: static; translate: none; width: 120px; }
  .tx-hub__nodes { position: static; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
  .tx-node { position: static; transform: none; left: auto !important; top: auto !important; }
}

/* ---------- 5. Who this helps ------------------------------------------ */
.tx-who__head { max-width: 640px; margin-bottom: clamp(32px, 4vw, 56px); }
.tx-who__head .tag { margin-bottom: 18px; }
.tx-who__arches { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 3vw, 44px); align-items: end; }
.tx-arch { display: block; }
.tx-arch:nth-child(2) { margin-bottom: clamp(24px, 4vw, 64px); }
.tx-arch__img { display: block; aspect-ratio: 4 / 5.4; overflow: hidden; background: var(--ink-3); border-radius: 999px 999px 8px 8px; }
.tx-arch__img img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 24%; filter: grayscale(1) contrast(1.02); transition: filter .6s var(--ease), scale 1.2s var(--ease); }
.tx-arch:hover .tx-arch__img img { filter: grayscale(0); scale: 1.05; }
.tx-arch__name { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line-dark); font-size: clamp(1.05rem, 1.5vw, 1.3rem); font-weight: 600; letter-spacing: -.02em; color: var(--on-dark); }
.tx-arch__name svg { color: var(--lime); transition: transform .4s var(--ease); }
.tx-arch:hover .tx-arch__name svg { transform: translateX(6px); }
.tx-who__more { margin-top: clamp(28px, 3vw, 44px); }
@media (max-width: 760px) {
  .tx-who__arches { grid-template-columns: minmax(0, 1fr); max-width: 340px; margin-inline: auto; }
  .tx-arch:nth-child(2) { margin-bottom: 0; }
}

/* ---------- 6. FAQ ----------------------------------------------------- */
.tx-faq__grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(28px, 6vw, 100px); align-items: start; }
.tx-faq__side { position: sticky; top: calc(var(--nav-h) + 32px); }
.tx-faq__side .tag { margin-bottom: 18px; }
@media (max-width: 899px) { .tx-faq__grid { grid-template-columns: minmax(0, 1fr); } .tx-faq__side { position: static; } }

/* ---------- 7. CTA ----------------------------------------------------- */
.tx-cta { overflow: hidden; text-align: left; padding-block: clamp(80px, 10vw, 150px); }
.tx-cta__lines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.tx-cta__lines path { fill: none; stroke: var(--lime-hi); stroke-width: 1.5; opacity: .4; vector-effect: non-scaling-stroke; }
.tx-cta__in { position: relative; z-index: 1; }
.tx-cta .body-lg { margin-top: 20px; }
.tx-cta__act { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }
.tx-cta__fine { margin-top: 24px; font-size: 14px; color: var(--on-dark-2); }
.tx-cta__fine a { color: var(--on-dark); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- 8. Other services + next ----------------------------------- */
.tx-tail { overflow: hidden; padding-block: clamp(48px, 6vw, 88px) clamp(40px, 5vw, 72px); }
.tx-tail__lbl { margin-bottom: 18px; font-size: 12px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--on-dark); }
.tx-tail__mq { --mq-gap: 2.4rem; }
.tx-tail__mq a { font-size: clamp(2.2rem, 6vw, 5rem); font-weight: 600; letter-spacing: -.045em; line-height: 1.1; color: var(--on-dark); transition: color .3s var(--ease); }
.tx-tail__mq a::after { content: "/"; margin-left: 2.4rem; color: var(--green-deep); }
.tx-tail__mq a:hover { color: var(--green-deep); }
.tx-next { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-top: clamp(32px, 4vw, 56px); padding: clamp(24px, 3vw, 40px) clamp(24px, 3vw, 44px); overflow: hidden; border-radius: 8px; background: var(--green-deep); color: var(--on-dark); isolation: isolate; }
.tx-next::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--ink); transform: translateX(-101%); transition: transform .6s var(--ease); }
.tx-next:hover::before { transform: none; }
.tx-next__lbl { position: absolute; top: 18px; left: clamp(24px, 3vw, 44px); font-size: 12px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--lime-hi); }
.tx-next__name { margin-top: 18px; font-size: clamp(2rem, 5vw, 4.2rem); }
.tx-next__arw { display: grid; place-items: center; flex: none; width: 64px; height: 64px; border-radius: 50%; background: var(--lime-hi); color: var(--ink); transition: transform .5s var(--ease); }
.tx-next:hover .tx-next__arw { transform: translateX(8px); }

@media (prefers-reduced-motion: reduce) {
  .tx-arch__img img, .tx-next::before, .tx-next__arw { transition: none; }
}

@media (max-width: 600px) {
  .tx-hero__act .btn, .tx-cta__act .btn { white-space: normal; justify-content: center; text-align: center; width: 100%; padding-inline: 20px; }
}
