/* ============================================================
   MyFabmesh.AI — public website
   Single CSS file, no framework, no build. Just open index.html.
   Color system mirrors the desktop app so the brand feels coherent
   when a user lands on the site after installing.
   ============================================================ */

:root {
  --bg-0: #0b0b14;
  --bg-1: #15151f;
  --bg-2: #1d1d2c;
  --bg-3: #24243a;
  --border: #2c2c44;
  --border-strong: #3c3c5a;
  --text-0: #f5f5fa;
  --text-1: #c2c2d4;
  --text-2: #7c7c95;
  --accent: #a855f7;
  --accent-2: #e94560;
  --accent-grad: linear-gradient(135deg, #e94560, #a855f7);
  --success: #4ade80;
  --warning: #fbbf24;
  --radius: 12px;
  --radius-sm: 6px;
}

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

html, body {
  background: var(--bg-0);
  color: var(--text-0);
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
html {
  /* Smooth scroll for in-page anchor clicks (e.g. Choose your plan
     → #products). Mobile-safe — supported on all modern browsers. */
  scroll-behavior: smooth;
}
/* Push anchored sections below the sticky header (~65px) with a
   comfortable gap so the H2 is fully visible after scroll. */
section[id] {
  scroll-margin-top: 90px;
}
/* Make sure the products section has a bit of vertical breathing
   room at the top — defensive layer in case scroll-margin doesn't
   apply (some older browsers / cache edge cases). */
#products { padding-top: 24px; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--text-0); }

/* ============================================================
   Header
   ============================================================ */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 32px;
  border-bottom: 1px solid var(--border);
  background: rgba(11, 11, 20, 0.9);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 10;
}
.brand {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.3px;
  color: var(--text-0);
}
.brand-ai {
  background: var(--accent-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 800;
}
.beta-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.6px;
  background: rgba(168, 85, 247, 0.18);
  border: 1px solid rgba(168, 85, 247, 0.4);
  color: var(--accent);
  border-radius: 999px;
  vertical-align: middle;
  text-transform: uppercase;
}

/* Latest release block */
.latest-release {
  max-width: 800px;
  margin: 40px auto;
  padding: 0 24px;
}
.latest-release.hidden { display: none; }
.latest-release-inner {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 32px;
  box-shadow: var(--shadow-card);
}
.latest-release-tag {
  display: inline-block;
  padding: 4px 10px;
  background: rgba(74, 222, 128, 0.12);
  color: var(--success);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.latest-release h3 {
  font-size: 22px;
  margin-bottom: 6px;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.latest-date {
  color: var(--text-2);
  font-size: 13px;
  margin-bottom: 16px;
}
.latest-notes {
  background: var(--bg-0);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  color: var(--text-1);
  font-size: 13px;
  font-family: 'Consolas', 'Monaco', monospace;
  white-space: pre-wrap;
  max-height: 240px;
  overflow-y: auto;
  margin-bottom: 18px;
}
.latest-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.nav { display: flex; gap: 28px; align-items: center; font-size: 14px; }
.nav a { color: var(--text-1); }
.nav a:hover { color: var(--text-0); }
.nav-cta {
  padding: 8px 16px;
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  color: var(--accent) !important;
  font-weight: 600;
}
.nav-cta:hover {
  background: var(--accent);
  color: white !important;
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
  text-align: center;
  padding: 60px 24px 60px;
  max-width: 900px;
  margin: 0 auto;
}
.hero h1 {
  font-size: clamp(36px, 6vw, 56px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -1px;
  margin-bottom: 24px;
}
.gradient {
  background: var(--accent-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero .lead {
  font-size: 18px;
  color: var(--text-1);
  max-width: 640px;
  margin: 0 auto 36px;
}
.hero-cta {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.hero-trust {
  font-size: 13px;
  color: var(--text-2);
  max-width: 540px;
  margin: 0 auto;
}

/* ============================================================
   Hero screenshot slideshow (right column)
   Each slide is either a real PNG (drop into docs/screenshots/)
   or, if missing, a CSS mockup that fakes the app's chrome. The
   JS swaps in real images automatically when they're found.
   ============================================================ */
.hero-viewer {
  width: 100%;
  max-width: 720px;
  margin: 28px auto;
}
.ss-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(168, 85, 247, 0.15),
              0 6px 20px rgba(0, 0, 0, 0.4);
}
.ss-track { position: absolute; inset: 0; }
.ss-slide {
  position: absolute; inset: 0;
  opacity: 0;
  transition: opacity 0.6s ease;
  display: flex; align-items: stretch; justify-content: stretch;
}
.ss-slide.active { opacity: 1; }
.ss-slide img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.ss-caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 14px 18px;
  background: linear-gradient(to top,
    rgba(11, 11, 20, 0.95), rgba(11, 11, 20, 0));
  color: var(--text-0);
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  pointer-events: none;
}
.ss-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}
.ss-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--bg-3);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.2s;
  padding: 0;
}
.ss-dot:hover { border-color: var(--accent); }
.ss-dot.active {
  background: var(--accent-grad);
  border-color: transparent;
  transform: scale(1.2);
}

/* CSS mockup (no real PNG yet). Recreates the app's chrome in pure
   CSS so the slideshow looks alive on day one. */
.ss-mock {
  width: 100%; height: 100%;
  display: flex; flex-direction: column;
  background: var(--bg-0);
}
.ss-mock-bar {
  height: 36px;
  background: linear-gradient(to bottom, var(--bg-2), var(--bg-1));
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  position: relative;
}
.ss-mock-bar::before {
  content: "";
  position: absolute;
  left: 14px; top: 50%;
  transform: translateY(-50%);
  width: 80px; height: 14px;
  background: var(--accent-grad);
  border-radius: 3px;
  opacity: 0.75;
}
.ss-mock-bar::after {
  content: "";
  position: absolute;
  right: 14px; top: 50%;
  transform: translateY(-50%);
  width: 60px; height: 8px;
  background: var(--bg-3);
  border-radius: 3px;
}
.ss-mock-body { flex: 1; padding: 16px; gap: 12px; }
.ss-mock-card {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  height: 80px;
  margin-bottom: 12px;
  position: relative;
}
.ss-mock-card::before {
  content: "";
  position: absolute;
  inset: 16px;
  background: linear-gradient(135deg,
    rgba(168, 85, 247, 0.2), rgba(233, 69, 96, 0.15));
  border-radius: 4px;
}
.ss-mock-row {
  height: 12px;
  background: var(--bg-2);
  border-radius: 3px;
  margin: 8px 0;
}
.ss-mock-row:nth-child(odd) { width: 80%; }
.ss-mock-row:nth-child(even) { width: 60%; }
.ss-mock-split { display: grid; grid-template-columns: 1fr 1fr; }
.ss-mock-toolbar { display: grid; grid-template-columns: 60px 1fr; }
.ss-mock-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.ss-mock-image {
  background: linear-gradient(135deg, #2a3a5a, #4a6a8a);
  border-radius: var(--radius-sm);
  position: relative;
  overflow: hidden;
}
.ss-mock-image::after {
  content: "";
  position: absolute;
  inset: 30%;
  background: radial-gradient(circle, #d4a574 30%, transparent 60%);
  border-radius: 50%;
}
.ss-mock-3d {
  background: var(--bg-1);
  border-radius: var(--radius-sm);
  position: relative;
  overflow: hidden;
}
.ss-mock-3d::before {
  content: "";
  position: absolute;
  inset: 15%;
  background: conic-gradient(from 45deg,
    rgba(168, 85, 247, 0.4),
    rgba(233, 69, 96, 0.3),
    rgba(168, 85, 247, 0.4));
  border-radius: 50%;
  filter: blur(12px);
}
.ss-mock-3d::after {
  content: "";
  position: absolute;
  inset: 25%;
  background: linear-gradient(135deg, #4a5a7a, #6a8aaa);
  clip-path: polygon(50% 0%, 100% 38%, 82% 100%, 18% 100%, 0% 38%);
}
.ss-mock-tools {
  background: var(--bg-1);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
}
.ss-mock-tools::before, .ss-mock-tools::after {
  content: "";
  display: block;
  height: 24px;
  background: var(--bg-2);
  border-radius: 3px;
}
.ss-mock-thumb {
  background: linear-gradient(135deg, var(--bg-2), var(--bg-3));
  border-radius: var(--radius-sm);
  position: relative;
  overflow: hidden;
}
.ss-mock-thumb::after {
  content: "";
  position: absolute;
  inset: 20%;
  background: var(--accent-grad);
  opacity: 0.3;
  border-radius: 50%;
  filter: blur(8px);
}

/* ============================================================
   Buttons
   ============================================================ */
.btn-primary, .btn-ghost,
.btn-primary-full, .btn-ghost-full {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 26px;
  font-size: 15px;
  font-weight: 700;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none !important;
}
.btn-primary, .btn-primary-full {
  background: var(--accent-grad);
  color: white !important;
  box-shadow: 0 4px 14px rgba(168, 85, 247, 0.25);
}
.btn-primary:hover, .btn-primary-full:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(168, 85, 247, 0.4);
  color: white !important;
}
.btn-ghost, .btn-ghost-full {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--text-1) !important;
}
.btn-ghost:hover, .btn-ghost-full:hover {
  border-color: var(--accent);
  color: var(--text-0) !important;
}
.btn-primary-full, .btn-ghost-full {
  width: 100%;
  margin-top: 8px;
}

/* ============================================================
   Products section — the 2 cards
   ============================================================ */
.products {
  max-width: 1100px;
  margin: 40px auto 80px;
  padding: 0 24px;
}
.products h2 {
  text-align: center;
  font-size: 32px;
  margin-bottom: 40px;
  font-weight: 700;
}
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: 24px;
}
.card {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s;
}
.card:hover { border-color: var(--border-strong); }
.card-tag {
  align-self: flex-start;
  padding: 4px 10px;
  background: rgba(168, 85, 247, 0.15);
  color: var(--accent);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.card-tag-cloud {
  background: rgba(74, 222, 128, 0.15);
  color: var(--success);
}
.card h3 {
  font-size: 22px;
  margin-bottom: 12px;
  font-weight: 700;
}
.card-edition { color: var(--text-2); font-weight: 500; }
.card-price {
  margin-bottom: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}
.price {
  font-size: 32px;
  font-weight: 800;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.price-unit { font-size: 18px; }
.price-note {
  display: block;
  font-size: 12px;
  color: var(--text-2);
  margin-top: 4px;
  font-weight: 400;
}
.card-features {
  list-style: none;
  margin-bottom: 24px;
  /* Reserve a fixed minimum height tuned to the longest list
     (Desktop has 6 lines). The shorter Cloud list gets padded
     vertically so both feature blocks end at the same Y, which in
     turn aligns the Requirements box + buttons below. */
  min-height: 240px;
}
.card-features li {
  padding: 6px 0;
  color: var(--text-1);
  font-size: 14px;
}
.card-reqs {
  background: var(--bg-0);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 18px;
  /* Cloud has 3 lines, Desktop has 4. Force the box to fit the
     taller one so the buttons below stay aligned. */
  min-height: 150px;
}
.reqs-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-2);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.card-reqs ul { list-style: none; }
.card-reqs li {
  font-size: 12px;
  color: var(--text-1);
  padding: 3px 0;
}
.products-note {
  text-align: center;
  margin-top: 28px;
  color: var(--text-2);
  font-size: 14px;
}

/* ============================================================
   How it works
   ============================================================ */
.how {
  max-width: 1000px;
  margin: 80px auto;
  padding: 0 24px;
}
.how h2 {
  text-align: center;
  font-size: 32px;
  margin-bottom: 48px;
  font-weight: 700;
}
.how-steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}
.how-steps li {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.how-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent-grad);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  margin-bottom: 12px;
}
.how-steps h4 { font-size: 17px; margin-bottom: 8px; font-weight: 700; }
.how-steps p { color: var(--text-1); font-size: 14px; }

/* ============================================================
   For developers — chained MCP workflow (Claude → MyFabmesh → Unreal)
   ============================================================ */
.devs-section {
  max-width: 1000px;
  margin: 0 auto;
  padding: 70px 24px;
}
.devs-h2 {
  text-align: center;
  font-size: 30px;
  font-weight: 700;
  margin-bottom: 14px;
}
.devs-lead {
  text-align: center;
  color: var(--text-1);
  max-width: 640px;
  margin: 0 auto 40px;
  font-size: 15px;
}
.devs-chain {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}
.devs-card {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 20px;
  text-align: center;
  flex: 1;
  min-width: 200px;
  max-width: 260px;
  transition: border-color 0.2s, transform 0.2s;
}
.devs-card:hover { transform: translateY(-2px); border-color: var(--border-strong); }
.devs-card-accent {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(168, 85, 247, 0.15),
              0 6px 24px rgba(168, 85, 247, 0.12);
}
.devs-icon {
  font-size: 30px;
  margin-bottom: 10px;
}
.devs-card-title {
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 6px;
  color: var(--text-0);
}
.devs-card-accent .devs-card-title {
  background: var(--accent-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.devs-card-text {
  font-size: 13px;
  color: var(--text-1);
  line-height: 1.45;
}
.devs-arrow {
  align-self: center;
  font-size: 24px;
  color: var(--text-2);
  font-weight: 300;
  flex-shrink: 0;
}
.devs-note {
  text-align: center;
  font-size: 13px;
  color: var(--text-2);
  margin-top: 32px;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}
@media (max-width: 700px) {
  .devs-arrow { transform: rotate(90deg); padding: 4px 0; }
  .devs-card { max-width: 100%; }
}

/* ============================================================
   FAQ
   ============================================================ */
.faq {
  max-width: 800px;
  margin: 80px auto;
  padding: 0 24px;
}
.faq h2 {
  text-align: center;
  font-size: 32px;
  margin-bottom: 32px;
  font-weight: 700;
}
.faq details {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  padding: 14px 20px;
  transition: border-color 0.2s;
}
.faq details[open] { border-color: var(--accent); }
.faq summary {
  font-weight: 600;
  cursor: pointer;
  color: var(--text-0);
  list-style: none;
  padding: 4px 0;
}
.faq summary::after {
  content: "+";
  float: right;
  color: var(--accent);
  font-weight: 700;
  font-size: 20px;
}
.faq details[open] summary::after { content: "−"; }
.faq p {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  color: var(--text-1);
  font-size: 14px;
}

/* ============================================================
   Final CTA
   ============================================================ */
.cta-bottom {
  text-align: center;
  padding: 60px 24px 80px;
  border-top: 1px solid var(--border);
  margin-top: 40px;
}
.cta-bottom h2 {
  font-size: 32px;
  margin-bottom: 24px;
  font-weight: 700;
}

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  background: var(--bg-1);
  border-top: 1px solid var(--border);
  padding: 40px 24px 24px;
}
.footer-cols {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
}
.footer-brand {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 8px;
  color: var(--text-0);
}
.site-footer p { color: var(--text-2); font-size: 13px; }
.site-footer h5 {
  font-size: 13px;
  color: var(--text-2);
  margin-bottom: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.site-footer a {
  display: block;
  color: var(--text-1);
  font-size: 13px;
  padding: 4px 0;
}
.site-footer a:hover { color: var(--accent); }
.footer-bottom {
  text-align: center;
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  color: var(--text-2);
  font-size: 12px;
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 700px) {
  .site-header { padding: 14px 18px; flex-wrap: wrap; gap: 12px; }
  .nav { gap: 14px; font-size: 13px; }
  .hero { padding: 40px 18px 40px; }
  .footer-cols { grid-template-columns: 1fr 1fr; }
}
