/* ==========================================================================
   ViRouter landing — NEW design (Lovable "Infinite Brand Showcase" style)
   Pure black bg, Inter + JetBrains Mono, pill marquee (colored, soft rounded)
   ========================================================================== */

:root {
  --background: #000;
  --foreground: oklch(0.985 0 0);
  --card: oklch(0.03 0 0);
  --primary: oklch(0.985 0 0);
  --primary-foreground: #000;
  --secondary: oklch(0.08 0 0);
  --secondary-foreground: oklch(0.985 0 0);
  --muted-foreground: oklch(0.63 0 0);
  --subtle: oklch(0.45 0 0);
  --border: oklch(1 0 0 / 9%);
  --border-strong: oklch(1 0 0 / 16%);
  --success: oklch(0.78 0.16 160);
  --display: "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; border-color: var(--border); }
html { font-family: var(--display); -webkit-font-smoothing: antialiased; scroll-behavior: smooth; }
body { margin: 0; background: var(--background); color: var(--foreground); letter-spacing: -0.011em; line-height: 1.5; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

.container { width: 100%; max-width: 88rem; margin: 0 auto; padding-left: clamp(1.25rem, 3vw, 3rem); padding-right: clamp(1.25rem, 3vw, 3rem); }

/* ---- Header ---- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(0,0,0,.72); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.site-header__inner {
  display: flex; align-items: center; gap: 3.25rem; height: 4rem;
  width: 100%; max-width: 88rem; margin: 0 auto; padding-left: clamp(1.25rem, 3vw, 3rem); padding-right: clamp(1.25rem, 3vw, 3rem);
}
.brand { display: inline-flex; align-items: center; gap: .625rem; color: var(--foreground); }
.brand__logo { display: block; width: 28px; height: auto; object-fit: contain; flex: none; }
.brand__word { font-weight: 600; font-size: 1.0625rem; letter-spacing: .01em; }
.site-nav { display: none; align-items: center; gap: 2rem; font-size: .875rem; color: oklch(0.75 0 0); }
.site-nav a { transition: color 200ms ease; }
.site-nav a:hover { color: var(--foreground); }
.header__actions { margin-left: auto; display: flex; align-items: center; gap: .625rem; }
.signin { font-size: .8125rem; font-weight: 600; color: oklch(0.75 0 0); padding: .5rem .625rem; transition: color .2s ease; }
.signin:hover { color: var(--foreground); }
.btn-get-started {
  border-radius: .625rem; background: var(--primary); padding: .5rem 1rem;
  font-size: .8125rem; font-weight: 600; color: var(--primary-foreground); transition: opacity .2s ease;
}
.btn-get-started:hover { opacity: .9; }

/* ---- Hero ---- */
.site { position: relative; overflow-x: clip; overflow-y: visible; }
.bg-glow {
  position: absolute; left: 0; right: 0; top: -25%; height: 70vh; pointer-events: none;
  background: radial-gradient(55% 50% at 50% 50%, oklch(0.985 0 0 / 5%), transparent 70%);
  filter: blur(40px);
}
.hero {
  position: relative; margin: 0 auto; max-width: 64rem;
  display: flex; flex-direction: column; align-items: center;
  padding: 2rem 1.25rem 3.375rem; text-align: center;
}
.hero-badge {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  border-radius: .75rem; border: 1px solid rgba(255,255,255,.09); background: rgba(255,255,255,.02);
  padding: .375rem 1rem; box-shadow: 0 0 40px rgba(255,255,255,.04);
  font-size: .875rem; line-height: 1.5; font-weight: 500; color: rgba(255,255,255,.6);
}
.hero-badge__sparkle { width: 1rem; height: 1rem; flex: 0 0 auto; color: #fef3c7; }
.hero-badge__text { display: inline-flex; white-space: nowrap; letter-spacing: -.02em; }
.hero-badge__text > span { display: inline-block; white-space: pre; animation: badge-breathe 1.4s ease-in-out infinite; animation-delay: calc(var(--badge-index, 0) * 45ms); }
@keyframes badge-breathe {
  0%, 100% { font-variation-settings: 'wght' 420, 'slnt' 0; }
  50% { font-variation-settings: 'wght' 760, 'slnt' -8; }
}
.hero-title {
  margin-top: 3.25rem; text-align: center;
  font-size: 4.25rem; font-weight: 800; line-height: 1.08; letter-spacing: 0;
  filter: drop-shadow(0 10px 22px rgba(255,255,255,.08));
}
.hero-title-line { display: block; white-space: nowrap; }
.hero-title-line--gradient {
  background: linear-gradient(90deg, #fafaf9 0%, #fafaf9 36%, #a8a29e 54%, #fafaf9 72%, #fafaf9 100%);
  background-size: 220% 100%; background-clip: text; -webkit-background-clip: text; color: transparent;
  animation: hero-title-aurora 7s ease-in-out infinite;
}
.hero-title-line--solid { color: #fafaf9; }
.hero-title-silver {
  display: inline-block;
  background: linear-gradient(180deg, #f5f5f4 0%, #d6d3d1 42%, #a8a29e 100%);
  background-clip: text; -webkit-background-clip: text; color: transparent;
}
.hero-title .dim { color: inherit; text-shadow: none; }
.hero-title-break { display: none; }
.hero-subtitle {
  margin-top: 1.5rem; max-width: 46rem; text-align: center;
  font-size: .95rem; line-height: 1.7; color: #8a8580;
}
.hero-subtitle-line { display: block; white-space: nowrap; }
.hero-subtitle-break { display: none; }
.hero-highlight {
  display: inline-block; padding: 0 .22em; border-radius: .2em;
  color: #e7edf1; background: rgba(135,206,250,.34);
}
.hero-underline { position: relative; color: #c9c5bf; }
.hero-underline::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -.08em; height: .16em;
  border-radius: 9999px; background: rgba(255,152,0,.78);
}
.hero-actions { margin-top: 1.75rem; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .75rem; }
.btn-primary {
  border-radius: .75rem; background: var(--primary); padding: .625rem 1.25rem;
  min-height: 44px; font-size: .9375rem; font-weight: 600; line-height: 1.5;
  color: var(--primary-foreground); transition: opacity .2s ease;
}
.btn-primary:hover { opacity: .9; }
.btn-secondary {
  border-radius: .75rem; border: 1px solid var(--border); background: var(--card);
  padding: .625rem 1.25rem; min-height: 44px; font-size: .9375rem; font-weight: 600; line-height: 1.5;
  transition: border-color .2s ease;
}
.btn-secondary:hover { border-color: var(--border-strong); }
.btn-github-icon { width: 1.125rem; height: 1.125rem; flex: 0 0 auto; }
.btn-secondary { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; }
.hero-actions .btn-primary,
.hero-actions .btn-secondary {
  font-size: .9375rem;
  font-weight: 600;
  line-height: 1.5;
}

/* ---- Marquee (single-row ecosystem strip) ---- */
/* Full-width band separating Hero from Features. Transparent background,
   hairline borders, edge fade — a quiet connectivity proof, not a section.
   Motion is driven by main.js (requestAnimationFrame), not CSS keyframes:
   CSS animations freeze under prefers-reduced-motion / OS animation settings. */
.marquee-section {
  position: relative; width: min(84rem, calc(100% - 3rem)); margin: 0 auto;
}
.logo-marquee-section { height: 3.75rem; display: flex; align-items: center; overflow: hidden; user-select: none; }
.logo-marquee-mask {
  position: relative; width: 100%; margin: 0 auto; overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent 0, rgba(0,0,0,.35) 36px, #000 128px, #000 calc(100% - 128px), rgba(0,0,0,.35) calc(100% - 36px), transparent 100%);
  mask-image: linear-gradient(to right, transparent 0, rgba(0,0,0,.35) 36px, #000 128px, #000 calc(100% - 128px), rgba(0,0,0,.35) calc(100% - 36px), transparent 100%);
}
.logo-marquee-mask::before, .logo-marquee-mask::after {
  content: ""; position: absolute; top: 0; bottom: 0; z-index: 2; width: 8rem; pointer-events: none;
}
.logo-marquee-mask::before { left: 0; background: linear-gradient(to right, #000 0%, rgba(0,0,0,.82) 26%, transparent 100%); }
.logo-marquee-mask::after { right: 0; background: linear-gradient(to left, #000 0%, rgba(0,0,0,.82) 26%, transparent 100%); }
.marquee-row { display: flex; width: max-content; min-width: 100%; overflow: visible; }
.marquee-track {
  display: flex; flex: 0 0 auto; width: max-content; min-width: max-content; justify-content: flex-start;
  align-items: center; gap: clamp(1.25rem, 2.2vw, 2.75rem); padding: 0 1.5rem; list-style: none; will-change: transform;
}
.marquee-item {
  position: relative; display: inline-flex; align-items: center; gap: .55rem;
  padding-right: 1.6rem; white-space: nowrap; opacity: 1;
  transition: opacity .2s ease, filter .2s ease;
}
.marquee-item:hover { opacity: 1; filter: brightness(1.08); }
.marquee-item::after {
  content: ""; position: absolute; right: .8rem; top: 50%; transform: translateY(-50%);
  width: 1px; height: .9rem; background: rgba(255,255,255,.18);
}
.marquee-item img { width: 1.625rem; height: 1.625rem; object-fit: contain; flex-shrink: 0; opacity: 1; }
.marquee-item .fallback {
  display: flex; width: 1.625rem; height: 1.625rem; align-items: center; justify-content: center;
  border-radius: .375rem; background: rgba(255,255,255,.08); color: var(--muted-foreground);
  font-size: .6rem; font-weight: 600; flex-shrink: 0;
}
.marquee-item .marquee-label { font-size: .8125rem; font-weight: 500; color: #f1f5f9; letter-spacing: -.01em; }

/* ---- Features ---- */
.features { position: relative; margin: 0 auto; max-width: 72rem; padding: 3rem 1.25rem 0; }
.features-grid { display: grid; gap: 1rem; grid-template-columns: 1fr; }
.feature-card {
  border-radius: 1rem; border: 1px solid var(--border); background: var(--card);
  padding: 1.25rem; transition: border-color .2s ease;
}
.feature-card:hover { border-color: var(--border-strong); }
.feature-icon { display: inline-flex; color: var(--foreground); opacity: .85; }
.feature-icon svg { width: 1.125rem; height: 1.125rem; }
.feature-title { margin-top: .75rem; font-size: 1rem; font-weight: 600; }
.feature-body { margin-top: .375rem; font-size: .875rem; line-height: 1.5; color: var(--muted-foreground); }

/* ---- Pricing (3 Lovable-style cards + $0 trial banner) ---- */
.pricing { position: relative; margin: 0 auto; max-width: 72rem; padding: 5.5rem 1.25rem 6rem; }
.pricing-head { margin: 0 auto; max-width: 42rem; text-align: center; }
.pricing-title { font-size: 1.875rem; font-weight: 600; letter-spacing: -.03em; }
.pricing-subtitle { margin: .75rem auto 0; max-width: 42rem; font-size: 1rem; line-height: 1.55; color: var(--muted-foreground); }
.pricing-note-top { margin: .65rem auto 0; max-width: 38rem; font-size: .8125rem; line-height: 1.5; color: var(--subtle); }

/* Cards — nguyên bản spec Lovable (rounded-3xl, p-7, giá 4xl) */
.plans { margin-top: 3rem; display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
.plan {
  position: relative; display: flex; flex-direction: column; border-radius: 1.5rem;
  border: 1px solid var(--border); padding: 1.75rem;
  background: color-mix(in oklch, var(--card) 60%, transparent);
}
.plan--featured {
  border-color: oklch(0.985 0 0 / 50%); background: var(--card);
  box-shadow: 0 24px 70px -40px rgba(255,255,255,.35);
}
.plan-badge {
  position: absolute; top: -.75rem; left: 1.75rem; border-radius: 9999px;
  background: var(--primary); padding: .25rem .75rem; font-size: .7rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .02em; color: var(--primary-foreground);
}
.plan-name {
  font-size: .875rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em;
  color: var(--muted-foreground);
}
.plan-price-row { margin-top: 1rem; display: flex; align-items: flex-end; gap: .25rem; }
.plan-price { font-size: 2.25rem; font-weight: 600; letter-spacing: -.03em; line-height: 1.15; }
.plan-cadence { padding-bottom: .25rem; font-size: .875rem; color: var(--muted-foreground); }
.plan-blurb { margin-top: .75rem; font-size: .875rem; color: var(--muted-foreground); }
.plan-features { margin-top: 1.25rem; flex: 1; display: flex; flex-direction: column; gap: .625rem; }
.plan-features li { display: flex; align-items: flex-start; gap: .625rem; font-size: .875rem; color: var(--foreground); line-height: 1.45; }
.plan-features .check { margin-top: .125rem; flex-shrink: 0; color: var(--primary); }
.plan-features .check svg { width: 1rem; height: 1rem; }
.plan-cta {
  margin-top: 2rem; border-radius: .75rem; padding: .75rem 1.25rem; text-align: center;
  font-size: .9375rem; font-weight: 600; transition: opacity .2s ease;
}
.plan-cta:hover { opacity: .9; }
.plan-cta--primary { background: var(--primary); color: var(--primary-foreground); }
.plan-cta--secondary { border: 1px solid var(--border-strong); background: var(--secondary); color: var(--secondary-foreground); }
.pricing__note {
  margin-top: 2.75rem; border-top: 1px solid var(--border); padding-top: 1.5rem;
  display: grid; grid-template-columns: 1fr; gap: 1rem; font-size: .8125rem; color: var(--subtle);
}
.pricing__note b { color: var(--muted-foreground); font-weight: 600; }
.pricing__note a { color: var(--muted-foreground); border-bottom: 1px solid var(--border-strong); }

/* ---- FAQ ---- */
.faq { border-top: 1px solid var(--border); padding: 5rem 0; }
.faq .split { display: grid; grid-template-columns: 1fr; gap: 2rem; align-items: start; }
.faq h2 { font-size: 1.875rem; font-weight: 600; letter-spacing: -.03em; margin-top: 1rem; }
.faq__kicker {
  font-family: var(--mono); font-size: .6875rem; letter-spacing: .18em;
  text-transform: uppercase; color: var(--muted-foreground);
}
.faq__items details { border-bottom: 1px solid var(--border); }
.faq__items details:first-child { border-top: 1px solid var(--border); }
.faq__items summary {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.25rem 0; cursor: pointer; list-style: none;
  font-size: 1rem; font-weight: 600; transition: color .15s ease;
}
.faq__items summary::-webkit-details-marker { display: none; }
.faq__items summary::after {
  content: "+"; font-family: var(--mono); font-size: 1rem; color: var(--subtle);
  transition: transform .2s ease;
}
.faq__items details[open] summary::after { transform: rotate(45deg); }
.faq__items p { padding: 0 0 1.375rem; color: var(--muted-foreground); font-size: .875rem; max-width: 64ch; }

/* ---- Footer ---- */
.site-footer { border-top: 1px solid var(--border); padding: 3.5rem 0 2.25rem; }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 1.75rem; }
.footer-brand > .footer-brand__word { display: inline-flex !important; align-items: center; gap: .625rem; margin-top: 0 !important; font-size: 1.0625rem; font-weight: 600; color: var(--foreground) !important; }
.footer-brand__logo { width: 26px; height: auto; object-fit: contain; }
.footer-brand span { display: block; margin-top: .625rem; font-size: .8125rem; color: var(--subtle); max-width: 26ch; }
.footer-status {
  margin-top: 1.25rem; display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--mono); font-size: .7rem; color: var(--foreground);
}
.footer-status::before { content: ""; width: 6px; height: 6px; border-radius: 999px; background: currentColor; }
.footer-nav h4,
.footer-grid h4 {
  font-family: var(--mono); font-size: .6875rem; font-weight: 500; letter-spacing: .18em;
  text-transform: uppercase; color: oklch(0.55 0 0); margin: 0 0 .875rem;
}
.footer-chips {
  display: flex; flex-wrap: wrap; gap: .5rem;
}
.footer-chips a {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 1.75rem; padding: .25rem .75rem;
  border: 1px solid var(--border-strong); border-radius: .75rem;
  background: transparent; color: var(--foreground);
  font-size: .75rem; font-weight: 500; line-height: 1.2; white-space: nowrap;
  transition: border-color .15s ease, background-color .15s ease, color .15s ease;
}
.footer-chips a:hover {
  border-color: oklch(1 0 0 / 28%);
  background: oklch(1 0 0 / 4%);
}
.footer-bottom {
  margin-top: 3.5rem; padding-top: 1.375rem; border-top: 1px solid var(--border);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem;
  font-family: var(--mono); font-size: .7rem; color: var(--subtle);
}

/* ---- Keyframes & responsive ---- */

/* ---- Scroll-reveal animations ---- */
/* Base state: hidden until revealed. JS adds .is-revealed. */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 600ms cubic-bezier(0.22, 1, 0.36, 1),
              transform 600ms cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}
[data-reveal="zoom"] { transform: translateY(24px) scale(0.96); }
[data-reveal].is-revealed { opacity: 1; transform: none; }

/* Hero entrance on page load (runs once, no JS needed) */
.hero-badge, .hero-title, .hero-subtitle, .hero-actions {
  opacity: 0; transform: translateY(18px);
  animation: hero-rise 700ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.hero-badge { animation-delay: 80ms; }
.hero-title { animation-delay: 200ms; }
.hero-subtitle { animation-delay: 320ms; }
.hero-actions { animation-delay: 440ms; }
@keyframes hero-rise { to { opacity: 1; transform: none; } }
@keyframes hero-title-aurora {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* Header gains solid backdrop after scrolling (JS toggles .is-scrolled) */
.site-header { transition: background-color 300ms ease, border-color 300ms ease; }
.site-header:not(.is-scrolled) { background: transparent; border-bottom-color: transparent; }

/* FAQ accordion — single-open, smooth height */
.faq__items details { overflow: hidden; }
.faq__items details[open] { animation: faq-open 300ms ease; }
@keyframes faq-open { from { opacity: .4; } to { opacity: 1; } }

/* Marquee motion & reduced-motion behavior handled in main.js (rAF driver) */

@media (min-width: 640px) {
  .site-nav { display: flex; }
  .hero { max-width: 70rem; padding-top: 2rem; }
  .hero-title { font-size: 4.75rem; }
  .hero-subtitle { font-size: 1rem; }
  .hero-actions { margin-top: 1.5rem; }
  .btn-primary, .btn-secondary { padding-top: .8rem; padding-bottom: .8rem; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .pricing-title { font-size: 2.25rem; }
  .marquee-section .logo-marquee-section { height: 4.5rem; }
  .marquee-item { gap: .625rem; padding-right: 0; }
  .marquee-item::after { display: none; }
  .marquee-item img, .marquee-item .fallback { width: 1.95rem; height: 1.95rem; }
  .marquee-item .marquee-label { font-size: .9375rem; }
  .marquee-track { min-width: max-content; }
  .plans { grid-template-columns: repeat(2, 1fr); }
  .pricing__note { grid-template-columns: 1fr 1fr; }
  .faq .split { grid-template-columns: 1fr 1fr; gap: 3rem; }
}
@media (min-width: 1536px) {
  .hero { padding-top: 3.5rem; padding-bottom: 4.5rem; }
  .hero-title { font-size: 5rem; max-width: 66rem; }
  .hero-subtitle { max-width: 48rem; }
  .features, .pricing { max-width: 88rem; padding-left: clamp(2rem, 3vw, 3rem); padding-right: clamp(2rem, 3vw, 3rem); }
}
@media (max-width: 639px) {
  .hero { max-width: 24rem; padding: 4.25rem 1.25rem 3.25rem; }
  .hero-badge { max-width: 100%; padding-left: .75rem; padding-right: .75rem; font-size: .75rem; }
  .hero-title { max-width: none; width: calc(100% + 1rem); font-size: 2.25rem; font-weight: 800; line-height: 1.1; }
  .hero-title-line { white-space: nowrap; }
  .hero-title .dim { white-space: nowrap; }
  .hero-subtitle { width: 100%; max-width: 22rem; margin-top: 1.35rem; font-size: .875rem; line-height: 1.7; }
  .hero-subtitle-line { white-space: nowrap; }
  .hero-actions { width: 100%; margin-top: 1.85rem; gap: .75rem; }
  .hero-actions a { display: inline-flex; align-items: center; justify-content: center; }
  .btn-primary, .btn-secondary { padding-left: 1.25rem; padding-right: 1.25rem; }
  .marquee-section { width: calc(100% - 1.5rem); }
  .logo-marquee-mask {
    width: 100%;
    -webkit-mask-image: linear-gradient(to right, transparent 0, rgba(0,0,0,.2) 18px, #000 56px, #000 calc(100% - 56px), rgba(0,0,0,.2) calc(100% - 18px), transparent 100%);
    mask-image: linear-gradient(to right, transparent 0, rgba(0,0,0,.2) 18px, #000 56px, #000 calc(100% - 56px), rgba(0,0,0,.2) calc(100% - 18px), transparent 100%);
  }
  .marquee-track { padding: 0 .9rem; width: max-content; min-width: max-content; }
  .marquee-item { gap: .45rem; }
  .marquee-item img, .marquee-item .fallback { width: 1.625rem; height: 1.625rem; }
  .marquee-item .marquee-label { font-size: .8125rem; }
  .site-footer { padding: 2.75rem 0 1.75rem; }
  .footer-grid { gap: 1.5rem; }
  .footer-chips { gap: .45rem; }
  .footer-chips a { min-height: 1.625rem; padding: .1875rem .625rem; font-size: .6875rem; }
  .footer-bottom { margin-top: 2.25rem; }
}
@media (min-width: 1024px) {
  .features-grid { grid-template-columns: repeat(4, 1fr); }
  .plans { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: minmax(16rem, 1.4fr) repeat(3, minmax(0, 1fr)); gap: 2.5rem 2rem; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-badge__text > span { animation: none; font-variation-settings: 'wght' 500, 'slnt' 0; }
  [data-reveal] { opacity: 1 !important; transform: none !important; transition: none !important; }
  .hero-badge, .hero-title, .hero-subtitle, .hero-actions { opacity: 1; transform: none; animation: none; }
  .faq__items details[open] { animation: none; }
}
