/* ========================================
   RADICAL SAAS REDESIGN — Inspired by Linear / Vercel / Stripe
   ======================================== */

/* RESET */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0
}

html {
  scroll-behavior: smooth
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: #0f172a;
  background: #fff;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased
}

a {
  text-decoration: none;
  color: inherit
}

ul {
  list-style: none
}

img {
  max-width: 100%;
  display: block
}

.wrap {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 28px
}

/* ===== TOPBAR ===== */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 999;
  height: 56px;
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, .72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid #f1f5f9;
}

.topbar .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%
}

.t-brand {
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: -.02em
}

.t-brand b {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent
}

.t-nav {
  display: flex;
  gap: 28px
}

.t-nav a {
  font-size: .8rem;
  font-weight: 500;
  color: #64748b;
  transition: color .15s
}

.t-nav a:hover {
  color: #6366f1
}

.t-cta {
  font-size: .78rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  padding: 7px 18px;
  border-radius: 100px;
  transition: opacity .2s;
}

.t-cta:hover {
  opacity: .88
}

.mob-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px
}

.mob-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: #334155;
  margin: 4px 0;
  border-radius: 2px
}

/* ===== HERO — CENTERED LAYOUT ===== */
.hero {
  padding: 130px 28px 60px;
  text-align: center;
  background: radial-gradient(ellipse 80% 60% at 50% -20%, #ede9fe 0%, #fff 70%);
  position: relative;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #7c3aed;
  background: #f5f3ff;
  border: 1px solid #ddd6fe;
  padding: 5px 14px;
  border-radius: 100px;
  margin-bottom: 28px;
}

.hero h1 {
  font-size: 3.6rem;
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -.04em;
  max-width: 780px;
  margin: 0 auto 20px;
}

.hero h1 .grad {
  background: linear-gradient(135deg, #6366f1, #a855f7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-sub {
  font-size: 1.12rem;
  color: #475569;
  line-height: 1.75;
  max-width: 600px;
  margin: 0 auto 40px;
}

.hero-btns {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 56px
}

.hb-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  padding: 14px 30px;
  border-radius: 14px;
  font-weight: 700;
  font-size: .95rem;
  box-shadow: 0 8px 32px rgba(99, 102, 241, .25);
  transition: box-shadow .2s;
}

.hb-primary:hover {
  box-shadow: 0 12px 40px rgba(99, 102, 241, .35)
}

.hb-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #f8fafc;
  color: #334155;
  padding: 14px 30px;
  border-radius: 14px;
  font-weight: 600;
  font-size: .95rem;
  border: 1.5px solid #e2e8f0;
  transition: border-color .2s;
}

.hb-secondary:hover {
  border-color: #6366f1;
  color: #6366f1
}

.hero-mockup {
  max-width: 820px;
  margin: 0 auto;
  background: linear-gradient(145deg, #f1f5f9, #e2e8f0);
  border-radius: 16px;
  padding: 6px;
  box-shadow: 0 40px 80px rgba(0, 0, 0, .08), 0 0 0 1px rgba(0, 0, 0, .04);
}

.hero-mockup .browser-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: #fff;
  border-radius: 12px 12px 0 0;
  border-bottom: 1px solid #f1f5f9;
}

.browser-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%
}

.browser-dot.r {
  background: #fca5a5
}

.browser-dot.y {
  background: #fde68a
}

.browser-dot.g {
  background: #86efac
}

.hero-mockup img {
  border-radius: 0 0 12px 12px;
  width: 100%
}

/* ===== STATS BAR ===== */
.stats-bar {
  background: #f8fafc;
  border-top: 1px solid #f1f5f9;
  border-bottom: 1px solid #f1f5f9;
  padding: 40px 28px;
}

.stats-row {
  display: flex;
  justify-content: center;
  gap: 64px;
  flex-wrap: wrap
}

.stat-item {
  text-align: center
}

.stat-num {
  font-size: 2.2rem;
  font-weight: 900;
  letter-spacing: -.03em;
  background: linear-gradient(135deg, #6366f1, #a855f7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent
}

.stat-label {
  font-size: .78rem;
  color: #64748b;
  font-weight: 500;
  margin-top: 4px
}

/* ===== PROBLEMS — HORIZONTAL MARQUEE STYLE ===== */
.problems {
  padding: 80px 28px;
  background: #fff
}

.problems .wrap {
  max-width: 1140px
}

.sec-head {
  margin-bottom: 48px
}

.sec-head .chip {
  display: inline-block;
  font-size: .68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: #6366f1;
  margin-bottom: 12px;
}

.sec-head h2 {
  font-size: 2.4rem;
  font-weight: 900;
  letter-spacing: -.03em;
  line-height: 1.15;
  margin-bottom: 10px
}

.sec-head p {
  font-size: 1rem;
  color: #64748b;
  max-width: 520px
}

.prob-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px
}

.prob-card {
  padding: 28px 22px;
  border-radius: 18px;
  border: 1px solid #f1f5f9;
  background: #fafbff;
  position: relative;
  overflow: hidden;
  transition: border-color .25s;
}

.prob-card:hover {
  border-color: #c7d2fe
}

.prob-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: 18px 18px 0 0;
}

.prob-card:nth-child(1)::before {
  background: linear-gradient(90deg, #ef4444, #f97316)
}

.prob-card:nth-child(2)::before {
  background: linear-gradient(90deg, #f59e0b, #eab308)
}

.prob-card:nth-child(3)::before {
  background: linear-gradient(90deg, #3b82f6, #6366f1)
}

.prob-card:nth-child(4)::before {
  background: linear-gradient(90deg, #22c55e, #14b8a6)
}

.prob-card .p-icon {
  font-size: 1.6rem;
  margin-bottom: 16px;
}

.prob-card:nth-child(1) .p-icon {
  color: #ef4444
}

.prob-card:nth-child(2) .p-icon {
  color: #f59e0b
}

.prob-card:nth-child(3) .p-icon {
  color: #3b82f6
}

.prob-card:nth-child(4) .p-icon {
  color: #22c55e
}

.prob-card h3 {
  font-size: .95rem;
  font-weight: 800;
  margin-bottom: 8px;
  letter-spacing: -.01em
}

.prob-card p {
  font-size: .82rem;
  color: #64748b;
  line-height: 1.6
}

/* ===== FEATURES — BENTO GRID ===== */
.features {
  padding: 80px 28px;
  background: linear-gradient(180deg, #faf5ff 0%, #fff 100%)
}

.bento {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: auto auto;
  gap: 16px
}

.bento-card {
  background: #fff;
  border: 1px solid #f1f5f9;
  border-radius: 18px;
  padding: 36px 28px;
  transition: box-shadow .3s, border-color .3s;
  position: relative;
  overflow: hidden;
}

.bento-card:hover {
  box-shadow: 0 16px 48px rgba(99, 102, 241, .08);
  border-color: #ddd6fe
}

.bento-card.wide {
  grid-column: span 2
}

.bento-card .b-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #ede9fe, #f5f3ff);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: #7c3aed;
  margin-bottom: 18px;
}

.bento-card h3 {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -.01em;
  margin-bottom: 8px
}

.bento-card p {
  font-size: .85rem;
  color: #64748b;
  line-height: 1.7
}

/* ===== DOWNLOAD — FLOATING CARD CENTER ===== */
.dl-section {
  padding: 100px 28px;
  background: linear-gradient(180deg, #fff 0%, #faf5ff 50%, #fff 100%);
}

.dl-card {
  max-width: 900px;
  margin: 0 auto;
  background: linear-gradient(135deg, #4f46e5, #7c3aed, #9333ea);
  border-radius: 28px;
  padding: 60px 48px;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 40px;
  align-items: center;
  color: #fff;
  position: relative;
  overflow: hidden;
  box-shadow: 0 32px 64px rgba(79, 70, 229, .2), 0 0 0 1px rgba(255, 255, 255, .08) inset;
}

.dl-card::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -30%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(255, 255, 255, .1) 0%, transparent 70%);
}

.dl-card::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -20%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(255, 255, 255, .06) 0%, transparent 70%);
}

.dl-l {
  position: relative;
  z-index: 1
}

.dl-l h2 {
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: -.03em;
  margin-bottom: 8px
}

.dl-l .dl-sub {
  font-size: .95rem;
  opacity: .8;
  margin-bottom: 24px
}

.dl-checks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 16px;
  margin-bottom: 28px
}

.dl-checks li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .82rem;
  font-weight: 500
}

.dl-checks li i {
  color: #a5b4fc;
  font-size: .7rem
}

.dl-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  color: #4f46e5;
  padding: 14px 28px;
  border-radius: 14px;
  font-weight: 800;
  font-size: .95rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, .15);
  transition: transform .15s;
}

.dl-action:hover {
  transform: scale(1.03)
}

.dl-r {
  position: relative;
  z-index: 1;
  background: rgba(255, 255, 255, .08);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 20px;
  padding: 28px;
}

.dl-badges {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap
}

.dl-badge {
  font-size: .72rem;
  font-weight: 700;
  background: rgba(255, 255, 255, .14);
  padding: 5px 12px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.dl-r h3 {
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: 4px
}

.dl-r>p {
  font-size: .82rem;
  opacity: .75;
  margin-bottom: 20px
}

.dl-block {
  margin-bottom: 16px
}

.dl-block h4 {
  font-size: .82rem;
  font-weight: 700;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px
}

.dl-block ul li {
  font-size: .78rem;
  opacity: .85;
  padding: 2px 0
}

.dl-block p {
  font-size: .78rem;
  opacity: .85;
  line-height: 1.6
}

/* ===== ERROR CODES — ACCORDION STYLE ===== */
.errors {
  padding: 80px 28px;
  background: #fff
}

.err-groups {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 32px
}

.err-group-title {
  font-size: .8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: #6366f1;
  padding-bottom: 8px;
  border-bottom: 2px solid #ede9fe;
  margin-bottom: 4px;
}

.err-items {
  display: flex;
  flex-direction: column;
  gap: 8px
}

.err-item {
  background: #fafbff;
  border: 1px solid #f1f5f9;
  border-radius: 14px;
  padding: 18px 22px;
  display: flex;
  gap: 18px;
  align-items: flex-start;
  transition: border-color .2s;
}

.err-item:hover {
  border-color: #c7d2fe
}

.err-tag {
  flex-shrink: 0;
  min-width: 110px;
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
  font-size: .72rem;
  font-weight: 800;
  color: #7c3aed;
  background: #ede9fe;
  padding: 6px 10px;
  border-radius: 8px;
  text-align: center;
  word-break: break-all;
}

.err-body h4 {
  font-size: .88rem;
  font-weight: 700;
  margin-bottom: 3px
}

.err-body .desc {
  font-size: .78rem;
  color: #64748b;
  margin-bottom: 4px
}

.err-body .sol {
  font-size: .76rem;
  color: #16a34a;
  font-weight: 600
}

.err-body .sol span {
  font-weight: 400;
  color: #475569
}

.err-tip-bar {
  max-width: 800px;
  margin: 32px auto 0;
  display: flex;
  gap: 14px;
  align-items: center;
  background: linear-gradient(135deg, #fefce8, #fef9c3);
  border: 1px solid #fde68a;
  border-radius: 14px;
  padding: 18px 22px;
}

.err-tip-bar .emoji {
  font-size: 1.4rem;
  flex-shrink: 0
}

.err-tip-bar h4 {
  font-size: .88rem;
  font-weight: 700;
  color: #92400e;
  margin-bottom: 2px
}

.err-tip-bar p {
  font-size: .78rem;
  color: #78716c;
  line-height: 1.6
}

/* ===== GUIDE — VERTICAL TIMELINE ===== */
.guide {
  padding: 80px 28px;
  background: #faf5ff
}

.timeline {
  max-width: 680px;
  margin: 0 auto 60px;
  position: relative;
  padding-left: 48px
}

.timeline::before {
  content: '';
  position: absolute;
  left: 15px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, #c4b5fd, #e9d5ff);
  border-radius: 2px;
}

.tl-step {
  position: relative;
  padding-bottom: 36px
}

.tl-step:last-child {
  padding-bottom: 0
}

.tl-dot {
  position: absolute;
  left: -48px;
  top: 2px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: .8rem;
  box-shadow: 0 0 0 4px #faf5ff, 0 0 0 6px #ddd6fe;
}

.tl-step h3 {
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: -.01em;
  margin-bottom: 6px
}

.tl-step p {
  font-size: .88rem;
  color: #64748b;
  line-height: 1.7
}

.adv-section {
  max-width: 800px;
  margin: 0 auto
}

.adv-section>h3 {
  font-size: 1.3rem;
  font-weight: 900;
  text-align: center;
  margin-bottom: 24px;
  letter-spacing: -.02em
}

.adv-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px
}

.adv-item {
  background: #fff;
  border: 1px solid #f1f5f9;
  border-radius: 16px;
  padding: 24px 20px;
  transition: border-color .2s;
}

.adv-item:hover {
  border-color: #ddd6fe
}

.adv-item h4 {
  font-size: .9rem;
  font-weight: 700;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px
}

.adv-item h4 i {
  color: #7c3aed;
  font-size: .82rem
}

.adv-item p {
  font-size: .82rem;
  color: #64748b;
  line-height: 1.6
}

/* ===== FAQ — EXPANDABLE ACCORDION ===== */
.faq {
  padding: 80px 28px;
  background: #fff
}

.faq-list {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 10px
}

.faq-item {
  border: 1px solid #f1f5f9;
  border-radius: 16px;
  overflow: hidden;
  transition: border-color .2s;
}

.faq-item:hover {
  border-color: #ddd6fe
}

.faq-q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  cursor: pointer;
  background: #fafbff;
  font-size: .95rem;
  font-weight: 700;
  color: #0f172a;
  transition: background .15s;
}

.faq-q:hover {
  background: #f5f3ff
}

.faq-q .chevron {
  font-size: .7rem;
  color: #94a3b8;
  transition: transform .25s;
  flex-shrink: 0;
}

.faq-item.open .faq-q .chevron {
  transform: rotate(180deg)
}

.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height .35s ease, padding .35s ease;
  padding: 0 24px;
}

.faq-item.open .faq-a {
  max-height: 300px;
  padding: 0 24px 20px
}

.faq-a p {
  font-size: .88rem;
  color: #64748b;
  line-height: 1.75
}

/* ===== COMPATIBILITY — TABS STYLE ===== */
.compat {
  padding: 80px 28px;
  background: #faf5ff
}

.compat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  max-width: 900px;
  margin: 0 auto
}

.compat-card {
  background: #fff;
  border: 1px solid #f1f5f9;
  border-radius: 18px;
  padding: 28px 24px;
  transition: border-color .2s;
}

.compat-card:hover {
  border-color: #ddd6fe
}

.cc-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px
}

.cc-head i {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, #ede9fe, #f5f3ff);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: #7c3aed;
}

.cc-head h3 {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -.01em
}

.compat-card li {
  font-size: .82rem;
  color: #475569;
  padding: 5px 0;
  border-bottom: 1px solid #faf5ff;
}

.compat-card li:last-child {
  border-bottom: none
}

.compat-card li strong {
  color: #0f172a;
  font-weight: 700
}

/* ===== FOOTER ===== */
.foot {
  background: #0c0a1a;
  color: #94a3b8;
  padding: 64px 28px 28px
}

.foot-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px
}

.foot-brand h2 {
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 8px
}

.foot-brand b {
  background: linear-gradient(135deg, #818cf8, #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent
}

.foot-brand p {
  font-size: .82rem;
  color: #64748b
}

.foot-col h4 {
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: #cbd5e1;
  margin-bottom: 14px
}

.foot-col li {
  padding: 3px 0
}

.foot-col a {
  font-size: .82rem;
  color: #64748b;
  transition: color .15s
}

.foot-col a:hover {
  color: #818cf8
}

.foot-bottom {
  border-top: 1px solid #1e1b3a;
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.foot-bottom p {
  font-size: .75rem;
  color: #4b5563
}

.foot-bottom a {
  color: #818cf8
}

.foot-socials {
  display: flex;
  gap: 8px
}

.foot-socials a {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #1e1b3a;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  font-size: .82rem;
  transition: background .2s, color .2s;
}

.foot-socials a:hover {
  background: #6366f1;
  color: #fff
}

/* ===== AD ===== */
.ad-wrap {
  max-width: 100%;
  margin-bottom: 36px
}

/* ===== RESPONSIVE ===== */
@media(max-width:1024px) {
  .hero h1 {
    font-size: 2.6rem
  }

  .prob-strip {
    grid-template-columns: 1fr 1fr
  }

  .bento {
    grid-template-columns: 1fr 1fr
  }

  .bento-card.wide {
    grid-column: span 1
  }

  .dl-card {
    grid-template-columns: 1fr;
    padding: 40px 32px
  }

  .stats-row {
    gap: 40px
  }

  .compat-grid {
    grid-template-columns: 1fr
  }

  .foot-grid {
    grid-template-columns: 1fr 1fr
  }
}

@media(max-width:768px) {
  .t-nav {
    display: none
  }

  .mob-toggle {
    display: block
  }

  .hero {
    padding: 110px 20px 50px
  }

  .hero h1 {
    font-size: 2rem
  }

  .hero-sub {
    font-size: .95rem
  }

  .prob-strip {
    grid-template-columns: 1fr
  }

  .bento {
    grid-template-columns: 1fr
  }

  .dl-card {
    padding: 32px 24px;
    border-radius: 20px
  }

  .dl-checks {
    grid-template-columns: 1fr
  }

  .err-item {
    flex-direction: column;
    gap: 10px
  }

  .err-tag {
    min-width: auto;
    align-self: flex-start
  }

  .timeline {
    padding-left: 44px
  }

  .adv-grid {
    grid-template-columns: 1fr
  }

  .compat-grid {
    grid-template-columns: 1fr
  }

  .foot-grid {
    grid-template-columns: 1fr
  }

  .foot-bottom {
    flex-direction: column;
    text-align: center
  }

  .sec-head h2 {
    font-size: 1.8rem
  }
}