/* The public landing page. Shares the app's tokens and retro ground (app.css);
 * adds the hero device, the feature grid, the install band and the FAQ. */
/* The canvas gradient stays put while the page scrolls; links styled as buttons lose the underline. */
body.lp { background: var(--entry-canvas) fixed, var(--canvas); }
.lp a.btn, .lp a.glass-pill { text-decoration: none; }

/* ---------- nav ---------- */
.lp-nav {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: max(12px, var(--safe-top)) max(20px, env(safe-area-inset-right)) 12px max(20px, env(safe-area-inset-left));
  background: color-mix(in srgb, var(--entry-card) 70%, transparent);
  -webkit-backdrop-filter: blur(20px) saturate(1.2); backdrop-filter: blur(20px) saturate(1.2);
  border-bottom: 1px solid var(--glass-border);
}
.lp-nav .brand { color: var(--text-primary); text-decoration: none; }
.lp-links { display: flex; align-items: center; gap: 4px; }
.lp-link { padding: 8px 12px; border-radius: var(--radius-full); font-size: 14px; font-weight: 500; color: var(--text-secondary); text-decoration: none; transition: color var(--dur-fast) var(--ease-smooth), background-color var(--dur-fast) var(--ease-smooth); }
.lp-link:hover { color: var(--text-primary); background: var(--glass-surface); }
.glass-pill.sm { height: 36px; padding: 0 16px; font-size: 14px; margin-left: 4px; }
@media (max-width: 520px) { .lp-link { display: none; } }

/* ---------- hero ---------- */
.lp-hero { position: relative; overflow: clip; }
/* The retro ground fades into the page instead of ending in an edge. */
.lp-hero .retro { -webkit-mask-image: linear-gradient(#000 70%, transparent); mask-image: linear-gradient(#000 70%, transparent); }
.lp-hero .retro { animation-duration: 900ms; }
.lp-hero-inner {
  position: relative; max-width: 1120px; margin: 0 auto; min-height: min(760px, calc(100dvh - 61px));
  display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: 48px; padding: 56px 24px 72px;
}
.lp-copy { max-width: 560px; animation: rise var(--dur-nav) var(--ease-dialog) both; }
.lp-eyebrow { display: inline-block; font-size: 13px; line-height: 18px; font-weight: 600; letter-spacing: .02em; color: var(--text-secondary);
  padding: 6px 12px; border-radius: var(--radius-full); background: var(--entry-card); border: 1px solid var(--glass-border);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
.lp-hero h1 { margin: 20px 0 0; font-size: clamp(40px, 6vw, 64px); line-height: 1.04; letter-spacing: -.035em; font-weight: 700; text-wrap: balance; }
.lp-lede { margin: 20px 0 0; font-size: clamp(17px, 1.6vw, 19px); line-height: 1.5; color: var(--text-secondary); max-width: 34ch; text-wrap: pretty; }
.lp-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.lp-cta .btn, .lp-cta .glass-pill { min-width: 176px; }
.lp-sub { margin: 16px 0 0; font-size: 14px; line-height: 20px; color: var(--text-muted); }

/* The device: an Atomic Purple handheld (device.svg) with KortaMod's real screens
 * laid exactly over its screen window. Upright, so the pixel art stays even. */
.device {
  position: relative; justify-self: center; width: clamp(250px, 27vw, 340px); aspect-ratio: 3 / 5; margin: 0;
  animation: device-in var(--dur-nav) var(--ease-dialog) 80ms both;
}
.device-shell { position: absolute; inset: 0; width: 100%; height: 100%; display: block;
  filter: drop-shadow(0 30px 40px rgba(43, 22, 84, .38)) drop-shadow(0 8px 14px rgba(43, 22, 84, .28)); }
/* A soft contact shadow on the "floor". */
.device::after { content: ""; position: absolute; left: 12%; right: 12%; bottom: -7%; height: 7%; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(20, 8, 40, .45), transparent); filter: blur(6px); z-index: -1; }
.device-screen { position: absolute; left: 20%; top: 10.8%; width: 60%; aspect-ratio: 160 / 144; overflow: hidden; border-radius: 1px; background: #0b0810; }
.shot { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 420ms var(--ease-gentle); }
.shot.on { opacity: 1; }
@keyframes device-in { from { opacity: 0; transform: translateY(16px); } }
@keyframes device-float { 50% { transform: translateY(-8px); } }
@media (prefers-reduced-motion: no-preference) {
  .device { animation: device-in var(--dur-nav) var(--ease-dialog) 80ms both, device-float 7s ease-in-out 1s infinite; }
}

@media (max-width: 860px) {
  .lp-hero-inner { grid-template-columns: 1fr; text-align: center; padding: 40px 20px 64px; gap: 40px; min-height: 0; }
  .lp-copy { margin: 0 auto; }
  .lp-lede { margin-left: auto; margin-right: auto; }
  .lp-cta { justify-content: center; }
  .device { width: min(250px, 62vw); }
}
@media (max-width: 420px) { .lp-cta .btn, .lp-cta .glass-pill { width: 100%; } }

/* ---------- sections ---------- */
.lp-section { max-width: 1120px; margin: 0 auto; padding: 64px 24px; }
.lp-section + .lp-section { padding-top: 32px; }
.lp-section h2 { margin: 0 0 32px; font-size: clamp(28px, 3.6vw, 40px); line-height: 1.1; letter-spacing: -.03em; font-weight: 700; text-align: center; text-wrap: balance; }

.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.tile {
  grid-column: span 2; display: flex; flex-direction: column; gap: 6px; padding: 20px; border-radius: var(--radius-3xl);
  background: var(--entry-card); border: 1px solid var(--glass-border); -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px);
  box-shadow: var(--entry-card-shadow);
}
.tile.big { grid-column: span 3; }
/* Each screen in the same dark bezel; the @4x render scales down evenly. */
.tile-screen { margin-bottom: 14px; padding: 12px; border-radius: 18px; background: linear-gradient(#221a2e, #140f1c);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06), inset 0 2px 8px rgba(0, 0, 0, .45); }
.tile-screen img { display: block; width: 100%; height: auto; aspect-ratio: 160 / 144; border-radius: 3px; }
.tile h3 { margin: 0; font-size: 17px; line-height: 24px; font-weight: 600; letter-spacing: -.01em; }
.tile p { margin: 0; font-size: 15px; line-height: 22px; color: var(--text-secondary); }
@media (max-width: 860px) { .tile, .tile.big { grid-column: span 3; } }
/* Phones: one tile per row, so every screen stays readable. */
@media (max-width: 560px) {
  .bento { grid-template-columns: 1fr; gap: 12px; }
  .tile, .tile.big { grid-column: auto; padding: 16px; border-radius: var(--radius-2xl); }
  .tile-screen { padding: 10px; border-radius: 14px; }
}

.lp-install {
  max-width: 640px; margin: 0 auto; text-align: center; padding: 40px 24px; border-radius: var(--radius-3xl);
  background: var(--entry-card); border: 1px solid var(--glass-border); -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px);
  box-shadow: var(--entry-card-shadow);
}
.lp-install h2 { margin-bottom: 24px; }
.lp-install .btn { min-width: 200px; }
.steps { list-style: none; margin: 0 0 28px; padding: 0; display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 20px; }
.steps li { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 500; color: var(--text-secondary); }
.steps .num { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 600;
  background: var(--glass-surface-hover); color: var(--text-primary); font-variant-numeric: tabular-nums; }

.faq { max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.faq details { border-radius: var(--radius-2xl); background: var(--entry-card); border: 1px solid var(--glass-border);
  -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px); }
.faq summary { list-style: none; cursor: pointer; padding: 18px 52px 18px 20px; position: relative; font-size: 16px; line-height: 22px; font-weight: 600; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 22px; top: 50%; width: 9px; height: 9px; margin-top: -6px;
  border-right: 2px solid var(--text-muted); border-bottom: 2px solid var(--text-muted); transform: rotate(45deg);
  transition: transform var(--dur-normal) var(--ease-dialog); }
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq summary:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: var(--radius-2xl); }
.faq p { margin: 0; padding: 0 20px 18px; font-size: 15px; line-height: 22px; color: var(--text-secondary); }
.faq a { color: var(--text-primary); }

footer.lp-foot { flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 24px 16px max(32px, var(--safe-bottom)); font-size: 13px; line-height: 18px; }
footer.lp-foot .fine { font-size: 11px; line-height: 16px; color: var(--text-faint); }

@media (max-width: 560px) {
  .steps { flex-direction: column; align-items: center; gap: 10px; }
  .lp-install { padding: 32px 20px; }
}
@media (prefers-reduced-motion: reduce) { .lp-copy, .device { animation: none; } .shot { transition: none; } }
@media (prefers-reduced-transparency: reduce) {
  .lp-nav, .tile, .lp-install, .faq details, .lp-eyebrow { background: var(--surface-solid); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
