/* CanvasForm — Brand Stylesheet */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,400&display=swap');

:root {
  --cnvs-themecolor: #2563EB;
  --cnvs-themecolor-rgb: 37, 99, 235;

  --cf-bg: #060B18;
  --cf-surface: #0D1526;
  --cf-surface-2: #111C35;
  --cf-border: rgba(255,255,255,0.08);
  --cf-ink: #F0F4FF;
  --cf-muted: rgba(240,244,255,0.55);
  --cf-accent: var(--cnvs-themecolor);
  --cf-accent-rgb: var(--cnvs-themecolor-rgb);
  --cf-green: #10B981;
  --cf-purple: #7C3AED;
  --cf-amber: #F59E0B;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
}

/* ─── Base ─── */
body.stretched {
  font-family: 'DM Sans', sans-serif;
  background-color: var(--cf-bg);
  color: var(--cf-ink);
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Space Grotesk', sans-serif;
  text-wrap: balance;
}

/* ─── Header ─── */
#header.cf-header {
  --cnvs-header-height: 72px;
}

#header.cf-header #header-wrap {
  background: rgba(6, 11, 24, 0.85);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--cf-border);
}

#header.cf-header .menu-link {
  color: rgba(240,244,255,0.78);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 200ms var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  #header.cf-header .menu-link:hover {
    color: var(--cf-ink);
  }
}

#header.cf-header .logo-default,
#header.cf-header .logo-dark {
  /* sized naturally */
}

/* Sticky — keep glass look */
#header.cf-header.sticky-header #header-wrap {
  background: rgba(6, 11, 24, 0.95);
}

/* ─── Hero ─── */
#cf-hero {
  background: var(--cf-bg);
  padding-top: 5rem;
  padding-bottom: 0;
  position: relative;
  overflow: hidden;
}

.is-expanded-menu #cf-hero {
  padding-top: calc(var(--cnvs-header-height, 72px) + 4rem);
}

.cf-hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
}

@media (min-width: 992px) {
  .cf-hero-grid {
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
  }
}

.cf-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cnvs-themecolor);
  background: rgba(var(--cnvs-themecolor-rgb), 0.1);
  border: 1px solid rgba(var(--cnvs-themecolor-rgb), 0.25);
  border-radius: 100px;
  padding: 0.35rem 0.85rem;
  margin-bottom: 1.5rem;
}

.cf-hero-title {
  font-size: clamp(2.4rem, 5vw, 4.2rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--cf-ink);
  margin-bottom: 1.5rem;
}

.cf-hero-title .accent {
  color: var(--cnvs-themecolor);
}

.cf-hero-lead {
  font-size: 1.15rem;
  line-height: 1.7;
  color: var(--cf-muted);
  max-width: 52ch;
  margin-bottom: 2rem;
  text-wrap: pretty;
}

.cf-cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.cf-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--cnvs-themecolor);
  color: #fff !important;
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  text-decoration: none;
  transition: background 200ms var(--ease-out), transform 160ms var(--ease-out), box-shadow 200ms var(--ease-out);
  cursor: pointer;
}

@media (hover: hover) and (pointer: fine) {
  .cf-btn-primary:hover {
    background: #1d4fd8;
    box-shadow: 0 0 0 4px rgba(var(--cnvs-themecolor-rgb), 0.2);
    transform: translateY(-1px);
  }
}

.cf-btn-primary:active { transform: scale(0.97); }

.cf-btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  color: var(--cf-ink) !important;
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  border: 1px solid var(--cf-border);
  text-decoration: none;
  transition: border-color 200ms var(--ease-out), background 200ms var(--ease-out), transform 160ms var(--ease-out);
  cursor: pointer;
}

@media (hover: hover) and (pointer: fine) {
  .cf-btn-ghost:hover {
    border-color: rgba(var(--cnvs-themecolor-rgb), 0.5);
    background: rgba(var(--cnvs-themecolor-rgb), 0.06);
  }
}

.cf-btn-ghost:active { transform: scale(0.97); }

.cf-hero-image-wrap {
  position: relative;
}

.cf-hero-image-wrap img {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--cf-border);
  box-shadow: 0 24px 80px rgba(0,0,0,0.5);
}

.cf-hero-glow {
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: rgba(var(--cnvs-themecolor-rgb), 0.15);
  filter: blur(90px);
  top: -100px;
  right: -150px;
  pointer-events: none;
  z-index: 0;
}

.cf-hero-badge {
  position: absolute;
  bottom: -1rem;
  left: -1.5rem;
  background: var(--cf-surface-2);
  border: 1px solid var(--cf-border);
  border-radius: 10px;
  padding: 0.65rem 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--cf-ink);
  white-space: nowrap;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

.cf-hero-badge .bi {
  color: var(--cf-green);
  font-size: 1rem;
}

/* ─── Logos strip ─── */
.cf-logos {
  border-top: 1px solid var(--cf-border);
  border-bottom: 1px solid var(--cf-border);
  padding: 2rem 0;
  background: var(--cf-surface);
}

.cf-logos-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--cf-muted);
  font-weight: 600;
  white-space: nowrap;
}

.cf-logos-track {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  flex-wrap: wrap;
}

.cf-logo-pill {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: rgba(240,244,255,0.35);
  letter-spacing: -0.01em;
  transition: color 200ms var(--ease-out);
  cursor: default;
}

@media (hover: hover) and (pointer: fine) {
  .cf-logo-pill:hover { color: rgba(240,244,255,0.7); }
}

/* ─── Section labels ─── */
.cf-section-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cnvs-themecolor);
  margin-bottom: 1rem;
}

.cf-section-heading {
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.15;
  color: var(--cf-ink);
  margin-bottom: 1rem;
}

.cf-section-sub {
  font-size: 1.05rem;
  color: var(--cf-muted);
  max-width: 60ch;
  line-height: 1.7;
  text-wrap: pretty;
}

/* ─── Features ─── */
.cf-features {
  background: var(--cf-bg);
}

.cf-feature-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

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

@media (min-width: 992px) {
  .cf-feature-grid { grid-template-columns: repeat(3, 1fr); }
}

.cf-feature-card {
  background: var(--cf-surface);
  border: 1px solid var(--cf-border);
  border-radius: 12px;
  padding: 1.75rem;
  transition: border-color 220ms var(--ease-out), transform 220ms var(--ease-out), box-shadow 220ms var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .cf-feature-card:hover {
    border-color: rgba(var(--cnvs-themecolor-rgb), 0.4);
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.3);
  }
}

.cf-feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(var(--cnvs-themecolor-rgb), 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: var(--cnvs-themecolor);
  margin-bottom: 1.25rem;
}

.cf-feature-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--cf-ink);
  margin-bottom: 0.5rem;
}

.cf-feature-desc {
  font-size: 0.9rem;
  color: var(--cf-muted);
  line-height: 1.65;
  margin: 0;
}

/* ─── How it works ─── */
.cf-how {
  background: var(--cf-surface);
  position: relative;
}

.cf-steps-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 768px) {
  .cf-steps-row { grid-template-columns: repeat(3, 1fr); }
}

.cf-step {
  position: relative;
  text-align: center;
}

.cf-step-num {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--cf-bg);
  border: 2px solid var(--cnvs-themecolor);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--cnvs-themecolor);
  margin: 0 auto 1.25rem;
}

.cf-step-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--cf-ink);
  margin-bottom: 0.5rem;
}

.cf-step-desc {
  font-size: 0.9rem;
  color: var(--cf-muted);
  line-height: 1.65;
  max-width: 28ch;
  margin: 0 auto;
}

/* ─── Code preview / showcase ─── */
.cf-showcase {
  background: var(--cf-bg);
}

.cf-showcase-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
}

@media (min-width: 992px) {
  .cf-showcase-grid {
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
  }
}

.cf-code-block {
  background: var(--cf-surface);
  border: 1px solid var(--cf-border);
  border-radius: 12px;
  overflow: hidden;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.82rem;
  line-height: 1.75;
}

.cf-code-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: var(--cf-surface-2);
  border-bottom: 1px solid var(--cf-border);
}

.cf-code-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.cf-code-body {
  padding: 1.25rem 1.5rem;
  color: rgba(240,244,255,0.85);
  overflow-x: auto;
}

.cf-code-body .kw { color: #60A5FA; }
.cf-code-body .str { color: #34D399; }
.cf-code-body .attr { color: #F9A8D4; }
.cf-code-body .cm { color: rgba(240,244,255,0.3); font-style: italic; }
.cf-code-body .tag { color: #FCA5A5; }

.cf-checklist {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
}

.cf-checklist li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.95rem;
  color: var(--cf-muted);
  padding: 0.35rem 0;
}

.cf-checklist li .bi {
  color: var(--cf-green);
  font-size: 1.05rem;
  flex-shrink: 0;
  margin-top: 2px;
}

/* ─── Testimonials ─── */
.cf-testimonials {
  background: var(--cf-surface);
}

.cf-testi-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .cf-testi-grid { grid-template-columns: repeat(3, 1fr); }
}

.cf-testi-card {
  background: var(--cf-bg);
  border: 1px solid var(--cf-border);
  border-radius: 12px;
  padding: 1.75rem;
}

.cf-testi-stars {
  display: flex;
  gap: 3px;
  margin-bottom: 1rem;
  color: var(--cf-amber);
  font-size: 0.9rem;
}

.cf-testi-quote {
  font-size: 0.9rem;
  color: var(--cf-muted);
  line-height: 1.7;
  margin-bottom: 1.25rem;
}

.cf-testi-author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.cf-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--cf-surface-2);
  border: 1px solid var(--cf-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--cnvs-themecolor);
  flex-shrink: 0;
}

.cf-testi-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--cf-ink);
}

.cf-testi-role {
  font-size: 0.75rem;
  color: var(--cf-muted);
}

/* ─── Stats ─── */
.cf-stats {
  background: var(--cf-bg);
  border-top: 1px solid var(--cf-border);
  border-bottom: 1px solid var(--cf-border);
}

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

@media (min-width: 768px) {
  .cf-stats-grid { grid-template-columns: repeat(4, 1fr); }
}

.cf-stat {
  text-align: center;
}

.cf-stat-num {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  color: var(--cnvs-themecolor);
  line-height: 1;
  margin-bottom: 0.35rem;
}

.cf-stat-label {
  font-size: 0.85rem;
  color: var(--cf-muted);
  font-weight: 500;
}

/* ─── GitHub / Open source CTA ─── */
.cf-oss {
  background: var(--cf-surface);
  position: relative;
  overflow: hidden;
}

.cf-oss-inner {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
}

.cf-oss-glow {
  position: absolute;
  width: 700px;
  height: 700px;
  border-radius: 50%;
  background: rgba(var(--cnvs-themecolor-rgb), 0.1);
  filter: blur(120px);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.cf-github-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--cf-surface-2);
  border: 1px solid var(--cf-border);
  border-radius: 8px;
  padding: 0.6rem 1.1rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--cf-ink) !important;
  text-decoration: none;
  transition: border-color 200ms var(--ease-out), background 200ms var(--ease-out), transform 160ms var(--ease-out);
  cursor: pointer;
}

@media (hover: hover) and (pointer: fine) {
  .cf-github-btn:hover {
    border-color: rgba(var(--cnvs-themecolor-rgb), 0.4);
    background: rgba(var(--cnvs-themecolor-rgb), 0.07);
  }
}

.cf-github-btn:active { transform: scale(0.97); }

/* ─── Footer ─── */
#footer {
  --cnvs-footer-bg: #020509;
  --cnvs-footer-top-border: 1px solid rgba(255,255,255,0.07);
  --cnvs-copyrights-link-color: rgba(240,244,255,0.45);
}

.cf-footer-logo-text {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--cf-ink);
  letter-spacing: -0.02em;
}

.cf-footer-logo-text span {
  color: var(--cnvs-themecolor);
}

.cf-footer-tagline {
  font-size: 0.88rem;
  color: var(--cf-muted);
  line-height: 1.6;
  max-width: 32ch;
  margin-top: 0.5rem;
}

.cf-footer-heading {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(240,244,255,0.4);
  margin-bottom: 1rem;
}

.cf-footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.cf-footer-links li {
  margin-bottom: 0.55rem;
}

.cf-footer-links a {
  font-size: 0.88rem;
  color: rgba(240,244,255,0.55);
  text-decoration: none;
  transition: color 180ms var(--ease-out);
  cursor: pointer;
}

@media (hover: hover) and (pointer: fine) {
  .cf-footer-links a:hover {
    color: var(--cf-ink);
  }
}

.cf-footer-social {
  display: flex;
  gap: 0.65rem;
  margin-top: 1.25rem;
}

.cf-social-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  color: rgba(240,244,255,0.55);
  text-decoration: none;
  transition: background 180ms var(--ease-out), color 180ms var(--ease-out), border-color 180ms var(--ease-out);
  cursor: pointer;
}

@media (hover: hover) and (pointer: fine) {
  .cf-social-icon:hover {
    background: rgba(var(--cnvs-themecolor-rgb), 0.15);
    border-color: rgba(var(--cnvs-themecolor-rgb), 0.4);
    color: var(--cnvs-themecolor);
  }
}

/* ─── Scroll reveal defaults (visible if JS disabled) ─── */
[data-animate] { opacity: 1; }

/* ─── Keyboard focus ─── */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--cnvs-themecolor);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ─── Reduced motion ─── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
