/* PhilTech Budget page (philtech.app/budget/). Tokens, base type, buttons and the label swap, nav, hero shell, section
   spacing, WhatsApp icon and floating button, footer, reveals and the Hebrew font overrides are in ../common.css, loaded
   before this file; only this page's own rules live here. The features grid, steps, list, trust band, FAQ and contact
   form are the Forms page's (../forms/style.css), so the product pages read as one family. */

/* The demo arrives after the hero copy (the copy's cascade and @keyframes rise are in common.css) */
.demo-wrap { animation: rise 900ms 200ms var(--ease-out) both; }

/* Hero demo: one spend request, asked → quotes → approved → in the budget, on a loop; main.js drives it. */
.demo { position: relative; }
.sheet { background: var(--card); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); padding: 22px; }
.sheet-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 18px; gap: 12px; }
.sheet-head b { font: var(--display-w) 26px/1 var(--display); }
.sheet-head small { color: var(--ink-3); font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.panes { display: grid; }
.pane {
  grid-area: 1 / 1; display: grid; align-content: start; gap: 12px; min-height: 250px;
  opacity: 0; transform: translateY(8px); filter: blur(4px); pointer-events: none;
  transition: opacity 180ms ease, transform 180ms var(--ease-out), filter 180ms ease;
}
.pane.on { opacity: 1; transform: none; filter: none; transition: opacity 420ms var(--ease-out), transform 520ms var(--ease-out), filter 420ms var(--ease-out); }
.pane .q { margin: 0; font-weight: 600; font-size: 15px; }
.num, .money { font-variant-numeric: tabular-nums; }
.money { direction: ltr; unicode-bidi: isolate; }

/* Step 1: the member's message, as the committee receives it */
.msg { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; display: grid; gap: 6px; }
.msg .who { font-size: 12px; font-weight: 700; color: var(--teal); }
.msg p { margin: 0; font-size: 15px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-s { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: var(--line); color: var(--ink-2); }
.tag-s.acc { background: var(--accent-soft); color: var(--accent); }

/* Step 2: quotes arrive; the chosen one is marked */
.quote { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--paper); font-weight: 600; font-size: 15px;
  opacity: 0; transform: translateY(6px); transition: opacity 300ms ease, transform 400ms var(--ease-out), border-color 250ms ease, background-color 250ms ease; }
.quote.on { opacity: 1; transform: none; }
.quote.pick { border-color: var(--teal); background: var(--teal-soft); }
.quote .pk { font-size: 11px; font-weight: 800; color: var(--teal); opacity: 0; transition: opacity 250ms ease; }
.quote.pick .pk { opacity: 1; }
.rule { color: var(--ink-3); font-size: 13px; }

/* Step 3: approvers sign off by the rule; the counter fills */
.appr { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line); font-size: 15px; font-weight: 600; }
.appr .st { margin-inline-start: auto; font-size: 12px; font-weight: 700; color: var(--ink-3); transition: color 250ms ease; }
.appr .av { width: 28px; height: 28px; border-radius: 50%; background: var(--line); display: grid; place-items: center; font-size: 12px; font-weight: 800; flex: none; transition: background-color 250ms ease, color 250ms ease; }
.appr.ok .av { background: var(--teal); color: var(--on-teal); }
.appr.ok .st { color: var(--teal); }
.count { font-size: 13px; color: var(--ink-3); }
.ok-line { margin: 4px 0 0; font-size: 14px; font-weight: 700; color: var(--teal); opacity: 0; transform: translateY(4px); transition: opacity 300ms ease, transform 400ms var(--ease-out); }
.ok-line.on { opacity: 1; transform: none; }

/* Step 4: the allowance takes the commitment; what is left updates */
.env { display: grid; gap: 8px; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--paper); }
.env .row { display: flex; justify-content: space-between; gap: 10px; font-weight: 600; }
.env .row small { color: var(--ink-3); font-weight: 600; font-size: 13px; }
.bar { height: 12px; border-radius: 6px; background: var(--line); overflow: hidden; display: flex; }
.bar i { display: block; height: 100%; }
.bar .spent { background: var(--accent); width: 6.3%; }
.bar .comm { background: color-mix(in srgb, var(--accent) 45%, transparent); width: 0; transition: width 900ms var(--ease-in-out); }
.env.take .bar .comm { width: 26%; }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--ink-3); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-inline-end: 6px; vertical-align: -1px; }

/* The committee's side: the notice when a request is approved. Enters slowly, leaves fast. */
.float {
  position: absolute; background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow);
  padding: 14px 16px; font-size: 14px; display: flex; align-items: center; gap: 10px;
  opacity: 0; transform: translateY(10px) scale(.96); filter: blur(4px);
  transition: opacity 200ms ease, transform 200ms var(--ease-out), filter 200ms ease;
}
.float.on { opacity: 1; transform: none; filter: none; transition: opacity 450ms var(--ease-out), transform 550ms var(--ease-out), filter 450ms var(--ease-out); }
.float .meta { color: var(--ink-3); font-size: 12px; }
.float .dot { width: 30px; height: 30px; border-radius: 50%; background: var(--teal-soft); color: var(--teal); display: grid; place-items: center; font-weight: 800; flex: none; }
.float.approved { inset-inline-end: -18px; bottom: -28px; }
@media (max-width: 600px) { .float.approved { inset-inline-end: 8px; bottom: -40px; } }

/* The steps under the demo; the active one fills a bar over its own duration (linear: it is a clock) */
.demo-steps { list-style: none; margin: 56px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; counter-reset: ds; }
.demo-steps li { font-size: 13px; font-weight: 600; color: var(--ink-3); position: relative; padding-top: 12px; transition: color 250ms ease; }
.demo-steps li::before { counter-increment: ds; content: counter(ds) " · "; }
.demo-steps li::after { content: ""; position: absolute; top: 0; inset-inline: 0; height: 3px; border-radius: 3px; background: var(--line); }
.demo-steps li span.bar2 { position: absolute; top: 0; inset-inline: 0; height: 3px; border-radius: 3px; background: var(--accent); z-index: 1; transform: scaleX(0); transform-origin: left; }
:lang(he) .demo-steps li span.bar2 { transform-origin: right; }
.demo-steps li.done, .demo-steps li.on { color: var(--ink); }
.demo-steps li.done span.bar2 { transform: scaleX(1); transition: transform 200ms ease; }
.demo-steps li.on span.bar2 { transform: scaleX(1); transition: transform var(--dur, 1.4s) linear; }
@media (max-width: 600px) { .demo-steps { margin-top: 72px; grid-template-columns: repeat(2, 1fr); row-gap: 14px; } }

/* Features: a bento grid, as on the Events page. The two wide cards show their claim instead of describing it. */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 20px; }
.feat { grid-column: span 2; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 28px; display: flex; flex-direction: column; }
.feat.wide { grid-column: span 4; display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: center; }
.feat.half { grid-column: span 3; }
.feat .ic { width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; margin-bottom: 18px; }
.feat h3 { font-size: 24px; margin-bottom: 8px; }
.feat p { margin: 0; color: var(--ink-2); font-size: 16px; }
@media (max-width: 920px) {
  .bento { grid-template-columns: 1fr 1fr; }
  .feat, .feat.half { grid-column: span 1; }
  .feat.wide { grid-column: span 2; }
}
@media (max-width: 600px) {
  .bento { grid-template-columns: 1fr; }
  .feat, .feat.half, .feat.wide { grid-column: span 1; }
  .feat.wide { grid-template-columns: 1fr; }
}
/* minmax(0, 1fr) so long rows ellipsise instead of pushing the card past a phone screen */
.vis { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 16px; font-size: 14px; min-height: 150px; display: grid; grid-template-columns: minmax(0, 1fr); align-content: center; gap: 8px; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; counter-reset: s; position: relative; }
/* The top rule draws across as the steps come in, reading in the page's direction */
.steps::before { content: ""; position: absolute; top: 0; inset-inline: 0; height: 1px; background: var(--line); transform-origin: left; }
:lang(he) .steps::before { transform-origin: right; }
.js .steps::before { transform: scaleX(0); transition: transform 1100ms var(--ease-in-out); }
.js .steps.in::before { transform: none; }
.step { padding-block-start: 32px; padding-inline-end: 28px; }
.step::before { counter-increment: s; content: "0" counter(s); display: block; font: var(--display-w) 56px/1 var(--display); color: var(--accent); margin-bottom: 14px; }
.step p { color: var(--ink-2); margin: 8px 0 0; }
@media (max-width: 820px) { .steps { grid-template-columns: 1fr; } .step + .step { margin-top: 8px; } }

/* Templates: a plain list, not pills, since they are not buttons */
.uses { display: grid; grid-template-columns: repeat(3, 1fr); column-gap: 28px; }
.use { display: flex; align-items: baseline; gap: 10px; padding: 14px 0; border-top: 1px solid var(--line); font-weight: 600; font-size: 16px; }
.use::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); translate: 0 -2px; }
@media (max-width: 920px) { .uses { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .uses { column-gap: 16px; } .use { font-size: 14px; padding: 12px 0; } }

/* Trust: the dark band, with the facts beside the heading */
.trust { background: var(--band-bg); color: var(--band-ink); border-radius: 28px; padding: 64px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 56px; align-items: start; }
.trust-head p:not(.eyebrow) { opacity: .75; margin: 16px 0 0; font-size: 18px; }
.facts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 28px 32px; }
.facts li { display: grid; gap: 6px; padding-top: 16px; border-top: 1px solid color-mix(in srgb, var(--band-ink) 18%, transparent); }
.facts b { font-size: 17px; }
.facts span { opacity: .75; font-size: 15px; }
@media (max-width: 920px) { .trust { grid-template-columns: 1fr; gap: 36px; padding: 44px 32px; } }
@media (max-width: 600px) { .trust { padding: 36px 20px; border-radius: 22px; } .facts { grid-template-columns: 1fr; } }

/* FAQ. Where the browser can animate to height:auto (::details-content), the answer opens instead of jumping. */
.faq { interpolate-size: allow-keywords; }
.faq-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr); gap: 64px; align-items: start; }
.faq-wrap .sec-head { position: sticky; top: 100px; margin-bottom: 0; }
.faq details:first-child { padding-top: 6px; }
@media (max-width: 820px) { .faq-wrap { display: block; } .faq-wrap .sec-head { position: static; margin-bottom: 28px; } }
.faq details { border-bottom: 1px solid var(--line); padding: 22px 0; }
.faq summary { cursor: pointer; font-weight: 700; font-size: 18px; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 20px; border-radius: 6px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 26px; line-height: 1; color: var(--accent); flex: none; transition: transform 250ms var(--ease-out); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--ink-2); margin: 12px 0 0; }
.faq details::details-content {
  block-size: 0; overflow: clip; opacity: 0;
  transition: block-size 300ms var(--ease-out), opacity 250ms ease, content-visibility 300ms allow-discrete;
}
.faq details[open]::details-content { block-size: auto; opacity: 1; }

/* CTA + contact */
.cta { text-align: center; }
.cta h2 { max-width: 760px; margin: 0 auto 18px; }
.cta p:not(.eyebrow) { color: var(--ink-2); max-width: 560px; margin: 0 auto 32px; }
form.contact {
  max-width: 620px; margin: 0 auto; display: grid; gap: 12px; text-align: start;
  background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 28px; box-shadow: var(--shadow);
}
@media (max-width: 600px) { form.contact { padding: 18px; border-radius: 18px; } }
form.contact[hidden] { display: none; }
/* The Hebrew email field: right-to-left while the Hebrew placeholder shows, left-to-right once an address is typed */
:lang(he) form.contact input[type="email"]:not(:placeholder-shown) { direction: ltr; }
form.contact .two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 600px) { form.contact .two { grid-template-columns: 1fr; } }
form.contact input, form.contact textarea, form.contact select {
  width: 100%; font: 400 16px var(--body); padding: 14px 16px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--paper); color: var(--ink);
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
form.contact :is(input, textarea, select):focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent); }
form.contact textarea { min-height: 110px; resize: vertical; }

.wa-alt { font-size: 15px; color: var(--ink-3); margin: 18px auto 0; }
.wa-link { display: inline-flex; align-items: center; gap: 6px; color: var(--wa); font-weight: 700; text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .wa-link:hover { text-decoration: underline; } }


/* A feature that is announced but not built yet says so on its card (the site claims only what exists) */
.feat { position: relative; }
.soon { position: absolute; top: 24px; inset-inline-end: 24px; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: var(--teal-soft); color: var(--teal); }

/* Feature visuals. minmax(0, 1fr) so long rows ellipsise instead of pushing the card past a phone screen. */
.vis { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 16px; font-size: 14px; min-height: 150px; display: grid; grid-template-columns: minmax(0, 1fr); align-content: center; gap: 8px; }

/* "Every bill on its schedule": the recurring list, each with how often and how much */
.bill { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 9px 12px; }
/* the label is never clipped (amounts like 1 000 000 ₽ are long): when the row is too narrow the pill drops below it */
.bill .bl { flex: 1 0 auto; font-weight: 600; white-space: nowrap; }
.bill .fq { margin-inline-start: auto; font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--line); color: var(--ink-2); white-space: nowrap; }
.bill .fq.est { background: var(--teal-soft); color: var(--teal); }
.bill .money { font-weight: 700; white-space: nowrap; }
.js .vis-bills .bill { opacity: 0; transform: translateY(8px); transition: opacity 400ms var(--ease-out), transform 500ms var(--ease-out); transition-delay: calc(var(--k, 0) * 90ms); }
.js .vis-bills.play .bill { opacity: 1; transform: none; }

/* "See December from November": monthly closing balances against the minimum the committee keeps */
.vis-fc { gap: 6px; }
/* Each column is a fixed-height flex column, so a bar's percentage height has something definite to be a share of */
.fc-chart { position: relative; display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; height: 120px; padding-top: 6px; }
.fc-chart .col { height: 114px; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; }
.fc-chart .b { display: block; width: 100%; border-radius: 6px 6px 3px 3px; background: var(--accent); height: calc(var(--h) * .82); }
.fc-chart .col.low .b { background: var(--accent-deep, var(--accent)); opacity: .55; }
.fc-chart .col small { font-size: 11px; color: var(--ink-3); }
.fc-min { position: absolute; inset-inline: 0; bottom: calc(18px + 30%); border-top: 2px dashed var(--teal); }
.fc-note { font-size: 13px; font-weight: 700; color: var(--accent-deep, var(--accent)); }
:root[data-theme="dark"] .fc-note { color: var(--accent); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .fc-note { color: var(--accent); } }
.js .vis-fc .b { transform: scaleY(0); transform-origin: bottom; transition: transform 700ms var(--ease-out); transition-delay: calc(var(--k, 0) * 80ms); }
.js .vis-fc.play .b { transform: none; }
.js .vis-fc .fc-note { opacity: 0; transition: opacity 400ms ease 700ms; }
.js .vis-fc.play .fc-note { opacity: 1; }

/* Waitlist form: the status line under the button, and the honeypot field people never see */
/* form.contact in the selectors so they outrank the CTA section's paragraph rule (.cta p:not(.eyebrow)) */
form.contact .wl-status { margin: 4px 0 0; max-width: none; min-height: 1.5em; font-size: 15px; color: var(--ink-2); text-align: center; }
form.contact .wl-status.ok { color: var(--teal); font-weight: 700; }
form.contact .wl-status.err { color: var(--accent-deep, var(--accent)); font-weight: 600; }
:root[data-theme="dark"] form.contact .wl-status.err { color: var(--accent); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) form.contact .wl-status.err { color: var(--accent); } }
form.contact input[aria-invalid="true"] { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent); }
form.contact button:disabled { opacity: .6; cursor: progress; }
.hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Reduced motion, this page's part: common.css already drops the shared movement */
@media (prefers-reduced-motion: reduce) {
  .demo-wrap { animation: none; }
  .pane, .pane.on, .float, .float.on, .quote, .ok-line { transform: none; filter: none; }
  .bar .comm { transition: none; }
  .js .vis-bills .bill, .js .vis-fc .b, .js .vis-fc .fc-note { opacity: 1; transform: none; transition: none; }
  .js .steps::before { transform: none; transition: none; }
  .faq summary::after { transition: none; }
  .faq details::details-content { transition: none; }
}
