:root {
  color-scheme: light;
  --primary: #f8fafc;
  --primary-dark: #ffffff;
  --primary-mid: #f1f5f9;
  --accent: #0ea5e9;
  --accent-strong: #0284c7;
  --accent-warm: #f59e0b;
  --text: #111111;
  --muted: #475569;
  --panel: rgba(255, 255, 255, 0.96);
  --border: rgba(15, 23, 42, 0.12);
  --font: "Inter", "Segoe UI", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: #ffffff;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

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

a:hover {
  text-decoration: underline;
}

.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.glow {
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  filter: blur(140px);
  opacity: 0.18;
}

.glow-1 {
  background: rgba(14, 165, 233, 0.24);
  top: -120px;
  left: -180px;
}

.glow-2 {
  background: rgba(2, 132, 199, 0.18);
  bottom: -200px;
  right: -160px;
}

.site-bg-grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(15, 23, 42, 0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(15, 23, 42, 0.05) 1px, transparent 1px);
  background-size: 160px 160px;
  opacity: 0.2;
}

.hero {
  position: relative;
  z-index: 1;
  width: min(1200px, 100%);
  margin: 0 auto;
  padding: 40px 48px 68px;
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 44px;
}

.logo-link {
  display: inline-flex;
  align-items: center;
  gap: 0;
  text-decoration: none;
}

.logo-image {
  width: 140px;
  height: 56px;
  object-fit: contain;
}

.nav-actions {
  display: flex;
  gap: 16px;
  align-items: center;
}

.nav-actions a {
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid transparent;
  color: var(--text);
}

.nav-actions a:hover {
  border-color: rgba(56, 189, 248, 0.3);
  text-decoration: none;
}

.nav-actions .cta {
  border-color: rgba(96, 165, 250, 0.45);
  background: rgba(96, 165, 250, 0.2);
  box-shadow: 0 16px 34px -18px rgba(96, 165, 250, 0.45);
}

.nav-actions .docs {
  border-color: rgba(148, 163, 184, 0.28);
  background: rgba(148, 163, 184, 0.08);
}

.home-user-chip {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: #f8fafc;
  color: #334155;
  font-size: 0.88rem;
  font-weight: 700;
}

.home-logout-btn {
  height: 40px;
  border-radius: 12px;
  border: 1px solid #fda4af;
  background: #fff1f2;
  color: #be123c;
  padding: 0 12px;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
}

.hidden {
  display: none !important;
}

.hero-content {
  max-width: none;
  flex: 1 1 auto;
}

.hero-mobile-video {
  display: none;
}

.hero-layout {
  display: flex;
  gap: 36px;
  align-items: stretch;
}

.hero-content h1 {
  font-size: clamp(2.2rem, 4.2vw, 3.2rem);
  margin: 0;
  letter-spacing: -0.02em;
  line-height: 1.08;
}

.hero-content p {
  margin: 20px 0;
  font-size: 1.02rem;
  line-height: 1.55;
  color: #374151;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  margin-bottom: 14px;
  justify-content: flex-start;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  border-radius: 14px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 1rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.2s ease;
}

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

.btn.primary {
  background: linear-gradient(140deg, rgba(96, 165, 250, 0.95), rgba(59, 130, 246, 0.78));
  color: #0b1220;
  border-color: rgba(96, 165, 250, 0.45);
  box-shadow: 0 22px 48px -20px rgba(59, 130, 246, 0.55);
  min-height: 48px;
  font-size: 1rem;
  font-weight: 700;
  padding: 12px 18px;
}

.btn.secondary {
  border-color: rgba(15, 23, 42, 0.18);
  color: #111111;
  background: #f8fafc;
}

.hero-meta {
  display: flex;
  justify-content: flex-start;
  color: #475569;
  font-size: 0.95rem;
  text-align: left;
  max-width: 620px;
  margin: 0;
}

.hero-preview {
  flex: 0 0 320px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.preview-frame {
  position: relative;
  padding: 14px;
  border-radius: 20px;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.12);
  box-shadow: 0 14px 36px -28px rgba(2, 6, 23, 0.35);
  overflow: hidden;
}

.hero-embedded-video {
  width: 100%;
  aspect-ratio: 9 / 16;
  border-radius: 14px;
  background: #000;
  border: 1px solid rgba(15, 23, 42, 0.16);
  display: block;
}

.content {
  position: relative;
  z-index: 1;
  width: min(1200px, 100%);
  margin: 0 auto;
  padding: 0 48px 64px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.features-showcase {
  padding: 18px 0 8px;
}

.section-head {
  text-align: center;
  margin-bottom: 26px;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(1.8rem, 3.2vw, 2.4rem);
  letter-spacing: -0.01em;
}

.features-tree-svg {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 1400px;
  /* fixed width to maintain path curve integrity */
  max-width: none;
  height: 600px;
  z-index: 0;
  pointer-events: none;
  opacity: 0.7;
}

.features-tree-wrapper {
  position: relative;
  z-index: 1;
  overflow: hidden;
  /* Prevent the fixed width SVG from causing horizontal scroll */
  padding: 40px 0;
}

.tree-line-anim {
  stroke-dasharray: 200;
  animation: flow-energy 6s linear infinite;
}

.tree-line-anim.p1 {
  animation-duration: 4s;
}

.tree-line-anim.p2 {
  animation-duration: 5s;
  animation-delay: 1s;
}

@keyframes flow-energy {
  from {
    stroke-dashoffset: 1000;
  }

  to {
    stroke-dashoffset: 0;
  }
}

.features-icons-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  position: relative;
  z-index: 1;
}

.feature-icon-card {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  padding: 18px 14px;
  text-align: center;
  box-shadow: 0 16px 34px -26px rgba(15, 23, 42, 0.35);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
  position: relative;
}

.feature-icon-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 24px 40px -20px rgba(14, 165, 233, 0.3);
  background: rgba(255, 255, 255, 0.95);
}

.feature-icon-badge {
  width: 84px;
  height: 84px;
  border-radius: 20px;
  margin: 0 auto 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #0f172a;
  background: linear-gradient(140deg, rgba(241, 245, 249, 0.95), rgba(226, 232, 240, 0.9));
  border: 1px solid rgba(15, 23, 42, 0.12);
  box-shadow: 0 12px 28px -20px rgba(15, 23, 42, 0.6);
  position: relative;
  z-index: 2;
  animation: float-pulse 4s ease-in-out infinite;
  overflow: hidden;
}

@keyframes float-pulse {
  0% {
    transform: translateY(0);
    box-shadow: 0 12px 28px -20px rgba(15, 23, 42, 0.6), 0 0 0 rgba(14, 165, 233, 0);
  }

  50% {
    transform: translateY(-8px);
    box-shadow: 0 20px 32px -20px rgba(15, 23, 42, 0.5), 0 0 24px -6px rgba(14, 165, 233, 0.45);
    border-color: rgba(14, 165, 233, 0.4);
  }

  100% {
    transform: translateY(0);
    box-shadow: 0 12px 28px -20px rgba(15, 23, 42, 0.6), 0 0 0 rgba(14, 165, 233, 0);
  }
}

.delay-1 {
  animation-delay: 0s;
}

.delay-2 {
  animation-delay: 0.4s;
}

.delay-3 {
  animation-delay: 0.8s;
}

.delay-4 {
  animation-delay: 1.2s;
}

.delay-5 {
  animation-delay: 1.6s;
}

.delay-6 {
  animation-delay: 2.0s;
}

.feature-icon-badge img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.feature-icon-card p {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 600;
  color: #111111;
  line-height: 1.45;
}

.feature-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.feature-grid article {
  padding: 22px;
  border-radius: 18px;
  background: var(--panel);
  border: 1px solid var(--border);
  box-shadow: 0 16px 34px -26px rgba(15, 23, 42, 0.55);
}

.feature-grid h2 {
  margin: 0 0 12px;
  font-size: 1.3rem;
}

.feature-grid p {
  margin: 0 0 20px;
  color: #374151;
  line-height: 1.5;
}

.demo-showcase {
  padding: 8px 0 4px;
}

.demo-head p {
  margin: 10px auto 0;
  max-width: 700px;
  color: #475569;
  font-size: 1.02rem;
}

.demo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.demo-card {
  padding: 18px;
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.12);
  box-shadow: 0 16px 32px -24px rgba(15, 23, 42, 0.42);
}

.demo-card:last-child {
  display: flex;
  flex-direction: column;
}

.demo-label {
  display: inline-flex;
  align-items: center;
  margin-bottom: 14px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(59, 130, 246, 0.24);
  background: rgba(96, 165, 250, 0.14);
  color: #1e3a8a;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.demo-code {
  margin: 0;
  padding: 14px;
  border-radius: 14px;
  background: #0f172a;
  color: #e2e8f0;
  border: 1px solid #1f2937;
  overflow: auto;
  min-height: 300px;
  max-width: 100%;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.demo-code code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9rem;
  line-height: 1.5;
  white-space: inherit;
}

.demo-video-wrap {
  width: min(100%, 300px);
  margin: 0 auto;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: #000;
  box-shadow: 0 14px 28px -20px rgba(2, 6, 23, 0.7);
}

.demo-video {
  width: 100%;
  aspect-ratio: 9 / 16;
  display: block;
}

.callout {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 22px 24px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.14), rgba(2, 132, 199, 0.1));
  border: 1px solid rgba(2, 132, 199, 0.2);
  color: var(--text);
}

.callout h3 {
  margin: 0 0 10px;
  font-size: 1.4rem;
}

.callout p {
  margin: 0;
  color: #334155;
}

.btn.inline {
  background: var(--primary);
  color: var(--accent);
  border-color: rgba(0, 209, 178, 0.3);
}



@media (max-width: 960px) {
  .hero {
    padding: 34px 24px 52px;
  }

  .content {
    padding: 0 24px 52px;
  }

  .features-icons-grid {
    grid-template-columns: repeat(2, minmax(140px, 1fr));
  }

  .nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 28px;
  }

  .nav-actions {
    width: 100%;
    flex-wrap: wrap;
    gap: 10px;
  }

  .nav-actions a {
    padding: 9px 12px;
    border-radius: 10px;
    font-size: 0.9rem;
  }

  .logo-image {
    width: 118px;
    height: 46px;
  }

  .hero-layout {
    flex-direction: column;
    gap: 22px;
  }

  .hero-content h1 {
    font-size: clamp(2rem, 7vw, 2.5rem);
  }

  .hero-content p {
    font-size: 0.96rem;
    margin: 14px 0 16px;
  }

  .hero-preview {
    display: none;
  }

  .hero-mobile-video {
    display: block;
    margin: 10px auto 14px;
    max-width: 300px;
  }

  .hero-buttons {
    width: 100%;
  }

  .btn.primary {
    width: 100%;
    max-width: 340px;
    min-height: 44px;
    font-size: 0.96rem;
  }

  .hero-meta {
    text-align: left;
    font-size: 0.9rem;
    line-height: 1.4;
  }

  .section-head {
    margin-bottom: 16px;
  }

  .section-head h2 {
    font-size: clamp(1.5rem, 5vw, 2rem);
  }

  .demo-code {
    min-height: 250px;
  }

  .callout {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .demo-grid {
    grid-template-columns: 1fr;
  }


}

@media (max-width: 560px) {
  .hero {
    padding: 24px 14px 34px;
    width: 100%;
    max-width: none;
  }

  .content {
    padding: 0 14px 34px;
    gap: 26px;
    width: 100%;
    max-width: none;
  }

  .glow {
    opacity: 0.1;
  }

  .grid {
    background-size: 120px 120px;
  }

  .logo-image {
    width: 108px;
    height: 42px;
  }

  .nav-actions {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .nav-actions a {
    width: 100%;
    text-align: center;
    padding: 8px 10px;
    font-size: 0.86rem;
  }

  .home-user-chip,
  .home-logout-btn {
    grid-column: 1 / -1;
    width: 100%;
    justify-content: center;
  }

  .hero-layout,
  .hero-content,
  .features-showcase,
  .feature-grid,
  .demo-showcase,
  .callout {
    width: 100%;
  }

  .hero-content h1 {
    font-size: clamp(1.72rem, 9vw, 2.15rem);
    line-height: 1.1;
  }

  .hero-content p {
    font-size: 0.92rem;
    line-height: 1.45;
    margin: 12px 0 14px;
  }

  .hero-mobile-video {
    width: 100%;
    max-width: 320px;
  }

  .btn.primary {
    max-width: 100%;
    font-size: 0.92rem;
    min-height: 42px;
    width: 100%;
  }

  .feature-icon-card {
    padding: 14px 10px;
  }

  .feature-icon-badge {
    width: 72px;
    height: 72px;
    margin-bottom: 10px;
    font-size: 0.96rem;
  }

  .feature-icon-card p {
    font-size: 0.9rem;
  }

  .feature-grid article {
    padding: 16px;
  }

  .demo-card {
    padding: 14px;
  }

  .demo-code {
    min-height: 210px;
    padding: 12px;
  }

  .demo-code code {
    font-size: 0.8rem;
  }

  .demo-video-wrap {
    width: min(100%, 250px);
  }

  .callout {
    padding: 16px;
  }

  .callout h3 {
    font-size: 1.08rem;
  }

  .callout p {
    font-size: 0.9rem;
  }

  .site-footer {
    padding: 20px 14px 28px;
  }

  .features-icons-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .site-footer {
    width: 100%;
    max-width: none;
  }
}

/* =========================================
   NEW SECTION STYLES (HOMEPAGE FLOW)
   ========================================= */

.output-proof {
  padding: 20px 0;
}

.output-proof .section-head p,
.how-it-works .section-head p,
.workflow-diagram .section-head p,
.pricing .section-head p {
  margin: 10px auto 0;
  max-width: 600px;
  color: #475569;
  font-size: 1.05rem;
}

.proof-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: 20px;
  width: 100%;
}

.proof-video {
  width: 100%;
  max-width: 100%;
  aspect-ratio: 9 / 16;
  max-height: 600px;
  border-radius: 14px;
  background: #000;
  border: 1px solid rgba(15, 23, 42, 0.16);
  display: block;
  object-fit: cover;
}

.how-it-works .feature-grid,
.who-its-for .feature-grid {
  margin-top: 10px;
}

.step-card {
  position: relative;
  display: flex;
  flex-direction: column;
}

.step-badge {
  width: 44px;
  height: 44px;
  background: rgba(14, 165, 233, 0.1);
  color: #0284c7;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 20px;
  border: 1px solid rgba(14, 165, 233, 0.2);
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.15);
}

.diagram-box {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
  background: var(--panel);
  border: 1px solid var(--border);
  padding: 40px;
  border-radius: 20px;
  box-shadow: 0 16px 34px -26px rgba(15, 23, 42, 0.55);
}

.diagram-node {
  background: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.4);
  padding: 14px 24px;
  border-radius: 12px;
  font-weight: 600;
  color: #0f172a;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
  font-size: 1.05rem;
}

.diagram-arrow {
  color: #94a3b8;
  font-size: 1.5rem;
  font-weight: bold;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: center;
  margin-top: 20px;
}

.pricing-card {
  background: var(--panel);
  border: 1px solid var(--border);
  padding: 34px 28px;
  border-radius: 20px;
  box-shadow: 0 16px 34px -26px rgba(15, 23, 42, 0.45);
  display: flex;
  flex-direction: column;
}

.pricing-card.pro {
  transform: scale(1.05);
  border-color: rgba(14, 165, 233, 0.4);
  background: #ffffff;
  box-shadow: 0 24px 48px -20px rgba(14, 165, 233, 0.25);
  z-index: 2;
}

.pricing-card h3 {
  margin: 0;
  font-size: 1.5rem;
  color: #0f172a;
}

.pricing-card .price {
  font-size: 3.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 16px 0 24px;
  color: #0f172a;
}

.pricing-card .price span {
  font-size: 1.15rem;
  font-weight: 600;
  color: #64748b;
}

.pricing-card ul {
  list-style: none;
  padding: 0;
  margin: 0 0 32px 0;
  flex: 1;
}

.pricing-card li {
  padding: 12px 0;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  color: #334155;
  font-size: 0.98rem;
}

.pricing-card li:last-child {
  border-bottom: none;
}

.trust {
  padding: 20px 0;
  text-align: center;
}


@media (max-width: 900px) {
  .pricing-grid {
    grid-template-columns: 1fr;
  }

  .pricing-card.pro {
    transform: scale(1);
    z-index: 1;
  }
}

@media (max-width: 768px) {
  .proof-grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 16px;
    padding-bottom: 20px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .proof-grid::-webkit-scrollbar {
    display: none;
  }

  .proof-video {
    flex: 0 0 85%;
    scroll-snap-align: center;
  }
}

@media (max-width: 600px) {
  .diagram-arrow {
    transform: rotate(90deg);
  }

  .diagram-box {
    flex-direction: column;
  }
}

.hidden {
  display: none !important;
}

@media (min-width: 640px) {
  .sm-flex {
    display: flex !important;
  }
}

@media (min-width: 768px) {
  .md-flex {
    display: flex !important;
  }
}

.hidden {
  display: none !important;
}

.md-flex,
.sm-flex {
  display: none;
}

@media (min-width: 640px) {
  .sm-flex {
    display: flex !important;
  }
}

@media (min-width: 768px) {
  .md-flex {
    display: flex !important;
  }
}

@media (min-width: 640px) {
  .sm-hidden {
    display: none !important;
  }
}