/* Recently — landing page.

   Everything here is prefixed .lp- so it can never leak into a user's public
   profile page, which is themeable. The composition leans on flat colour
   fills, chunky radii and a few deliberately overlapping elements; the goal
   is visual density without clutter, and specifically not a centred column of
   white cards with hairline borders. */

.lp-page {
  background: var(--app-bg);
  overflow-x: clip;
}

.lp-shell {
  width: 100%;
  max-width: var(--app-wide);
  margin: 0 auto;
  padding: 0 var(--app-space-5);
}

/* --- nav ----------------------------------------------------------------- */

.lp-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--app-space-5);
  padding: var(--app-space-5) 0;
}

.lp-wordmark {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  font-family: var(--app-font-display);
  font-weight: 700;
  font-size: var(--app-text-lg);
  letter-spacing: -0.03em;
  color: var(--app-fg);
  text-decoration: none;
}

.lp-wordmark-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--app-accent);
}

.lp-nav-links {
  display: flex;
  align-items: center;
  gap: var(--app-space-5);
}

.lp-nav-links a {
  font-size: var(--app-text-sm);
  font-weight: 500;
  color: var(--app-fg-muted);
  text-decoration: none;
}

/* Nav links are muted; buttons in the nav are not. `.lp-nav-links a` outweighs
   `.app-btn-primary`, so the filled variant needs its foreground restated here
   or it renders dark text on the accent fill. */
.lp-nav-links a:hover { color: var(--app-fg); }
.lp-nav-links a.app-btn { color: var(--app-fg); }
.lp-nav-links a.app-btn-primary,
.lp-nav-links a.app-btn-primary:hover { color: var(--app-accent-fg); }

/* --- account menu -------------------------------------------------------- */

/* A <details> rather than a scripted dropdown: the marketing page ships no
   JavaScript beyond the username check, and this needs none. */
.lp-account { position: relative; }

.lp-account-trigger {
  display: inline-flex;
  align-items: center;
  gap: var(--app-space-2);
  padding: 0.35rem 0.6rem 0.35rem 0.35rem;
  border: 1.5px solid var(--app-border-strong);
  border-radius: var(--app-radius-full);
  background: var(--app-surface);
  cursor: pointer;
  list-style: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}

/* Safari draws its own triangle unless both of these are cleared. */
.lp-account-trigger::-webkit-details-marker { display: none; }
.lp-account-trigger::marker { content: ""; }

.lp-account-trigger:hover {
  background: var(--app-surface-sunk);
  border-color: var(--app-fg-subtle);
}

.lp-account-trigger:focus-visible {
  outline: 3px solid var(--app-accent);
  outline-offset: 2px;
}

.lp-account-avatar {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  object-fit: cover;
  flex: none;
}

.lp-account-avatar.is-empty {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--app-accent);
  color: var(--app-accent-fg);
  font-size: 0.6875rem;
  font-weight: 700;
}

/* Sits on top of the initial, so a missing photo falls back cleanly. */
.lp-account-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.lp-nav-links .lp-account-name {
  font-size: var(--app-text-sm);
  font-weight: 600;
  color: var(--app-fg);
  max-width: 9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lp-account-caret { color: var(--app-fg-subtle); flex: none; }
.lp-account[open] .lp-account-caret { transform: rotate(180deg); }

.lp-account-menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  z-index: 20;
  min-width: 11rem;
  padding: var(--app-space-2);
  display: flex;
  flex-direction: column;
  background: var(--app-surface);
  border: 1.5px solid var(--app-border-strong);
  border-radius: var(--app-radius);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}

.lp-nav-links .lp-account-menu a,
.lp-account-menu button {
  padding: 0.5rem 0.625rem;
  border: 0;
  border-radius: calc(var(--app-radius) - 4px);
  background: none;
  font: inherit;
  font-size: var(--app-text-sm);
  font-weight: 500;
  color: var(--app-fg);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.lp-nav-links .lp-account-menu a:hover,
.lp-account-menu button:hover { background: var(--app-surface-sunk); }

/* Sign out is the destructive one, and it sits at the bottom of the list. */
.lp-account-menu form {
  margin-top: var(--app-space-2);
  padding-top: var(--app-space-2);
  border-top: 1px solid var(--app-border);
}
.lp-account-menu form button { width: 100%; color: var(--app-fg-muted); }

/* --- hero ---------------------------------------------------------------- */

.lp-hero {
  position: relative;
  padding: var(--app-space-7) 0 var(--app-space-9);
  /* A dot grid rather than a flat field: it gives the section texture at
     almost no cost and stops the hero reading as empty space. */
  background-image: radial-gradient(var(--app-border-strong) 1.2px, transparent 1.2px);
  background-size: 26px 26px;
  background-position: -13px -13px;
}

/* Soft violet bloom behind the mockup, clipped by the section. */
.lp-hero-glow {
  position: absolute;
  top: -14%;
  right: -6%;
  width: 46rem;
  height: 46rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(109, 74, 255, 0.20) 0%, rgba(109, 74, 255, 0.06) 45%, transparent 68%);
  pointer-events: none;
}

.lp-hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: var(--app-space-8);
  align-items: center;
}

.lp-hero-copy h1 {
  margin: var(--app-space-4) 0 0;
  font-size: clamp(2.75rem, 6.2vw, var(--app-text-5xl));
  line-height: 0.98;
}

.lp-lede {
  margin: var(--app-space-5) 0 var(--app-space-6);
  max-width: 32rem;
  font-size: var(--app-text-lg);
  line-height: 1.55;
  color: var(--app-fg-muted);
}

.lp-hero-note {
  display: flex;
  align-items: center;
  gap: var(--app-space-2);
  margin: var(--app-space-5) 0 0;
  font-size: var(--app-text-sm);
  font-weight: 500;
  color: var(--app-fg-muted);
}

.lp-tick {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  flex: none;
  border-radius: 50%;
  background: var(--app-lime);
  color: var(--app-fg);
  font-size: 11px;
  font-weight: 700;
}

/* --- claim form ---------------------------------------------------------- */

.lp-claim {
  display: flex;
  align-items: center;
  gap: var(--app-space-2);
  padding: var(--app-space-2);
  max-width: 30rem;
  background: var(--app-surface);
  border: 2px solid var(--app-fg);
  border-radius: var(--app-radius);
  /* Hard offset shadow — deliberately not a soft blur, so the form reads as a
     physical object and becomes the obvious focal point of the hero. */
  box-shadow: 4px 4px 0 var(--app-accent);
  transition: box-shadow 120ms ease, transform 120ms ease;
}

.lp-claim:focus-within {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--app-accent);
}

.lp-claim-prefix {
  padding-left: var(--app-space-3);
  font-size: var(--app-text-sm);
  font-weight: 600;
  color: var(--app-fg-subtle);
  white-space: nowrap;
}

.lp-claim input {
  flex: 1;
  min-width: 0;
  padding: var(--app-space-3) 0;
  border: 0;
  background: transparent;
  font: inherit;
  font-weight: 600;
  color: var(--app-fg);
}

.lp-claim input:focus { outline: none; }
.lp-claim input::placeholder { color: var(--app-fg-subtle); font-weight: 500; }

/* Signed-in replacement for the claim form. Same hard-offset treatment on the
   URL so the hero keeps its focal point, minus the input nobody can use. */
.lp-claim-signedin {
  display: flex;
  align-items: center;
  gap: var(--app-space-4);
  flex-wrap: wrap;
  max-width: 30rem;
}

.lp-claim-url {
  display: inline-flex;
  align-items: baseline;
  padding: var(--app-space-3) var(--app-space-4);
  background: var(--app-surface);
  border: 2px solid var(--app-fg);
  border-radius: var(--app-radius);
  box-shadow: 4px 4px 0 var(--app-accent);
  font-size: var(--app-text-sm);
  font-weight: 700;
  color: var(--app-fg);
  text-decoration: none;
  transition: box-shadow 120ms ease, transform 120ms ease;
}

.lp-claim-url:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--app-accent);
}

.lp-claim-url .lp-claim-prefix { padding-left: 0; }

.lp-status {
  margin: var(--app-space-3) 0 0;
  min-height: 1.25rem;
  font-size: var(--app-text-sm);
  font-weight: 500;
  color: var(--app-fg-muted);
}

.lp-status[data-state="ok"] { color: var(--app-positive); }
.lp-status[data-state="taken"],
.lp-status[data-state="invalid"] { color: var(--app-negative); }

/* --- hero mockup --------------------------------------------------------- */

.lp-device-wrap {
  position: relative;
  justify-self: center;
  width: 100%;
  max-width: 24rem;
}

.lp-device {
  /* The tilt is the single cheapest way to stop this looking like a
     screenshot dropped into a template. */
  transform: rotate(2.2deg);
  background: var(--app-surface);
  border-radius: var(--app-radius-lg);
  box-shadow: var(--app-shadow-lg);
  overflow: hidden;
}

.lp-device-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: var(--app-space-3) var(--app-space-4);
  background: var(--app-fg);
}

.lp-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
}

.lp-dot:first-child { background: var(--app-coral); }

.lp-device-url {
  margin-left: var(--app-space-3);
  font-family: var(--app-font-mono);
  font-size: var(--app-text-xs);
  color: rgba(255, 255, 255, 0.7);
}

.lp-device-body { padding: var(--app-space-5); }

.lp-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--app-accent), var(--app-cyan));
}

.lp-mock-name {
  margin: var(--app-space-3) 0 0;
  font-family: var(--app-font-display);
  font-weight: 700;
  font-size: var(--app-text-lg);
  letter-spacing: -0.02em;
}

.lp-mock-bio {
  margin: 2px 0 var(--app-space-4);
  font-size: var(--app-text-sm);
  color: var(--app-fg-muted);
}

.lp-now {
  padding: var(--app-space-4);
  border-radius: var(--app-radius-sm);
  background: var(--app-accent-soft);
}

.lp-now .app-eyebrow { color: var(--app-accent); }

.lp-now p {
  margin: var(--app-space-1) 0 0;
  font-size: var(--app-text-sm);
  font-weight: 500;
  line-height: 1.45;
}

.lp-mock-links {
  display: grid;
  gap: var(--app-space-2);
  margin-top: var(--app-space-4);
}

.lp-mock-link {
  padding: var(--app-space-3) var(--app-space-4);
  border-radius: var(--app-radius-sm);
  background: var(--app-surface-sunk);
  font-size: var(--app-text-sm);
  font-weight: 500;
}

.lp-mock-link.is-highlight {
  background: var(--app-fg);
  color: #fff;
}

.lp-mock-updates {
  margin-top: var(--app-space-4);
  padding-top: var(--app-space-4);
  border-top: 1.5px solid var(--app-border);
  display: grid;
  gap: var(--app-space-3);
}

.lp-mock-update {
  margin: 0;
  font-size: var(--app-text-sm);
  line-height: 1.45;
  color: var(--app-fg-muted);
}

.lp-mock-date {
  display: block;
  margin-top: 2px;
  font-size: var(--app-text-xs);
  color: var(--app-fg-subtle);
}

/* Floating chips overlapping the device. */
.lp-float {
  position: absolute;
  background: var(--app-surface);
  border-radius: var(--app-radius);
  box-shadow: var(--app-shadow-lg);
}

.lp-float-clicks {
  display: grid;
  gap: 2px;
  left: -2.5rem;
  bottom: 3.5rem;
  padding: var(--app-space-4);
  transform: rotate(-3deg);
}

.lp-float-label {
  font-size: var(--app-text-xs);
  font-weight: 600;
  color: var(--app-fg-subtle);
}

.lp-float-value {
  font-size: var(--app-text-2xl);
  line-height: 1;
}

.lp-float-delta {
  font-size: var(--app-text-xs);
  font-weight: 700;
  color: var(--app-positive);
}

.lp-float-now {
  display: flex;
  align-items: center;
  gap: var(--app-space-2);
  right: -1.5rem;
  top: 2.5rem;
  padding: var(--app-space-3) var(--app-space-4);
  border-radius: var(--app-radius-full);
  font-size: var(--app-text-xs);
  font-weight: 600;
  transform: rotate(3deg);
}

.lp-float-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--app-positive);
  box-shadow: 0 0 0 3px var(--app-positive-soft);
}

/* --- stat strip ---------------------------------------------------------- */

.lp-strip {
  background: var(--app-fg);
  color: #fff;
  padding: var(--app-space-6) 0;
}

.lp-strip-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--app-space-5);
}

.lp-stat {
  display: grid;
  gap: var(--app-space-1);
  padding-left: var(--app-space-4);
  border-left: 3px solid var(--app-accent);
}

.lp-stat:nth-child(2) { border-color: var(--app-lime); }
.lp-stat:nth-child(3) { border-color: var(--app-coral); }
.lp-stat:nth-child(4) { border-color: var(--app-cyan); }

.lp-stat-num {
  font-size: var(--app-text-3xl);
  line-height: 1;
  color: #fff;
}

.lp-stat-label {
  font-size: var(--app-text-sm);
  color: rgba(255, 255, 255, 0.6);
}

/* --- sections ------------------------------------------------------------ */

.lp-section { padding: var(--app-space-9) 0; }

.lp-section-head {
  max-width: 40rem;
  margin-bottom: var(--app-space-7);
}

.lp-section-head h2 {
  margin: var(--app-space-3) 0 0;
  font-size: clamp(2rem, 4vw, var(--app-text-3xl));
  line-height: 1.05;
}

.lp-section-head p {
  margin: var(--app-space-4) 0 0;
  font-size: var(--app-text-lg);
  line-height: 1.55;
  color: var(--app-fg-muted);
}

/* --- steps --------------------------------------------------------------- */

.lp-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--app-space-5);
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: none;
}

.lp-step {
  position: relative;
  padding: var(--app-space-6) var(--app-space-5) var(--app-space-5);
  border-radius: var(--app-radius);
  background: var(--app-surface-sunk);
}

.lp-step-num {
  display: block;
  font-size: var(--app-text-4xl);
  line-height: 0.8;
  color: var(--app-accent);
  opacity: 0.9;
}

.lp-step:nth-child(2) .lp-step-num { color: var(--app-coral); }
.lp-step:nth-child(3) .lp-step-num { color: var(--app-cyan); }
.lp-step:nth-child(4) .lp-step-num { color: var(--app-amber); }

.lp-step h3 {
  margin: var(--app-space-4) 0 var(--app-space-2);
  font-size: var(--app-text-lg);
}

.lp-step p {
  margin: 0;
  font-size: var(--app-text-sm);
  line-height: 1.5;
  color: var(--app-fg-muted);
}

/* --- features ------------------------------------------------------------ */

.lp-features {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--app-space-4);
}

.lp-feature {
  padding: var(--app-space-6);
  border-radius: var(--app-radius-lg);
}

.lp-feature-wide { grid-column: span 2; }

.lp-feature h3 {
  margin: 0 0 var(--app-space-3);
  font-size: var(--app-text-xl);
}

.lp-feature p {
  margin: 0;
  font-size: var(--app-text-sm);
  line-height: 1.55;
  color: var(--app-fg-muted);
}

.lp-feature-tag {
  display: inline-block;
  margin-bottom: var(--app-space-4);
  padding: 4px 10px;
  border-radius: var(--app-radius-full);
  background: rgba(13, 13, 18, 0.08);
  font-size: var(--app-text-xs);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.lp-feature-violet { background: var(--app-accent-soft); }
.lp-feature-lime   { background: var(--app-lime-soft); }
.lp-feature-coral  { background: var(--app-coral-soft); }
.lp-feature-cyan   { background: var(--app-cyan-soft); }
.lp-feature-amber  { background: var(--app-amber-soft); }

.lp-feature-dark {
  background: var(--app-fg);
  color: #fff;
}

.lp-feature-dark p { color: rgba(255, 255, 255, 0.68); }

/* --- themes -------------------------------------------------------------- */

.lp-themes {
  display: flex;
  flex-wrap: wrap;
  gap: var(--app-space-3);
  margin: 0;
  padding: 0;
  list-style: none;
}

.lp-theme {
  display: flex;
  align-items: center;
  gap: var(--app-space-3);
  padding: var(--app-space-3) var(--app-space-5) var(--app-space-3) var(--app-space-3);
  border-radius: var(--app-radius-full);
  background: var(--app-surface);
  box-shadow: var(--app-shadow-sm);
  font-size: var(--app-text-sm);
  font-weight: 600;
}

.lp-theme span {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1.5px rgba(13, 13, 18, 0.1);
}

.lp-theme[data-swatch="plain"] span    { background: linear-gradient(135deg, #ffffff, #e8e9f0); }
.lp-theme[data-swatch="ink"] span      { background: linear-gradient(135deg, #0d0d12, #3a3a48); }
.lp-theme[data-swatch="paper"] span    { background: linear-gradient(135deg, #c2f04c, #6d4aff); }
.lp-theme[data-swatch="midnight"] span { background: linear-gradient(135deg, #10101c, #6d4aff); }
.lp-theme[data-swatch="terminal"] span { background: linear-gradient(135deg, #04140c, #22c55e); }
.lp-theme[data-swatch="sunset"] span   { background: linear-gradient(135deg, #ff5c7a, #ffb020); }
.lp-theme[data-swatch="mint"] span     { background: linear-gradient(135deg, #d9fbef, #22d3ee); }

/* --- faq ----------------------------------------------------------------- */

.lp-faq {
  display: grid;
  gap: var(--app-space-3);
  max-width: 48rem;
}

.lp-faq details {
  padding: var(--app-space-4) var(--app-space-5);
  border-radius: var(--app-radius);
  background: var(--app-surface-sunk);
}

.lp-faq details[open] {
  background: var(--app-surface);
  box-shadow: var(--app-shadow);
}

.lp-faq summary {
  cursor: pointer;
  font-family: var(--app-font-display);
  font-weight: 700;
  font-size: var(--app-text-lg);
  letter-spacing: -0.02em;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--app-space-4);
}

.lp-faq summary::-webkit-details-marker { display: none; }

.lp-faq summary::after {
  content: "+";
  flex: none;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--app-accent);
  color: #fff;
  font-size: var(--app-text-base);
  line-height: 1;
}

.lp-faq details[open] summary::after { content: "–"; }

.lp-faq p {
  margin: var(--app-space-3) 0 0;
  max-width: var(--app-measure);
  line-height: 1.6;
  color: var(--app-fg-muted);
}

/* --- closing cta --------------------------------------------------------- */

.lp-cta {
  padding: var(--app-space-9) 0;
  background: var(--app-accent);
  color: #fff;
}

.lp-cta-inner { text-align: center; }

.lp-cta h2 {
  margin: 0;
  font-size: clamp(2.25rem, 5vw, var(--app-text-4xl));
  line-height: 1.02;
  color: #fff;
}

.lp-cta p {
  margin: var(--app-space-4) auto var(--app-space-6);
  max-width: 32rem;
  font-size: var(--app-text-lg);
  color: rgba(255, 255, 255, 0.82);
}

.lp-cta .lp-claim {
  margin: 0 auto;
  border-color: transparent;
  box-shadow: 4px 4px 0 rgba(13, 13, 18, 0.45);
}

.lp-cta .lp-status { color: rgba(255, 255, 255, 0.85); }
.lp-cta .lp-status[data-state="ok"] { color: var(--app-lime); }
.lp-cta .lp-status[data-state="taken"],
.lp-cta .lp-status[data-state="invalid"] { color: #ffd7dc; }

/* --- footer -------------------------------------------------------------- */

.lp-footer {
  padding: var(--app-space-6) 0;
  background: var(--app-fg);
  color: rgba(255, 255, 255, 0.6);
}

.lp-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--app-space-5);
  flex-wrap: wrap;
}

.lp-footer .lp-wordmark { color: #fff; }

.lp-footer nav {
  display: flex;
  gap: var(--app-space-5);
}

.lp-footer a {
  font-size: var(--app-text-sm);
  font-weight: 500;
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
}

.lp-footer a:hover { color: #fff; }

.lp-footer-note { font-size: var(--app-text-sm); }

/* --- responsive ---------------------------------------------------------- */

@media (max-width: 1000px) {
  .lp-hero-grid { grid-template-columns: 1fr; gap: var(--app-space-8); }
  .lp-device-wrap { max-width: 22rem; }
  .lp-features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lp-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lp-strip-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .lp-shell { padding: 0 var(--app-space-4); }
  .lp-section { padding: var(--app-space-8) 0; }
  .lp-nav-links { gap: var(--app-space-4); }
  /* The secondary nav links are the first thing to go on a phone; the sign-in
     button (or account menu) is the only one that has to survive. Scoped to
     direct children so it doesn't also blank out the account menu's items. */
  .lp-nav-links > a:not(.app-btn) { display: none; }
  .lp-features,
  .lp-steps { grid-template-columns: 1fr; }
  .lp-feature-wide { grid-column: auto; }
  .lp-claim { flex-wrap: wrap; }
  .lp-claim input { flex-basis: 60%; }
  /* Floating chips overlap the copy at narrow widths, so they come inline. */
  .lp-float-clicks { left: -0.5rem; bottom: 1rem; padding: var(--app-space-3); }
  .lp-float-now { right: -0.25rem; top: 1rem; }
  .lp-device-wrap { max-width: 20rem; }
}

@media (prefers-reduced-motion: reduce) {
  .lp-claim { transition: none; }
}
