/* ============================================================
   Landing page theme — "AI Proxy Hub" style
   Self-hosted, CSP-safe (no CDN frameworks), animation-light.
   Loaded only on the landing layout (app/Views/layouts/landing.php).
   ============================================================ */

:root {
  --lp-bg: #f8fafc;
  --lp-ink: #0f172a;
  --lp-muted: #475569;
  --lp-faint: #94a3b8;
  --lp-line: #e2e8f0;
  --lp-brand: #2563eb;
  --lp-brand-hover: #1d4ed8;
  --lp-brand-soft: #eff6ff;
  --lp-brand-border: #bfdbfe;
  --lp-code-bg: #1e293b;
  --lp-code-line: #334155;
  --lp-shadow: 0 4px 20px -2px rgba(15, 23, 42, .06);
  --lp-shadow-lg: 0 12px 40px -8px rgba(15, 23, 42, .18);
  --lp-radius: 16px;
}

body.landing {
  background: var(--lp-bg);
  color: var(--lp-ink);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

.landing section[id], .landing [id="models"], .landing [id="rates"] { scroll-margin-top: 88px; }

.landing .lp-container { max-width: 80rem; margin: 0 auto; padding: 0 1.5rem; }

/* ------------------------------------------------------------
   Navbar — sticky, blurred
   ------------------------------------------------------------ */
.lp-nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--lp-line);
  transition: box-shadow .25s ease;
}
.lp-nav.scrolled { box-shadow: 0 6px 24px -12px rgba(15, 23, 42, .18); }
.lp-nav-inner {
  max-width: 80rem; margin: 0 auto; padding: 0 1.5rem;
  height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.lp-brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.lp-brand-logo {
  width: 36px; height: 36px; border-radius: 12px;
  background: var(--lp-brand); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 14px -4px rgba(37, 99, 235, .5);
  flex: 0 0 auto;
}
.lp-brand-logo svg { width: 18px; height: 18px; }
.lp-brand-name { font-size: 20px; font-weight: 700; letter-spacing: -.02em; color: var(--lp-ink); }
.lp-brand-accent { color: var(--lp-brand); }

.lp-links { display: flex; align-items: center; gap: 32px; }
.lp-links a {
  font-size: 14px; font-weight: 500; color: var(--lp-muted);
  text-decoration: none; transition: color .2s ease;
}
.lp-links a:hover { color: var(--lp-brand); }

.lp-actions { display: flex; align-items: center; gap: 14px; }
.lp-login {
  font-size: 14px; font-weight: 600; color: #334155; text-decoration: none;
  padding: 8px 10px; transition: color .2s ease;
}
.lp-login:hover { color: var(--lp-brand); }
.lp-cta {
  font-size: 14px; font-weight: 600; color: #fff; text-decoration: none;
  background: var(--lp-brand); padding: 9px 16px; border-radius: 10px;
  box-shadow: 0 4px 14px -4px rgba(37, 99, 235, .45);
  transition: background .2s ease, transform .2s ease, box-shadow .2s ease;
}
.lp-cta:hover { background: var(--lp-brand-hover); transform: translateY(-1px); box-shadow: 0 8px 20px -6px rgba(37, 99, 235, .5); }

.lp-burger {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 40px; height: 40px; padding: 8px;
  background: none; border: 1px solid var(--lp-line); border-radius: 10px; cursor: pointer;
}
.lp-burger span { display: block; height: 2px; border-radius: 2px; background: var(--lp-ink); transition: transform .2s ease, opacity .2s ease; }
.lp-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.lp-burger.open span:nth-child(2) { opacity: 0; }
.lp-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.lp-mobile {
  display: none; flex-direction: column; gap: 4px;
  padding: 10px 24px 18px; border-top: 1px solid var(--lp-line); background: rgba(255, 255, 255, .97);
}
.lp-mobile a {
  padding: 10px 4px; font-size: 15px; font-weight: 500; color: var(--lp-ink); text-decoration: none;
  border-bottom: 1px solid #f1f5f9;
}
.lp-mobile a.lp-mobile-cta { color: var(--lp-brand); font-weight: 600; border-bottom: 0; }

/* ------------------------------------------------------------
   Hero
   ------------------------------------------------------------ */
.lp-hero { position: relative; padding: 72px 0 64px; overflow: hidden; text-align: center; }
.lp-blob {
  position: absolute; border-radius: 50%; filter: blur(72px); opacity: .55;
  z-index: 0; pointer-events: none; will-change: transform;
}
.lp-blob-1 { width: 440px; height: 440px; background: #bfdbfe; top: -140px; left: -100px; animation: lpFloat 15s ease-in-out infinite; }
.lp-blob-2 { width: 400px; height: 400px; background: #dbeafe; bottom: -160px; right: -80px; animation: lpFloat 19s ease-in-out infinite reverse; }
@keyframes lpFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(28px, -26px) scale(1.07); }
}
.lp-hero-inner { position: relative; z-index: 1; }

.lp-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 999px;
  background: var(--lp-brand-soft); border: 1px solid var(--lp-brand-border);
  color: var(--lp-brand); font-size: 12.5px; font-weight: 600;
}
.lp-badge-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--lp-brand); animation: lpPulse 2.2s ease-in-out infinite; }
@keyframes lpPulse { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }

.lp-hero h1 {
  margin: 22px auto 20px; max-width: 56rem;
  font-size: clamp(2.1rem, 5vw, 3.5rem); line-height: 1.12;
  font-weight: 800; letter-spacing: -.03em; color: var(--lp-ink);
}
.lp-hero h1 .lp-accent { color: var(--lp-brand); }
.lp-lead { margin: 0 auto 36px; max-width: 44rem; font-size: clamp(1.05rem, 2vw, 1.25rem); line-height: 1.6; color: var(--lp-muted); }

.lp-cta-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-bottom: 52px; }
.lp-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 13px 28px; border-radius: 13px; font-size: 15px; font-weight: 600;
  text-decoration: none; cursor: pointer; border: 1px solid transparent;
  transition: background .2s ease, transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.lp-btn svg { width: 16px; height: 16px; }
.lp-btn-primary {
  background: var(--lp-brand); color: #fff;
  box-shadow: 0 10px 26px -8px rgba(37, 99, 235, .55);
}
.lp-btn-primary:hover { background: var(--lp-brand-hover); transform: translateY(-2px); box-shadow: 0 14px 32px -8px rgba(37, 99, 235, .6); }
.lp-btn-ghost { background: #fff; color: #1e293b; border-color: #cbd5e1; box-shadow: 0 1px 3px rgba(15, 23, 42, .05); }
.lp-btn-ghost:hover { background: #f8fafc; transform: translateY(-2px); border-color: #94a3b8; }
.lp-btn-light { background: #fff; color: var(--lp-brand); }
.lp-btn-light:hover { transform: translateY(-2px); box-shadow: 0 12px 30px -10px rgba(15, 23, 42, .35); }

/* Hero entrance animation (pure CSS, runs without JS) */
@keyframes lpRise {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: none; }
}
.lp-anim { animation: lpRise .7s cubic-bezier(.22, .61, .36, 1) both; }
.lp-d1 { animation-delay: .05s; } .lp-d2 { animation-delay: .14s; } .lp-d3 { animation-delay: .23s; }
.lp-d4 { animation-delay: .32s; } .lp-d5 { animation-delay: .44s; }

/* Terminal / endpoint preview */
.lp-terminal {
  max-width: 56rem; margin: 0 auto; text-align: left;
  background: var(--lp-code-bg); border: 1px solid var(--lp-code-line);
  border-radius: var(--lp-radius); padding: 18px 20px; box-shadow: var(--lp-shadow-lg);
}
.lp-terminal-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding-bottom: 12px; margin-bottom: 14px; border-bottom: 1px solid var(--lp-code-line);
}
.lp-dots { display: inline-flex; align-items: center; gap: 7px; }
.lp-dot { width: 11px; height: 11px; border-radius: 50%; }
.lp-dot-r { background: #ef4444; } .lp-dot-y { background: #eab308; } .lp-dot-g { background: #22c55e; }
.lp-terminal-label { margin-left: 8px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 11.5px; color: #94a3b8; }
.lp-copy {
  display: inline-flex; align-items: center; gap: 6px;
  background: none; border: 0; padding: 4px 6px; border-radius: 6px; cursor: pointer;
  font-size: 12px; color: #94a3b8; font-family: inherit; transition: color .2s ease, background .2s ease;
}
.lp-copy:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.lp-terminal pre {
  margin: 0; overflow-x: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13.5px; line-height: 1.75; color: #e2e8f0;
}
.lp-terminal .k { color: #60a5fa; }
.lp-terminal .s { color: #86efac; }
.lp-terminal .c { color: #64748b; }

/* ------------------------------------------------------------
   Sections
   ------------------------------------------------------------ */
.lp-section { padding: 76px 0; }
.lp-section-alt { background: #fff; border-top: 1px solid var(--lp-line); border-bottom: 1px solid var(--lp-line); }
.lp-eyebrow {
  display: block; text-align: center; margin-bottom: 10px;
  color: var(--lp-brand); font-size: 12.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
}
.lp-h2 { margin: 0 0 12px; text-align: center; font-size: clamp(1.6rem, 3vw, 2.25rem); font-weight: 700; letter-spacing: -.02em; }
.lp-sub { margin: 0 auto 44px; max-width: 40rem; text-align: center; color: var(--lp-muted); font-size: 16px; line-height: 1.65; }

/* CLI tool cards */
.lp-cli-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 18px; }
.lp-cli-card {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  padding: 22px 14px; border-radius: 14px;
  background: #f8fafc; border: 1px solid var(--lp-line);
  transition: border-color .25s ease, transform .25s ease, box-shadow .25s ease;
}
.lp-cli-card:hover { border-color: var(--lp-brand); transform: translateY(-3px); box-shadow: var(--lp-shadow); }
.lp-cli-card svg { width: 26px; height: 26px; }
.lp-cli-card span { font-size: 13.5px; font-weight: 700; color: #1e293b; }
.ic-orange { color: #ea580c; } .ic-blue { color: #2563eb; } .ic-emerald { color: #059669; }
.ic-purple { color: #7c3aed; } .ic-indigo { color: #4f46e5; }

/* Steps */
.lp-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.lp-step {
  position: relative; padding: 24px 22px;
  background: #fff; border: 1px solid var(--lp-line); border-radius: var(--lp-radius);
  transition: transform .25s ease, box-shadow .25s ease;
}
.lp-step:hover { transform: translateY(-3px); box-shadow: var(--lp-shadow); }
.lp-step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 10px; margin-bottom: 14px;
  background: var(--lp-brand-soft); color: var(--lp-brand); font-weight: 800; font-size: 15px;
}
.lp-step h3 { margin: 0 0 8px; font-size: 16.5px; font-weight: 700; }
.lp-step p { margin: 0; font-size: 14px; line-height: 1.65; color: var(--lp-muted); }

/* Features */
.lp-features { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.lp-feature {
  padding: 26px 24px; background: #fff;
  border: 1px solid var(--lp-line); border-radius: var(--lp-radius);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.lp-feature:hover { transform: translateY(-4px); box-shadow: var(--lp-shadow); border-color: var(--lp-brand-border); }
.lp-feature-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 12px; margin-bottom: 16px;
  background: var(--lp-brand-soft); color: var(--lp-brand);
}
.lp-feature-icon svg { width: 22px; height: 22px; }
.lp-feature h3 { margin: 0 0 8px; font-size: 16.5px; font-weight: 700; }
.lp-feature p { margin: 0; font-size: 14px; line-height: 1.65; color: var(--lp-muted); }

/* Models & token rates table */
.lp-tablecard {
  max-width: 64rem; margin: 0 auto; overflow: hidden;
  background: #fff; border: 1px solid var(--lp-line); border-radius: var(--lp-radius);
  box-shadow: var(--lp-shadow);
}
.lp-tablewrap { overflow-x: auto; }
.lp-table { width: 100%; border-collapse: collapse; text-align: left; font-size: 14px; color: #334155; }
.lp-table th {
  padding: 15px 22px; background: #f1f5f9; border-bottom: 1px solid var(--lp-line);
  font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #64748b;
  white-space: nowrap;
}
.lp-table td { padding: 15px 22px; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }
.lp-table tbody tr:last-child td { border-bottom: 0; }
.lp-table tbody tr { transition: background .15s ease; }
.lp-table tbody tr:hover { background: #f8fafc; }
.lp-model { display: flex; align-items: center; gap: 12px; }
.lp-model-dot { width: 10px; height: 10px; border-radius: 50%; flex: 0 0 auto; }
.lp-model-name { font-weight: 600; color: var(--lp-ink); }
.lp-model-id { display: block; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 11.5px; color: var(--lp-faint); margin-top: 2px; }
.lp-price { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-weight: 600; color: #1e293b; white-space: nowrap; }
.lp-cap { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 600; margin: 2px 3px 2px 0; }
.lp-cap-tools { background: #eff6ff; color: #1d4ed8; }
.lp-cap-reasoning { background: #faf5ff; color: #7c3aed; }
.lp-cap-vision { background: #f0fdf4; color: #15803d; }
.lp-note { margin-top: 16px; text-align: center; font-size: 12.5px; color: var(--lp-faint); }

/* CTA band */
.lp-ctaband {
  max-width: 64rem; margin: 0 auto; padding: 52px 32px; text-align: center;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border-radius: 22px; box-shadow: 0 20px 50px -16px rgba(37, 99, 235, .55);
}
.lp-ctaband h2 { margin: 0 0 10px; color: #fff; font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 800; letter-spacing: -.02em; }
.lp-ctaband p { margin: 0 auto 28px; max-width: 34rem; color: #dbeafe; font-size: 15.5px; line-height: 1.6; }

/* ------------------------------------------------------------
   Footer
   ------------------------------------------------------------ */
.lp-footer { background: #fff; border-top: 1px solid var(--lp-line); padding: 44px 0; }
.lp-footer-inner {
  max-width: 80rem; margin: 0 auto; padding: 0 1.5rem;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px;
}
.lp-foot-brand { display: flex; align-items: center; gap: 10px; color: #64748b; font-size: 13.5px; }
.lp-foot-logo {
  width: 28px; height: 28px; border-radius: 8px; background: var(--lp-brand); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
}
.lp-foot-logo svg { width: 14px; height: 14px; }
.lp-foot-links { display: flex; flex-wrap: wrap; gap: 22px; }
.lp-foot-links a { color: #64748b; font-size: 13.5px; text-decoration: none; transition: color .2s ease; }
.lp-foot-links a:hover { color: var(--lp-brand); }

/* ------------------------------------------------------------
   Scroll reveal (JS adds .will-reveal then .in; without JS
   content simply stays visible — no hidden-content fallback issue)
   ------------------------------------------------------------ */
[data-reveal] {
  transition: opacity .7s ease, transform .7s cubic-bezier(.22, .61, .36, 1);
  transition-delay: calc(var(--rd, 0) * 80ms);
}
[data-reveal].will-reveal { opacity: 0; transform: translateY(26px); }
[data-reveal].will-reveal.in { opacity: 1; transform: none; }

/* ------------------------------------------------------------
   Reduced motion — disable everything animated
   ------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  .lp-anim, .lp-blob, .lp-badge-dot { animation: none !important; }
  [data-reveal] { transition: none !important; }
  [data-reveal].will-reveal { opacity: 1; transform: none; }
}

/* ------------------------------------------------------------
   Responsive
   ------------------------------------------------------------ */
@media (max-width: 900px) {
  .lp-section { padding: 56px 0; }
  .lp-hero { padding: 52px 0 48px; }
}
@media (max-width: 768px) {
  .lp-links, .lp-actions { display: none; }
  .lp-burger { display: flex; }
  .lp-mobile:not([hidden]) { display: flex; }
}
@media (max-width: 640px) {
  .lp-container { padding: 0 20px; }
  .lp-hero { padding: 40px 0 40px; }
  .lp-cta-row { margin-bottom: 40px; }
  .lp-btn { width: 100%; max-width: 320px; }
  .lp-terminal { padding: 14px 14px; border-radius: 12px; }
  .lp-terminal pre { font-size: 12px; }
  .lp-ctaband { padding: 40px 22px; border-radius: 16px; }
  .lp-table th, .lp-table td { padding: 12px 14px; }
}
