/* OpenFabric Studio — marketing site */
:root {
  --bg: #0a0a0f;
  --bg-elevated: #12121a;
  --bg-card: #16161f;
  --border: rgba(99, 102, 241, 0.18);
  --border-strong: rgba(99, 102, 241, 0.35);
  --indigo: #4F46E5;
  --indigo-bright: #6366F1;
  --indigo-soft: rgba(99, 102, 241, 0.12);
  --text: #f4f4f8;
  --text-muted: #a0a0b8;
  --text-dim: #6e6e86;
  --radius: 16px;
  --radius-sm: 10px;
  --max: 1100px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

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

a { color: var(--indigo-bright); text-decoration: none; }
a:hover { text-decoration: underline; }

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

.wrap {
  width: min(100% - 2.5rem, var(--max));
  margin-inline: auto;
}

/* ambient glow */
.glow {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 70% 50% at 50% -10%, rgba(79, 70, 229, 0.28), transparent 55%),
    radial-gradient(ellipse 40% 30% at 90% 20%, rgba(99, 102, 241, 0.12), transparent 50%),
    radial-gradient(ellipse 35% 25% at 10% 60%, rgba(79, 70, 229, 0.08), transparent 50%);
}

/* nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(10, 10, 15, 0.75);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 0;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.brand:hover { text-decoration: none; }

.brand img { width: 36px; height: 36px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 500;
  text-decoration: none;
}

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

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  background: var(--indigo);
  color: #fff !important;
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.06), 0 8px 24px rgba(79, 70, 229, 0.35);
  transition: background 0.15s ease, transform 0.15s ease;
}

.nav-cta:hover {
  background: var(--indigo-bright);
  text-decoration: none;
  transform: translateY(-1px);
}

.menu-btn {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 0.45rem 0.65rem;
  cursor: pointer;
}

/* hero */
.hero {
  padding: 5.5rem 0 4rem;
  text-align: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: var(--indigo-soft);
  border: 1px solid var(--border);
  color: var(--indigo-bright);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 1.4rem;
}

.eyebrow-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--indigo-bright);
  box-shadow: 0 0 10px var(--indigo-bright);
}

.hero h1 {
  margin: 0 auto 1.1rem;
  max-width: 16ch;
  font-size: clamp(2.4rem, 5.5vw, 3.75rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
  font-weight: 750;
}

.hero h1 span {
  background: linear-gradient(120deg, #a5b4fc 0%, var(--indigo-bright) 45%, var(--indigo) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lead {
  margin: 0 auto 2rem;
  max-width: 38rem;
  color: var(--text-muted);
  font-size: 1.125rem;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.85rem 1.35rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  border: 1px solid transparent;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  text-decoration: none;
  cursor: pointer;
}

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

.btn-primary {
  background: var(--indigo);
  color: #fff;
  box-shadow: 0 10px 30px rgba(79, 70, 229, 0.4);
}

.btn-primary:hover { background: var(--indigo-bright); color: #fff; }

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

.btn-ghost:hover {
  background: var(--indigo-soft);
  border-color: var(--indigo-bright);
  color: var(--text);
}

/* product preview panel (CSS-only, no screenshots) */
.preview {
  margin: 0 auto;
  max-width: 860px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: linear-gradient(160deg, #14141e 0%, #0e0e16 100%);
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.03),
    0 40px 80px rgba(0,0,0,0.45),
    0 0 60px rgba(79, 70, 229, 0.12);
  overflow: hidden;
  text-align: left;
}

.preview-bar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,0.02);
}

.preview-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #2a2a38;
}

.preview-dot:nth-child(1) { background: #ef4444; opacity: 0.7; }
.preview-dot:nth-child(2) { background: #eab308; opacity: 0.7; }
.preview-dot:nth-child(3) { background: #22c55e; opacity: 0.7; }

.preview-title {
  margin-left: 0.6rem;
  font-size: 0.78rem;
  color: var(--text-dim);
  font-family: var(--mono);
}

.preview-body {
  display: grid;
  grid-template-columns: 140px 1fr;
  min-height: 220px;
}

.preview-side {
  padding: 1rem 0.75rem;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.side-item {
  padding: 0.55rem 0.7rem;
  border-radius: 8px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.side-item.active {
  background: var(--indigo-soft);
  color: var(--indigo-bright);
  font-weight: 600;
}

.preview-main {
  padding: 1.25rem 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.wave {
  height: 56px;
  border-radius: 10px;
  background:
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 6px,
      rgba(99, 102, 241, 0.15) 6px,
      rgba(99, 102, 241, 0.15) 7px
    ),
    linear-gradient(
      180deg,
      transparent 20%,
      rgba(99, 102, 241, 0.35) 50%,
      transparent 80%
    );
  position: relative;
  overflow: hidden;
}

.wave::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(165, 180, 252, 0.25),
    transparent
  );
  animation: shimmer 2.8s ease-in-out infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

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

.chip {
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  font-size: 0.75rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.chip.accent {
  border-color: var(--border-strong);
  color: var(--indigo-bright);
  background: var(--indigo-soft);
}

/* sections */
section {
  padding: 4.5rem 0;
}

.section-head {
  text-align: center;
  margin-bottom: 2.5rem;
}

.section-head h2 {
  margin: 0 0 0.65rem;
  font-size: clamp(1.7rem, 3vw, 2.25rem);
  letter-spacing: -0.03em;
  font-weight: 700;
}

.section-head p {
  margin: 0 auto;
  max-width: 36rem;
  color: var(--text-muted);
}

/* features */
.features {
  background: linear-gradient(180deg, transparent, rgba(79, 70, 229, 0.04), transparent);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.15rem;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.4rem;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.feature-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.feature-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--indigo-soft);
  border: 1px solid var(--border);
  margin-bottom: 1rem;
  color: var(--indigo-bright);
}

.feature-card h3 {
  margin: 0 0 0.45rem;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.feature-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* how it works */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.15rem;
  counter-reset: step;
}

.step {
  position: relative;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.25rem 1.4rem;
}

.step::before {
  counter-increment: step;
  content: "0" counter(step);
  display: block;
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--indigo-bright);
  margin-bottom: 0.75rem;
  letter-spacing: 0.06em;
}

.step h3 {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
}

.step p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
}

/* CTA */
.cta {
  padding-top: 2rem;
  padding-bottom: 5rem;
}

.cta-panel {
  border-radius: calc(var(--radius) + 4px);
  border: 1px solid var(--border-strong);
  background:
    radial-gradient(ellipse 80% 80% at 50% 0%, rgba(99, 102, 241, 0.22), transparent 60%),
    var(--bg-card);
  padding: 3rem 1.75rem;
  text-align: center;
}

.cta-panel h2 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  letter-spacing: -0.03em;
}

.cta-panel p {
  margin: 0 auto 1.75rem;
  max-width: 32rem;
  color: var(--text-muted);
}

/* footer */
.footer {
  border-top: 1px solid var(--border);
  padding: 2.25rem 0 2.75rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  font-weight: 600;
}

.footer-brand img { width: 28px; height: 28px; }

.footer-meta {
  color: var(--text-dim);
  font-size: 0.82rem;
  max-width: 28rem;
  margin: 0.6rem 0 0;
  line-height: 1.5;
}

.footer-links {
  display: flex;
  gap: 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
}

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

/* reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

/* responsive */
@media (max-width: 800px) {
  .feature-grid,
  .steps {
    grid-template-columns: 1fr;
  }

  .preview-body {
    grid-template-columns: 1fr;
  }

  .preview-side {
    flex-direction: row;
    flex-wrap: wrap;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: rgba(10, 10, 15, 0.97);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 1.25rem 1rem;
  }

  .nav-links.open { display: flex; }

  .nav-links li { width: 100%; }

  .nav-links a {
    display: block;
    padding: 0.7rem 0.25rem;
  }

  .nav-links .nav-cta {
    justify-content: center;
    margin-top: 0.4rem;
  }

  .menu-btn { display: inline-flex; }

  .hero { padding-top: 3.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .wave::after { animation: none; }
}
