/* landing.css, marketing pages (/, /learn). Built on tokens.css.
   Inherits the same light-default + dark ([data-theme="dark"]) palette as the app. */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
::selection { background: var(--accent-soft); }

/* ambient background: two slow-pulsing accent glows (adapted from
   uxstoryboardcanvas.app, using our own palette) */
.lp-bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.lp-orb {
  position: absolute; width: 55%; height: 55%; border-radius: 50%;
  filter: blur(130px); opacity: .05; animation: lp-pulse 8s ease-in-out infinite;
}
.lp-orb.a { top: -18%; left: -12%; background: var(--accent); }
.lp-orb.b { bottom: -18%; right: -12%; background: var(--accent-2); animation-delay: 2.5s; }
@keyframes lp-pulse {
  0%, 100% { opacity: .04; transform: scale(1); }
  50%      { opacity: .07; transform: scale(1.1); }
}
@media (prefers-reduced-motion: reduce) {
  .lp-orb { animation: none; }
}

.lp-container { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.lp-narrow { max-width: 760px; }

/* ---- nav ---- */
.lp-nav {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  /* align nav content (logo + buttons) to the 1080px content container */
  padding: 14px max(24px, calc((100% - 1080px) / 2 + 24px)); border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  overflow: hidden;
}
/* header + footer get their own slow drifting accent sheen */
.lp-nav::before, .lp-footer::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(100deg, transparent 8%, color-mix(in srgb, var(--accent) 4%, transparent) 30%, transparent 50%, color-mix(in srgb, var(--accent-2) 4%, transparent) 70%, transparent 92%);
  background-size: 220% 100%;
  animation: lp-bar-drift 16s ease-in-out infinite alternate;
}
@keyframes lp-bar-drift { from { background-position: 0% 0; } to { background-position: 100% 0; } }
@media (prefers-reduced-motion: reduce) { .lp-nav::before, .lp-footer::before { animation: none; } }
.lp-brand { display: flex; align-items: center; gap: 11px; min-width: 0; }
.lp-brand b {
  font-family: var(--display); font-size: 27px; font-weight: 700; letter-spacing: -0.02em;
  /* same gradient as the hero "always current" text */
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lp-nav-links { display: flex; align-items: center; gap: 6px; }
.lp-nav-links a.text { color: var(--text-dim); font-size: 14px; font-weight: 500; padding: 8px 12px; border-radius: 9px; }
.lp-nav-links a.text:hover { color: var(--text); background: var(--bg-elev-2); }

.lp-btn {
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
  font-family: var(--font); font-size: 14px; font-weight: 600;
  padding: 10px 16px; border-radius: 10px; border: 1px solid transparent;
  transition: all .15s var(--ease);
}
/* high-contrast monochrome: inverts with the theme (dark on light, light on dark) */
.lp-btn.primary { background: var(--text); color: var(--bg); box-shadow: var(--shadow-soft); }
.lp-btn.primary:hover { transform: translateY(-1px); opacity: .9; }
.lp-btn.ghost { background: var(--bg-elev); color: var(--text); box-shadow: var(--shadow-soft); }
.lp-btn.ghost:hover { transform: translateY(-1px); }
.lp-btn.lg { font-size: 15px; padding: 13px 22px; }
/* borderless line-icon toggle (moon in dark, sun in light) */
.lp-theme {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; padding: 0;
  background: transparent; color: var(--text-dim); border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer; transition: all .15s var(--ease);
}
.lp-theme:hover { color: var(--text); background: var(--bg-elev-2); }
.lp-theme:active { transform: translateY(0); }
.lp-theme svg { width: 18px; height: 18px; display: block; }

/* ---- auth pages (/sign-in, /sign-up) ---- */
.auth-wrap { min-height: calc(100vh - 64px); display: grid; place-items: center; padding: 48px 24px; }
.auth-wrap #clerk-root { min-height: 360px; display: grid; place-items: center; }
.auth-msg { color: var(--text-dim); font-size: 14px; }

/* ---- hero ---- */
.lp-hero { position: relative; overflow: hidden; padding: 96px 0 72px; text-align: center; }
.lp-hero::before {
  content: ""; position: absolute; inset: -40% 0 auto 0; height: 560px; z-index: 0;
  background: radial-gradient(60% 70% at 50% 0%, var(--accent-soft), transparent 70%);
  pointer-events: none;
}
.lp-hero > * { position: relative; z-index: 1; }
.lp-eyebrow {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 22px;
  font-size: 12.5px; font-weight: 600; letter-spacing: .3px;
  color: var(--accent-2); background: var(--accent-2-soft);
  padding: 6px 13px; border-radius: 999px;
}
.lp-h1 {
  font-family: var(--display); font-weight: 700; letter-spacing: -0.03em; line-height: 1.05;
  font-size: clamp(38px, 6vw, 62px); margin: 0 auto 20px; max-width: 16ch;
}
.lp-h1 .grad {
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lp-sub { font-size: clamp(16px, 2.2vw, 20px); color: var(--text-dim); max-width: 800px; margin: 0 auto 32px; }
.lp-cta-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.lp-note { margin-top: 16px; font-size: 16px; color: var(--text-dim); }
.lp-note a { font-weight: 600; }
.lp-note a:hover { text-decoration: underline; }

/* ---- loop diagram ---- */
.lp-loop {
  margin: 56px auto 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; align-items: stretch;
}
.lp-node {
  background: var(--bg-elev); border: 1px solid var(--border); border-radius: 14px;
  padding: 16px 14px; text-align: left; box-shadow: var(--shadow-soft); position: relative;
}
.lp-node .ln-k { font-family: var(--mono); font-size: 13px; color: var(--accent-2); letter-spacing: .3px; }
.lp-node .ln-t { font-family: var(--display); font-weight: 600; font-size: 15px; margin: 6px 0 4px; }
.lp-node .ln-d { font-size: 16px; color: var(--text-dim); line-height: 1.55; }
.lp-node:not(:last-child)::after {
  content: "→"; position: absolute; right: -13px; top: 50%; transform: translateY(-50%);
  color: var(--text-dim); font-size: 16px; z-index: 2;
}
.lp-loop-back { max-width: 940px; margin: 10px auto 0; text-align: center; font-size: 16px; color: var(--text-dim); }
.lp-loop-back b { color: var(--accent-2); font-weight: 600; }

/* ---- sections ---- */
.lp-section { padding: 72px 0; border-top: 1px solid var(--border-soft); }
.lp-kicker { font-size: 13px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; color: var(--accent); margin: 0 0 10px; }
.lp-h2 { font-family: var(--display); font-weight: 700; letter-spacing: -0.02em; font-size: clamp(26px, 4vw, 38px); margin: 0 0 14px; line-height: 1.1; }
.lp-lede { font-size: 16px; color: var(--text-dim); max-width: 64ch; margin: 0 0 8px; }

/* feature grid */
.lp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 40px; }
.lp-card {
  background: var(--bg-elev); border: 1px solid var(--border); border-radius: 16px;
  padding: 22px; box-shadow: var(--shadow-soft);
}
.lp-card h3 { font-family: var(--display); font-weight: 600; font-size: 17px; margin: 0 0 8px; letter-spacing: -0.01em; }
.lp-card p { font-size: 16px; color: var(--text-dim); margin: 0; line-height: 1.55; }

/* numbered steps */
.lp-steps { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px 28px; margin-top: 40px; }
.lp-step { display: flex; gap: 16px; }
.lp-step h3 { font-family: var(--display); font-weight: 600; font-size: 16px; margin: 4px 0 5px; }
.lp-step p { font-size: 16px; color: var(--text-dim); margin: 0; line-height: 1.55; }

/* split: copy + visual */
.lp-split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.lp-proof {
  background: var(--bg-elev); border: 1px solid var(--border); border-radius: 18px;
  padding: 22px; box-shadow: var(--shadow);
}
.lp-proof .pf-row { display: flex; align-items: center; justify-content: space-between; padding: 11px 0; border-bottom: 1px solid var(--border-soft); }
.lp-proof .pf-row:last-child { border-bottom: 0; }
.lp-proof .pf-k { font-size: 13.5px; color: var(--text-dim); }
.lp-proof .pf-v { font-family: var(--display); font-weight: 700; font-variant-numeric: tabular-nums; font-size: 15px; }
.lp-proof .up { color: var(--good); } .lp-proof .down { color: var(--good); }
.lp-proof .pf-file { font-family: var(--mono); font-size: 11px; color: var(--text-dim); margin-bottom: 14px; }
.lp-proof .pf-ver { color: var(--accent-2); }

/* inline code / callout */
code, .lp-mono { font-family: var(--mono); font-size: .92em; }
.lp-callout {
  border-left: 3px solid var(--accent-2); background: var(--accent-2-soft);
  padding: 14px 18px; border-radius: 0 12px 12px 0; margin: 24px 0; color: var(--text-dim); font-size: 16px;
}

/* prose (learn page) */
.lp-prose h2 { font-family: var(--display); font-weight: 700; letter-spacing: -0.02em; font-size: 26px; margin: 44px 0 12px; }
.lp-prose h3 { font-family: var(--display); font-weight: 600; font-size: 18px; margin: 28px 0 8px; }
.lp-prose p { color: var(--text-dim); margin: 0 0 14px; }
.lp-prose ul { color: var(--text-dim); padding-left: 22px; margin: 0 0 14px; }
.lp-prose li { margin: 6px 0; }
.lp-prose strong { color: var(--text); }
/* centered readable column for the long-form article (balanced left/right) */
.lp-prose { max-width: 760px; }

/* ---- CTA band + footer ---- */
.lp-cta-band { text-align: center; padding: 80px 0; border-top: 1px solid var(--border-soft); }
.lp-cta-band .lp-h2 { margin-bottom: 18px; }
.lp-footer {
  position: sticky; bottom: 0; z-index: 20;
  border-top: 1px solid var(--border); padding: 14px 0; color: var(--text-dim); font-size: 16px;
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  overflow: hidden;
}
.lp-footer .lp-container { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.lp-footer a { color: var(--text-dim); }
.lp-footer a:hover { color: var(--text); text-decoration: underline; }

@media (max-width: 860px) {
  .lp-loop, .lp-grid { grid-template-columns: 1fr; }
  .lp-node:not(:last-child)::after { content: "↓"; right: 50%; top: auto; bottom: -16px; transform: translateX(50%); }
  .lp-steps, .lp-split { grid-template-columns: 1fr; }
  .lp-split { gap: 28px; }
  .lp-hero { padding: 64px 0 48px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .001ms !important; }
}
