/* landing-explore.css — signed-out homepage.
   One idea: a card you can save and scribble on. The card is the only loud
   thing on the page; everything around it stays quiet. Scoped to .nx. */

.nx {
  --nx-ink: #1a1633;
  --nx-paper: #f3f0ff;
  --nx-rule: #ddd6fb;
  --nx-pen: #4b3bd6;
  --nx-text: #f5f3ff;
  --nx-soft: #b8bad6;
  --nx-muted: #8f92b8;
  --nx-display: "Bricolage Grotesque", "Inter", system-ui, sans-serif;
  --nx-hand: "Caveat", "Segoe Print", cursive;
}

/* dashboard.js reveals this view with display:flex */
.cc-landing.nx {
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  text-align: left;
  padding: 0 24px 40px;
}

/* ── Hero ─────────────────────────────────────────────────────── */
.nx-hero {
  box-sizing: border-box;
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  min-height: min(720px, calc(100vh - 180px));
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  align-items: center;
  gap: 48px;
  padding: 48px 0 32px;
}
.nx-title {
  margin: 0 0 20px;
  font-family: var(--nx-display);
  font-weight: 800;
  font-size: clamp(52px, 5.6vw, 80px);
  line-height: .95;
  letter-spacing: -.035em;
  color: var(--nx-text);
}
.nx-title span { display: block; white-space: nowrap; }
.nx-sub {
  margin: 0 0 32px;
  max-width: 30ch;
  font-size: clamp(18px, 1.6vw, 21px);
  line-height: 1.45;
  color: var(--nx-soft);
}
.nx-actions { position: relative; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }
.nx-actions .btn { margin: 0; min-height: 52px; padding-inline: 26px; display: inline-flex; align-items: center; }
.nx-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  color: var(--nx-soft);
  text-decoration: none;
  cursor: pointer;
}
.nx-link:hover { color: var(--nx-text); }
.nx-link[hidden] { display: none; }
.nx :is(a, button, textarea):focus-visible { outline: 3px solid #d6c8ff; outline-offset: 3px; border-radius: 6px; }

/* Today's event: a single quiet line under the actions, never a takeover */
.nx .nx-today { margin: 28px 0 0; max-width: 440px; }
.nx .nx-today .today-event-card {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 2px 16px;
  padding: 12px 0 0;
  border: 0;
  border-top: 1px solid rgba(160, 150, 255, .18);
  border-radius: 0;
  background: none;
}
.nx .nx-today .today-event-label { grid-column: 1; margin: 0; font-size: 13px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--nx-muted); }
.nx .nx-today .today-event-name { grid-column: 1; margin: 0; font-size: 15px; font-weight: 600; color: var(--nx-text); }
.nx .nx-today .today-event-meta { grid-column: 1; margin: 0; font-size: 13px; color: var(--nx-muted); }
.nx .nx-today .today-event-join {
  grid-column: 2; grid-row: 1 / span 3; width: auto; margin: 0; min-height: 40px; padding: 0 16px;
  background: transparent; border: 1px solid rgba(160, 150, 255, .4); color: var(--nx-text); font-size: 14px;
}

/* ── The card ─────────────────────────────────────────────────── */
.nx-demo { position: relative; isolation: isolate; display: grid; justify-items: center; gap: 18px; }
/* A single soft light behind the card, so the eye lands there first */
.nx-demo::before {
  content: "";
  position: absolute;
  inset: 8% -6% 14%;
  z-index: 0;
  background: radial-gradient(closest-side, rgba(124, 92, 255, .38), transparent);
  filter: blur(20px);
  pointer-events: none;
}
.nx-demo > * { position: relative; z-index: 1; }
.nx-try {
  margin: 0;
  font-family: var(--nx-hand);
  font-size: 26px;
  font-weight: 600;
  color: #cdbbff;
  transform: rotate(-3deg);
}
.nx-demo[data-state="3"] .nx-try { display: none; }

.nx-card-scene { width: min(100%, 380px); perspective: 1400px; }
.nx-card {
  display: grid;
  transform: rotate(-2.5deg);
  transform-style: preserve-3d;
  transition: transform .7s cubic-bezier(.2, .8, .2, 1);
}
.nx-demo[data-state="2"] .nx-card { transform: rotate(2deg) rotateY(180deg); }
.nx-demo[data-state="3"] .nx-card { transform: rotate(-1deg); }

.nx-face {
  grid-area: 1 / 1;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 28px;
  border-radius: 18px;
  background: var(--nx-paper);
  color: var(--nx-ink);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .6) inset, 0 30px 70px rgba(4, 3, 20, .55);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.nx-back { transform: rotateY(180deg); }

.nx-person { display: flex; align-items: center; gap: 14px; }
.nx-avatar {
  flex: none; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%;
  background: linear-gradient(135deg, #7c5cff, #3ec6ff); font-weight: 700; color: #fff;
}
.nx-name { margin: 0; font-family: var(--nx-display); font-size: 26px; font-weight: 800; letter-spacing: -.02em; line-height: 1.05; color: var(--nx-ink); }
.nx-met { margin: 4px 0 0; font-size: 14px; color: #5d587a; }
.nx-facts { margin: 0; display: grid; gap: 12px; }
.nx-facts div { display: grid; gap: 1px; }
.nx-facts dt { font-size: 13px; font-weight: 600; color: #6f6990; }
.nx-facts dd { margin: 0; font-size: 17px; line-height: 1.35; color: var(--nx-ink); }

.nx-card-btn {
  align-self: flex-start;
  margin-top: auto;
  min-height: 48px;
  padding: 0 24px;
  border: 0;
  border-radius: 999px;
  background: var(--nx-ink);
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
}
.nx-card-btn:hover { background: #2c2552; }
.nx-card :is(button, textarea):focus-visible { outline-color: var(--nx-pen); }

/* Once saved, the front shows a pen tick instead of the button */
.nx-demo[data-state="3"] .nx-front .nx-card-btn { display: none; }
.nx-demo[data-state="3"] .nx-front::after {
  content: "Saved ✓";
  align-self: flex-start;
  margin-top: auto;
  font-family: var(--nx-hand);
  font-size: 30px;
  font-weight: 600;
  line-height: 1;
  color: var(--nx-pen);
  transform: rotate(-4deg);
}

/* The back: written in pen on ruled lines */
.nx-back-label { font-size: 14px; font-weight: 600; color: #6f6990; }
.nx-note {
  box-sizing: border-box;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  resize: none;
  overflow: hidden;
  /* one rule under each 36px line of handwriting */
  background-image: repeating-linear-gradient(to bottom, transparent 0 35px, var(--nx-rule) 35px 36px);
  background-attachment: local;
  font-family: var(--nx-hand);
  font-size: 30px;
  font-weight: 500;
  line-height: 36px;
  color: var(--nx-pen);
}
.nx-note::placeholder { color: #a9a1d6; }
.nx .nx-note:focus-visible { outline: 2px solid rgba(75, 59, 214, .28); outline-offset: 6px; border-radius: 4px; }
.nx-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.nx-back .nx-card-btn { margin-top: 4px; }
.nx .lx-chip {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid #cfc6f5;
  border-radius: 999px;
  background: #fff;
  font: inherit;
  font-size: 14px;
  color: #3d3760;
  cursor: pointer;
}
.nx .lx-chip:hover, .nx .lx-chip[aria-pressed="true"] { border-color: var(--nx-pen); color: var(--nx-pen); }

/* Two weeks later: the moment the product exists for */
.nx-reminder {
  box-sizing: border-box;
  width: min(100%, 380px);
  margin: 0;
  padding: 14px 18px;
  border: 1px solid rgba(160, 150, 255, .32);
  border-radius: 16px;
  background: rgba(23, 26, 46, .92);
  box-shadow: 0 16px 40px rgba(0, 0, 0, .4);
  animation: nx-drop .5s cubic-bezier(.2, .8, .2, 1);
}
.nx-reminder[hidden] { display: none; }
.nx-reminder-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.nx-replay { min-height: 32px; font-size: 13px; }
.nx-reminder-when { margin: 0 0 4px; font-size: 13px; font-weight: 600; color: #c4afff; }
.nx-reminder-text { margin: 0; font-size: 16px; line-height: 1.4; color: var(--nx-text); }
#lxNoteEcho { font-weight: 600; }
@keyframes nx-drop { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }

.nx-after { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 20px; }
.nx-after[hidden] { display: none; }
.nx-after .btn { margin: 0; min-height: 48px; display: inline-flex; align-items: center; }

/* ── Below the fold: three lines, then small links ────────────── */
.nx-steps {
  box-sizing: border-box;
  width: 100%;
  max-width: 960px;
  margin: 24px auto 0;
  padding: 28px 0 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  border-top: 1px solid rgba(160, 150, 255, .14);
}
.nx-steps li { font-size: 16px; line-height: 1.5; color: var(--nx-muted); }
.nx-steps strong { display: block; font-size: 18px; color: var(--nx-text); }
.nx-fine {
  width: 100%;
  max-width: 960px;
  margin: 40px auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
}
.nx-fine a { font-size: 14px; color: var(--nx-muted); text-decoration: none; }
.nx-fine a:hover { color: var(--nx-text); text-decoration: underline; }

/* ── Smaller screens: words, then the card, then the rest ─────── */
@media (max-width: 900px) {
  .nx-hero { grid-template-columns: 1fr; gap: 36px; min-height: 0; padding-top: 28px; }
}
@media (max-width: 600px) {
  .cc-landing.nx { padding: 0 20px 32px; }
  /* Headline, then the card, then actions: the card is the hook */
  .nx-hero { gap: 0; padding-top: 20px; }
  .nx-copy { display: contents; }
  .nx-title { order: 1; }
  .nx-sub { order: 2; margin-bottom: 8px; }
  .nx-demo { order: 3; margin: 0 0 28px; }
  .nx-actions { order: 4; }
  .nx .nx-today { order: 5; }
  .nx-title { font-size: clamp(46px, 13vw, 60px); }
  .nx-actions .btn { flex: 1 1 100%; justify-content: center; }
  .nx-actions .nx-link { flex: 1 1 100%; justify-content: center; }
  .nx-face { padding: 24px; }
  .nx-title span { white-space: normal; }
  .nx-steps { grid-template-columns: 1fr; gap: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .nx-card { transition: none; }
  .nx-reminder { animation: none; }
}
