/* Hero and the send-money composer. */

.hero { padding-block: clamp(20px, 4vw, 56px) clamp(56px, 8vw, 104px); }
.hero-grid { display: grid; gap: 40px; align-items: center; }
.hero-copy { display: grid; gap: 28px; align-content: center; }
.hero h1 { font-size: clamp(2.5rem, 1rem + 4.4vw, 4.25rem); }
.hero .lede { max-width: 34ch; }

.hero-field {
  position: relative; overflow: hidden; isolation: isolate;
  background: var(--ground-2); border: 1px solid var(--line); border-radius: var(--r-card);
  padding: clamp(20px, 4vw, 48px); display: grid; place-items: center; min-height: 520px;
}
.hero-diamond { z-index: 0; }
@media (max-width: 520px) { .hero-field { padding: 14px; min-height: 0; } }

@media (min-width: 1024px) {
  .hero { min-height: calc(100dvh - var(--nav-h)); display: grid; align-items: center; }
  .hero-grid { grid-template-columns: 1.1fr 0.9fr; gap: 64px; }
}

/* Entrance: one authored sequence, hidden only once JS has opted in. */
@keyframes rise { from { opacity: 0; transform: translateY(18px); filter: blur(3px); } to { opacity: 1; transform: none; filter: none; } }
.js [data-hero] { animation: rise 720ms var(--ease-out) both; }
.js [data-hero="0"] { animation-delay: 60ms; }
.js [data-hero="1"] { animation-delay: 160ms; }
.js [data-hero="2"] { animation-delay: 260ms; }
.js [data-hero="3"] { animation-delay: 200ms; }

/* Composer */
.composer {
  position: relative; z-index: 1; width: 100%; max-width: 400px;
  background: var(--ground); border: 1px solid var(--line-strong); border-radius: var(--r-card);
  padding: 24px; box-shadow: var(--shadow);
}
.composer-form { display: grid; gap: 18px; }
.composer-title { display: flex; align-items: center; gap: 10px; color: var(--accent-text); }
.composer-title h2 { font-size: 1.25rem; letter-spacing: -0.02em; color: var(--text); }

.affix { position: relative; }
.affix-lead { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--text-dim); pointer-events: none; }
.affix .input { padding-left: 38px; }
.field-err { color: var(--err); font-size: 0.875rem; font-weight: 600; }
.field-err:empty { display: none; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.input[aria-invalid="true"] { border-color: var(--err); }

.sum { display: grid; gap: 8px; padding-top: 14px; border-top: 1px solid var(--line); }
.sum div { display: flex; justify-content: space-between; gap: 12px; }
.sum dt { color: var(--text-dim); }
.sum dd { font-weight: 600; }

.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }
.btn[disabled]:active { transform: none; }
.btn-icon { padding: 0; width: 52px; min-height: 52px; flex: none; }
.demo-note { text-align: center; font-size: 0.8125rem; color: var(--text-faint); line-height: 1.4; }

.composer-done { display: grid; gap: 12px; justify-items: center; text-align: center; padding: 12px 0; }
.composer-done[hidden], .composer-form[hidden] { display: none; }
.composer-done h2 { font-size: 1.75rem; letter-spacing: -0.025em; }
.stamp {
  width: 68px; height: 68px; border-radius: var(--r-pill); display: grid; place-items: center;
  border: 2px solid var(--accent); color: var(--accent-text);
  animation: stamp 420ms var(--ease-out) both;
}
.stamp .icon { width: 2rem; height: 2rem; }
@keyframes stamp { from { opacity: 0; transform: scale(1.3) rotate(-8deg); } to { opacity: 1; transform: none; } }
.ref { color: var(--text-dim); padding: 8px 12px; border: 1px dashed var(--line-strong); border-radius: 8px; word-break: break-all; }
.composer.is-sending .btn-primary { pointer-events: none; }
.composer .is-shake { animation: shake 320ms var(--ease-out); }
@keyframes shake { 20% { transform: translateX(-6px); } 40% { transform: translateX(5px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(2px); } }
