/* static/css/core/home.css — Public Landing Page Styles */

.landing-page {
  display: block;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background: var(--bg);
  font-family: var(--font);
}

.lp { position: relative; display: flex; flex-direction: column; min-height: 100vh; overflow-x: clip; color: var(--text); }
.lp-wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 max(20px, 4vw); }
.lp-section { padding: 72px 0; }
.lp-view { position: relative; z-index: 1; flex: 1; }
.lp-view[hidden], .lp-header[hidden], .lp-footer[hidden] { display: none; }
.lp a { text-decoration: none; }
.lp-spacer { flex: 1; }

/* Ambient background */
.lp-ambient {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
  background-image: radial-gradient(var(--border) 1px, transparent 1px); background-size: 28px 28px;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 85%); mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
}
.lp-ambient::before, .lp-ambient::after {
  content: ""; position: absolute; width: 55vmax; height: 55vmax; border-radius: 50%;
  filter: blur(90px); opacity: 0.18; animation: lp-drift 26s ease-in-out infinite alternate;
}
.lp-ambient::before { background: var(--accent); top: -25vmax; left: -15vmax; }
.lp-ambient::after { background: var(--purple); top: 5vmax; right: -25vmax; animation-delay: -13s; }

/* Header */
.lp-header {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px; padding: 12px max(20px, 4vw);
  background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--border);
}
.lp-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; color: var(--text); }
.lp-logo {
  width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--purple)); color: #fff; font: 700 11px var(--mono);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.lp-brand:hover .lp-logo { transform: rotate(-8deg) scale(1.1); }
.lp-nav { display: flex; gap: 2px; margin-left: 20px; }
.lp-nav a { padding: 6px 12px; border-radius: var(--radius); color: var(--muted); font-weight: 500; transition: color 0.15s ease, background-color 0.15s ease; }
.lp-nav a:hover, .lp-nav a.is-active { color: var(--text); background: var(--surface2); }
.lp-menu-btn { display: none; }

/* Typography */
.lp-eyebrow {
  display: inline-flex; align-items: center; gap: 8px; font: 600 12px var(--mono); color: var(--accent);
  padding: 5px 12px; border-radius: 999px; background: color-mix(in srgb, var(--accent) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
}
.lp-live-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--accent2);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent2) 60%, transparent); animation: lp-pulse 2s infinite;
}
.lp-h1 { font-size: clamp(2.1rem, 4.4vw, 3.5rem); line-height: 1.05; letter-spacing: -0.04em; font-weight: 700; margin-top: 18px; }
.lp-grad {
  background: linear-gradient(100deg, var(--accent), var(--purple), var(--accent)); background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; animation: lp-shimmer 6s linear infinite;
}
.lp-title { font-size: clamp(1.6rem, 3vw, 2.3rem); line-height: 1.15; letter-spacing: -0.03em; font-weight: 700; max-width: 22ch; }
.lp-lead { color: var(--muted); font-size: 15.5px; line-height: 1.7; max-width: 58ch; margin-top: 14px; }
.lp-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.lp .btn-lg { padding: 11px 20px; font-size: 14px; }
.lp .btn i.ri-arrow-right-line { transition: transform 0.2s ease; }
.lp .btn:hover i.ri-arrow-right-line { transform: translateX(4px); }

/* Hero */
.lp-hero { display: grid; grid-template-columns: 1fr 1.08fr; gap: 48px; align-items: center; padding-top: 64px; padding-bottom: 64px; }
.lp-hero-copy > *, .lp-hero-visual { animation: lp-rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.lp-hero-copy > :nth-child(2) { animation-delay: 0.08s; }
.lp-hero-copy > :nth-child(3) { animation-delay: 0.16s; }
.lp-hero-copy > :nth-child(4) { animation-delay: 0.24s; }
.lp-hero-copy > :nth-child(5) { animation-delay: 0.32s; }
.lp-hero-visual { animation-delay: 0.2s; }
.lp-chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.lp-chips li {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; font-size: 12px;
  color: var(--muted); background: var(--surface); border: 1px solid var(--border);
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.lp-chips li:hover { border-color: var(--accent); color: var(--text); transform: translateY(-2px); }
.lp-chips i { color: var(--accent); }
.lp-caption { margin-top: 12px; text-align: center; font: 11px var(--mono); color: var(--muted); }

/* Live judge demo */
.lp-demo {
  border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--card-border); overflow: hidden;
  box-shadow: var(--shadow-card), 0 28px 60px -28px color-mix(in srgb, var(--accent) 45%, transparent); animation: lp-float 7s ease-in-out infinite;
}
.lp-demo-head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--surface2); border-bottom: 1px solid var(--border); }
.lp-dots { display: flex; gap: 6px; }
.lp-dots span { width: 10px; height: 10px; border-radius: 50%; background: var(--border2); }
.lp-demo-title { flex: 1; font: 600 12px var(--mono); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lp-pill { font: 600 11px var(--mono); padding: 3px 10px; border-radius: 999px; color: var(--muted); background: var(--subtle-bg); border: 1px solid var(--border); transition: all 0.25s ease; }
.lp-pill.is-running { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 40%, transparent); background: color-mix(in srgb, var(--warn) 12%, transparent); }
.lp-pill.is-ok { color: var(--accent2); border-color: color-mix(in srgb, var(--accent2) 40%, transparent); background: color-mix(in srgb, var(--accent2) 12%, transparent); }
.lp-pill.is-bad { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, transparent); background: color-mix(in srgb, var(--danger) 12%, transparent); }

.lp-demo-tabs { display: flex; gap: 4px; padding: 6px 10px 0; border-bottom: 1px solid var(--border); }
.lp-tab { border: 0; background: none; cursor: pointer; padding: 6px 10px; font: 600 12px var(--font); color: var(--muted); border-bottom: 2px solid transparent; transition: color 0.15s ease, border-color 0.15s ease; }
.lp-tab:hover { color: var(--text); }
.lp-tab.is-active { color: var(--accent); border-bottom-color: var(--accent); }

.lp-editor { display: flex; min-height: 138px; font: 13px/1.7 var(--mono); }
.lp-gutter { padding: 12px 10px; color: var(--muted); text-align: right; white-space: pre; border-right: 1px solid var(--border); user-select: none; }
.lp-code { flex: 1; margin: 0; padding: 12px 14px; overflow-x: auto; font: inherit; }
.tok-k { color: var(--sql-keyword); font-weight: 600; }
.tok-n { color: var(--sql-number); }
.tok-s { color: var(--sql-string); }
.lp-caret { display: inline-block; width: 2px; height: 1.15em; margin-left: 1px; vertical-align: text-bottom; background: var(--accent); animation: lp-blink 1s steps(1) infinite; }

.lp-meta { display: flex; justify-content: space-between; padding: 5px 14px; font: 11px var(--mono); color: var(--muted); background: var(--surface2); border-block: 1px solid var(--border); }
.lp-result { min-height: 168px; overflow-x: auto; }
.lp-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.lp-table th, .lp-table td { padding: 8px 14px; text-align: left; white-space: nowrap; border-bottom: 1px solid var(--table-row-border); }
.lp-table th { color: var(--muted); font: 600 11px var(--mono); }
.lp-table td.num { font-family: var(--mono); }
.lp-table tr.lp-row { animation: lp-row-in 0.35s ease both; }
.lp-table tr.lp-row-more td { color: var(--muted); font-family: var(--mono); }

.lp-verdict { display: flex; align-items: center; gap: 8px; padding: 10px 14px; font: 600 12px var(--mono); color: var(--muted); border-top: 1px solid var(--border); transition: background-color 0.3s ease, color 0.3s ease; }
.lp-verdict.is-ok { color: var(--accent2); background: color-mix(in srgb, var(--accent2) 10%, transparent); }
.lp-verdict.is-bad { color: var(--danger); background: color-mix(in srgb, var(--danger) 10%, transparent); }
.lp-verdict.is-running { color: var(--warn); }

/* Marquee */
.lp-marquee {
  overflow: hidden; border-block: 1px solid var(--border); background: color-mix(in srgb, var(--surface) 70%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.lp-marquee-track { display: flex; width: max-content; padding: 14px 0; animation: lp-scroll 40s linear infinite; }
.lp-marquee-group { display: flex; gap: 40px; padding-right: 40px; font: 600 13px var(--mono); color: var(--sql-keyword); }
.lp-marquee:hover .lp-marquee-track { animation-play-state: paused; }

/* Feature bento */
.lp-bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; margin-top: 32px; }
.lp-bento > :nth-child(1) { grid-column: span 4; }
.lp-bento > :nth-child(2) { grid-column: span 2; }
.lp-bento > :nth-child(3) { grid-column: span 2; }
.lp-bento > :nth-child(4) { grid-column: span 4; }
.lp-bento > :nth-child(5), .lp-bento > :nth-child(6) { grid-column: span 3; }
.lp-feature, .lp-role { position: relative; padding: 24px; }
.lp-feature h3, .lp-role h3, .lp-step h3, .lp-dev h3, .lp-form h3 { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; margin-bottom: 8px; }
.lp-feature p, .lp-step p, .lp-dev p, .lp-form p { color: var(--muted); line-height: 1.65; }
.lp-ico {
  width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; margin-bottom: 14px; font-size: 20px;
  color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.2s ease;
}
.lp-feature:hover .lp-ico { transform: rotate(-8deg) scale(1.12); background: color-mix(in srgb, var(--accent) 22%, transparent); }

/* Tilt + cursor spotlight */
[data-tilt] { transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform 0.18s ease-out, border-color 0.2s ease, box-shadow 0.25s ease; }
[data-tilt]::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 0.25s ease;
  background: radial-gradient(280px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--accent) 18%, transparent), transparent 65%);
}
[data-tilt]:hover { border-color: var(--accent); box-shadow: 0 16px 36px -16px color-mix(in srgb, var(--accent) 45%, transparent); }
[data-tilt]:hover::after { opacity: 1; }

/* Steps */
.lp-steps { list-style: none; counter-reset: step; position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 40px; }
.lp-steps::before, .lp-steps::after { content: ""; position: absolute; top: 15px; left: 15px; right: 15px; height: 2px; border-radius: 2px; }
.lp-steps::before { background: var(--border); }
.lp-steps::after { background: linear-gradient(90deg, var(--accent), var(--purple)); transform: scaleX(0); transform-origin: left; transition: transform 1.4s cubic-bezier(0.4, 0, 0.2, 1) 0.2s; }
.lp-steps.in::after { transform: scaleX(1); }
.lp-step { position: relative; z-index: 1; counter-increment: step; }
.lp-step::before {
  content: counter(step); display: grid; place-items: center; width: 32px; height: 32px; margin-bottom: 16px; border-radius: 50%;
  font: 700 13px var(--mono); color: var(--on-accent); background: var(--accent); box-shadow: 0 0 0 5px var(--bg);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.lp-step:hover::before { transform: scale(1.18); }

/* Roles */
.lp-roles { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 32px; }
.lp-role h3 { display: flex; align-items: center; gap: 10px; font-size: 18px; margin-bottom: 16px; }
.lp-role h3 i { color: var(--accent); }
.lp-role ul { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.lp-role li { display: flex; gap: 10px; color: var(--muted); line-height: 1.5; }
.lp-role li i { color: var(--accent2); }

/* Call to action */
.lp-cta {
  text-align: center; padding: 56px 24px; border: 1px solid var(--card-border); border-radius: var(--radius-lg);
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 14%, var(--surface)), color-mix(in srgb, var(--purple) 12%, var(--surface)));
}
.lp-cta .lp-title, .lp-cta .lp-lead { margin-inline: auto; }
.lp-cta .lp-actions { justify-content: center; }

/* About + contact */
.lp-dev { display: grid; grid-template-columns: 140px 1fr; gap: 28px; align-items: center; padding: 28px; margin-top: 28px; }
.lp-two { display: grid; grid-template-columns: 1.3fr 1fr; gap: 20px; align-items: start; margin-top: 28px; }
.lp-form { padding: 24px; }
.lp-note { margin-top: 14px; padding: 12px 14px; border-radius: var(--radius); font-size: 13px; border: 1px solid color-mix(in srgb, var(--warn) 45%, transparent); background: color-mix(in srgb, var(--warn) 12%, transparent); }
.lp-note[hidden] { display: none; }

/* Developer Image */
.lp-avatar {
  position: relative; flex-shrink: 0; width: 120px; height: 120px; border-radius: 50%; overflow: hidden;
  display: grid; place-items: center; background: var(--surface2); border: 2px solid var(--card-border);
  box-shadow: var(--shadow-card); animation: lp-ring 3s ease-out infinite;
}
.lp-avatar-initials { font: 700 36px var(--mono); color: var(--accent); }
.lp-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 0%; transform: scale(1.4); transform-origin: 53% 47%; }

/* Footer */
.lp-footer { position: relative; z-index: 1; border-top: 1px solid var(--border); padding: 28px 0; font-size: 13px; color: var(--muted); }
.lp-footer b { color: var(--text); }
.lp-footer-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.lp-footer-links { display: flex; flex-wrap: wrap; gap: 16px; }
.lp-footer a { color: var(--muted); transition: color 0.15s ease; }
.lp-footer a:hover { color: var(--accent); }

/* Scroll reveal */
.lp-js .lp-reveal { opacity: 0; translate: 0 18px; transition: opacity 0.6s ease, translate 0.6s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.18s ease-out, border-color 0.2s ease, box-shadow 0.25s ease; }
.lp-js .lp-reveal.in { opacity: 1; translate: 0 0; }
.lp-js .lp-bento > :nth-child(2), .lp-js .lp-roles > :nth-child(2) { transition-delay: 0.08s; }
.lp-js .lp-bento > :nth-child(3) { transition-delay: 0.16s; }
.lp-js .lp-bento > :nth-child(4) { transition-delay: 0.08s; }
.lp-js .lp-bento > :nth-child(6) { transition-delay: 0.08s; }

/* Keyframes */
@keyframes lp-drift { to { transform: translate(8vmax, 6vmax) scale(1.15); } }
@keyframes lp-shimmer { to { background-position: -200% 0; } }
@keyframes lp-rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@keyframes lp-float { 50% { transform: translateY(-8px); } }
@keyframes lp-blink { 50% { opacity: 0; } }
@keyframes lp-pulse { 70% { box-shadow: 0 0 0 8px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
@keyframes lp-row-in { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: none; } }
@keyframes lp-scroll { to { transform: translateX(-50%); } }
@keyframes lp-ring { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 40%, transparent); } 100% { box-shadow: 0 0 0 24px transparent; } }

/* Responsive */
@media (max-width: 960px) {
  .lp-hero { grid-template-columns: 1fr; padding-top: 40px; }
  .lp-bento { grid-template-columns: repeat(2, 1fr); }
  .lp-bento > * { grid-column: span 1 !important; }
  .lp-steps { grid-template-columns: repeat(2, 1fr); }
  .lp-steps::before, .lp-steps::after { display: none; }
  .lp-nav { display: none; }
  .lp-menu-btn { display: inline-flex; }
  .lp-header.open .lp-nav { display: flex; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; margin: 0; padding: 10px 20px; background: var(--bg); border-bottom: 1px solid var(--border); }
  .lp-two { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .lp-section { padding: 52px 0; }
  .lp-bento, .lp-roles, .lp-steps { grid-template-columns: 1fr; }
  .lp-dev { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .lp-dev .lp-actions { justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  .lp *, .lp *::before, .lp *::after { animation: none !important; transition: none !important; }
  .lp-js .lp-reveal { opacity: 1; translate: 0 0; }
  .lp-steps::after { transform: scaleX(1); }
}