/* FMU · ask.css — one-question card + envelope. Owner: D. Uses only the site tokens from SPEC.md. */

.ask { position: relative; color: var(--ink); font-family: var(--f-text); }
.ask *, .ask *::before, .ask *::after { box-sizing: border-box; }
.ask-sr { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.ask-stage { position: relative; width: 100%; max-width: 640px; outline: none; overflow-anchor: none; }

/* ---------- card ---------- */
.ask-card {
  position: relative;
  display: flex; flex-direction: column;
  background: var(--bg);
  border: 1px solid var(--ink);
  padding: 22px 28px 22px;
  transform-origin: 50% 50%;
}
.ask-card[hidden] { display: none; }
.ask-card.is-folding { pointer-events: none; }

/* crosshair marks on two corners (the site's grid language) */
.ask-x { position: absolute; width: 13px; height: 13px; pointer-events: none; }
.ask-x::before, .ask-x::after { content: ""; position: absolute; background: var(--ink); }
.ask-x::before { left: 6px; top: 0; width: 1px; height: 13px; }
.ask-x::after { top: 6px; left: 0; height: 1px; width: 13px; }
.ask-x--tl { left: -7px; top: -7px; }
.ask-x--br { right: -7px; bottom: -7px; }

.ask-head { display: flex; align-items: center; gap: 16px; min-height: 20px; }
.ask-tag, .ask-count, .ask-step__no, .ask-enter, .ask-sum__k, .ask-done__tag, .ask-kb, .ask-chip__k, .ask-cnt {
  font-family: var(--f-mono); font-size: 13px; letter-spacing: .04em; text-transform: uppercase; line-height: 1.3;
}
.ask-tag { margin: 0; color: var(--muted); }
.ask-count { margin: 0 0 0 auto; font-variant-numeric: tabular-nums; }
.ask-dots { display: flex; gap: 6px; margin: 0; padding: 0; list-style: none; }
.ask-dot { width: 8px; height: 8px; border: 1px solid var(--ink); background: transparent; transition: background-color var(--dur-2) var(--ease-out); }
.ask-dot.is-done { background: var(--ink); }
.ask-dot.is-on { background: var(--accent); }

.ask-bar { position: relative; height: 2px; margin: 14px -28px 0; background: var(--line); overflow: hidden; }
.ask-bar i { position: absolute; inset: 0; background: var(--ink); transform-origin: 0 50%; transform: scaleX(.2); transition: transform var(--dur-2) var(--ease-out); }

/* one question in flow at a time; the leaving one is lifted out of flow while it fades.
   ask.js eases the container height between questions. */
.ask-steps { position: relative; padding: 0 0 8px; }
.ask-step { display: none; min-width: 0; padding-top: 26px; }
.ask-step.is-on { display: block; }
.ask-step.is-leaving { display: block; position: absolute; left: 0; right: 0; top: 0; pointer-events: none; }

.ask-step__no { margin: 0 0 10px; color: var(--muted); }
.ask-step__q {
  margin: 0; outline: none;
  font-family: var(--f-display); font-stretch: 62%; font-weight: 800; text-transform: uppercase;
  font-size: clamp(34px, 4.2vw, 50px); line-height: .9; letter-spacing: -.01em; word-spacing: .14em;
  overflow-wrap: anywhere;
}
.ask-step__hint { margin: 10px 0 20px; font-size: 15px; line-height: 1.45; color: var(--muted); }
.ask-step__hint.is-warn { color: var(--ink); }
.ask-step__hint.is-warn::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 8px; background: var(--signal); vertical-align: 1px; }

/* ---------- chips ---------- */
.ask-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ask-chip {
  appearance: none; -webkit-appearance: none; margin: 0; border-radius: 0; cursor: pointer;
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 46px; padding: 0 16px 0 12px;
  background: transparent; color: var(--ink);
  border: 1px solid var(--line);
  font: 500 15px/1.2 var(--f-text); text-align: left;
  touch-action: manipulation; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent;
  transition: border-color var(--dur-1) ease, background-color var(--dur-1) ease, transform var(--dur-1) var(--ease-out);
}
.ask-chip__k { display: inline-grid; place-items: center; width: 22px; height: 22px; border: 1px solid var(--line); color: var(--muted); font-size: 13px; transition: inherit; }
.ask-chip:active { transform: scale(.97); }
.ask-chip[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); border-color: var(--on-accent); }
.ask-chip[aria-pressed="true"] .ask-chip__k { background: var(--on-accent); color: var(--accent); border-color: var(--on-accent); }
@media (hover: hover) and (pointer: fine) {
  .ask-chip:hover { border-color: var(--ink); }
  .ask-chip:hover .ask-chip__k { border-color: var(--ink); color: var(--ink); }
  .ask-chip[aria-pressed="true"]:hover .ask-chip__k { color: var(--accent); }
}

/* ---------- inputs ---------- */
.ask-field { position: relative; }
.ask-input {
  display: block; width: 100%; margin: 0; border-radius: 0;
  -webkit-appearance: none; appearance: none;
  min-height: 56px; padding: 14px 16px;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line);
  font: 400 20px/1.3 var(--f-text);  /* ≥16px: no iOS focus zoom */
  caret-color: var(--ink);
  transition: border-color var(--dur-1) ease;
}
.ask-input::placeholder { color: var(--muted); opacity: .75; }
.ask-input:focus { outline: none; border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.ask-input[aria-invalid="true"] { border-color: var(--ink); }
.ask-input--area { min-height: 112px; max-height: 40vh; resize: vertical; font-size: 17px; line-height: 1.45; }

.ask-err { min-height: 22px; margin: 8px 0 0; font-size: 14px; line-height: 1.4; color: var(--ink); }
.ask-err:not(:empty)::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 8px; background: var(--signal); vertical-align: 1px; }
/* read-back of what we understood; user data, so never uppercased (e-mails, Turkish İ) */
.ask-read { min-height: 20px; margin: 0; font-size: 14px; line-height: 1.4; color: var(--muted); overflow-wrap: anywhere; }
.ask-read:empty { display: none; }
.ask-cnt { position: absolute; right: 0; top: -22px; margin: 0; color: var(--muted); font-variant-numeric: tabular-nums; }

.ask-kbs { display: flex; gap: 0; margin: 0 0 10px; }
.ask-kb {
  appearance: none; margin: 0; border-radius: 0; cursor: pointer;
  min-height: 32px; padding: 0 12px;
  background: transparent; color: var(--muted); border: 1px solid var(--line);
  touch-action: manipulation; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent;
  transition: color var(--dur-1) ease, background-color var(--dur-1) ease;
}
.ask-kb + .ask-kb { border-left: 0; }
.ask-kb[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
@media (hover: hover) and (pointer: fine) { .ask-kb:not([aria-pressed="true"]):hover { color: var(--ink); } }

/* summary on the last step */
.ask-sum { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); }
.ask-sum__k { margin: 0 0 6px; color: var(--muted); }
.ask-sum__row { margin: 0; font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
.ask-sum__sep { color: var(--muted); }
.ask-sum__i {
  appearance: none; border: 0; border-radius: 0; margin: 0; padding: 0; background: none; color: var(--ink); cursor: pointer;
  font: inherit; text-align: left; touch-action: manipulation;
}
.ask-sum__i bdi { text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
@media (hover: hover) and (pointer: fine) { .ask-sum__i:hover bdi { text-decoration-color: var(--ink); } }

/* aydınlatma line on the send step (L) */
.ask-legal { margin: 12px 0 0; font-size: 14px; line-height: 1.45; color: var(--muted); }
.ask-legal a { color: var(--ink); text-decoration: underline; text-decoration-thickness: 1px; text-decoration-color: var(--muted); text-underline-offset: 3px; }
@media (hover: hover) and (pointer: fine) { .ask-legal a:hover { text-decoration-color: var(--ink); } }

/* Web3Forms botcheck honeypot: off-canvas, not display:none (some bots skip hidden fields) */
.ask-hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }

/* ---------- footer / buttons ---------- */
.ask-foot { display: flex; align-items: center; gap: 16px; padding-top: 14px; }
.ask-back {
  appearance: none; border: 0; border-radius: 0; background: none; color: var(--ink); cursor: pointer;
  min-height: 44px; padding: 0 4px; margin-left: -4px; font: 500 15px/1 var(--f-text);
  touch-action: manipulation; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent;
  transition: opacity var(--dur-1) ease;
}
.ask-back.is-hidden { opacity: 0; pointer-events: none; }
@media (hover: hover) and (pointer: fine) { .ask-back:hover { text-decoration: underline; text-underline-offset: 4px; } }
.ask-enter { margin-left: auto; color: var(--muted); }

.ask-next, .ask-again {
  appearance: none; border-radius: 0; cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 44px; padding: 0 18px;
  font: 600 15px/1 var(--f-text);
  touch-action: manipulation; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent;
  transition: transform var(--dur-1) var(--ease-out), background-color var(--dur-1) ease, color var(--dur-1) ease;
}
.ask-next { background: var(--ink); color: var(--bg); border: 1px solid var(--ink); }
.ask-foot .ask-next { margin-left: 0; }
.ask-enter:empty + .ask-next { margin-left: auto; }
.ask-next.is-send { background: var(--accent); color: var(--on-accent); border-color: var(--on-accent); }
.ask-next__a { display: inline-block; transition: transform var(--dur-1) var(--ease-out); }
.ask-next:active, .ask-again:active { transform: scale(.97); }
@media (hover: hover) and (pointer: fine) {
  .ask-next:hover .ask-next__a { transform: translateX(3px); }
  .ask-next.is-send:hover .ask-next__a { transform: translate(2px, -2px); }
}
.ask-again { background: transparent; color: var(--ink); border: 1px solid var(--ink); }
@media (hover: hover) and (pointer: fine) { .ask-again:hover { background: var(--ink); color: var(--bg); } }

.ask :focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.ask .ask-input:focus-visible, .ask [tabindex="-1"]:focus-visible { outline: none; }
.ask-chip[aria-pressed="true"]:focus-visible { outline-color: var(--ink); }

/* ---------- done / fail ---------- */
.ask-stage.is-after { display: flex; align-items: center; }
.ask-done { width: 100%; padding: 30px 28px 28px; border: 1px solid var(--line); background: var(--bg); }
.ask-done[hidden] { display: none; }
.ask-done__tag { display: flex; align-items: center; gap: 8px; margin: 0 0 16px; color: var(--muted); }
.ask-done__tag i { width: 8px; height: 8px; background: var(--accent); border: 1px solid var(--ink); }
.ask-done__tag--sig i { background: var(--signal); border-color: var(--signal); }
.ask-done__h { margin: 0; outline: none; font-family: var(--f-display); font-stretch: 62%; font-weight: 800; text-transform: uppercase; font-size: clamp(40px, 5vw, 60px); line-height: .88; letter-spacing: -.01em; word-spacing: .14em; }
.ask-done__p { max-width: 46ch; margin: 14px 0 22px; font-size: 16px; line-height: 1.5; color: var(--ink); overflow-wrap: anywhere; }
.ask-fail__row { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- envelope ---------- */
.env { position: absolute; z-index: 2; pointer-events: none; }
.env-in { position: absolute; inset: 0; }
.env-back { position: absolute; inset: 0; background: var(--bg); border: 1px solid var(--ink); }
.env-flap { position: absolute; inset: 0; backface-visibility: visible; will-change: transform; }
.env-flap--l { transform-origin: 0 50%; }
.env-flap--r { transform-origin: 100% 50%; }
.env-flap--b { transform-origin: 50% 100%; }
.env-flap--t { transform-origin: 50% 0; }
.env-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.env-svg polygon { fill: var(--bg); stroke: var(--ink); stroke-width: 1; stroke-linejoin: miter; }
.env-flap--t .env-svg polygon { fill: var(--surface); }
.env-seal {
  position: absolute; left: 50%; top: 60%;
  width: 40px; height: 40px; display: grid; place-items: center;
  background: var(--accent); color: var(--on-accent); border: 1px solid var(--on-accent);
  transform: translate(-50%, -50%) rotate(-7deg); opacity: 0;
}
.env-seal span { font-family: var(--f-display); font-stretch: 62%; font-weight: 800; font-size: 16px; letter-spacing: .02em; line-height: 1; }

.env-fly { position: fixed; inset: 0; z-index: 80; pointer-events: none; overflow: hidden; }
.env-fx { position: absolute; will-change: transform; }
.env-fy { position: absolute; left: 0; top: 0; will-change: transform; }
.env-fy > .env { position: absolute; }
.env-streak { position: absolute; inset: 0; overflow: visible; }
.env-streak path { fill: none; stroke: var(--ink); stroke-linecap: round; stroke-linejoin: round; }
.env-streak__a { stroke-width: 1.3; opacity: .34; }
.env-streak__b { stroke-width: .8; opacity: .2; stroke-dasharray: 14 5 3 6; }

/* ---------- phone ---------- */
@media (max-width: 760px) {
  .ask-card { padding: 18px 18px 16px; }
  .ask-bar { margin: 12px -18px 0; }
  .ask-step { padding-top: 22px; }
  .ask-step__q { font-size: clamp(34px, 10vw, 44px); }
  .ask-chips { display: grid; grid-template-columns: 1fr; gap: 6px; }
  .ask-chip { min-height: 52px; width: 100%; font-size: 16px; }
  .ask-foot { gap: 12px; }
  .ask-foot .ask-next { flex: 1 1 auto; min-height: 50px; }
  .ask-done { padding: 24px 18px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .ask-bar i, .ask-dot, .ask-chip, .ask-next, .ask-next__a { transition-duration: 1ms; }
  .ask-chip:active, .ask-next:active, .ask-again:active { transform: none; }
}
.ask-nowrap { white-space: nowrap; }
