/*
 * Lightnest: the shared Lightverse styles (/styles.css) plus the pieces only this page has —
 * the household chat, transaction thread, notes, goals and audience cards.
 */

/* ---------- Logo with its endorsement line, as on the Lightcash site ---------- */

.nest-logo {
  position: relative;
  display: inline-block;
  padding-bottom: 0.8rem;
}
.endorsement {
  position: absolute;
  top: calc(100% - 0.7rem);
  left: 2.45rem;
  display: flex;
  align-items: center;
  gap: 0.28em;
  font-size: 0.625rem;
  line-height: 1;
  white-space: nowrap;
}
.endorsement span {
  opacity: 0.6;
}
.endorsement svg {
  width: 0.8em;
  height: 0.8em;
}
/* The Lightverse planet in "a Lightverse company": its ring matches the line's text. */
.endorsement .mark {
  --logo-ring: currentColor;
  width: 1.5em;
  height: 1.5em;
  margin: 0 -0.1em;
}
.endorsement b {
  font-weight: 600;
  letter-spacing: -0.01em;
}
.nav .nest-logo {
  margin-top: 0.8rem;
}

/* ---------- Shared bits ---------- */

.avatar-ember {
  background: var(--ember);
  color: #fff;
}
.avatar-sage {
  background: #7f9c8a;
  color: #fff;
}
.avatar-nest {
  background: linear-gradient(135deg, #9aa5ff 0%, #e2a7bd 55%, #e0563b 100%);
  color: #fff;
}
.avatar svg {
  width: 55%;
  height: 55%;
}
.icon-dot {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  transition:
    background-color 0.3s,
    color 0.3s;
}
.icon-dot svg {
  width: 1.25rem;
  height: 1.25rem;
}
.mention {
  color: var(--peri-deep);
}
.progress {
  display: block;
  height: 0.4rem;
  overflow: hidden;
  border-radius: 999px;
  background: var(--cloud);
}
.progress i {
  display: block;
  width: var(--to);
  height: 100%;
  border-radius: inherit;
  background: var(--peri-deep);
}
.goal-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.875rem;
}
.goal-row b {
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.fine {
  font-size: 0.875rem;
  opacity: 0.75;
}
.nest-first {
  padding-top: 6rem;
}

/* ---------- Hero conversation ---------- */

.nest-showcase {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  margin: 3.5rem auto 0;
  padding-inline: 0.75rem;
}
.chat-card {
  width: 100%;
  max-width: 34rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 1.5rem;
  background: var(--paper);
  box-shadow: var(--card-shadow);
  text-align: left;
}
.chat-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--line);
}
.chat-head .avatar {
  width: 2.25rem;
  height: 2.25rem;
  font-size: 0.85rem;
  box-shadow: 0 0 0 2px var(--paper);
}
.chat-title {
  display: grid;
  flex: 1;
  min-width: 0;
  line-height: 1.25;
}
.chat-title strong {
  font-weight: 500;
}
.chat-title small {
  overflow: hidden;
  color: var(--mute);
  font-size: 0.8rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chat-log {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  min-height: 21rem;
  margin: 0;
  padding: 1.1rem 1rem;
  list-style: none;
}
.msg {
  max-width: 82%;
  padding: 0.6rem 0.9rem;
  border-radius: 1.1rem;
  font-size: 0.92rem;
  line-height: 1.45;
}
.msg small {
  display: block;
  margin-bottom: 0.1rem;
  font-size: 0.72rem;
  opacity: 0.7;
}
.msg b {
  font-weight: 600;
}
.msg-me {
  align-self: flex-end;
  border-bottom-right-radius: 0.3rem;
  background: var(--ink);
  color: var(--paper);
}
.msg-them {
  align-self: flex-start;
  border-bottom-left-radius: 0.3rem;
  background: var(--cloud);
}
.msg-nest {
  align-self: flex-start;
  border: 1px solid color-mix(in oklab, var(--peri-deep) 25%, transparent);
  border-bottom-left-radius: 0.3rem;
  background: color-mix(in oklab, var(--peri-deep) 8%, transparent);
}
.msg-nest small {
  color: var(--peri-deep);
  opacity: 1;
}
.msg-typing {
  display: none;
  align-self: flex-start;
  gap: 0.25rem;
  padding: 0.75rem 0.9rem;
  background: var(--cloud);
}
.msg-typing.shown {
  display: flex;
}
.msg-typing span {
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: var(--mute);
  animation: typing 1.2s ease-in-out infinite;
}
.msg-typing span:nth-child(2) {
  animation-delay: 0.15s;
}
.msg-typing span:nth-child(3) {
  animation-delay: 0.3s;
}
.goal-card {
  display: grid;
  gap: 0.45rem;
  align-self: flex-start;
  width: min(100%, 18rem);
  padding: 0.85rem 1rem;
  border: 1.5px dashed var(--dash);
  border-radius: 1rem;
  background: var(--panel);
}
.goal-card small {
  color: var(--mute);
  font-size: 0.75rem;
}
/* While motion is on, each line waits for nest.js to bring it in. */
html.motion .chat-log [data-step]:not(.shown) {
  display: none;
}
.chat-log .shown {
  animation: arrive 0.45s var(--ease) both;
}
.goal-card.shown .progress i {
  animation: fill 1.2s var(--ease) 0.2s both;
}
.composer {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0.75rem 0.75rem;
  padding: 0.4rem 0.4rem 0.4rem 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--mute);
  font-size: 0.875rem;
}
.composer span:first-child {
  flex: 1;
}
.send {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
}
.send svg {
  width: 0.9rem;
  height: 0.9rem;
}
.replay {
  padding: 0.35rem 0.85rem;
  border: 1px solid rgb(255 255 255 / 0.6);
  border-radius: 999px;
  background: rgb(255 255 255 / 0.7);
  backdrop-filter: blur(8px);
  color: #0d0d12;
  font-size: 0.8rem;
}
.replay[hidden] {
  display: none;
}
[data-theme="dark"] .replay {
  border-color: rgb(255 255 255 / 0.1);
  background: rgb(255 255 255 / 0.1);
  color: #fff;
}
.nest-hero .universe-strip {
  padding-top: 2.5rem;
}

/* ---------- Problem cards ---------- */

.nest-cards {
  display: grid;
  gap: 1rem;
}
.nest-card {
  display: flex;
  flex-direction: column;
  min-height: 18rem;
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: 1.5rem;
  background: var(--paper);
}
.nest-card h3,
.seat h3 {
  padding-top: 3.5rem;
  font-size: 1.5rem;
  line-height: 1.2;
  letter-spacing: -0.025em;
}
.nest-card p,
.seat p {
  margin-top: 0.75rem;
  color: var(--mute);
  line-height: 1.625;
  text-wrap: pretty;
}

/* ---------- Feature tiles ---------- */

.thread {
  overflow: hidden;
}
.thread-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1.1rem;
  border-bottom: 1px solid var(--line);
}
.merchant {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.75rem;
  background: var(--warn-soft);
}
.thread-title {
  display: grid;
  flex: 1;
  min-width: 0;
  line-height: 1.25;
}
.thread-title strong {
  font-weight: 500;
}
.thread-title small {
  color: var(--mute);
  font-size: 0.78rem;
}
.amount {
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.thread-comments {
  display: grid;
  gap: 0.75rem;
  padding: 1rem 1.1rem 1.1rem;
}
.thread-comments li {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
}
.thread-comments .avatar,
.presence .avatar {
  width: 1.9rem;
  height: 1.9rem;
  margin: 0;
  box-shadow: none;
  font-size: 0.78rem;
}
.thread-comments p {
  padding: 0.5rem 0.8rem;
  border-radius: 0.3rem 1rem 1rem 1rem;
  background: var(--cloud);
  font-size: 0.875rem;
  line-height: 1.45;
}
.thread-comments b {
  margin-right: 0.25rem;
  font-weight: 600;
}
.thread-comments .from-nest p {
  background: color-mix(in oklab, var(--peri-deep) 8%, transparent);
}

.presence {
  display: grid;
  padding: 0.4rem 0;
}
.presence li {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.7rem 1rem;
  font-size: 0.875rem;
}
.presence li + li {
  border-top: 1px solid var(--line);
}
.presence li > span:nth-child(2) {
  flex: 1;
  color: var(--ink-soft);
}
.presence b {
  color: var(--ink);
  font-weight: 500;
}
.here {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--good);
  box-shadow: 0 0 0 3px var(--good-soft);
}

.mention-light {
  opacity: 0.65;
}

.notes {
  display: grid;
  gap: 0.75rem;
  padding: 1rem 1.1rem 1.1rem;
}
.notes-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}
.notes-head strong {
  font-weight: 500;
}
.notes-head small {
  color: var(--mute);
  font-size: 0.78rem;
}
#notes-list {
  display: grid;
  border-top: 1px solid var(--line);
}
#notes-list li,
.glance-notes li {
  position: relative;
  padding: 0.6rem 0 0.6rem 1.25rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.9rem;
}
#notes-list li::before,
.glance-notes li::before {
  content: "";
  position: absolute;
  top: 1.05rem;
  left: 0.2rem;
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: var(--peri-deep);
}
#notes-list .just-added {
  animation:
    arrive 0.45s var(--ease),
    flash 1.8s ease-out;
}
#remember:disabled {
  opacity: 1;
  background: var(--good-soft);
  color: var(--good);
}
#remember:disabled svg:last-child {
  display: none;
}

/* ---------- Group chat panel (twilight) ---------- */

.group-panel {
  position: relative;
  isolation: isolate;
  display: grid;
  gap: 2.5rem;
  align-items: center;
  overflow: hidden;
  padding: 3rem 1.25rem;
  border-radius: 28px;
  color: #0d0d12;
}
[data-theme="dark"] .group-panel {
  color: #f5f5f8;
}
.panel-kicker {
  margin-bottom: 1rem;
  font-size: 0.9rem;
  opacity: 0.75;
}
.group-copy > p:not(.panel-kicker):not(.fine) {
  max-width: 30rem;
  margin-top: 1.5rem;
  font-size: 1.05rem;
  line-height: 1.625;
  opacity: 0.85;
}
.app-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 1.75rem 0 1.25rem;
}
.app-chips li {
  padding: 0.35rem 0.85rem;
  border: 1px solid rgb(255 255 255 / 0.7);
  border-radius: 999px;
  background: rgb(255 255 255 / 0.75);
  backdrop-filter: blur(8px);
  color: #0d0d12;
  font-size: 0.85rem;
}
[data-theme="dark"] .app-chips li {
  border-color: rgb(255 255 255 / 0.1);
  background: rgb(255 255 255 / 0.1);
  color: #fff;
}
.group-chat {
  width: 100%;
  max-width: 26rem;
  justify-self: center;
  overflow: hidden;
  box-shadow: var(--card-shadow);
  color: var(--ink);
}
.group-chat .chat-head .avatar {
  margin: 0;
}
.group-log {
  display: grid;
  gap: 0.5rem;
  margin: 0;
  padding: 1rem;
  background: var(--panel);
  list-style: none;
}
.day {
  justify-self: center;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  background: var(--cloud);
  color: var(--mute);
  font-size: 0.72rem;
}
.bubble {
  justify-self: start;
  max-width: 88%;
  padding: 0.55rem 0.8rem 0.4rem;
  border: 1px solid var(--line);
  border-radius: 0.3rem 1rem 1rem 1rem;
  background: var(--paper);
  font-size: 0.875rem;
  line-height: 1.45;
}
.bubble small {
  display: block;
  font-size: 0.72rem;
}
.who-nest {
  color: var(--peri-deep);
}
.who-gran {
  color: #7f9c8a;
}
.bubble time {
  display: block;
  margin-top: 0.15rem;
  color: var(--mute);
  font-size: 0.68rem;
  text-align: right;
}
.bubble-me {
  justify-self: end;
  border-color: transparent;
  border-radius: 1rem 0.3rem 1rem 1rem;
  background: var(--ink);
  color: var(--paper);
}
.bubble-me time {
  color: inherit;
  opacity: 0.6;
}

/* ---------- One screen ---------- */

.checklist {
  display: grid;
  gap: 0.75rem;
  max-width: 28rem;
}
.checklist li {
  position: relative;
  padding-left: 2rem;
  color: var(--ink-soft);
  line-height: 1.5;
}
.checklist li::before {
  content: "✓";
  position: absolute;
  top: 0.05rem;
  left: 0;
  display: grid;
  place-items: center;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.7rem;
}
.glance {
  display: grid;
  gap: 0.75rem;
  padding: 0.75rem;
  border: 1.5px dashed var(--dash);
  border-radius: 28px;
  background: var(--panel);
}
.glance .card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.25rem;
}
.glance-label {
  color: var(--mute);
  font-size: 0.85rem;
}
.glance-big {
  font-size: 3rem;
  line-height: 1;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}
.glance-left .badge {
  align-self: flex-start;
  height: auto;
  min-height: 1.5rem;
  white-space: normal;
}
.glance-who {
  margin-top: auto;
}
.glance-who .avatar {
  width: 2.25rem;
  height: 2.25rem;
  font-size: 0.85rem;
  box-shadow: 0 0 0 3px var(--paper);
}
.goal {
  display: grid;
  gap: 0.45rem;
}
.glance-notes ul {
  border-top: 1px solid var(--line);
}

/* ---------- Steps ---------- */

.steps {
  display: grid;
  gap: 2rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.steps li {
  display: flex;
  gap: 1.25rem;
}
.step-number {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.875rem;
  box-shadow:
    0 0 0 4px var(--page),
    0 0 0 5px var(--line);
}
.steps h3 {
  margin-top: 0.6rem;
  font-size: 1.4rem;
  letter-spacing: -0.02em;
}
.steps p {
  margin-top: 0.6rem;
  color: var(--mute);
  line-height: 1.625;
}

/* ---------- Audience cards: the one pointed at lights up in ember ---------- */

.seats {
  display: grid;
  gap: 1rem;
}
.seat {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  min-height: 20rem;
  overflow: hidden;
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: 1.5rem;
  background: var(--paper);
  transition:
    color 0.3s,
    border-color 0.3s;
}
.seat .field {
  opacity: 0;
  transition: opacity 0.5s;
}
.seat[data-active="true"] {
  border-color: transparent;
  color: #fff;
}
.seat[data-active="true"] .field {
  opacity: 1;
}
.seat[data-active="true"] .icon-dot {
  background: #fff;
  color: #0d0d12;
}
.seat[data-active="true"] p {
  color: rgb(255 255 255 / 0.85);
}

/* ---------- Trust ---------- */

.trust {
  display: grid;
  gap: 2.5rem;
}
.trust-list {
  border-top: 1px solid var(--line);
}
.trust-list li {
  display: flex;
  gap: 1.25rem;
  padding-block: 1.75rem;
  border-bottom: 1px solid var(--line);
}
.trust-list h3 {
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}
.trust-list p {
  max-width: 32rem;
  margin-top: 0.4rem;
  color: var(--ink-soft);
  line-height: 1.625;
}
.trust-list .icon-dot {
  width: 2.5rem;
  height: 2.5rem;
}

/* ---------- Final call to action (ember) ---------- */

.nest-cta {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 5rem 1.5rem;
  border-radius: 28px;
  color: #fff;
  text-align: center;
}
.nest-cta h2 {
  max-width: 48rem;
  margin-inline: auto;
  font-size: clamp(2.75rem, 7vw, 5rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
}
.nest-cta > p:not(.fine) {
  max-width: 28rem;
  margin: 1.5rem auto 0;
  color: rgb(255 255 255 / 0.85);
  font-size: 1.15rem;
  line-height: 1.625;
}
.nest-cta-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.625rem;
  margin-top: 2.25rem;
}
.nest-cta .fine {
  margin-top: 1.5rem;
}

/* ---------- Motion ---------- */

@keyframes arrive {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}
@keyframes fill {
  from {
    width: 0;
  }
}
@keyframes typing {
  0%,
  100% {
    opacity: 0.25;
    transform: none;
  }
  45% {
    opacity: 1;
    transform: translateY(-2px);
  }
}
@keyframes flash {
  from {
    background-color: var(--good-soft);
  }
}

/* ---------- Responsive ---------- */

@media (min-width: 640px) {
  .nest-first {
    padding-top: 8rem;
  }
  .group-panel {
    padding: 4.5rem 3rem;
  }
  .nest-cta {
    padding: 7rem 3.5rem;
  }
  .nest-card,
  .seat {
    padding: 2rem;
  }
}
@media (min-width: 768px) {
  .nest-cards,
  .steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .seats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .glance {
    grid-template-columns: 1fr 1.2fr 1.2fr;
    padding: 1.25rem;
  }
}
@media (min-width: 1024px) {
  .group-panel {
    grid-template-columns: 1fr 1fr;
    gap: 3.5rem;
    padding: 5rem 4.5rem;
  }
  .seats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .trust {
    grid-template-columns: 1fr 1.4fr;
    gap: 4rem;
  }
  .checklist {
    justify-self: end;
  }
}
@media (max-width: 479px) {
  .nav .nest-logo .endorsement {
    display: none;
  }
  .nav .nest-logo {
    margin-top: 0;
    padding-bottom: 0;
  }
  .chat-log {
    min-height: 23rem;
  }
}
