/* Featherwork voice session, estimate sheet and lead form.
   Variables are scoped here so the page design (site.css) stays independent. */
.session, .sheet {
  --paper: #f5f1ea;
  --paper-2: #ece5d9;
  --ink: #16151a;
  --ink-soft: #4d4a52;
  --coral: #ee5a36;
  --coral-deep: #cf4321;
  --lime: #cfe4b8;
  --lilac: #d4cbf5;
  --night: #17122a;
  --night-2: #221a3b;
  --night-line: rgba(255, 255, 255, 0.12);
  --good: #3ddc84;
  --warn: #ffc24b;
  --bad: #ff6b6b;
  --display: 'Bricolage Grotesque', ui-sans-serif, system-ui, sans-serif;
  --serif: 'Instrument Serif', Georgia, serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --radius: 22px;
  --gutter: clamp(16px, 4vw, 48px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --display: 'DM Sans', system-ui, sans-serif;
  --serif: 'Space Grotesk', system-ui, sans-serif;
  --mono: 'DM Sans', system-ui, sans-serif;
  font-family: var(--display);
  line-height: 1.5;
}
.session { --coral: #ff6d4a; --lime: #d6f27d; --lilac: #d5b4f7; --night: #221726; --night-2: #33213a; }
.sheet { --coral: #ff6d4a; --lime: #f3ff7c; --paper: #faf6e9; --paper-2: #f1e9d8; --ink: #221726; --ink-soft: #5d5263; }
body.locked { overflow: hidden; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.session button, .sheet button { font: inherit; color: inherit; cursor: pointer; }
.session :focus-visible, .sheet :focus-visible { outline: 3px solid var(--coral); outline-offset: 3px; border-radius: 8px; }
.session .logo { display: inline-flex; align-items: center; gap: 8px; font-family: 'Space Grotesk', sans-serif; font-size: 20px; font-weight: 700; letter-spacing: -1px; color: #fff; }
.session .logo-mark { width: 26px; height: 26px; }
.session .logo .logo-mark .vane { fill: var(--coral); }
.session .logo .logo-mark .spine { stroke: var(--night); stroke-width: 2; stroke-linecap: round; }
.type-link.light { background: none; border: 0; padding: 6px 8px; font-size: 15px; color: rgba(255,255,255,.65); text-decoration: underline; text-underline-offset: 4px; text-decoration-color: rgba(255,255,255,.3); }
.type-link.light:hover { color: #fff; }
.p-title em { font-style: normal; color: var(--coral); }
.sheet .small { font-size: 14px; color: var(--ink-soft); }
.sheet a { color: inherit; text-decoration: underline; }

/* =====================================================================
   Voice session
   ===================================================================== */
.session {
  position: fixed; inset: 0; z-index: 50;
  background: radial-gradient(120% 90% at 50% 0%, var(--night-2), var(--night) 60%);
  color: #fff;
  display: flex; flex-direction: column;
  animation: sessionIn 0.6s var(--ease);
}
@keyframes sessionIn { from { opacity: 0; transform: scale(1.02); } to { opacity: 1; transform: none; } }
.session-grain { position: absolute; inset: 0; pointer-events: none; opacity: 0.06; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }

.session-bar { display: flex; align-items: center; gap: 12px; padding: 14px var(--gutter); padding-top: max(14px, env(safe-area-inset-top)); position: relative; z-index: 2; }
.chips { display: flex; gap: 8px; margin-left: auto; justify-content: flex-end; min-width: 0; }
.chip { font-family: var(--mono); font-size: 11.5px; padding: 5px 10px; border-radius: 99px; border: 1px solid var(--night-line); color: rgba(255, 255, 255, 0.8); white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.chip.demo { border-color: var(--warn); color: var(--warn); }
.chip.live { border-color: var(--lime); color: var(--lime); }
.chip.mic i { width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 255, 255, 0.35); }
.chip.mic.on i { background: var(--good); box-shadow: 0 0 0 0 rgba(61, 220, 132, 0.7); animation: pulse 1.6s infinite; }
.chip.mic.muted i { background: var(--warn); }
.chip.mic.blocked i { background: var(--bad); }
@keyframes pulse { 70% { box-shadow: 0 0 0 7px rgba(61, 220, 132, 0); } 100% { box-shadow: 0 0 0 0 rgba(61, 220, 132, 0); } }
@media (max-width: 640px) {
  .chip[data-chip-voice] { display: none; }
  .chip { font-size: 10.5px; padding: 5px 8px; }
  .session-bar .logo span { display: none; }
}

.icon-btn { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--night-line); background: rgba(255, 255, 255, 0.06); display: grid; place-items: center; flex: none; }
.icon-btn svg { width: 20px; height: 20px; fill: currentColor; }
.icon-btn:hover { background: rgba(255, 255, 255, 0.14); }
.icon-btn.dark { border-color: rgba(0, 0, 0, 0.15); background: rgba(0, 0, 0, 0.05); color: var(--ink); }

.session-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr minmax(320px, 400px); position: relative; z-index: 1; }
.stage { display: flex; flex-direction: column; align-items: center; padding: 8px var(--gutter) 24px; overflow-y: auto; min-height: 0; }
.stage > * { flex-shrink: 0; }

/* typing layout: transcript is the conversation, input pinned under it */
.session.text-mode .orb-wrap { width: 120px; margin-top: 0; }
.session.text-mode .captions { display: none; }
.session.text-mode .state { order: 1; }
.session.text-mode .orb-wrap { order: 0; }
.session.text-mode .demo-banner { order: -1; }
.session.text-mode .notice { order: 2; }
.session.text-mode .transcript { order: 3; margin-top: 4px; }
.session.text-mode .type-bar { order: 4; position: sticky; bottom: 0; padding: 10px 0; margin: 0; background: linear-gradient(transparent, var(--night) 30%); }
.session.text-mode .controls { order: 5; }
.session.text-mode .type-link { order: 6; }

.demo-banner { max-width: 560px; font-size: 13.5px; text-align: center; padding: 10px 14px; border-radius: 14px; border: 1px dashed rgba(255, 194, 75, 0.6); color: #ffe2a3; background: rgba(255, 194, 75, 0.06); margin-bottom: 4px; }

.orb-wrap { position: relative; width: min(52vh, 420px, 82vw); aspect-ratio: 1; margin-top: clamp(4px, 2vh, 24px); flex: none; }
.orb { width: 100%; height: 100%; }
.orb-hit { position: absolute; inset: 18%; border-radius: 50%; border: 0; background: transparent; }

.state { font-family: var(--mono); font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; margin: 4px 0 10px; color: rgba(255, 255, 255, 0.65); min-height: 1.5em; }
.state.listening { color: var(--lime); }
.state.speaking { color: #ffb19f; }

.captions { width: min(720px, 100%); text-align: center; min-height: 8em; }
.cap-scout { font-size: clamp(20px, 2.4vw, 28px); line-height: 1.3; letter-spacing: -0.015em; margin: 0 0 14px; text-wrap: balance; }
.cap-scout .w { opacity: 0.25; transition: opacity 0.25s; }
.cap-scout .w.on { opacity: 1; }
.cap-you { font-family: var(--serif); font-style: italic; font-size: clamp(20px, 2.2vw, 26px); color: var(--lime); margin: 0; min-height: 1.3em; }
.cap-you:not(:empty)::before { content: '“'; }
.cap-you:not(:empty)::after { content: '”'; }

.notice { width: min(560px, 100%); margin: 8px 0; background: rgba(255, 255, 255, 0.07); border: 1px solid var(--night-line); border-radius: 16px; padding: 14px 16px; font-size: 15px; }
.notice strong { color: var(--warn); }
.notice .notice-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.pill { border: 1px solid rgba(255, 255, 255, 0.3); background: transparent; color: #fff; border-radius: 99px; padding: 8px 14px; font-size: 14px; }
.pill.solid { background: var(--lime); color: var(--ink); border-color: var(--lime); font-weight: 600; }

.type-bar { width: min(640px, 100%); display: flex; gap: 8px; margin: 10px 0 6px; }
.type-bar input { flex: 1; min-width: 0; font: inherit; font-size: 17px; color: #fff; background: rgba(255, 255, 255, 0.08); border: 1px solid var(--night-line); border-radius: 99px; padding: 14px 20px; }
.type-bar input::placeholder { color: rgba(255, 255, 255, 0.45); }
.type-bar input:focus { outline: none; border-color: var(--lime); }
.send { width: 52px; height: 52px; border-radius: 50%; border: 0; background: var(--lime); display: grid; place-items: center; flex: none; }
.send svg { width: 22px; height: 22px; fill: var(--ink); }

.controls { display: flex; gap: 12px; margin-top: 10px; }
.ctl { display: grid; justify-items: center; gap: 6px; background: none; border: 0; font-size: 12.5px; color: rgba(255, 255, 255, 0.75); width: 76px; }
.ctl svg { width: 58px; height: 58px; padding: 17px; border-radius: 50%; background: rgba(255, 255, 255, 0.08); border: 1px solid var(--night-line); fill: #fff; transition: background 0.25s, transform 0.25s var(--ease); }
.ctl:hover svg { background: rgba(255, 255, 255, 0.16); transform: translateY(-2px); }
.ctl[aria-pressed='true'] svg { background: var(--warn); fill: var(--ink); }
.ctl.end svg { background: var(--coral); border-color: var(--coral); }
.ctl.end:hover svg { background: var(--coral-deep); }

.transcript { list-style: none; padding: 16px; margin: 16px 0 0; width: min(720px, 100%); background: rgba(0, 0, 0, 0.2); border-radius: 18px; display: grid; gap: 10px; font-size: 15px; }
.transcript li { display: grid; gap: 2px; }
.transcript b { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: rgba(255, 255, 255, 0.5); font-weight: 400; }
.transcript li.user span { color: var(--lime); }

/* ---------- Live brief ---------- */
.brief { border-left: 1px solid var(--night-line); background: rgba(255, 255, 255, 0.035); min-height: 0; display: flex; flex-direction: column; }
.brief-handle { display: none; }
.brief-scroll { overflow-y: auto; padding: 18px 22px 28px; flex: 1; }
.brief-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.brief-head h3 { margin: 0; font-size: 20px; letter-spacing: -0.02em; }
.feas { font-family: var(--mono); font-size: 11.5px; padding: 4px 9px; border-radius: 99px; background: rgba(255, 255, 255, 0.08); color: rgba(255, 255, 255, 0.7); white-space: nowrap; }
.feas.good { background: var(--good); color: var(--ink); }
.feas.ok { background: var(--lime); color: var(--ink); }
.feas.warn { background: var(--warn); color: var(--ink); }
.feas.bad { background: var(--bad); color: var(--ink); }
.cov { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-bottom: 18px; }
.cov i { height: 5px; border-radius: 3px; background: rgba(255, 255, 255, 0.12); transition: background 0.5s; }
.cov i.on { background: var(--lime); }
.brief-body { display: grid; gap: 16px; }
.bsec { animation: bsecIn 0.6s var(--ease); }
@keyframes bsecIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.bsec h4 { font-family: var(--mono); font-weight: 400; font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: rgba(255, 255, 255, 0.5); margin: 0 0 6px; }
.bsec p { margin: 0; font-size: 15px; }
.bsec ul, .bsec ol { margin: 0; padding-left: 18px; font-size: 14.5px; color: rgba(255, 255, 255, 0.88); }
.bsec li { margin-bottom: 3px; }
.bsec.flash { animation: flash 1.2s var(--ease); }
@keyframes flash { 0% { background: rgba(216, 245, 91, 0.18); } 100% { background: transparent; } }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: 13px; padding: 4px 10px; border-radius: 99px; background: rgba(255, 255, 255, 0.1); }
.tag small { opacity: 0.6; font-family: var(--mono); font-size: 10.5px; margin-left: 4px; }
.brief-empty { color: rgba(255, 255, 255, 0.5); font-size: 15px; }
.btn-proposal { margin-top: 22px; width: 100%; border: 0; border-radius: 16px; padding: 16px; background: var(--lime); color: var(--ink); font-weight: 700; font-size: 17px; }

@media (max-width: 1000px) {
  .session-body { grid-template-columns: 1fr; }
  .brief {
    position: absolute; left: 0; right: 0; bottom: 0; z-index: 5;
    max-height: 78%;
    background: #1f1836; border: 1px solid var(--night-line); border-bottom: 0;
    border-radius: 22px 22px 0 0;
    transform: translateY(calc(100% - 56px - env(safe-area-inset-bottom)));
    transition: transform 0.5s var(--ease);
    box-shadow: 0 -20px 40px rgba(0, 0, 0, 0.3);
  }
  .brief.open { transform: none; }
  .brief-handle { display: flex; align-items: center; gap: 12px; width: 100%; height: 56px; padding: 0 20px; background: none; border: 0; font-weight: 600; flex: none; }
  .brief-handle::before { content: ''; position: absolute; top: 7px; left: 50%; width: 40px; height: 4px; margin-left: -20px; border-radius: 2px; background: rgba(255, 255, 255, 0.25); }
  .brief-handle span:last-child { margin-left: auto; font-family: var(--mono); font-size: 12px; color: rgba(255, 255, 255, 0.6); }
  .meter { flex: 1; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, 0.12); overflow: hidden; max-width: 160px; }
  .meter i { display: block; height: 100%; width: 0; background: var(--lime); transition: width 0.6s var(--ease); }
  .brief-scroll { padding-top: 0; padding-bottom: max(28px, env(safe-area-inset-bottom)); }
  .stage { padding-bottom: 80px; }
}

/* ---------- Proposal sheet ---------- */
.sheet { position: fixed; inset: 0; z-index: 60; background: rgba(10, 7, 20, 0.6); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); display: grid; place-items: center; padding: 16px; overflow-y: auto; animation: fadeIn 0.3s; }
@keyframes fadeIn { from { opacity: 0; } }
.sheet-card { position: relative; width: min(860px, 100%); max-height: calc(100svh - 32px); overflow-y: auto; background: var(--paper); color: var(--ink); border-radius: 28px; padding: clamp(22px, 4vw, 44px); animation: cardIn 0.6s var(--ease); }
@keyframes cardIn { from { opacity: 0; transform: translateY(40px) scale(0.98); } }
.sheet-close { position: absolute; top: 16px; right: 16px; }
.p-eyebrow { font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-soft); margin: 0 0 6px; }
.p-title { font-size: clamp(30px, 4.4vw, 50px); letter-spacing: -0.04em; line-height: 1; margin: 0 48px 18px 0; }
.p-title em { color: var(--coral); }
.p-fees { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 20px 0 12px; }
.p-fee { border-radius: 20px; padding: 20px 22px; background: var(--coral); color: #fff; }
.p-fee.m { background: var(--ink); }
.p-fee .k { font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; opacity: 0.85; margin: 0; }
.p-fee .v { font-size: clamp(40px, 6vw, 64px); font-weight: 800; letter-spacing: -0.045em; line-height: 1.05; margin: 8px 0 2px; }
.p-fee .v small { font-size: 18px; font-weight: 500; opacity: 0.8; letter-spacing: 0; }
.p-fee .r { font-size: 13.5px; opacity: 0.8; margin: 0; }
.p-disclaimer { font-size: 13.5px; background: var(--lime); border-radius: 12px; padding: 10px 14px; margin: 0 0 22px; }
.p-flags { margin: 0 0 18px; padding: 0; list-style: none; display: grid; gap: 6px; }
.p-flags li { font-size: 14px; padding: 10px 14px; border-radius: 12px; background: #fff3d6; border: 1px solid #f0d58a; }
.p-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 32px; }
.p-grid h4 { font-size: 15px; margin: 0 0 6px; letter-spacing: -0.01em; }
.p-grid ul, .p-grid ol { margin: 0; padding-left: 18px; font-size: 14.5px; color: var(--ink-soft); }
.p-grid li { margin-bottom: 3px; }
.p-full { grid-column: 1 / -1; }
details.rationale { margin-top: 22px; border-top: 1.5px solid var(--ink); padding-top: 14px; }
details.rationale summary { font-weight: 700; cursor: pointer; }
.r-table { width: 100%; border-collapse: collapse; font-size: 14px; margin-top: 10px; }
.r-table td { padding: 6px 0; border-bottom: 1px dashed rgba(0, 0, 0, 0.15); }
.r-table td:last-child { text-align: right; font-family: var(--mono); white-space: nowrap; padding-left: 12px; }
.r-table th { text-align: left; font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; padding: 14px 0 4px; color: var(--ink-soft); font-weight: 400; }
.p-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 26px; }
.p-btn { border: 1.5px solid var(--ink); background: transparent; border-radius: 99px; padding: 13px 22px; font-weight: 600; font-size: 16px; }
.p-btn.primary { background: var(--ink); color: var(--paper); }
.p-btn.primary:hover { background: var(--coral-deep); border-color: var(--coral-deep); }
.p-btn:disabled { opacity: 0.5; cursor: not-allowed; }
@media (max-width: 640px) { .p-fees, .p-grid { grid-template-columns: 1fr; } }

/* lead form */
.lead { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 8px; }
.lead label { display: grid; gap: 5px; font-size: 14px; font-weight: 600; }
.lead input, .lead select, .lead textarea { font: inherit; font-weight: 400; font-size: 16px; border: 1.5px solid var(--ink); border-radius: 12px; padding: 11px 13px; background: #fff; color: var(--ink); width: 100%; }
.lead textarea { min-height: 80px; resize: vertical; }
.lead .full { grid-column: 1 / -1; }
.lead .check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.lead .check input { width: 20px; height: 20px; margin-top: 2px; flex: none; accent-color: var(--coral); }
.privacy { font-size: 13px; color: var(--ink-soft); background: var(--paper-2); border-radius: 12px; padding: 12px 14px; }
.form-msg { font-size: 14.5px; padding: 12px 14px; border-radius: 12px; }
.form-msg.err { background: #ffe1dc; }
.form-msg.ok { background: #e3f7c5; }
@media (max-width: 640px) { .lead { grid-template-columns: 1fr; } }


@media (prefers-reduced-motion: reduce) {
  .session *, .sheet * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

