/* ==========================================================================
   Carto Development — main stylesheet
   Palette: charcoal #1A1F2C  /  emerald #10B981  /  cream #FAF7F2
   ========================================================================== */

:root {
  --charcoal: #1A1F2C;
  --charcoal-soft: #2A3142;
  --emerald: #10B981;
  --emerald-dark: #059669;
  --emerald-tint: #ECFDF5;
  --cream: #FAF7F2;
  --white: #FFFFFF;
  --text: #1F2937;
  --text-muted: #6B7280;
  --border: #E5E7EB;
  --border-soft: #F3F4F6;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 16px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 20px 40px rgba(15, 23, 42, 0.08);
  --radius: 12px;
  --radius-lg: 18px;
  --maxw: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; display: block; }

a {
  color: var(--emerald-dark);
  text-decoration: none;
  transition: color 0.15s ease;
}
a:hover { color: var(--charcoal); }

h1, h2, h3, h4 {
  font-weight: 700;
  color: var(--charcoal);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2.2rem, 4.5vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
h3 { font-size: 1.25rem; }
p  { margin: 0 0 1em; color: var(--text-muted); }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 5rem 0;
}
.section--tight { padding: 3.5rem 0; }
.section--dark {
  background: var(--charcoal);
  color: var(--cream);
}
.section--dark h2, .section--dark h3 { color: var(--white); }
.section--dark p { color: rgba(250, 247, 242, 0.75); }

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--emerald-dark);
  margin-bottom: 0.75rem;
}
.section--dark .eyebrow { color: var(--emerald); }

.section-head {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 3rem;
}
.section-head p { font-size: 1.1rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.4rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.18s ease;
  white-space: nowrap;
  text-align: center;
}
.btn--primary {
  background: var(--emerald);
  color: var(--white);
}
.btn--primary:hover {
  background: var(--emerald-dark);
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.25);
}
.btn--secondary {
  background: transparent;
  color: var(--charcoal);
  border-color: var(--charcoal);
}
.btn--secondary:hover {
  background: var(--charcoal);
  color: var(--white);
}
.btn--ghost {
  background: transparent;
  color: var(--cream);
  border-color: rgba(250, 247, 242, 0.3);
}
.btn--ghost:hover {
  background: var(--cream);
  color: var(--charcoal);
}
.btn--lg { padding: 1rem 1.75rem; font-size: 1rem; }
.btn--block { display: flex; width: 100%; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 247, 242, 0.92);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border-soft);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--charcoal);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}
.brand:hover { color: var(--charcoal); }
.brand__accent { color: var(--emerald-dark); }
.brand__mark {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  filter: drop-shadow(0 1px 2px rgba(15, 23, 42, 0.12));
}
.brand__text small {
  display: block;
  font-weight: 500;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: -2px;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav__links a {
  color: var(--text);
  font-weight: 500;
  font-size: 0.95rem;
}
.nav__links a:hover, .nav__links a.is-active {
  color: var(--charcoal);
}
.nav__links a.is-active {
  position: relative;
}
.nav__links a.is-active::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  bottom: -6px;
  height: 2px;
  background: var(--emerald);
  border-radius: 2px;
}

.nav__cta { margin-left: 1rem; }

.nav__toggle {
  display: none;
  background: none;
  border: 0;
  padding: 0.4rem;
  cursor: pointer;
}
.nav__toggle span {
  display: block;
  width: 24px; height: 2px;
  background: var(--charcoal);
  margin: 5px 0;
  transition: transform 0.2s ease;
  border-radius: 2px;
}

/* ---------- Hero ---------- */
.hero {
  padding: 5rem 0 4rem;
  background:
    radial-gradient(1000px 500px at 80% -20%, rgba(16,185,129,0.10), transparent 60%),
    radial-gradient(800px 400px at 10% 110%, rgba(16,185,129,0.06), transparent 60%),
    var(--cream);
  position: relative;
  overflow: hidden;
}
.hero__grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
  align-items: center;
}
.hero__tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.85rem;
  background: var(--emerald-tint);
  color: var(--emerald-dark);
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
}
.hero__tag::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--emerald);
}
.hero h1 { margin-bottom: 1.2rem; }
.hero__sub {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  max-width: 540px;
}
.hero__actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1.75rem;
}
.hero__meta {
  display: flex;
  gap: 1.5rem;
  font-size: 0.88rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}
.hero__meta span { display: inline-flex; align-items: center; gap: 0.35rem; }
.hero__meta .check {
  color: var(--emerald-dark);
  font-weight: 700;
}

/* Hero visual — stylized browser preview */
.hero__visual {
  position: relative;
}
.browser {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  transform: rotate(-1deg);
  transition: transform 0.4s ease;
}
.browser:hover { transform: rotate(0deg); }
.browser__bar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.75rem 1rem;
  background: #F4F5F7;
  border-bottom: 1px solid var(--border);
}
.browser__bar i {
  width: 11px; height: 11px;
  border-radius: 50%;
  background: #E5E7EB;
}
.browser__bar i:nth-child(1) { background: #FF6058; }
.browser__bar i:nth-child(2) { background: #FFBE2E; }
.browser__bar i:nth-child(3) { background: #28CA42; }
.browser__bar span {
  margin-left: 0.75rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  font-family: 'SF Mono', Menlo, monospace;
}
.browser__body { padding: 1.5rem; }
.browser__hero {
  background: linear-gradient(135deg, var(--charcoal), var(--charcoal-soft));
  border-radius: 10px;
  padding: 1.5rem;
  color: var(--cream);
  margin-bottom: 1rem;
}
.browser__hero h4 {
  color: var(--white);
  font-size: 1.1rem;
  margin: 0 0 0.4rem;
}
.browser__hero p {
  color: rgba(250,247,242,0.7);
  font-size: 0.82rem;
  margin: 0 0 0.85rem;
}
.browser__hero .pill {
  display: inline-block;
  padding: 0.35rem 0.7rem;
  background: var(--emerald);
  color: var(--white);
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
}
.browser__grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.6rem;
}
.browser__tile {
  background: var(--cream);
  border-radius: 8px;
  padding: 0.85rem 0.7rem;
  font-size: 0.72rem;
  color: var(--text-muted);
}
.browser__tile strong {
  display: block;
  color: var(--charcoal);
  font-size: 0.9rem;
  margin-bottom: 0.15rem;
}

/* ---------- Feature / card grids ---------- */
.grid {
  display: grid;
  gap: 1.5rem;
}
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: #DCE5DE;
}
.card__icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: var(--emerald-tint);
  color: var(--emerald-dark);
  display: grid; place-items: center;
  margin-bottom: 1rem;
  font-size: 1.2rem;
  font-weight: 700;
}
.card h3 { margin-bottom: 0.5rem; }
.card p { margin: 0; }

/* ---------- Problem callout ---------- */
.problem {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  border: 1px solid var(--border);
}
.problem__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.problem__list li {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  font-size: 0.98rem;
  color: var(--text);
}
.problem__list li::before {
  content: "✕";
  flex-shrink: 0;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: #FEE2E2;
  color: #B91C1C;
  display: grid; place-items: center;
  font-size: 0.8rem;
  font-weight: 700;
}

/* ---------- Steps / process ---------- */
.steps {
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}
.step {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  position: relative;
}
.step::before {
  counter-increment: step;
  content: "0" counter(step);
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--emerald-dark);
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}
.step h3 { font-size: 1.1rem; margin-bottom: 0.4rem; }
.step p { margin: 0; font-size: 0.95rem; }

/* ---------- Pricing ---------- */
.pricing {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  align-items: stretch;
}
.plan {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  position: relative;
}
.plan--featured {
  border: 2px solid var(--emerald);
  box-shadow: 0 24px 50px rgba(16,185,129,0.15);
  transform: translateY(-8px);
}
.plan__badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--emerald);
  color: var(--white);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
}
.plan h3 {
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.plan__price {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--charcoal);
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 0.25rem;
}
.plan__price small {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
}
.plan__tagline {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}
.plan__features {
  list-style: none;
  margin: 0 0 2rem;
  padding: 0;
  flex: 1;
}
.plan__features li {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  font-size: 0.92rem;
  color: var(--text);
  margin-bottom: 0.7rem;
}
.plan__features li::before {
  content: "✓";
  flex-shrink: 0;
  color: var(--emerald-dark);
  font-weight: 700;
}

/* ---------- Add-ons table ---------- */
.addons {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.addons__row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1.5rem;
  padding: 1.25rem 1.75rem;
  border-bottom: 1px solid var(--border-soft);
  align-items: center;
}
.addons__row:last-child { border-bottom: 0; }
.addons__row:hover { background: var(--cream); }
.addons__row h4 {
  font-size: 1rem;
  margin: 0 0 0.2rem;
}
.addons__row p {
  margin: 0;
  font-size: 0.88rem;
}
.addons__price {
  font-weight: 700;
  color: var(--emerald-dark);
  font-size: 1rem;
  white-space: nowrap;
}

/* ---------- FAQ ---------- */
.faq {
  max-width: 760px;
  margin: 0 auto;
}
.faq__item {
  border-bottom: 1px solid var(--border);
  padding: 1.25rem 0;
}
.faq__q {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--charcoal);
  text-align: left;
}
.faq__q::after {
  content: "+";
  font-size: 1.6rem;
  color: var(--emerald-dark);
  font-weight: 400;
  transition: transform 0.2s ease;
}
.faq__item.is-open .faq__q::after { content: "−"; }
.faq__a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, margin 0.3s ease;
}
.faq__item.is-open .faq__a {
  max-height: 400px;
  margin-top: 0.75rem;
}
.faq__a p { margin: 0; }

/* ---------- CTA strip ---------- */
.cta-strip {
  background: linear-gradient(135deg, var(--charcoal), var(--charcoal-soft));
  border-radius: var(--radius-lg);
  padding: 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  color: var(--cream);
  position: relative;
  overflow: hidden;
}
.cta-strip::before {
  content: "";
  position: absolute;
  top: -50%; right: -10%;
  width: 60%; height: 200%;
  background: radial-gradient(circle, rgba(16,185,129,0.18), transparent 60%);
  pointer-events: none;
}
.cta-strip h2 {
  color: var(--white);
  margin: 0 0 0.5rem;
  position: relative;
}
.cta-strip p {
  color: rgba(250,247,242,0.78);
  margin: 0;
  position: relative;
}
.cta-strip__actions {
  display: flex;
  gap: 0.75rem;
  flex-shrink: 0;
  position: relative;
}

/* ---------- Page hero (interior pages) ---------- */
.page-hero {
  padding: 5rem 0 3rem;
  text-align: center;
  background:
    radial-gradient(800px 400px at 50% -50%, rgba(16,185,129,0.10), transparent 60%),
    var(--cream);
}
.page-hero p {
  font-size: 1.15rem;
  max-width: 620px;
  margin: 0 auto;
}

/* ---------- Industries chips ---------- */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: center;
}
.chip {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.55rem 1.15rem;
  font-size: 0.9rem;
  color: var(--text);
  font-weight: 500;
}

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: 3rem;
}
.form {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
}
.form__row {
  margin-bottom: 1.1rem;
}
.form__row label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--charcoal);
  margin-bottom: 0.4rem;
}
.form__row input,
.form__row select,
.form__row textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text);
  background: var(--cream);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.form__row input:focus,
.form__row select:focus,
.form__row textarea:focus {
  outline: none;
  border-color: var(--emerald);
  box-shadow: 0 0 0 3px rgba(16,185,129,0.15);
  background: var(--white);
}
.form__row textarea { min-height: 130px; resize: vertical; }
.form__cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.contact-info {
  background: var(--charcoal);
  color: var(--cream);
  border-radius: var(--radius-lg);
  padding: 2rem;
}
.contact-info h3 { color: var(--white); margin-bottom: 1.25rem; }
.contact-info ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.contact-info li {
  margin-bottom: 1.25rem;
  font-size: 0.95rem;
  color: rgba(250,247,242,0.78);
}
.contact-info li strong {
  display: block;
  color: var(--white);
  font-weight: 600;
  margin-bottom: 0.15rem;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.contact-info a {
  color: var(--emerald);
}
.contact-info a:hover { color: var(--white); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--charcoal);
  color: rgba(250,247,242,0.7);
  padding: 4rem 0 2rem;
  margin-top: 2rem;
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 3rem;
}
.footer__brand p {
  color: rgba(250,247,242,0.65);
  margin-top: 1rem;
  font-size: 0.92rem;
  max-width: 320px;
}
.footer__col h4 {
  color: var(--white);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}
.footer__col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer__col li { margin-bottom: 0.6rem; }
.footer__col a {
  color: rgba(250,247,242,0.7);
  font-size: 0.93rem;
}
.footer__col a:hover { color: var(--emerald); }
.footer__bottom {
  border-top: 1px solid rgba(250,247,242,0.1);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: rgba(250,247,242,0.55);
  flex-wrap: wrap;
  gap: 1rem;
}
.footer__brand .brand { color: var(--white); }
.footer__brand .brand__text small { color: rgba(250,247,242,0.55); }

/* ---------- About / story ---------- */
.story {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}
.story__visual {
  background: linear-gradient(135deg, var(--emerald-tint), var(--cream));
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  border: 1px solid var(--border);
}
.story__stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
.story__stat strong {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  color: var(--charcoal);
  letter-spacing: -0.02em;
}
.story__stat span {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ---------- Utility ---------- */
.center { text-align: center; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mb-2 { margin-bottom: 2rem; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .hero__grid { grid-template-columns: 1fr; }
  .hero__visual { order: -1; }
  .pricing { grid-template-columns: 1fr; }
  .plan--featured { transform: none; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .problem__list { grid-template-columns: 1fr; }
  .story { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .cta-strip { flex-direction: column; text-align: center; align-items: stretch; padding: 2rem; }
  .cta-strip__actions { justify-content: center; flex-wrap: wrap; }
}

@media (max-width: 680px) {
  .section { padding: 3.5rem 0; }
  .nav__links {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    background: var(--cream);
    padding: 1rem 1.5rem 1.5rem;
    gap: 1rem;
    align-items: stretch;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
  }
  .nav__links.is-open { display: flex; }
  .nav__cta { margin-left: 0; }
  .nav__toggle { display: block; }
  .grid--3, .grid--4, .grid--2 { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .form__cols { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .hero__actions .btn { flex: 1; }
}
