/*
 * CarBalance — landing page v2.
 * Built from scratch: no Bootstrap, no third-party template CSS/JS.
 * Same content as v1, different visual system (custom grid/flex layout,
 * own type scale, own components).
 */

:root {
  --cb-ink: #15192b;
  --cb-text: #4b5370;
  --cb-muted: #8a90a6;
  --cb-bg: #ffffff;
  --cb-bg-soft: #f6f7fb;
  --cb-border: #e7e9f2;
  --cb-primary: #4338ca;
  --cb-primary-dark: #332b9e;
  --cb-primary-soft: #eef0fd;
  --cb-accent: #f6ad55;
  --cb-accent-soft: #fff3e3;
  --cb-radius: 20px;
  --cb-shadow: 0 10px 30px rgba(21, 25, 43, .06);
  --cb-shadow-lg: 0 25px 60px rgba(21, 25, 43, .12);
  --cb-max: 1180px;
}

* { box-sizing: border-box; }

body.cb-v2 {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--cb-text);
  background: var(--cb-bg);
  line-height: 1.6;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

.cb-v2 h1, .cb-v2 h2, .cb-v2 h3 {
  font-family: "Sora", "Inter", sans-serif;
  color: var(--cb-ink);
  margin: 0;
}

.cb-v2 a { text-decoration: none; }

.cb-container { max-width: var(--cb-max); margin: 0 auto; padding: 0 24px; }

/* ---------- Header ---------- */

.cb-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(255, 255, 255, .7);
  -webkit-backdrop-filter: blur(14px) saturate(180%);
  backdrop-filter: blur(14px) saturate(180%);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease, box-shadow .25s ease;
}
.cb-header.cb-scrolled {
  border-color: var(--cb-border);
  box-shadow: 0 2px 20px rgba(21, 25, 43, .05);
}
.cb-header .cb-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}
.cb-logo img { height: 42px; display: block; }

.cb-nav ul {
  display: flex;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.cb-nav a {
  font-size: .95rem;
  font-weight: 600;
  color: var(--cb-text);
  transition: color .2s ease;
}
.cb-nav a:hover, .cb-nav a.active { color: var(--cb-primary); }

.cb-nav-toggle {
  display: none;
  width: 42px; height: 42px;
  border-radius: 10px;
  border: 1px solid var(--cb-border);
  background: #fff;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.cb-nav-toggle span, .cb-nav-toggle span::before, .cb-nav-toggle span::after {
  display: block;
  width: 18px; height: 2px;
  background: var(--cb-ink);
  position: relative;
  transition: transform .2s ease, opacity .2s ease;
}
.cb-nav-toggle span::before, .cb-nav-toggle span::after { content: ""; position: absolute; left: 0; }
.cb-nav-toggle span::before { top: -6px; }
.cb-nav-toggle span::after { top: 6px; }
.cb-header.cb-nav-open .cb-nav-toggle span { background: transparent; }
.cb-header.cb-nav-open .cb-nav-toggle span::before { transform: translateY(6px) rotate(45deg); }
.cb-header.cb-nav-open .cb-nav-toggle span::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 860px) {
  .cb-nav-toggle { display: flex; }
  .cb-nav {
    position: fixed;
    top: 76px; left: 0; right: 0;
    background: #fff;
    border-bottom: 1px solid var(--cb-border);
    box-shadow: var(--cb-shadow);
    max-height: 0;
    overflow: hidden;
    transition: max-height .3s ease;
  }
  .cb-header.cb-nav-open .cb-nav { max-height: 320px; }
  .cb-nav ul { flex-direction: column; gap: 0; padding: 12px 24px 20px; }
  .cb-nav ul li { border-bottom: 1px solid var(--cb-border); }
  .cb-nav ul li:last-child { border-bottom: none; }
  .cb-nav a { display: block; padding: 14px 0; }
}

/* ---------- Buttons ---------- */

.cb-btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: .95rem;
  border: none;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.cb-btn-primary {
  background: linear-gradient(135deg, var(--cb-primary), #6d28d9);
  color: #fff;
  box-shadow: 0 14px 30px rgba(67, 56, 202, .35);
}
.cb-btn-primary:hover { transform: translateY(-2px); box-shadow: 0 18px 40px rgba(67, 56, 202, .45); }
.cb-btn-outline {
  background: #fff;
  color: var(--cb-ink);
  border: 1.5px solid var(--cb-border);
}
.cb-btn-outline:hover { border-color: var(--cb-primary); color: var(--cb-primary); }
.cb-btn-block { width: 100%; justify-content: center; }

/* ---------- Hero ---------- */

.cb-hero {
  position: relative;
  padding: 170px 0 100px;
  overflow: hidden;
  background: var(--cb-bg);
}
.cb-hero::before {
  content: "";
  position: absolute;
  top: -10%; right: -10%;
  width: 60%; height: 120%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--cb-primary), transparent 80%), transparent);
  filter: blur(10px);
  z-index: 0;
}
.cb-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, var(--cb-border) 1px, transparent 1px);
  background-size: 28px 28px;
  -webkit-mask-image: linear-gradient(180deg, transparent, rgba(0,0,0,.5) 30%, transparent 75%);
  mask-image: linear-gradient(180deg, transparent, rgba(0,0,0,.5) 30%, transparent 75%);
  opacity: .5;
  z-index: 0;
}
.cb-hero .cb-container {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 48px;
  align-items: center;
}
@media (max-width: 960px) {
  .cb-hero .cb-container { grid-template-columns: 1fr; text-align: center; }
}
.cb-hero h1 {
  font-size: clamp(2.6rem, 5vw, 3.75rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  font-weight: 700;
}
.cb-hero h1 .cb-accent {
  background: linear-gradient(90deg, var(--cb-primary), var(--cb-accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.cb-hero p {
  font-size: 1.1rem;
  color: var(--cb-text);
  max-width: 540px;
  margin-top: 22px;
}
@media (max-width: 960px) { .cb-hero p { margin-inline: auto; } }
.cb-hero-actions { margin-top: 36px; }
.cb-hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
}
.cb-hero-visual .cb-card-float {
  background: #fff;
  border-radius: var(--cb-radius);
  box-shadow: var(--cb-shadow-lg);
  padding: 28px;
  border: 1px solid var(--cb-border);
}
.cb-hero-visual img {
  max-width: 280px;
  width: 100%;
  display: block;
  animation: cbFloat 5s ease-in-out infinite;
}
@keyframes cbFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}
@media (prefers-reduced-motion: reduce) {
  .cb-hero-visual img { animation: none; }
}

/* ---------- Section shells ---------- */

.cb-section { padding: 100px 0; }
.cb-section-soft { background: var(--cb-bg-soft); }
.cb-section-title { text-align: center; max-width: 620px; margin: 0 auto 56px; }
.cb-section-title h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); }
.cb-section-title p { margin-top: 12px; color: var(--cb-muted); font-size: 1.05rem; }

/* ---------- About ---------- */

.cb-about .cb-container {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 56px;
  align-items: center;
}
@media (max-width: 900px) { .cb-about .cb-container { grid-template-columns: 1fr; } }
.cb-about img {
  width: 100%;
  border-radius: var(--cb-radius);
  box-shadow: var(--cb-shadow-lg);
}
.cb-about .cb-lead { font-size: 1.2rem; color: var(--cb-ink); font-weight: 500; margin-bottom: 14px; }

/* ---------- Services ---------- */

.cb-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 900px) { .cb-grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .cb-grid-3 { grid-template-columns: 1fr; } }

.cb-service-card {
  background: #fff;
  border: 1px solid var(--cb-border);
  border-radius: var(--cb-radius);
  padding: 32px 26px;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.cb-service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--cb-shadow-lg);
  border-color: color-mix(in srgb, var(--cb-primary), transparent 60%);
}
.cb-service-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--cb-primary-soft), var(--cb-accent-soft));
  color: var(--cb-primary);
  font-size: 1.35rem;
  margin-bottom: 18px;
}
.cb-service-card h3 { font-size: 1.12rem; margin-bottom: 10px; }
.cb-service-card p { margin: 0; color: var(--cb-text); font-size: .96rem; }

/* ---------- Pricing ---------- */

.cb-pricing-note { text-align: center; }

.cb-pricing-card {
  position: relative;
  background: #fff;
  border: 1px solid var(--cb-border);
  border-radius: var(--cb-radius);
  padding: 40px 30px;
  display: flex;
  flex-direction: column;
  transition: transform .25s ease, box-shadow .25s ease;
}
.cb-pricing-card:hover { transform: translateY(-4px); box-shadow: var(--cb-shadow); }
.cb-pricing-card.cb-featured {
  background: linear-gradient(165deg, var(--cb-ink), #262b45);
  color: #fff;
  border-color: transparent;
  box-shadow: var(--cb-shadow-lg);
  transform: scale(1.03);
}
@media (max-width: 900px) { .cb-pricing-card.cb-featured { transform: none; } }
.cb-pricing-card .cb-badge {
  position: absolute;
  top: -14px; left: 50%;
  transform: translateX(-50%);
  background: var(--cb-accent);
  color: #4a2c00;
  font-size: .78rem;
  font-weight: 700;
  padding: 6px 16px;
  border-radius: 999px;
  letter-spacing: .02em;
}
.cb-plan-name { font-size: 1.3rem; font-weight: 700; }
.cb-plan-desc { color: var(--cb-muted); font-size: .92rem; margin-top: 6px; }
.cb-pricing-card.cb-featured .cb-plan-desc { color: rgba(255,255,255,.7); }
.cb-price { display: flex; align-items: baseline; gap: 6px; margin: 28px 0 26px; }
.cb-price .cb-currency { font-size: 1.1rem; color: var(--cb-muted); font-weight: 600; }
.cb-pricing-card.cb-featured .cb-price .cb-currency { color: rgba(255,255,255,.7); }
.cb-price .cb-amount { font-size: 3rem; font-weight: 700; letter-spacing: -0.02em; }
.cb-price .cb-period { font-size: 1rem; color: var(--cb-muted); }
.cb-pricing-card.cb-featured .cb-price .cb-period { color: rgba(255,255,255,.7); }
.cb-features { list-style: none; margin: 0 0 28px; padding: 0; flex: 1; }
.cb-features li { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; font-size: .94rem; }
.cb-features li i { color: var(--cb-primary); margin-top: 3px; flex-shrink: 0; }
.cb-pricing-card.cb-featured .cb-features li i { color: var(--cb-accent); }
.cb-pricing-card.cb-featured .cb-features li { color: rgba(255,255,255,.88); }
.cb-plan-btn {
  display: block;
  text-align: center;
  padding: 13px;
  border-radius: 999px;
  font-weight: 600;
  border: 1.5px solid var(--cb-primary);
  color: var(--cb-primary);
  transition: all .2s ease;
}
.cb-plan-btn:hover { background: var(--cb-primary); color: #fff; }
.cb-pricing-card.cb-featured .cb-plan-btn { background: var(--cb-accent); border-color: var(--cb-accent); color: #3a2300; }
.cb-pricing-card.cb-featured .cb-plan-btn:hover { background: #f2994a; border-color: #f2994a; }

/* ---------- Contact ---------- */

.cb-contact-form { max-width: 720px; margin: 0 auto; }
.cb-form-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 18px; margin-bottom: 18px; }
@media (max-width: 760px) { .cb-form-row { grid-template-columns: 1fr; } }
.cb-field label {
  display: block;
  font-size: .82rem;
  font-weight: 600;
  color: var(--cb-ink);
  margin-bottom: 6px;
}
.cb-field input, .cb-field textarea {
  width: 100%;
  padding: 13px 16px;
  border-radius: 12px;
  border: 1.5px solid var(--cb-border);
  font-family: inherit;
  font-size: .95rem;
  color: var(--cb-ink);
  background: #fff;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.cb-field input:focus, .cb-field textarea:focus {
  outline: none;
  border-color: var(--cb-primary);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--cb-primary), transparent 85%);
}
.cb-field.cb-field-full { margin-bottom: 22px; }

/* ---------- Footer ---------- */

.cb-footer {
  border-top: 1px solid var(--cb-border);
  padding: 32px 0;
}
.cb-footer .cb-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: .9rem;
  color: var(--cb-muted);
}
.cb-footer a { font-weight: 600; color: var(--cb-text); }
.cb-footer a:hover { color: var(--cb-primary); }

/* ---------- Scroll top ---------- */

.cb-scroll-top {
  position: fixed;
  right: 24px; bottom: 24px;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--cb-ink);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity .25s ease, transform .25s ease;
  z-index: 90;
}
.cb-scroll-top.cb-visible { opacity: 1; pointer-events: auto; transform: translateY(0); }

/* ---------- Reveal ---------- */

.cb-reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.cb-reveal.cb-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) { .cb-reveal { opacity: 1; transform: none; transition: none; } }
.cb-grid-3 > .cb-reveal:nth-child(2) { transition-delay: .08s; }
.cb-grid-3 > .cb-reveal:nth-child(3) { transition-delay: .16s; }
.cb-grid-3 > .cb-reveal:nth-child(4) { transition-delay: .24s; }
.cb-grid-3 > .cb-reveal:nth-child(5) { transition-delay: .32s; }
.cb-grid-3 > .cb-reveal:nth-child(6) { transition-delay: .4s; }
