/* PhilTech Forms page (philtech.app/forms/). 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, template list, FAQ and contact form
   follow the Events page (../events/style.css) so the two 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: the signer's side of one form, verify → fill → sign → signed PDF, on a loop; main.js drives it.
   Pure CSS, so it stays sharp, tiny and in the page's language. */
.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; }
.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; }
/* The panes share one cell, so the card keeps the height of the tallest and nothing below it jumps */
.panes { display: grid; }
.pane {
  grid-area: 1 / 1; display: grid; align-content: start; gap: 12px; min-height: 230px;
  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; }

/* Step 1: the email code fills in digit by digit */
.code { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; direction: ltr; }
.code i {
  aspect-ratio: .85; border-radius: 10px; border: 1px solid var(--line); background: var(--paper);
  display: grid; place-items: center; font: 700 22px/1 var(--body); font-style: normal; font-variant-numeric: tabular-nums;
  transition: border-color 200ms ease, background-color 300ms ease, transform 160ms var(--ease-out);
}
.code i.f { border-color: var(--accent); transform: scale(1.04); }
.code i.f + i:not(.f) { transform: none; }
.code.ok i { border-color: var(--teal); background: var(--teal-soft); color: var(--teal); transform: none; }
.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 2: answering "Yes" reveals the follow-up question, which is the builder's condition at work */
.choice { display: flex; gap: 8px; }
.choice span {
  flex: 1; text-align: center; padding: 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--paper);
  font-weight: 600; font-size: 14px; transition: background-color 250ms ease, color 250ms ease, border-color 250ms ease, transform 160ms var(--ease-out);
}
.choice span.press { transform: scale(.94); }
.choice span.sel { background: var(--accent); border-color: var(--accent); color: #fff; }
.cond { display: grid; gap: 8px; opacity: 0; transform: translateY(-6px); transition: opacity 300ms ease, transform 400ms var(--ease-out); }
.cond.on { opacity: 1; transform: none; }
.input { border: 1px solid var(--accent); border-radius: 12px; padding: 10px 12px; min-height: 42px; font-size: 15px; display: flex; align-items: center; box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 12%, transparent); }
.caret { display: inline-block; width: 2px; height: 18px; background: var(--accent); margin-inline-start: 1px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.rule { color: var(--ink-3); font-size: 12px; }

/* Step 3: the signature draws itself (stroke-dashoffset over a normalised path length), then consent, then send */
.sig-box { position: relative; border: 1px dashed var(--line); border-radius: 14px; background: var(--paper); padding: 10px 14px 24px; color: var(--ink); }
.sig-box svg { width: 100%; height: 70px; display: block; }
.sig-box path { stroke-dasharray: 1; stroke-dashoffset: 1; }
.sig-box.draw path { stroke-dashoffset: 0; transition: stroke-dashoffset 1500ms var(--ease-in-out); }
.sig-box small { position: absolute; bottom: 6px; inset-inline-start: 14px; font-size: 11px; color: var(--ink-3); border-top: 1px solid var(--line); inset-inline-end: 14px; padding-top: 2px; }
/* A signature is written left to right even on a Hebrew page */
.sig-box svg { direction: ltr; }
.consent { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ink-2); }
.consent .box { width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid var(--line); flex: none; display: grid; place-items: center; transition: background-color 200ms ease, border-color 200ms ease; }
.consent .box.on { background: var(--teal); border-color: var(--teal); }
.consent .box.on::after { content: "✓"; color: var(--on-teal); font-size: 13px; font-weight: 800; }
.send { justify-self: start; background: var(--accent); color: #fff; font-weight: 700; font-size: 14px; padding: 10px 18px; border-radius: 999px; opacity: .45; transition: opacity 250ms ease, transform 160ms var(--ease-out); }
.send.ready { opacity: 1; }
.send.press { transform: scale(.94); }

/* Step 4: the signed PDF and its verification code */
.pdf { display: flex; align-items: center; gap: 14px; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 14px; }
.pdf b { display: block; }
.pdf small { color: var(--ink-3); font-size: 13px; }
.pdf-ic { width: 42px; height: 52px; border-radius: 8px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-size: 11px; font-weight: 800; letter-spacing: .06em; flex: none; }
.pdf-ic.sm { width: 30px; height: 36px; font-size: 9px; border-radius: 6px; }
.vcode { display: grid; gap: 2px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); }
.vcode small { color: var(--ink-3); font-size: 12px; }
.vcode b { font: 700 20px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .06em; direction: ltr; justify-self: start; }

/* The team's side: the notice that lands when the form is signed. 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.signed { inset-inline-end: -18px; bottom: -28px; }
@media (max-width: 600px) { .float.signed { inset-inline-end: 8px; bottom: -40px; } }

/* The steps under the demo name what is happening; 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.bar {
  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.bar { transform-origin: right; }
.demo-steps li.done, .demo-steps li.on { color: var(--ink); }
.demo-steps li.done span.bar { transform: scaleX(1); transition: transform 200ms ease; }
.demo-steps li.on span.bar { 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; }

/* "A builder": the form's outline, with the follow-up question indented under the one it depends on */
.brow { display: flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 9px 12px; }
.brow .bt { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 800; flex: none; }
.brow .bl { flex: 1; min-width: 0; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brow .req, .brow .if { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.brow .req { background: var(--line); color: var(--ink-2); }
.brow .if { background: var(--teal-soft); color: var(--teal); }
.brow.cond-row { margin-inline-start: 22px; border-style: dashed; }
.js .vis-build .brow { 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-build.play .brow { opacity: 1; transform: none; }

/* "Anyone can check a copy": the file, then the two answers the verify page can give */
.vfile { display: flex; align-items: center; gap: 10px; font-weight: 600; min-width: 0; }
.vfile .vn { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; direction: ltr; }
.vres { border-radius: 12px; padding: 10px 12px; display: grid; gap: 2px; }
.vres b { font-size: 14px; }
.vres small { font-size: 12px; opacity: .85; }
.vres.good { background: var(--teal-soft); color: var(--teal); }
.vres.bad { background: var(--accent-soft); color: var(--accent-deep); }
:root[data-theme="dark"] .vres.bad { color: var(--accent); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .vres.bad { color: var(--accent); } }
.js .vis-verify .vres { opacity: 0; transform: translateY(6px); transition: opacity 350ms ease, transform 450ms var(--ease-out); }
.js .vis-verify.play .vres.good { opacity: 1; transform: none; transition-delay: 500ms; }
.js .vis-verify.play .vres.bad { opacity: 1; transform: none; transition-delay: 900ms; }

/* 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; } }

/* 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, .cond, .ok-line { transform: none; filter: none; }
  .caret { animation: none; }
  .sig-box path { stroke-dashoffset: 0; }
  .js .vis-build .brow, .js .vis-verify .vres { opacity: 1; transform: none; transition: none; }
  .js .steps::before { transform: none; transition: none; }
  .faq summary::after { transition: none; }
  .faq details::details-content { transition: none; }
}
