/* Hoot v2 home, lower sections: pre-dawn band, #feedback, #pricing (plan cards + Questions).
   Owner: builder C (r22; the #support tip card styles were removed, see backup-before-r22). Also loaded by /pricing. Partial: v2-build/partials/home-lower.html. Uses base.css tokens and components.
   Hidden reveal states belong to the motion engine (html.motion-ready); nothing here hides content. */

/* ---------- Pre-dawn band ---------- */
body.v2 .h-lower-band { --h-band-h: clamp(190px, 24vw, 360px); }
body.v2 .h-lower-band__sky { background: var(--h-sky-predawn); }
body.v2 .h-lower-band .h-anim-firefly { transform-box: fill-box; }
body.v2 .h-lower-band [data-parallax] { will-change: transform; }
/* end the band in a soft fade into #101318 instead of a straight seam */
body.v2 .h-lower-band::after { height: 64px; background: linear-gradient(to bottom, rgb(16 19 24 / 0), var(--h-bg)); pointer-events: none; }
/* fade the paper grain out at both edges so the seams with the page stay invisible */
body.v2 .h-lower-band.h-grain::before {
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 30%, #000 70%, transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0%, #000 30%, #000 70%, transparent 100%);
}

/* ---------- Shared section frame ---------- */
body.v2 .h-lower { position: relative; isolation: isolate; }
/* A soft pool of the section's accent behind its main card; it never reaches the section edges, so every seam stays #101318. */
body.v2 .h-lower::before {
  content: "";
  position: absolute; z-index: -1; pointer-events: none;
  inset: 12% 0 12% 0;
  background: radial-gradient(46% 52% at var(--h-lower-glow-x, 70%) 50%, rgb(var(--h-accent-rgb) / .075), transparent 72%);
}
/* consecutive lower sections share one gap instead of two full paddings */
body.v2 .h-lower + .h-lower { padding-top: calc(var(--h-section-y) * .45); }
body.v2 .h-lower-head { gap: var(--h-s-4); margin-bottom: 0; }
body.v2 .h-lower-head .h-lead { max-width: 40ch; }

body.v2 .h-lower-art svg { width: 100%; height: auto; overflow: visible; }
body.v2 .h-lower-steam { transform-box: fill-box; transform-origin: 50% 100%; }

/* study doodles in the margins (texture only, wide screens only) */
body.v2 .h-lower-doodle { display: none; position: absolute; z-index: -1; width: 92px; height: auto; pointer-events: none; }
@media (min-width: 1400px) {
  body.v2 .h-lower-doodle { display: block; width: 76px; }
  body.v2 .h-lower-doodle--left { left: max(16px, calc(50% - 700px)); top: 18%; }
  body.v2 .h-lower-doodle--right { right: max(16px, calc(50% - 700px)); top: 22%; }
}

/* ---------- Questions ---------- */
body.v2 .h-lower-faq { --h-lower-glow-x: 30%; }
body.v2 .h-lower-faq .h-faq { min-width: 0; counter-reset: h-lower-q; }
/* small numbered tab before each question */
body.v2 .h-lower-faq .h-faq__q { justify-content: flex-start; counter-increment: h-lower-q; }
body.v2 .h-lower-faq .h-faq__q::before {
  content: counter(h-lower-q, decimal-leading-zero);
  flex: none; min-width: 2.2em;
  font-size: .8125rem; font-weight: 700; letter-spacing: .08em; font-variant-numeric: tabular-nums;
  color: var(--h-accent);
}
body.v2 .h-lower-faq .h-faq__toggle { margin-left: auto; }
body.v2 .h-lower-faq .h-faq__a { padding-left: calc(22px + 2.2em * .8125 + 16px); }
@media (max-width: 479px) {
  body.v2 .h-lower-faq .h-faq__q { padding-left: 16px; gap: 12px; font-size: 1rem; }
  body.v2 .h-lower-faq .h-faq__a { padding-left: 16px; padding-right: 16px; }
}
body.v2 .h-lower-faq .h-faq__item { box-shadow: var(--h-shadow-1); }
@media (hover: hover) {
  body.v2 .h-lower-faq .h-faq__item:not([open]):hover { border-color: var(--h-accent-line); background: color-mix(in srgb, var(--h-panel) 82%, var(--h-panel-2)); }
}
body.v2 .h-lower-faq .h-faq__q:focus-visible { outline-offset: -2px; }

/* ---------- Feedback ---------- */
body.v2 .h-lower-feedback { --h-lower-glow-x: 50%; }
body.v2 .h-fb {
  position: relative;
  display: grid; grid-template-columns: 1fr; gap: clamp(28px, 4vw, 56px); align-items: center;
  padding: clamp(20px, 5vw, 64px);
  border-radius: var(--h-r-xl);
  background:
    radial-gradient(70% 90% at 100% 0%, rgb(var(--h-accent-rgb) / .14) 0%, transparent 60%),
    radial-gradient(60% 80% at 0% 100%, rgba(124, 203, 245, .07) 0%, transparent 60%),
    var(--h-panel);
  border: 1px solid var(--h-line-soft);
  box-shadow: var(--h-shadow-2);
  overflow: hidden;
}
body.v2 .h-fb::after {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; pointer-events: none;
  background: linear-gradient(90deg, rgb(var(--h-accent-rgb) / 0), var(--h-accent) 30%, var(--h-apricot) 60%, rgb(var(--h-accent-rgb) / 0));
}
body.v2 .h-fb__copy { display: flex; flex-direction: column; align-items: flex-start; gap: var(--h-s-4); min-width: 0; }
body.v2 .h-fb__copy .h-title { max-width: 14ch; }
body.v2 .h-fb__action { min-width: 0; }
@media (min-width: 900px) {
  body.v2 .h-fb { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
  /* when the form is open, line the copy up with its top */
  body.v2 .h-fb:has([data-fb-panel]:not([hidden])) { align-items: start; }
}

body.v2 .h-fb-intro { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 18px; }
body.v2 .h-fb-intro__art { width: min(100%, 360px); }
body.v2 .h-fb-intro__art svg { width: 100%; height: auto; overflow: visible; }
body.v2 .h-fb-intro__note { max-width: 40ch; text-wrap: balance; color: var(--h-muted); font-size: .9375rem; line-height: 1.55; }

/* the form */
body.v2 .h-fb-panel {
  position: relative;
  display: flex; flex-direction: column; gap: 20px;
  padding: clamp(18px, 3vw, 30px);
  border-radius: var(--h-r-lg);
  background: var(--h-panel-2);
  border: 1px solid var(--h-accent-line);
  box-shadow: var(--h-shadow-3), 0 0 0 6px rgb(var(--h-accent-rgb) / .05);
}
@media (prefers-reduced-motion: no-preference) {
  html:not(.motion-off) body.v2 .h-fb-inline:not([hidden]) .h-fb-panel { animation: h-lower-panel-in var(--h-dur-2) var(--h-ease-out) both; }
}
@keyframes h-lower-panel-in { from { opacity: 0; transform: translateY(12px) scale(.99); } }

body.v2 .h-fb-panel__top { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: 14px; }
body.v2 .h-fb-panel__badge {
  width: 48px; height: 48px; border-radius: 15px;
  display: grid; place-items: center;
  color: var(--h-on-accent); background: var(--h-accent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 10px 24px -10px rgb(var(--h-accent-rgb) / .8);
  transform: rotate(-5deg);
}
body.v2 .h-fb-panel__badge svg { width: 24px; height: 24px; }
body.v2 .h-fb-panel__head { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-width: 0; }
body.v2 .h-fb-panel__head h3 { font-size: clamp(1.3rem, 1.15rem + .6vw, 1.6rem); font-weight: 700; letter-spacing: -.025em; line-height: 1.2; }
body.v2 .h-fb-panel__note {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 12px; border-radius: 10px;
  background: var(--h-accent-tint); border: 1px solid var(--h-accent-line);
  color: var(--h-accent); font-size: .8125rem; font-weight: 600; line-height: 1.35;
}
body.v2 .h-fb-panel__note svg { width: 15px; height: 15px; flex: none; }
body.v2 .h-fb-panel__close {
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid var(--h-line); background: var(--h-panel-3); color: var(--h-ink-soft);
  transition: background-color var(--h-dur-1), color var(--h-dur-1), transform var(--h-dur-2) var(--h-ease-spring);
}
body.v2 .h-fb-panel__close svg { width: 18px; height: 18px; }
@media (hover: hover) { body.v2 .h-fb-panel__close:hover { background: #2c3542; color: var(--h-ink); transform: rotate(90deg); } }

body.v2 .h-fb-panel__body { display: flex; flex-direction: column; gap: 18px; }
body.v2 .h-fb-input-wrap { position: relative; display: flex; align-items: center; }
body.v2 .h-fb-input-wrap > svg { position: absolute; left: 15px; width: 19px; height: 19px; color: var(--h-muted); pointer-events: none; }
body.v2 .h-fb-input-wrap .h-input { padding-left: 46px; }
body.v2 .h-fb-textarea-wrap { position: relative; }
body.v2 .h-fb-textarea-wrap textarea.h-input { min-height: 150px; line-height: 1.6; padding-bottom: 52px; }
body.v2 .h-fb-textarea-wrap.is-over textarea.h-input { border-color: var(--h-accent); box-shadow: 0 0 0 3px rgb(var(--h-accent-rgb) / .25); }
body.v2 .h-fb-textarea-wrap input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

/* attach row along the bottom of the message box; app.js pads the textarea to its height */
body.v2 .h-fb-tools {
  position: absolute; left: 10px; right: 12px; bottom: 10px;
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px;
  pointer-events: none;
}
body.v2 .h-fb-chips-list { display: contents; }
body.v2 .h-fb-attach {
  pointer-events: auto; flex: none;
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 32px; padding: 4px 11px; border-radius: 9px;
  border: 1px solid var(--h-line); background: var(--h-panel-3); color: var(--h-accent);
  font-size: .8125rem; font-weight: 600; line-height: 1.4;
  transition: border-color var(--h-dur-1), background-color var(--h-dur-1);
}
body.v2 .h-fb-attach svg { width: 14px; height: 14px; flex: none; }
@media (hover: hover) { body.v2 .h-fb-attach:hover { border-color: var(--h-accent-line); background: var(--h-accent-tint); } }
body.v2 .h-fb-count { flex: none; margin-left: auto; color: var(--h-faint); font-size: .75rem; font-variant-numeric: tabular-nums; pointer-events: none; }

/* chips created by app.js */
body.v2 .h-fb-tools .fb-attachment {
  pointer-events: auto; flex: 0 1 auto; min-width: 0; max-width: 200px;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 4px 3px 3px; border-radius: 9px;
  border: 1px solid var(--h-line); background: var(--h-panel-3);
}
body.v2 .h-fb-tools .fb-preview { width: 22px; height: 22px; flex: none; object-fit: cover; border-radius: 5px; }
body.v2 .h-fb-tools .fb-attachment__glyph { flex: none; display: grid; place-items: center; width: 22px; height: 22px; color: var(--h-muted); }
body.v2 .h-fb-tools .fb-attachment__glyph svg { width: 14px; height: 14px; }
body.v2 .h-fb-tools .fb-attachment__name { flex: 1; min-width: 0; font-size: .75rem; color: var(--h-ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.v2 .h-fb-tools .fb-attachment__remove {
  flex: none; width: 22px; height: 22px; border-radius: 6px; padding: 0;
  display: grid; place-items: center; background: transparent; color: var(--h-muted);
}
body.v2 .h-fb-tools .fb-attachment__remove svg { width: 12px; height: 12px; }
@media (hover: hover) { body.v2 .h-fb-tools .fb-attachment__remove:hover { background: rgba(255, 255, 255, .08); color: var(--h-ink); } }

body.v2 .h-fb-error { color: var(--h-ember); font-size: .9375rem; font-weight: 600; }
body.v2 .h-fb-status {
  padding: 12px 14px; border-radius: var(--h-r-sm);
  background: var(--h-mint-tint); border: 1px solid rgba(130, 221, 209, .3);
  color: var(--h-mint); font-size: .9375rem; line-height: 1.55;
}

@media (max-width: 479px) {
  body.v2 .h-tip-assurances { flex-direction: column; gap: 8px; }
  body.v2 .h-tip-assurances li.h-tip-assurances__dot { display: none; } /* beats the li display rule above */
  body.v2 .h-fb-panel__top { grid-template-columns: minmax(0, 1fr) auto; }
  body.v2 .h-fb-panel__badge { display: none; }
  body.v2 .h-tip { min-height: 104px; }
}

/* inline link in the support lead (Pro) */
body.v2 .h-lower-head .h-lead a { color: var(--h-ink); text-decoration: underline; text-decoration-color: var(--h-accent); text-underline-offset: 3px; }
@media (hover: hover) { body.v2 .h-lower-head .h-lead a:hover { color: var(--h-accent); } }

/* ---------- Pricing (r22): Free and Pro cards, then Questions ---------- */
body.v2 .h-lower-pricing { --h-lower-glow-x: 62%; }
body.v2 .h-lower-pricing .h-lower-head { margin-bottom: clamp(32px, 4vw, 52px); }
body.v2 .h-plans { display: grid; grid-template-columns: 1fr; gap: clamp(16px, 2vw, 24px); max-width: 900px; margin-inline: auto; align-items: stretch; }
@media (min-width: 760px) { body.v2 .h-plans { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }

body.v2 .h-plan {
  position: relative;
  display: flex; flex-direction: column; gap: 18px;
  padding: clamp(22px, 3vw, 32px);
  border-radius: var(--h-r-xl);
  background: var(--h-panel);
  border: 1px solid var(--h-line-soft);
  box-shadow: var(--h-shadow-2);
  min-width: 0;
}
body.v2 .h-plan--pro {
  border-color: rgba(148, 169, 255, .5);
  background: radial-gradient(90% 60% at 50% 0%, rgba(148, 169, 255, .14) 0%, transparent 70%), var(--h-panel);
  box-shadow: 0 0 0 1px rgba(148, 169, 255, .28), var(--h-shadow-2), 0 0 70px -18px rgba(148, 169, 255, .45);
}
body.v2 .h-plan--pro::after {
  content: ""; position: absolute; left: 24px; right: 24px; top: -1px; height: 2px; border-radius: 2px; pointer-events: none;
  background: linear-gradient(90deg, rgba(148, 169, 255, 0), #94a9ff 30%, #bcd0ff 55%, rgba(148, 169, 255, 0));
}
/* side by side from 760px; on phones Free comes first, so "free" is the first thing read */

body.v2 .h-plan__name { display: flex; align-items: center; gap: 10px; margin: 0; font-size: clamp(1.35rem, 1.2rem + .6vw, 1.6rem); font-weight: 700; letter-spacing: -.02em; line-height: 1.15; }
body.v2 .h-plan__mark { width: 26px; height: 26px; color: #94a9ff; filter: drop-shadow(0 0 8px rgba(148, 169, 255, .55)); }
body.v2 .h-plan__price { display: flex; align-items: baseline; gap: 8px; margin: 0; }
body.v2 .h-plan__price strong { font-size: clamp(2.4rem, 2rem + 1.4vw, 3rem); font-weight: 700; line-height: 1; letter-spacing: -.04em; text-shadow: var(--h-glow-text); }
body.v2 .h-plan__price span { color: var(--h-muted); font-size: 1rem; }

/* the three prices: static rows (choosing a plan happens in the pop-up) */
body.v2 .h-plan__prices { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
body.v2 .h-plan__row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 12px; row-gap: 2px;
  padding: 10px 14px; border-radius: var(--h-r-sm);
  background: var(--h-bg); border: 1px solid var(--h-line-soft);
}
body.v2 .h-plan__row.is-best { border-color: rgba(148, 169, 255, .5); background: var(--h-blue-tint); }
body.v2 .h-plan__plan { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-weight: 600; color: var(--h-ink); }
body.v2 .h-plan__amt { color: var(--h-muted); font-size: .9375rem; white-space: nowrap; text-align: right; }
body.v2 .h-plan__amt strong { color: var(--h-ink); font-size: 1.125rem; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
body.v2 .h-plan__note { grid-column: 1 / -1; color: var(--h-ink-soft); font-size: .8125rem; }

body.v2 .h-plan__plus { margin: 0 0 -8px; color: var(--h-muted); font-size: .875rem; font-weight: 600; letter-spacing: .02em; }
body.v2 .h-plan__list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
body.v2 .h-plan__list li { display: flex; align-items: flex-start; gap: 10px; color: var(--h-ink-soft); font-size: 1rem; line-height: 1.45; }
body.v2 .h-plan__tick { width: 18px; height: 18px; flex: none; margin-top: 2px; color: var(--h-mint); }
body.v2 .h-plan--free .h-plan__tick { color: var(--h-faint); }
body.v2 .h-plan--pro .h-plan__tick { color: #94a9ff; }
body.v2 .h-plan--pro .h-plan__list li { color: var(--h-ink); }
body.v2 .h-plan__btn { margin-top: auto; }
body.v2 .h-plan__fine { margin: -8px 0 0; text-align: center; color: var(--h-muted); font-size: .875rem; }

/* Questions under the cards, one narrow column */
body.v2 .h-pricing-faq { max-width: 760px; margin: clamp(56px, 7vw, 96px) auto 0; }
body.v2 .h-pricing-faq__title { margin: 0 0 20px; text-align: center; font-size: var(--h-fs-h3); font-weight: 700; letter-spacing: -.02em; }

/* r22 fix: Feedback starts closer to the valley band above it */
body.v2 .h-lower-band + .h-lower-feedback { padding-top: calc(var(--h-section-y) * .45); }
