/* ========== Faacore landing ========== */
:root {
  --bg: #07070f;
  --bg-elevated: #0e0e1a;
  --surface: rgba(18, 18, 32, 0.72);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #f2f2f8;
  --muted: #9a9ab0;
  --cyan: #22d3ee;
  --magenta: #e879f9;
  --violet: #8b5cf6;
  --gold: #fbbf24;
  --gradient: linear-gradient(135deg, #22d3ee 0%, #8b5cf6 50%, #e879f9 100%);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  --radius: 20px;
  --nav-h: 72px;
  --font: "Inter", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

img,
video {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Background ambience */
.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -3;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 20%, black, transparent);
  pointer-events: none;
}

.bg-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.35;
  z-index: -2;
  pointer-events: none;
  animation: float 18s ease-in-out infinite;
}

.bg-orb-a {
  width: 420px;
  height: 420px;
  background: var(--cyan);
  top: -80px;
  left: -60px;
}

.bg-orb-b {
  width: 500px;
  height: 500px;
  background: var(--violet);
  top: 30%;
  right: -120px;
  animation-delay: -6s;
}

.bg-orb-c {
  width: 360px;
  height: 360px;
  background: var(--magenta);
  bottom: 10%;
  left: 20%;
  animation-delay: -12s;
  opacity: 0.22;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(30px, -40px) scale(1.08); }
}

.cursor-glow {
  position: fixed;
  width: 480px;
  height: 480px;
  margin: -240px 0 0 -240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.12), transparent 65%);
  pointer-events: none;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.4s ease;
  will-change: transform;
}

body:hover .cursor-glow {
  opacity: 1;
}

/* Nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 clamp(1.25rem, 4vw, 3rem);
  backdrop-filter: blur(16px) saturate(1.2);
  background: rgba(7, 7, 15, 0.65);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, background 0.3s;
}

.nav.scrolled {
  border-bottom-color: var(--border);
  background: rgba(7, 7, 15, 0.88);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.logo-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--gradient);
  color: #0a0a12;
  font-weight: 800;
  font-size: 1rem;
  box-shadow: 0 0 24px rgba(139, 92, 246, 0.45);
}

.logo-text {
  font-size: 1.1rem;
}

.nav-links {
  display: none;
  gap: 1.75rem;
}

.nav-links a {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--text);
}

@media (min-width: 768px) {
  .nav-links { display: flex; }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: none;
  cursor: pointer;
  border-radius: 999px;
  padding: 0.85rem 1.4rem;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s, border-color 0.2s;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn-sm {
  padding: 0.55rem 1rem;
  font-size: 0.85rem;
}

.btn-primary {
  background: var(--gradient);
  color: #0a0a12;
  box-shadow: 0 8px 32px rgba(139, 92, 246, 0.35);
}

.btn-primary:hover {
  box-shadow: 0 12px 40px rgba(34, 211, 238, 0.35);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-strong);
}

.btn-ghost:hover {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.04);
}

.btn-glow {
  background: rgba(139, 92, 246, 0.15);
  color: var(--text);
  border: 1px solid rgba(139, 92, 246, 0.4);
}

.btn-glow:hover {
  background: rgba(139, 92, 246, 0.25);
}

/* Hero */
.hero {
  max-width: 1100px;
  margin: 0 auto;
  padding: clamp(3.5rem, 10vw, 7rem) clamp(1.25rem, 4vw, 3rem) clamp(4rem, 8vw, 6rem);
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.82rem;
  margin-bottom: 1.75rem;
}

.pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.6);
  animation: pulse 2s ease infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.55); }
  70% { box-shadow: 0 0 0 10px rgba(52, 211, 153, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

.hero-title {
  font-size: clamp(2.4rem, 7vw, 4.4rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.08;
  margin-bottom: 1.25rem;
}

.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  max-width: 620px;
  margin: 0 auto 2rem;
  color: var(--muted);
  font-size: clamp(1rem, 2.2vw, 1.15rem);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  justify-content: center;
  margin-bottom: 3rem;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1.5rem 2rem;
  padding: 1.5rem 2rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  backdrop-filter: blur(12px);
  max-width: 720px;
  margin: 0 auto;
}

.stat {
  text-align: center;
  min-width: 100px;
}

.stat strong {
  display: block;
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.stat span {
  color: var(--muted);
  font-size: 0.85rem;
}

.stat-divider {
  width: 1px;
  height: 40px;
  background: var(--border-strong);
}

@media (max-width: 540px) {
  .stat-divider { display: none; }
}

/* Sections */
.section {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(3rem, 8vw, 5.5rem) clamp(1.25rem, 4vw, 3rem);
}

.section-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 3.5rem;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--cyan);
  margin-bottom: 0.75rem;
}

.section-head h2 {
  font-size: clamp(1.9rem, 4vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 0.85rem;
}

.section-lead {
  color: var(--muted);
  font-size: 1.05rem;
}

/* Projects */
.project {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: center;
  padding: clamp(1.5rem, 3vw, 2.25rem);
  border-radius: calc(var(--radius) + 8px);
  border: 1px solid var(--border);
  background: linear-gradient(160deg, rgba(20, 20, 36, 0.9), rgba(10, 10, 18, 0.6));
  box-shadow: var(--shadow);
  margin-bottom: 2.5rem;
}

@media (min-width: 960px) {
  .project {
    grid-template-columns: 1fr 1.15fr;
    gap: 3rem;
  }
  .project-flip {
    grid-template-columns: 1.15fr 1fr;
  }
  .project-flip .project-meta { order: 2; }
  .project-flip .project-media { order: 1; }
}

.tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}

.tag-cyan {
  color: var(--cyan);
  background: rgba(34, 211, 238, 0.1);
  border: 1px solid rgba(34, 211, 238, 0.3);
}

.tag-magenta {
  color: var(--magenta);
  background: rgba(232, 121, 249, 0.1);
  border: 1px solid rgba(232, 121, 249, 0.3);
}

.tag-gold {
  color: var(--gold);
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.3);
}

.project-meta h3 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 0.85rem;
}

.project-meta > p {
  color: var(--muted);
  margin-bottom: 1.25rem;
}

.feature-list {
  list-style: none;
  margin-bottom: 1.5rem;
}

.feature-list li {
  position: relative;
  padding-left: 1.35rem;
  margin-bottom: 0.55rem;
  color: #c8c8d8;
  font-size: 0.95rem;
}

.feature-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gradient);
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.chip {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--muted);
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
}

/* Gallery */
.gallery-main {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  background: #05050c;
  aspect-ratio: 4 / 5;
  max-height: 560px;
}

.gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: opacity 0.35s ease, transform 0.5s ease;
}

.gallery-main:hover img {
  transform: scale(1.02);
}

.gallery-prev,
.gallery-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: rgba(7, 7, 15, 0.7);
  color: var(--text);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 0.2s, background 0.2s;
}

.gallery:hover .gallery-prev,
.gallery:hover .gallery-next,
.gallery:focus-within .gallery-prev,
.gallery:focus-within .gallery-next {
  opacity: 1;
}

.gallery-prev { left: 12px; }
.gallery-next { right: 12px; }

.gallery-prev:hover,
.gallery-next:hover {
  background: rgba(139, 92, 246, 0.4);
}

.gallery-thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.6rem;
  margin-top: 0.75rem;
}

.thumb {
  border: 2px solid transparent;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  padding: 0;
  background: #05050c;
  opacity: 0.55;
  transition: opacity 0.2s, border-color 0.2s, transform 0.2s;
}

.thumb img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  object-position: top;
}

.thumb:hover {
  opacity: 0.85;
  transform: translateY(-2px);
}

.thumb.active {
  opacity: 1;
  border-color: var(--cyan);
  box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.3);
}

/* Video card */
.video-card video {
  width: 100%;
  border-radius: 16px;
  border: 1px solid var(--border-strong);
  background: #000;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  box-shadow: 0 0 60px rgba(232, 121, 249, 0.12);
}

.video-caption {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-top: 0.85rem;
  padding: 0.75rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
}

.video-caption img {
  width: 72px;
  height: 48px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.video-caption strong {
  display: block;
  font-size: 0.9rem;
}

.video-caption span {
  color: var(--muted);
  font-size: 0.8rem;
}

/* Engine */
.engine-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 640px) {
  .engine-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .engine-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .engine-card.span-2 {
    grid-column: span 2;
  }
}

.engine-card {
  padding: 1.4rem 1.5rem;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface);
  backdrop-filter: blur(10px);
  transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s;
}

.engine-card:hover {
  border-color: rgba(139, 92, 246, 0.45);
  transform: translateY(-3px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3);
}

.engine-card.span-2 {
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.08), rgba(139, 92, 246, 0.12), rgba(232, 121, 249, 0.08));
  border-color: rgba(139, 92, 246, 0.25);
}

.engine-icon {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  color: var(--cyan);
}

.engine-card h3,
.engine-card h4 {
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.45rem;
}

.engine-card h3 { font-size: 1.25rem; }
.engine-card h4 { font-size: 1rem; }

.engine-card p {
  color: var(--muted);
  font-size: 0.92rem;
}

.tools-banner {
  margin-top: 2.5rem;
  padding: 1.25rem 0;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.35);
  overflow: hidden;
}

.tools-banner .mono {
  text-align: center;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 1rem;
}

.marquee {
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
}

.marquee-track {
  display: flex;
  gap: 0.75rem;
  width: max-content;
  animation: marquee 40s linear infinite;
}

.marquee-track span {
  font-family: var(--mono);
  font-size: 0.82rem;
  padding: 0.4rem 0.85rem;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
  background: rgba(34, 211, 238, 0.06);
  color: #b8eef8;
  white-space: nowrap;
}

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* Beta */
.beta-card {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
  padding: clamp(2rem, 5vw, 3.5rem);
  border-radius: calc(var(--radius) + 8px);
  border: 1px solid rgba(251, 191, 36, 0.25);
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(251, 191, 36, 0.08), transparent),
    linear-gradient(160deg, rgba(24, 20, 12, 0.95), rgba(10, 10, 18, 0.9));
  box-shadow: var(--shadow);
}

.beta-card h2 {
  font-size: clamp(1.7rem, 3.5vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 1rem 0 0.85rem;
}

.beta-card > p {
  color: var(--muted);
  margin-bottom: 1.75rem;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.waitlist {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 440px;
  margin: 0 auto;
}

@media (min-width: 540px) {
  .waitlist {
    flex-direction: row;
  }
}

.waitlist input {
  flex: 1;
  padding: 0.9rem 1.15rem;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: rgba(0, 0, 0, 0.4);
  color: var(--text);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.waitlist input::placeholder {
  color: #6b6b80;
}

.waitlist input:focus {
  border-color: rgba(139, 92, 246, 0.6);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}

.form-note {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.form-note.success {
  color: #34d399;
}

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  padding: 2rem clamp(1.25rem, 4vw, 3rem) 2.5rem;
  margin-top: 2rem;
}

.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.footer p {
  color: var(--muted);
  font-size: 0.85rem;
}

.footer-links {
  display: flex;
  gap: 1.25rem;
}

.footer-links a {
  color: var(--muted);
  font-size: 0.85rem;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--text);
}

/* Reveal animations */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .bg-orb,
  .marquee-track,
  .pulse {
    animation: none;
  }
}
