/* ===========================================
   Credorra — Design Tokens & Base
   =========================================== */

:root {
  /* Brand purple scale (kept as --blue-* for legacy compatibility) */
  --blue-50:  #F5EEFE;
  --blue-100: #EADAFD;
  --blue-200: #D4B6FB;
  --blue-300: #B68AF6;
  --blue-400: #9760F1;
  --blue-500: #7C3BED;   /* primary */
  --blue-600: #6526C9;
  --blue-700: #501B9F;
  --blue-800: #3A1478;
  --blue-900: #260F4F;

  /* Convenience aliases (new code can use these) */
  --brand-50:  #F5EEFE;
  --brand-100: #EADAFD;
  --brand-200: #D4B6FB;
  --brand-300: #B68AF6;
  --brand-400: #9760F1;
  --brand-500: #7C3BED;
  --brand-600: #6526C9;
  --brand-700: #501B9F;
  --brand-800: #3A1478;
  --brand-900: #260F4F;

  /* Ink / neutrals (warmed slightly toward purple for cohesion) */
  --ink-950: #0E0A22;
  --ink-800: #1A152F;
  --ink-700: #2D2745;
  --ink-500: #5E5775;
  --ink-400: #7E7894;
  --ink-300: #A7A2BD;
  --ink-200: #D1CEE0;
  --ink-100: #E7E5F0;
  --ink-50:  #F2F0F8;

  --paper:       #FFFFFF;
  --paper-soft:  #FAFBFD;
  --paper-dim:   #F5F7FB;

  /* Accents */
  --accent-mint: #B5F0CF;
  --accent-amber:#FFD37A;
  --accent-rose: #FFB5C5;

  --primary: var(--blue-500);
  --primary-ink: var(--blue-700);

  /* Type */
  --font-sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-serif: "Instrument Serif", "Cormorant Garamond", Georgia, serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Radii */
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-2xl: 36px;
  --radius-pill: 999px;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(38, 15, 79, 0.06);
  --shadow-sm: 0 2px 6px rgba(38, 15, 79, 0.06), 0 1px 2px rgba(38, 15, 79, 0.04);
  --shadow-md: 0 10px 30px -10px rgba(38, 15, 79, 0.18), 0 2px 6px rgba(38, 15, 79, 0.04);
  --shadow-lg: 0 24px 60px -20px rgba(38, 15, 79, 0.25), 0 4px 12px rgba(38, 15, 79, 0.06);
  --shadow-blue: 0 18px 40px -12px rgba(124, 59, 237, 0.45);
  --shadow-brand: 0 18px 40px -12px rgba(124, 59, 237, 0.45);

  /* Layout */
  --container: 1240px;
  --gutter: 24px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink-950);
  font-family: var(--font-sans);
  font-feature-settings: "ss01", "ss02", "cv11";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img, svg { display: block; max-width: 100%; }

::selection { background: var(--blue-200); color: var(--blue-800); }

/* ---------- Layout helpers ---------- */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.wide { max-width: 1440px; }
.narrow { max-width: 920px; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--primary);
}
.eyebrow::before {
  content: "";
  width: 18px;
  height: 1px;
  background: currentColor;
}

h1, h2, h3, h4 {
  font-family: var(--font-sans);
  font-weight: 500;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--ink-950);
  text-wrap: balance;
}

h1 { font-size: clamp(48px, 6.4vw, 92px); line-height: 0.98; letter-spacing: -0.035em; font-weight: 500; }
h2 { font-size: clamp(36px, 4.4vw, 64px); line-height: 1.02; letter-spacing: -0.03em; }
h3 { font-size: clamp(22px, 2vw, 28px); line-height: 1.15; }
h4 { font-size: 18px; line-height: 1.3; }

p { margin: 0; color: var(--ink-700); line-height: 1.5; }

.serif { font-family: var(--font-serif); font-style: italic; font-weight: 400; letter-spacing: -0.01em; }

.mono { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.04em; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 18px;
  border-radius: var(--radius-pill);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.005em;
  border: 1px solid transparent;
  transition: transform .15s ease, background .2s ease, color .2s ease, border-color .2s ease, box-shadow .2s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--ink-950);
  color: var(--paper);
}
.btn-primary:hover {
  background: var(--blue-500);
  box-shadow: var(--shadow-blue);
}

.btn-blue {
  background: var(--blue-500);
  color: var(--paper);
  box-shadow: 0 1px 0 rgba(255,255,255,0.2) inset, var(--shadow-sm);
}
.btn-blue:hover { background: var(--blue-600); box-shadow: var(--shadow-blue); }

.btn-ghost {
  background: transparent;
  color: var(--ink-950);
  border-color: var(--ink-100);
}
.btn-ghost:hover { border-color: var(--ink-300); background: var(--paper-soft); }

.btn-link {
  height: auto;
  padding: 0;
  background: transparent;
  border: 0;
  color: var(--ink-950);
  font-size: 15px;
  border-radius: 0;
  position: relative;
}
.btn-link::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -3px;
  height: 1px;
  background: currentColor;
  transform-origin: left;
  transition: transform .25s ease;
}
.btn-link:hover::after { transform: scaleX(0.5); }

.btn-arrow svg { transition: transform .2s ease; }
.btn-arrow:hover svg { transform: translateX(3px); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,0.82);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid rgba(10, 15, 34, 0.06);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 32px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-size: 19px;
  color: var(--ink-950);
}
.brand__mark {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: radial-gradient(120% 100% at 0% 0%, var(--blue-400), var(--blue-600) 70%);
  position: relative;
  box-shadow: 0 6px 14px -4px rgba(30,91,255,0.6), 0 1px 0 rgba(255,255,255,0.5) inset;
}
.brand__mark::after {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 4px;
  background:
    radial-gradient(circle at 30% 30%, rgba(255,255,255,0.85), transparent 55%),
    linear-gradient(135deg, transparent 40%, rgba(255,255,255,0.25) 60%);
}

.nav-main {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-main a {
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  font-size: 14.5px;
  color: var(--ink-700);
  transition: color .15s ease, background .15s ease;
}
.nav-main a:hover { color: var(--ink-950); background: var(--paper-dim); }
.nav-main a.is-active { color: var(--ink-950); background: var(--paper-dim); }

.header-cta {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink-950);
  color: var(--ink-200);
  padding: 80px 0 32px;
  margin-top: 120px;
}
.site-footer h4 {
  color: var(--paper);
  font-size: 13px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 500;
  margin-bottom: 18px;
}
.site-footer a {
  display: block;
  padding: 6px 0;
  color: var(--ink-300);
  font-size: 14.5px;
  transition: color .15s ease;
}
.site-footer a:hover { color: var(--paper); }

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 60px;
  padding-bottom: 60px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.footer-tagline {
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: var(--paper);
  font-weight: 500;
  max-width: 380px;
  margin-bottom: 24px;
}
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 28px;
  font-size: 13px;
  color: var(--ink-400);
}
.footer-bottom .brand { color: var(--paper); }

/* ---------- Sections ---------- */
section {
  position: relative;
}
.section {
  padding: 120px 0;
}
.section-tight {
  padding: 80px 0;
}

.section-head {
  max-width: 720px;
  margin-bottom: 56px;
}
.section-head h2 {
  margin-top: 18px;
}
.section-head p {
  margin-top: 20px;
  font-size: 18px;
  color: var(--ink-500);
  max-width: 580px;
}

/* ---------- Cards ---------- */
.card {
  background: var(--paper);
  border: 1px solid var(--ink-100);
  border-radius: var(--radius-lg);
  padding: 28px;
}

/* ---------- Misc ---------- */
.hr {
  height: 1px;
  background: var(--ink-100);
  border: 0;
  margin: 0;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 28px;
  padding: 0 12px;
  border-radius: var(--radius-pill);
  background: var(--blue-50);
  color: var(--blue-700);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: -0.005em;
}
.chip .dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--blue-500);
  box-shadow: 0 0 0 3px var(--blue-100);
}

/* ---------- Marquee ---------- */
.marquee {
  overflow: hidden;
  position: relative;
  mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
}
.marquee__track {
  display: flex;
  gap: 24px;
  width: max-content;
  animation: marquee 50s linear infinite;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.marquee--slow .marquee__track { animation-duration: 80s; }
.marquee--reverse .marquee__track { animation-direction: reverse; }

/* ---------- Reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .8s cubic-bezier(0.2, 0.7, 0.2, 1), transform .8s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.reveal.is-in {
  opacity: 1;
  transform: translateY(0);
}

/* ===========================================
   Responsive — global
   =========================================== */

/* Mobile-friendly container padding */
@media (max-width: 720px) {
  :root { --gutter: 18px; }
}
@media (max-width: 420px) {
  :root { --gutter: 14px; }
}

/* Typography refinement on small screens */
@media (max-width: 720px) {
  h1 { font-size: clamp(36px, 8.4vw, 56px); line-height: 1.02; }
  h2 { font-size: clamp(28px, 6.6vw, 40px); }
  h3 { font-size: 20px; }
  .section-head { margin-bottom: 36px; }
  .section-head p { font-size: 16px; }
}
@media (max-width: 420px) {
  h1 { font-size: clamp(32px, 9vw, 44px); letter-spacing: -0.025em; }
  h2 { font-size: clamp(26px, 7.4vw, 34px); letter-spacing: -0.02em; }
}

/* Section spacing — global step-down on small screens */
@media (max-width: 1024px) { .section { padding: 96px 0; } }
@media (max-width: 720px)  { .section { padding: 72px 0; } .section-tight { padding: 56px 0; } }
@media (max-width: 420px)  { .section { padding: 56px 0; } .section-tight { padding: 44px 0; } }

/* ---------- Mobile nav (injected by site.js) ---------- */
.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  border-radius: 12px;
  border: 1px solid var(--ink-100);
  background: var(--paper);
  align-items: center;
  justify-content: center;
  padding: 0;
  color: var(--ink-950);
  flex-shrink: 0;
}
.nav-toggle:hover { background: var(--paper-soft); }
.nav-toggle svg { display: block; }
.nav-toggle .icon-close { display: none; }
body.nav-open .nav-toggle .icon-open { display: none; }
body.nav-open .nav-toggle .icon-close { display: block; }

.mobile-nav {
  position: fixed;
  inset: 72px 0 0 0;
  z-index: 49;
  background: var(--paper);
  padding: 24px var(--gutter) 32px;
  transform: translateY(-12px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  overflow-y: auto;
  border-bottom: 1px solid var(--ink-100);
  box-shadow: 0 24px 48px -24px rgba(38, 15, 79, 0.18);
}
body.nav-open .mobile-nav {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
body.nav-open { overflow: hidden; }
.mobile-nav a.mn-link {
  display: block;
  padding: 14px 8px;
  font-size: 18px;
  font-weight: 500;
  color: var(--ink-950);
  border-bottom: 1px solid var(--ink-100);
  letter-spacing: -0.01em;
}
.mobile-nav a.mn-link:hover { color: var(--blue-700); }
.mobile-nav a.mn-link.is-active { color: var(--blue-700); }
.mobile-nav .mn-cta {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 22px;
}
.mobile-nav .mn-cta .btn { width: 100%; justify-content: center; height: 48px; }

/* Hide desktop nav, show toggle below 1080px (the nav has 7+ links) */
@media (max-width: 1080px) {
  .nav-main { display: none; }
  .nav-toggle { display: inline-flex; }
  .header-cta .btn-ghost { display: none; }
}
@media (max-width: 540px) {
  .header-cta .btn-primary,
  .header-cta .btn-blue { display: none; }
}

/* Header tightening */
@media (max-width: 720px) {
  .site-header__inner { height: 64px; gap: 16px; }
  .mobile-nav { inset: 64px 0 0 0; }
  .brand { font-size: 17px; }
  .brand__mark { width: 24px; height: 24px; }
}

/* Buttons on mobile */
@media (max-width: 420px) {
  .btn { height: 42px; padding: 0 16px; font-size: 14.5px; }
}

/* Footer */
@media (max-width: 920px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; padding-bottom: 40px; }
  .site-footer { padding: 64px 0 32px; margin-top: 80px; }
  .footer-tagline { font-size: clamp(22px, 4.6vw, 30px); }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }
}

/* Page hero */
@media (max-width: 720px) {
  .page-hero { padding: 56px 0 40px; }
}

/* ===========================================
   Responsive sweep — page-level polish
   =========================================== */

/* HEADER fine-tuning so brand never collides with toggle */
@media (max-width: 720px) {
  .site-header__inner { gap: 12px; }
  .nav-toggle { width: 40px; height: 40px; border-radius: 10px; }
}
@media (max-width: 380px) {
  .header-cta { gap: 6px; }
}

/* HERO — tighten on small screens */
@media (max-width: 920px) {
  .hero { padding: 56px 0 32px; }
  .hero h1 { margin-top: 18px; }
  .hero__sub { margin-top: 20px; }
  .hero__cta { margin-top: 28px; }
  .hero__proof { margin-top: 28px; flex-wrap: wrap; gap: 14px; }
}
@media (max-width: 420px) {
  .hero { padding: 40px 0 24px; }
  .hero__cta .btn { width: 100%; justify-content: center; }
  .hero__proof-text { font-size: 12.5px; }
  .avatar-stack .av { width: 30px; height: 30px; }
}

/* DASHMOCK — make stats fit nicely */
@media (max-width: 480px) {
  .dashmock { padding: 14px; border-radius: var(--radius-lg); }
  .dashmock__stats { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .stat__value { font-size: 18px; }
  .dashmock__head h4 { font-size: 13px; }
  .dashmock__chart { height: 96px; padding: 12px; }
}

/* LOGO BAR — wrap nicely on phones */
@media (max-width: 420px) {
  .logobar__row { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .logobar__item { font-size: 16px; }
}

/* FEATURES bento → single column already at 560 — tighten paddings */
@media (max-width: 560px) {
  .feat { padding: 24px; }
  .feat h3 { font-size: 20px; }
}

/* PLATFORMS */
@media (max-width: 560px) {
  .platform { padding: 28px; }
}

/* TESTIMONIALS — let metric tiles wrap, not crush */
.testimonial > div[style*="display:flex"] { flex-wrap: wrap; }
@media (max-width: 720px) {
  .testimonial { padding: 24px; }
  .testimonial__metric { font-size: 36px !important; }
}
@media (max-width: 420px) {
  .testimonial__metric { font-size: 28px !important; }
}

/* CALCULATOR PREVIEW (dark card on landing) */
@media (max-width: 560px) {
  .calc { padding: 28px; border-radius: var(--radius-lg); }
  .calc__panel { padding: 20px; }
  .calc__total { font-size: 26px; }
  .calc__cta { flex-direction: column; align-items: stretch; }
  .calc__cta .btn { width: 100%; justify-content: center; }
}

/* PRICING tiers */
@media (max-width: 720px) {
  .tier { padding: 28px 24px; }
  .tier__price { font-size: 44px; }
}

/* PRICING comparison table — horizontal scroll on mobile */
.compare {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.compare table { min-width: 640px; }
@media (max-width: 720px) {
  .compare th, .compare td { padding: 12px 14px; font-size: 13.5px; }
}

/* CASE STUDY bars — fit phone width */
@media (max-width: 720px) {
  .bars { gap: 8px; min-height: 140px; }
  .bar__lbl { font-size: 10px; letter-spacing: 0.04em; }
  .bar__val { font-size: 12px; }
  .case { padding: 56px 0; }
  .case__head { gap: 16px; margin-bottom: 28px; }
  .case__duration { padding-left: 0; border-left: 0; text-align: left; }
  .chart-block { padding: 22px; }
}

/* CALCULATOR PAGE form */
@media (max-width: 560px) {
  .calc-form { padding: 24px; }
  .result-hero { padding: 28px; }
  .result-cell { padding: 20px; }
  .result-cell .val { font-size: 26px; }
  .result-grid { grid-template-columns: 1fr; }
}

/* FAQ + final CTA */
@media (max-width: 560px) {
  .faq-item__q { font-size: 16px; padding: 20px 0; gap: 14px; }
  .faq-item__a p { font-size: 14.5px; }
  .final-cta { padding: 56px 24px; border-radius: var(--radius-xl); }
  .final-cta__buttons .btn { width: 100%; justify-content: center; }
}

/* Marquee cards size */
@media (max-width: 480px) {
  .review-card { width: 280px; padding: 18px; }
}

/* Avoid horizontal overflow anywhere */
html, body { overflow-x: hidden; }
img, video { max-width: 100%; height: auto; }

/* ===========================================
   Mobile hardening — covers tight phones
   =========================================== */

/* Dashmock URL pill must truncate, not overflow */
.dashmock__top { flex-wrap: nowrap; min-width: 0; }
.dashmock__top .url {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex: 1;
}

/* Hero CTA stack vertically on tight phones, full width buttons */
@media (max-width: 480px) {
  .hero__cta { flex-direction: column; align-items: stretch; }
  .hero__cta .btn { width: 100%; justify-content: center; }
  .hero__proof { align-items: flex-start; }
  .hero__proof-text { line-height: 1.4; }
}

/* Section heads — keep prose readable */
@media (max-width: 720px) {
  .section-head { max-width: 100%; }
  .section-head p { font-size: 15.5px; max-width: 100%; }
}

/* Testimonials — robust at any size */
@media (max-width: 720px) {
  .testimonial blockquote { font-size: 18px !important; line-height: 1.3; }
  .testimonial--big blockquote { font-size: 20px !important; }
  .testimonials { gap: 14px; }
}
.testimonial > div[style*="display:flex"],
.testimonial > div[style*="display: flex"] {
  flex-wrap: wrap !important;
  row-gap: 14px;
}

/* Calc preview total wraps on tight phones */
@media (max-width: 420px) {
  .calc__total { font-size: 22px; }
  .calc__total small { display: block; margin-left: 0; margin-top: 2px; }
  .calc__row { font-size: 13.5px; }
}

/* Pricing tier — featured tag, suffix wrap */
@media (max-width: 560px) {
  .tier__price-suffix { display: block; margin-left: 0; margin-top: 4px; font-size: 13px; }
  .tier__tag { top: 12px; right: 12px; }
  .tier__price { font-size: 40px; }
}

/* FAQ + how-it-works step icon */
@media (max-width: 480px) {
  .step { padding: 24px; min-height: auto; }
  .step__icon { width: 48px; height: 48px; }
  .step h3 { margin-top: 18px; font-size: 19px; }
  .platforms { gap: 14px; }
  .platform { padding: 24px; gap: 14px; }
  .platform__logo { width: 48px; height: 48px; font-size: 19px; }
}

/* Site header — ensure brand label never crowds buttons */
@media (max-width: 380px) {
  .brand { font-size: 16px; gap: 8px; }
  .brand__mark { width: 22px; height: 22px; }
}

/* Min-width:0 so flex/grid children can shrink instead of overflowing */
.site-header__inner > *,
.hero__proof > *,
.testimonial__author > *,
.review-card__head > *,
.dashmock__head > * {
  min-width: 0;
}

/* Mobile nav: better readable links */
@media (max-width: 480px) {
  .mobile-nav a.mn-link { padding: 16px 6px; font-size: 17px; }
}

/* Buttons inside text-heavy CTAs should wrap if needed */
.btn { max-width: 100%; }
