/* Ask Amy phone-first landing — call CTA + optional explainer web chat. */
:root {
  --line-bg: #0B0E14;
  --line-ink: #e8eaef;
  --line-muted: #9aa3ad;
  --line-mint: #2EE6C5;
  --line-white: #ffffff;
  --line-hand: #f5d76e;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  min-height: 100%;
}
body.askamy-line {
  min-height: 100vh;
  font-family: "DM Sans", system-ui, sans-serif;
  color: var(--line-ink);
  background:
    radial-gradient(1100px 520px at 50% -10%, rgba(46, 230, 197, 0.16), transparent 55%),
    radial-gradient(700px 400px at 100% 100%, rgba(46, 230, 197, 0.06), transparent 45%),
    var(--line-bg);
  display: flex;
  flex-direction: column;
}

.line-draft {
  margin: 0;
  padding: 0.85rem 1.25rem 0;
  text-align: center;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--line-muted);
}

.line-hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 1.15rem;
  padding: clamp(1.75rem, 8vh, 4rem) 1.25rem 2rem;
  max-width: 34rem;
  margin: 0 auto;
  width: 100%;
}

.line-brand-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.55rem;
  padding-bottom: 2.6rem;
  min-height: 3.2rem;
}

.line-zone {
  position: absolute;
  z-index: 1;
  left: 50%;
  top: 0;
  width: 18rem;
  height: 18rem;
  transform: translate(-50%, -1.1rem);
  border: 0;
  border-radius: 50%;
  padding: 0;
  margin: 0;
  background: transparent;
  cursor: pointer;
}
.line-zone:focus-visible {
  outline: 2px solid var(--line-mint);
  outline-offset: 4px;
}
.line-zone:hover + .line-brand {
  transform: scale(1.02);
}
.line-brand {
  position: relative;
  z-index: 2;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.48em;
  margin: 0;
  padding: 0.15em 0 0;
  border: 0;
  border-radius: 1.4rem;
  background: transparent;
  color: var(--line-white);
  pointer-events: none;
  font-size: clamp(1.85rem, 6vw, 2.35rem);
  transition: transform 160ms ease;
}
/* Pulse sits beside the button. An animated layer on the button itself
   stops iPhone Safari repainting the trade name. */
.line-pulse {
  position: absolute;
  z-index: 0;
  left: 50%;
  top: 0;
  width: 18rem;
  height: 18rem;
  transform: translate(-50%, -1.1rem);
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
}
.line-brand.is-pulse + .line-pulse,
.line-brand[data-state="ready"] + .line-pulse {
  opacity: 1;
  animation: line-throb 1.7s ease-in-out infinite;
}
.line-brand.is-chat + .line-pulse {
  opacity: 1;
  animation: line-throb-hot 1.7s ease-in-out infinite;
}
.line-brand.is-chat ~ .line-hand {
  opacity: 0;
  visibility: hidden;
}
.line-wave {
  width: 1.05em;
  height: 1.05em;
  color: var(--line-mint);
  flex: 0 0 auto;
}
.line-wave .bar {
  fill: currentColor;
  transform-origin: center bottom;
  transform-box: fill-box;
}
/* Idle: static mint bars — no bounce, no throb */
.line-brand[data-state="idle"] .line-wave {
  color: var(--line-mint);
  animation: none;
}
.line-brand[data-state="idle"] .bar {
  animation: none;
  transform: none;
}
.line-brand[data-state="ready"] .line-wave,
.line-brand.is-pulse .line-wave {
  animation: line-ready 1.4s ease-in-out infinite;
}
.line-brand[data-state="speaking"] .line-wave {
  animation: line-speaking 0.7s ease-in-out infinite;
  color: #ff5c5c;
}
.line-brand[data-state="ready"] .bar,
.line-brand.is-pulse .bar,
.line-brand[data-state="speaking"] .bar {
  animation: line-bounce 1.2s ease-in-out infinite;
}
.line-brand[data-state="speaking"] .bar {
  animation-duration: 0.7s;
}
.line-brand.is-chat .line-wave {
  color: #ff5c5c;
  animation: line-chat-icon 1.7s ease-in-out infinite;
}
.line-brand.is-chat .bar {
  animation: line-bounce 1.7s ease-in-out infinite;
}
.line-brand .bar:nth-child(1) { animation-delay: 0s; }
.line-brand .bar:nth-child(2) { animation-delay: 0.12s; }
.line-brand .bar:nth-child(3) { animation-delay: 0.24s; }

.line-lockup {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.48em;
}
.line-lockup-amy {
  display: flex;
  align-items: baseline;
  justify-content: center;
  font-size: 1em;
  line-height: 1;
  white-space: nowrap;
}
.line-lockup-amy .amy {
  font-family: system-ui, sans-serif;
  font-weight: 700;
  color: var(--line-mint);
}
.line-lockup-amy .of {
  margin-left: 0.28em;
  font-family: system-ui, sans-serif;
  font-weight: 700;
  color: #fff;
}
.line-lockup-bar {
  display: inline-grid;
  justify-items: center;
  align-items: center;
  box-sizing: border-box;
  padding: 0.32em 0.62em 0.36em;
  border-radius: 0.28em;
  background: var(--line-white);
  color: var(--line-bg);
  font-family: system-ui, sans-serif;
  font-size: 0.76em;
  font-weight: 700;
  line-height: 1;
}
.line-lockup-sizer,
.line-lockup-label {
  grid-area: 1 / 1;
  white-space: nowrap;
}
.line-lockup-sizer { visibility: hidden; }

/* Tip sits under-left; space reserved always so show/hide does not shift layout */
.line-hand {
  position: absolute;
  z-index: 2;
  left: 0;
  bottom: 0;
  margin: 0;
  max-width: 10.5rem;
  padding: 0;
  font-family: Caveat, "Segoe Print", cursive;
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.15;
  color: var(--line-hand);
  text-align: left;
  transform: rotate(-7deg);
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.05rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 280ms ease;
}
.line-hand.is-on {
  opacity: 1;
  visibility: visible;
  animation: line-hand-in 420ms ease-out;
}
.line-hand-arrow {
  display: block;
  font-size: 1.25rem;
  line-height: 1;
  margin-left: 3.4rem;
  transform: translateY(0.1rem);
}
.line-hand-copy {
  display: block;
  padding-left: 0.15rem;
}

.line-title {
  margin: 0.35rem 0 0;
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: clamp(1.65rem, 5vw, 2.25rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--line-white);
}

.line-lede {
  margin: 0;
  font-size: clamp(1.05rem, 2.8vw, 1.2rem);
  line-height: 1.45;
  color: var(--line-muted);
  max-width: 28rem;
}

.line-call {
  position: relative;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.6rem;
  padding: 1.05rem 1.6rem 1.2rem;
  min-width: min(20rem, 100%);
  text-decoration: none;
  color: inherit;
  border-radius: 18px;
  border: 1px solid rgba(46, 230, 197, 0.45);
  background:
    linear-gradient(180deg, rgba(46, 230, 197, 0.16), rgba(46, 230, 197, 0.05));
  box-shadow: 0 0 0 1px rgba(46, 230, 197, 0.08), 0 18px 40px rgba(0, 0, 0, 0.35);
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}
.line-call:hover {
  border-color: rgba(46, 230, 197, 0.85);
  transform: translateY(-1px);
  box-shadow: 0 0 0 1px rgba(46, 230, 197, 0.18), 0 22px 48px rgba(0, 0, 0, 0.4);
}
.line-call:focus-visible {
  outline: 2px solid var(--line-mint);
  outline-offset: 3px;
}
.line-call-kicker {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--line-mint);
  white-space: nowrap;
}
.line-call-num {
  font-size: clamp(1.7rem, 6vw, 2.15rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--line-white);
}

.line-note {
  margin: 0.15rem 0 0;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--line-muted);
  max-width: 26rem;
}

.line-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Chat sits in the page, a few lines at the top, and the mark moves down with it. */
.line-text {
  display: none;
  position: relative;
  z-index: 4;
  flex: 0 0 auto;
  gap: 0.35rem;
  width: min(34rem, calc(100% - 1.5rem));
  margin: 0.75rem auto 0;
  padding: 0.45rem 0.7rem 0.55rem;
  text-align: left;
  box-sizing: border-box;
  border-radius: 14px;
  background: rgba(11, 14, 20, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.line-text.is-open {
  display: flex;
  flex-direction: column;
  max-height: 9.5rem;
}
.line-text-panel {
  background: transparent;
  border: 0;
  border-radius: 0;
  overflow: hidden;
}
.line-text-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.15rem 0.15rem 0.45rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--line-white);
  font-size: 0.95rem;
}
.line-text-done {
  background: transparent;
  border: 0;
  color: var(--line-muted);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.15rem 0.1rem;
}
.line-text-done:hover { color: var(--line-white); }
.line-thread {
  display: grid;
  gap: 0.3rem;
  padding: 0.35rem 0.1rem 0.2rem;
  min-height: 0;
  max-height: 3.4rem;
  overflow: auto;
}
.line-turn {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.4;
}
.line-turn.is-user { color: var(--line-muted); }
.line-turn.is-amy { color: var(--line-ink); }
.line-composer input {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  font: inherit;
  background: rgba(0, 0, 0, 0.28);
  color: var(--line-white);
}
.line-composer input:focus {
  outline: 2px solid rgba(46, 230, 197, 0.45);
  outline-offset: 1px;
}
.line-chat-status {
  margin: 0;
  font-size: 0.8rem;
  color: var(--line-hand);
}

.line-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  justify-content: center;
  align-items: center;
  padding: 1rem 1.25rem calc(1.1rem + env(safe-area-inset-bottom, 0px));
  font-size: 0.78rem;
  color: var(--line-muted);
}
.line-foot a {
  color: var(--line-mint);
  text-decoration: none;
  font-weight: 600;
}
.line-foot a:hover { text-decoration: underline; }

@keyframes line-ready {
  0%, 100% { color: var(--line-mint); }
  50% { color: var(--line-white); }
}
@keyframes line-speaking {
  0%, 100% { color: #ff5c5c; }
  50% { color: var(--line-mint); }
}
@keyframes line-bounce {
  0%, 100% { transform: scaleY(0.72); }
  50% { transform: scaleY(1); }
}
@keyframes line-chat-icon {
  0%, 100% { color: #ff5c5c; }
  50% { color: #fff; }
}
@keyframes line-throb {
  0%, 100% {
    box-shadow:
      0 0 0 0 rgba(46, 230, 197, 0.55),
      0 0 22px 1px rgba(46, 230, 197, 0.28);
    opacity: 1;
  }
  50% {
    box-shadow:
      0 0 0 14px rgba(46, 230, 197, 0),
      0 0 36px 6px rgba(46, 230, 197, 0.22);
    opacity: 0.92;
  }
}
@keyframes line-throb-hot {
  0%, 100% {
    box-shadow:
      0 0 0 0 rgba(255, 92, 92, 0.6),
      0 0 22px 1px rgba(255, 92, 92, 0.4);
    opacity: 1;
  }
  50% {
    box-shadow:
      0 0 0 14px rgba(255, 92, 92, 0),
      0 0 36px 6px rgba(255, 92, 92, 0.28);
    opacity: 0.92;
  }
}
@keyframes line-hand-in {
  from { opacity: 0; transform: rotate(-7deg) translate(0, 8px); }
  to { opacity: 1; transform: rotate(-7deg) translate(0, 0); }
}

@media (max-width: 520px) {
  .line-brand-wrap { padding-bottom: 2.4rem; }
  .line-hand {
    left: -0.15rem;
    max-width: 9.5rem;
    font-size: 1.25rem;
  }
  .line-hand-arrow { margin-left: 2.8rem; }
}
