/* Lead-intake CTA prototype — palette mirrors dkatsiros.dev */

:root {
  --bg: #0d0d0f;
  --bg-raised: #141417;
  --bg-panel: #17171b;
  --line: rgba(255, 255, 255, 0.07);
  --line-strong: rgba(255, 255, 255, 0.14);
  --accent: #e8927c;
  --accent-soft: rgba(232, 146, 124, 0.14);
  --accent-line: rgba(232, 146, 124, 0.35);
  --text: #e4e2df;
  --text-muted: #98948e;
  --text-dim: #6b6862;
  --ok: #8fbf9f;
  --err: #d98a8a;
  --serif: 'EB Garamond', Georgia, 'Times New Roman', serif;
  --mono: 'Kode Mono', ui-monospace, 'Cascadia Mono', 'JetBrains Mono', Menlo, monospace;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --radius: 10px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

/* the hidden attribute always wins over display rules below */
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100dvh;
}

/* fixed grain overlay — pointer-events none, never on scrolling containers */
.grain {
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.04 0'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---- layout: single column mobile, asymmetric split >= 900px ---- */

.shell {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 48px 20px calc(56px + env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
}

@media (min-width: 900px) {
  .shell {
    grid-template-columns: 1.15fr 1fr;
    gap: 72px;
    align-items: start;
    padding-top: 96px;
    min-height: 100dvh;
  }
  .pitch { position: sticky; top: 96px; }
}

/* staggered load-in — transform/opacity only */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  animation: reveal 0.7s var(--ease) forwards;
  animation-delay: calc(var(--i, 0) * 110ms);
}
@keyframes reveal { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .reveal { animation: none; opacity: 1; transform: none; }
}

/* ---- pitch column ---- */

.kicker {
  color: var(--text-dim);
  font-size: 13px;
  letter-spacing: 0.06em;
  margin-bottom: 28px;
}
.prompt-char { color: var(--accent); margin-right: 8px; }

.headline {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2rem, 6.5vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin-bottom: 24px;
}
.headline em {
  font-style: italic;
  color: var(--accent);
}

.lede {
  color: var(--text-muted);
  max-width: 46ch;
  margin-bottom: 32px;
}

.assurances {
  list-style: none;
  display: grid;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 24px;
  max-width: 46ch;
}
.assurances li {
  color: var(--text-muted);
  font-size: 13.5px;
  display: flex;
  gap: 12px;
  align-items: baseline;
}
.tick { color: var(--ok); flex: none; }

.sig {
  margin-top: 28px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--text-dim);
}

/* ---- intake panel ---- */

.intake {
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 28px 22px 26px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 24px 48px -24px rgba(0, 0, 0, 0.6);
}
@media (min-width: 900px) {
  .intake { padding: 36px 32px 32px; }
}

.step-label {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 20px;
}
.step-num { color: var(--accent); margin-right: 10px; }

.step-divider {
  border: none;
  border-top: 1px solid var(--line);
  margin: 28px 0;
}

/* ---- mic ---- */

.mic-stage { display: grid; justify-items: center; gap: 14px; padding: 8px 0 4px; }

.mic-btn {
  position: relative;
  width: 132px;
  height: 132px;
  border: none;
  background: none;
  cursor: pointer;
  border-radius: 50%;
  -webkit-tap-highlight-color: transparent;
  touch-action: none;
}

.mic-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid var(--accent-line);
  opacity: 0.9;
  transition: transform 0.4s var(--ease), opacity 0.4s var(--ease);
}

.mic-core {
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 30% 25%, #1f1f24, #151518);
  border: 1px solid var(--line-strong);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 12px 28px -12px rgba(0, 0, 0, 0.7);
  color: var(--accent);
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease);
}
.mic-icon, .stop-icon { width: 40px; height: 40px; }
.stop-icon { display: none; }

.mic-btn:hover .mic-core { border-color: var(--accent-line); }
.mic-btn:active .mic-core { transform: scale(0.96); }
.mic-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

.mic-btn.recording .mic-icon { display: none; }
.mic-btn.recording .stop-icon { display: block; color: var(--err); }
.mic-btn.recording .mic-core { border-color: rgba(217, 138, 138, 0.5); }
.mic-btn.recording .mic-ring {
  border-color: rgba(217, 138, 138, 0.5);
  animation: pulse 1.6s var(--ease) infinite;
}
@keyframes pulse {
  0%   { transform: scale(1);    opacity: 0.9; }
  70%  { transform: scale(1.22); opacity: 0; }
  100% { transform: scale(1.22); opacity: 0; }
}

.mic-hint { color: var(--text-muted); font-size: 13px; text-align: center; }

.mic-timer {
  font-size: 15px;
  color: var(--err);
  font-variant-numeric: tabular-nums;
}

.voice-done { margin-top: 16px; }
.voice-chip {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  border-radius: 999px;
  padding: 9px 16px;
  font-size: 13px;
  color: var(--text);
}
.voice-wave { display: inline-flex; gap: 3px; align-items: center; height: 14px; }
.voice-wave i {
  width: 2.5px;
  border-radius: 2px;
  background: var(--accent);
  animation: wave 1.2s ease-in-out infinite;
  transform-origin: center;
}
.voice-wave i:nth-child(1) { height: 6px;  animation-delay: 0ms; }
.voice-wave i:nth-child(2) { height: 12px; animation-delay: 120ms; }
.voice-wave i:nth-child(3) { height: 8px;  animation-delay: 240ms; }
.voice-wave i:nth-child(4) { height: 13px; animation-delay: 360ms; }
.voice-wave i:nth-child(5) { height: 5px;  animation-delay: 480ms; }
@keyframes wave { 0%, 100% { transform: scaleY(0.6); } 50% { transform: scaleY(1); } }
@media (prefers-reduced-motion: reduce) { .voice-wave i { animation: none; } }

.voice-redo {
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.voice-redo:hover { color: var(--text); }

.mic-error {
  margin-top: 14px;
  color: var(--err);
  font-size: 13px;
  text-align: center;
}

/* ---- text fallback (de-emphasized) ---- */

.text-fallback { margin-top: 22px; }
.text-fallback summary {
  color: var(--text-dim);
  font-size: 13px;
  cursor: pointer;
  list-style: none;
  text-align: center;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s var(--ease);
}
.text-fallback summary::-webkit-details-marker { display: none; }
.text-fallback summary:hover { color: var(--text-muted); }
.text-fallback[open] summary { margin-bottom: 14px; color: var(--text-muted); }

.field-label {
  display: block;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}

textarea, input[type="email"], input[type="tel"], input[type="text"] {
  width: 100%;
  background: var(--bg-raised);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  padding: 12px 14px;
  transition: border-color 0.2s var(--ease);
}
textarea { resize: vertical; min-height: 96px; }
textarea:focus, input:focus {
  outline: none;
  border-color: var(--accent-line);
}
::placeholder { color: var(--text-dim); }

/* ---- channel picker ---- */

.channel-picker {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.channel {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 14px 6px 12px;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 12.5px;
  cursor: pointer;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease),
              background 0.2s var(--ease), transform 0.15s var(--ease);
}
.channel svg { width: 22px; height: 22px; }
.channel:hover { border-color: var(--line-strong); color: var(--text); }
.channel:active { transform: scale(0.97); }
.channel:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.channel[aria-checked="true"] {
  border-color: var(--accent-line);
  background: var(--accent-soft);
  color: var(--accent);
}

.contact-value { margin-top: 18px; }
.field-help { margin-top: 8px; font-size: 12px; color: var(--text-dim); }
.field-error { margin-top: 8px; font-size: 12.5px; color: var(--err); }

.tg-stub {
  display: inline-block;
  margin-top: 10px;
  font-size: 12.5px;
  color: var(--text-muted);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.tg-stub:hover { color: var(--accent); }

/* ---- send ---- */

.send-btn {
  position: relative;
  width: 100%;
  margin-top: 28px;
  padding: 15px 20px;
  background: var(--accent);
  color: #191512;
  border: none;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: transform 0.15s var(--ease), filter 0.2s var(--ease);
}
.send-btn:hover { filter: brightness(1.07); }
.send-btn:active { transform: translateY(1px) scale(0.99); }
.send-btn:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }
.send-btn[disabled] { cursor: default; filter: saturate(0.5) brightness(0.85); }

.send-spinner {
  display: none;
  position: absolute;
  right: 16px;
  top: 50%;
  width: 16px;
  height: 16px;
  margin-top: -8px;
  border: 2px solid rgba(25, 21, 18, 0.3);
  border-top-color: #191512;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.send-btn.busy .send-spinner { display: block; }

.send-error { margin-top: 12px; font-size: 13px; color: var(--err); text-align: center; }

.privacy-note {
  margin-top: 16px;
  font-size: 12px;
  color: var(--text-dim);
  text-align: center;
}

/* ---- success panel ---- */

.success-panel {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 16px;
  padding-top: 44px;
  padding-bottom: 44px;
}
.success-mark {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--ok);
  background: rgba(143, 191, 159, 0.1);
  border: 1px solid rgba(143, 191, 159, 0.35);
  animation: mark-in 0.5s var(--ease);
}
.success-mark svg { width: 30px; height: 30px; }
@keyframes mark-in { from { transform: scale(0.7); opacity: 0; } }

.success-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.7rem;
}
.success-body { color: var(--text-muted); max-width: 40ch; font-size: 14px; }
.success-ref { font-size: 12px; color: var(--text-dim); }
.success-again {
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.success-again:hover { color: var(--text); }
