/* ============================================================
   SAAS-V2 — STYLES.CSS — FlowBoard
   Light clean · Violet + Green · Plus Jakarta Sans
   ============================================================ */

:root {
  --primary: #7c3aed;
  --primary-dark: #6d28d9;
  --primary-light: #f5f3ff;
  --primary-rgb: 124, 58, 237;
  --green: #10b981;
  --green-rgb: 16, 185, 129;

  --white: #ffffff;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;

  --canvas: var(--white);
  --canvas-alt: var(--gray-50);
  --ink: var(--gray-900);
  --ink-soft: var(--gray-700);
  --muted: var(--gray-500);
  --border: var(--gray-200);

  --font-main: 'Plus Jakarta Sans', system-ui, sans-serif;

  --fs-xs: clamp(0.7rem, 0.65rem + 0.25vw, 0.78rem);
  --fs-sm: clamp(0.82rem, 0.76rem + 0.3vw, 0.9rem);
  --fs-base: clamp(0.92rem, 0.86rem + 0.3vw, 1rem);
  --fs-md: clamp(1rem, 0.9rem + 0.5vw, 1.15rem);
  --fs-lg: clamp(1.15rem, 1rem + 0.75vw, 1.4rem);
  --fs-xl: clamp(1.4rem, 1.1rem + 1.5vw, 2rem);
  --fs-2xl: clamp(1.8rem, 1.3rem + 2.5vw, 2.8rem);
  --fs-3xl: clamp(2.2rem, 1.5rem + 3.5vw, 3.6rem);
  --fs-4xl: clamp(2.8rem, 1.8rem + 5vw, 4.5rem);

  --section-py: clamp(60px, 8vw, 110px);
  --container-max: 1140px;
  --container-px: clamp(16px, 4vw, 32px);

  --radius-sm: 8px; --radius-md: 12px; --radius-lg: 16px; --radius-xl: 20px; --radius-2xl: 28px; --radius-full: 9999px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.04); --shadow-md: 0 4px 16px rgba(0,0,0,0.06); --shadow-lg: 0 12px 40px rgba(0,0,0,0.08);
  --ease: cubic-bezier(0.4, 0, 0.2, 1); --duration: 0.35s;
  --z-sticky: 200; --z-overlay: 300; --z-preloader: 500;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; overflow-x: hidden; }
body { font-family: var(--font-main); font-size: var(--fs-base); color: var(--ink); background: var(--canvas); line-height: 1.7; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; transition: color var(--duration) var(--ease); }
ul, ol { list-style: none; }
button { border: none; background: none; cursor: pointer; font: inherit; color: inherit; }
::selection { background: rgba(var(--primary-rgb), 0.12); }

.container { max-width: var(--container-max); margin: 0 auto; padding: 0 var(--container-px); }
.kicker { display: inline-block; font-size: var(--fs-xs); font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--primary); margin-bottom: 14px; }
.section-title { font-size: var(--fs-3xl); font-weight: 800; line-height: 1.1; letter-spacing: -0.03em; color: var(--ink); margin-bottom: 14px; }
.section-title em { font-style: normal; color: var(--primary); }
.section-lead { font-size: var(--fs-md); color: var(--muted); max-width: 560px; line-height: 1.8; }
.section-header { margin-bottom: 48px; }
.section-header--center { text-align: center; }
.section-header--center .section-lead { margin: 0 auto; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 700; font-size: var(--fs-sm); border-radius: var(--radius-full); padding: 12px 28px; transition: all var(--duration) var(--ease); border: 2px solid transparent; white-space: nowrap; }
.btn .material-icons { font-size: 18px; }
.btn--primary { background: var(--primary); color: var(--white); box-shadow: 0 4px 14px rgba(var(--primary-rgb), 0.25); }
.btn--primary:hover { background: var(--primary-dark); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(var(--primary-rgb), 0.35); }
.btn--outline { border-color: var(--border); color: var(--ink); }
.btn--outline:hover { border-color: var(--primary); color: var(--primary); }
.btn--ghost { color: var(--muted); }
.btn--ghost:hover { color: var(--primary); }
.btn--sm { padding: 8px 20px; font-size: var(--fs-xs); }
.btn--lg { padding: 16px 36px; font-size: var(--fs-base); }
.btn--block { width: 100%; }

/* PRELOADER */
.preloader { position: fixed; inset: 0; z-index: var(--z-preloader); background: var(--white); display: flex; align-items: center; justify-content: center; transition: opacity 0.5s var(--ease), visibility 0.5s var(--ease); }
.preloader.loaded { opacity: 0; visibility: hidden; pointer-events: none; }
.preloader__ring { width: 32px; height: 32px; border: 3px solid var(--gray-200); border-top-color: var(--primary); border-radius: 50%; margin: 0 auto 12px; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.preloader__text { font-size: var(--fs-sm); font-weight: 800; color: var(--ink); letter-spacing: 0.08em; }

.scroll-progress { position: fixed; top: 0; left: 0; height: 2px; width: 100%; z-index: calc(var(--z-sticky) + 1); background: var(--primary); transform-origin: left; transform: scaleX(0); }

/* NAVBAR */
.navbar { position: sticky; top: 0; z-index: var(--z-sticky); background: rgba(255,255,255,0.92); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-bottom: 1px solid rgba(0,0,0,0.04); transition: box-shadow var(--duration); }
.navbar.scrolled { box-shadow: var(--shadow-md); }
.navbar__inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.navbar__brand { font-size: var(--fs-lg); font-weight: 800; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.navbar__icon { color: var(--primary); font-size: 1.1em; }
.navbar__list { display: flex; gap: 4px; }
.navbar__link { padding: 6px 14px; font-size: var(--fs-xs); font-weight: 600; color: var(--muted); border-radius: var(--radius-md); transition: color var(--duration), background var(--duration); }
.navbar__link:hover, .navbar__link.active { color: var(--primary); background: var(--primary-light); }
.navbar__actions { display: flex; align-items: center; gap: 8px; }
.navbar__burger { display: none; flex-direction: column; gap: 5px; width: 24px; }
.navbar__burger span { display: block; height: 2px; background: var(--ink); border-radius: 2px; transition: all var(--duration); }
.navbar__burger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.navbar__burger.active span:nth-child(2) { opacity: 0; }
.navbar__burger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* HERO */
.hero { padding: clamp(80px, 10vw, 120px) 0 0; text-align: center; }
.hero__content { max-width: 720px; margin: 0 auto; }
.hero__badge { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-xs); font-weight: 700; color: var(--primary); padding: 6px 16px; border: 1px solid rgba(var(--primary-rgb), 0.15); border-radius: var(--radius-full); background: var(--primary-light); margin-bottom: 24px; }
.hero__badge .material-icons { font-size: 16px; }
.hero__title { font-size: var(--fs-4xl); font-weight: 800; line-height: 1.05; color: var(--ink); margin-bottom: 20px; letter-spacing: -0.04em; }
.hero__title em { font-style: normal; color: var(--primary); }
.hero__lead { font-size: var(--fs-md); color: var(--muted); max-width: 580px; margin: 0 auto 32px; line-height: 1.8; }
.hero__actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-bottom: 32px; }
.hero__social-proof { display: flex; align-items: center; justify-content: center; gap: 16px; flex-wrap: wrap; margin-bottom: 48px; }
.hero__avatars { display: flex; align-items: center; }
.hero__avatars img { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--white); margin-left: -6px; object-fit: cover; }
.hero__avatars img:first-child { margin-left: 0; }
.hero__avatars span { font-size: var(--fs-xs); font-weight: 800; color: var(--primary); margin-left: 6px; }
.hero__rating { font-size: var(--fs-xs); color: #f59e0b; }
.hero__rating span { color: var(--muted); margin-left: 4px; }

/* BOARD MOCK */
.hero__board { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; padding: 24px; border: 1px solid var(--border); border-radius: var(--radius-2xl); background: var(--gray-50); box-shadow: var(--shadow-lg); margin-bottom: -40px; }
.board__col { background: var(--white); border-radius: var(--radius-lg); padding: 16px; border: 1px solid var(--border); }
.board__col h4 { font-size: var(--fs-sm); font-weight: 800; margin-bottom: 12px; }
.board__card { padding: 12px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--white); font-size: var(--fs-xs); font-weight: 600; margin-bottom: 8px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; transition: all var(--duration); position: relative; }
.board__card:hover { box-shadow: var(--shadow-sm); transform: translateY(-2px); }
.board__card--active { border-color: rgba(var(--primary-rgb), 0.3); background: var(--primary-light); }
.board__card--done { opacity: 0.5; text-decoration: line-through; }
.board__tag { font-size: 10px; font-weight: 800; padding: 2px 8px; border-radius: var(--radius-full); text-transform: uppercase; letter-spacing: 0.04em; }
.board__tag--dev { background: #dbeafe; color: #1d4ed8; }
.board__tag--design { background: #fce7f3; color: #be185d; }
.board__tag--mkt { background: #d1fae5; color: #047857; }
.board__card-avatar { margin-left: auto; }
.board__card-avatar img { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; }

/* LOGOS */
.logos { padding: calc(40px + 40px) 0 40px; border-bottom: 1px solid var(--border); }
.logos__label { text-align: center; font-size: var(--fs-xs); font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 16px; }
.logos__grid { display: flex; justify-content: center; gap: 40px; flex-wrap: wrap; }
.logos__grid span { font-size: var(--fs-lg); font-weight: 900; color: var(--gray-300); letter-spacing: -0.02em; }

/* FEATURES */
.features { padding: var(--section-py) 0; }
.features__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature-card { padding: 28px; border: 1px solid var(--border); border-radius: var(--radius-xl); background: var(--white); transition: all var(--duration); }
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: rgba(var(--primary-rgb), 0.12); }
.feature-card__icon { display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: var(--radius-lg); background: var(--primary-light); color: var(--primary); margin-bottom: 16px; }
.feature-card__icon .material-icons { font-size: 24px; }
.feature-card h3 { font-size: var(--fs-base); font-weight: 800; margin-bottom: 8px; }
.feature-card p { font-size: var(--fs-sm); color: var(--muted); line-height: 1.7; }

/* PRICING */
.pricing { padding: var(--section-py) 0; background: var(--canvas-alt); }
.pricing__toggle { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 36px; }
.pricing__toggle-label { font-size: var(--fs-sm); font-weight: 700; color: var(--muted); cursor: pointer; transition: color var(--duration); }
.pricing__toggle-label.active { color: var(--ink); }
.pricing__toggle-label em { font-style: normal; color: var(--primary); font-size: var(--fs-xs); }
.pricing__toggle-switch { width: 44px; height: 24px; border-radius: 12px; background: var(--gray-300); position: relative; cursor: pointer; transition: background var(--duration); }
.pricing__toggle-switch span { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--white); transition: transform var(--duration); box-shadow: var(--shadow-sm); }
.pricing__toggle-switch.yearly { background: var(--primary); }
.pricing__toggle-switch.yearly span { transform: translateX(20px); }
.pricing__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.price-card { padding: 32px; border: 1px solid var(--border); border-radius: var(--radius-xl); background: var(--white); position: relative; transition: all var(--duration); }
.price-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.price-card--popular { border-color: rgba(var(--primary-rgb), 0.3); box-shadow: 0 0 0 1px rgba(var(--primary-rgb), 0.1); }
.price-card__badge { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--primary); color: var(--white); font-size: var(--fs-xs); font-weight: 800; padding: 4px 14px; border-radius: var(--radius-full); }
.price-card h3 { font-size: var(--fs-lg); font-weight: 800; margin-bottom: 6px; }
.price-card__desc { font-size: var(--fs-sm); color: var(--muted); margin-bottom: 20px; }
.price-card__price { margin-bottom: 24px; }
.price-card__amount { font-size: var(--fs-2xl); font-weight: 800; color: var(--ink); }
.price-card__price span { font-size: var(--fs-sm); color: var(--muted); }
.price-card ul { display: grid; gap: 10px; margin-bottom: 24px; }
.price-card li { display: flex; align-items: center; gap: 8px; font-size: var(--fs-sm); color: var(--ink-soft); }
.price-card li .material-icons { font-size: 18px; color: var(--green); }

/* TESTIMONIALS */
.testimonials { padding: var(--section-py) 0; }
.testi-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.testi-card { padding: 28px; border: 1px solid var(--border); border-radius: var(--radius-xl); background: var(--white); transition: all var(--duration); }
.testi-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.testi-card--accent { background: var(--primary); border-color: transparent; color: var(--white); }
.testi-card--accent blockquote { color: rgba(255,255,255,0.9); }
.testi-card--accent .testi-card__author { border-top-color: rgba(255,255,255,0.15); }
.testi-card--accent .testi-card__author span { color: rgba(255,255,255,0.6); }
.testi-card blockquote { font-size: var(--fs-sm); color: var(--ink-soft); line-height: 1.7; font-style: italic; margin-bottom: 20px; }
.testi-card__author { display: flex; align-items: center; gap: 12px; padding-top: 16px; border-top: 1px solid var(--border); }
.testi-card__author img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; }
.testi-card__author strong { display: block; font-size: var(--fs-sm); font-weight: 800; }
.testi-card__author span { font-size: var(--fs-xs); color: var(--muted); }

/* CTA */
.cta { padding: var(--section-py) 0; background: var(--gray-900); text-align: center; }
.cta .section-title { color: var(--white); }
.cta .section-title em { color: #a78bfa; }
.cta p { font-size: var(--fs-md); color: rgba(255,255,255,0.5); margin-bottom: 28px; }
.cta .btn--primary { background: var(--white); color: var(--gray-900); box-shadow: 0 4px 16px rgba(0,0,0,0.2); }
.cta .btn--primary:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(0,0,0,0.3); }

/* FAQ */
.faq { padding: var(--section-py) 0; }
.faq__layout { display: grid; grid-template-columns: 0.4fr 0.6fr; gap: 48px; align-items: start; }
.faq__list { display: grid; gap: 10px; }
.faq__item { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; transition: all var(--duration); }
.faq__item[open] { border-color: rgba(var(--primary-rgb), 0.2); box-shadow: var(--shadow-sm); }
.faq__q { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 18px 22px; cursor: pointer; font-size: var(--fs-base); font-weight: 700; list-style: none; }
.faq__q::-webkit-details-marker { display: none; }
.faq__q .material-icons { color: var(--primary); font-size: 20px; transition: transform var(--duration); flex-shrink: 0; }
.faq__item[open] .faq__q .material-icons { transform: rotate(180deg); }
.faq__a { padding: 0 22px 18px; }
.faq__a p { font-size: var(--fs-sm); color: var(--muted); line-height: 1.8; }

/* FOOTER */
.footer { padding: 48px 0 0; border-top: 1px solid var(--border); }
.footer__top { display: grid; grid-template-columns: 1.5fr 2fr; gap: 48px; padding-bottom: 36px; }
.footer__logo { font-size: var(--fs-lg); font-weight: 800; color: var(--ink); display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.footer__logo span { color: var(--primary); }
.footer__brand p { font-size: var(--fs-sm); color: var(--gray-400); line-height: 1.5; }
.footer__cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.footer__cols h5 { font-size: var(--fs-sm); font-weight: 800; margin-bottom: 12px; }
.footer__cols a { display: block; font-size: var(--fs-sm); color: var(--gray-400); padding: 3px 0; transition: color var(--duration); }
.footer__cols a:hover { color: var(--primary); }
.footer__bottom { display: flex; align-items: center; justify-content: space-between; padding: 18px 0; border-top: 1px solid var(--border); font-size: var(--fs-xs); color: var(--gray-400); flex-wrap: wrap; gap: 10px; }
.footer__bottom div { display: flex; gap: 16px; }
.footer__bottom a { color: var(--gray-400); transition: color var(--duration); }
.footer__bottom a:hover { color: var(--primary); }

.back-to-top { position: fixed; bottom: 28px; right: 28px; width: 44px; height: 44px; border-radius: 50%; background: var(--primary); color: var(--white); display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 16px rgba(var(--primary-rgb), 0.3); z-index: var(--z-overlay); opacity: 0; visibility: hidden; transform: translateY(16px); transition: all var(--duration); }
.back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: var(--primary-dark); transform: translateY(-3px); }

@media (max-width: 1024px) {
  .hero__board { grid-template-columns: 1fr; }
  .features__grid { grid-template-columns: repeat(2, 1fr); }
  .pricing__grid { grid-template-columns: 1fr; max-width: 400px; margin: 0 auto; }
  .testi-grid { grid-template-columns: 1fr; }
  .faq__layout { grid-template-columns: 1fr; }
  .footer__top { grid-template-columns: 1fr; }
  .navbar__menu { position: fixed; inset: 0; width: 100vw; height: 100dvh; background: var(--white); z-index: var(--z-overlay); display: flex; align-items: center; justify-content: center; opacity: 0; visibility: hidden; pointer-events: none; transition: opacity 0.4s var(--ease), visibility 0s linear 0.4s; }
  .navbar__menu.open { opacity: 1; visibility: visible; pointer-events: auto; transition: opacity 0.4s var(--ease); }
  .navbar__list { flex-direction: column; gap: 8px; }
  .navbar__link { font-size: var(--fs-lg); padding: 12px 24px; }
  .navbar__burger { display: flex; position: relative; z-index: calc(var(--z-overlay) + 1); }
}
@media (max-width: 768px) {
  .features__grid { grid-template-columns: 1fr; }
  .logos__grid { gap: 24px; }
}
@media (max-width: 480px) {
  .hero__title { font-size: var(--fs-2xl); }
  .hero__actions { flex-direction: column; }
  .hero__actions .btn { width: 100%; }
  .footer__cols { grid-template-columns: 1fr; }
  .footer__bottom { flex-direction: column; text-align: center; }
}
