/* Bavlin Solutions — marketing site
   Family resemblance to AppealSwift: Fraunces display, pine-green accent,
   warm neutrals — recast for a broader B2B automation agency. */

:root {
  --ink: #0F1A17;
  --ink-soft: #33403B;
  --muted: #55635E;
  --faint: #8A968F;
  --bg: #FAFAF7;
  --bg-alt: #F2F1EB;
  --card: #FFFFFF;
  --border: #E6E3DC;

  --accent: #0E7A5F;
  --accent-dark: #0B6A52;
  --accent-bright: #14B88A;
  --accent-tint: #E7F3EF;

  --hero-1: #0F1A17;
  --hero-2: #123C31;

  --header-bg: rgba(250, 250, 247, .85);

  --radius: 12px;
  --radius-sm: 8px;
  --max: 1160px;

  --shadow-sm: 0 1px 2px rgb(15 26 23 / 5%);
  --shadow-md: 0 10px 30px rgb(15 26 23 / 8%);

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Dark theme — deep blue-slate surfaces, same pine-green identity with a
   brighter accent so contrast holds (mirrors AppealSwift's dark palette). */
[data-theme="dark"] {
  --ink: #E9EEF0;
  --ink-soft: #C4CFD3;
  --muted: #A7B4BA;
  --faint: #75838B;
  --bg: #121A1E;
  --bg-alt: #161F24;
  --card: #1B2429;
  --border: #2E3A40;

  --accent: #14B88A;
  --accent-dark: #0E9E76;
  --accent-bright: #4CC5A2;
  --accent-tint: #17322A;

  --hero-1: #0C1417;
  --hero-2: #10312A;

  --header-bg: rgba(18, 26, 30, .85);

  --shadow-sm: 0 1px 2px rgb(0 0 0 / 30%);
  --shadow-md: 0 12px 34px rgb(0 0 0 / 45%);
}

* { box-sizing: border-box; }

html { color-scheme: light dark; }
[data-theme="dark"] { color-scheme: dark; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); }

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

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  font-size: 15px;
  line-height: 1;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease, border-color .15s ease, color .15s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-lg { padding: 15px 26px; font-size: 16px; }
.btn-block { width: 100%; }

.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); color: #fff; }

.btn-ghost {
  background: transparent;
  color: #EAF2EE;
  border-color: rgba(255,255,255,.28);
}
.btn-ghost:hover { background: rgba(255,255,255,.08); color: #fff; }

.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover { background: #F0EFEA; color: var(--ink); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 24px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand-mark { display: inline-flex; }
.brand-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 20px;
  letter-spacing: -0.01em;
}
.brand-sub { color: var(--accent); margin-left: 3px; }
.brand-name-light { color: #fff; }
.brand-name-light .brand-sub { color: var(--accent-bright); }

.nav { display: flex; gap: 28px; margin-left: auto; }
.nav a {
  color: var(--muted);
  font-weight: 500;
  font-size: 15px;
}
.nav a:hover { color: var(--ink); }
.header-cta { display: flex; align-items: center; gap: 10px; }

/* Theme toggle */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card);
  color: var(--muted);
  cursor: pointer;
  transition: color .15s ease, border-color .15s ease, background .15s ease;
}
.theme-toggle:hover { color: var(--ink); border-color: var(--faint); }
.theme-toggle svg { width: 19px; height: 19px; }
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
.mobile-nav .theme-toggle { width: 100%; gap: 10px; margin-top: 10px; height: 46px; }
.mobile-nav .theme-toggle .toggle-label { font-weight: 500; font-size: 15px; }

/* Inline SVG icons inherit text color and use stroke */
.icon {
  width: 24px; height: 24px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  padding: 8px;
  cursor: pointer;
}
.nav-toggle span {
  width: 22px; height: 2px; background: var(--ink); border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 24px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
/* The [hidden] attribute must win over the class's display:flex */
.mobile-nav[hidden] { display: none; }
.mobile-nav a {
  padding: 12px 4px;
  color: var(--ink);
  font-weight: 500;
  border-bottom: 1px solid var(--border);
}
.mobile-nav a.btn { border-bottom: 0; margin-top: 10px; color: #fff; }

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(1200px 500px at 80% -10%, rgba(20,184,138,.20), transparent 60%),
    linear-gradient(160deg, var(--hero-1), var(--hero-2));
  color: #EAF2EE;
  padding: 96px 0 88px;
  position: relative;
  overflow: hidden;
}
.hero-inner { max-width: 820px; }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--accent-bright);
  margin: 0 0 18px;
}
.eyebrow-dark { color: var(--accent); }
.hero-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(38px, 6vw, 60px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 22px;
  color: #fff;
}
.hero-title .hl {
  color: var(--accent-bright);
  font-style: italic;
}
.hero-sub {
  font-size: clamp(17px, 2.2vw, 20px);
  color: #C5D3CD;
  max-width: 640px;
  margin: 0 0 34px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 54px; }

.hero-proof {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
  padding-top: 30px;
  border-top: 1px solid rgba(255,255,255,.12);
}
.proof-item { display: flex; flex-direction: column; gap: 2px; }
.proof-num {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
  color: #fff;
}
.proof-label { font-size: 13.5px; color: #A9BBB4; }
.proof-divider { width: 1px; height: 34px; background: rgba(255,255,255,.14); }

/* ---------- Value strip ---------- */
.strip { background: var(--card); border-bottom: 1px solid var(--border); }
.strip-inner { padding: 64px 0; max-width: 860px; }
.strip-lead {
  font-family: var(--font-display);
  font-size: clamp(24px, 3.4vw, 32px);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin: 0 0 16px;
  color: var(--ink);
}
.strip-body { font-size: 18px; color: var(--muted); margin: 0; }

/* ---------- Sections ---------- */
.section { padding: 84px 0; }
.section-alt { background: var(--bg-alt); }
.section-head { max-width: 720px; margin: 0 0 48px; }
.section-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 12px 0 14px;
  color: var(--ink);
}
.section-intro { font-size: 18px; color: var(--muted); margin: 0; }

/* ---------- Cards ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 26px;
  box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: #D8D4CB; }
.card-icon {
  width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  color: var(--accent);
  background: var(--accent-tint);
  border-radius: 12px;
  margin-bottom: 18px;
}
.card-icon .icon { width: 24px; height: 24px; }
.card h3 { font-size: 19px; margin: 0 0 8px; color: var(--ink); letter-spacing: -0.01em; }
.card p { margin: 0; color: var(--muted); font-size: 15.5px; }

/* ---------- Steps ---------- */
.steps {
  list-style: none;
  padding: 0; margin: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  counter-reset: step;
}
.step {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 24px;
  position: relative;
}
.step-num {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  width: 38px; height: 38px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 10px;
  margin-bottom: 16px;
}
.step h3 { font-size: 18px; margin: 0 0 8px; color: var(--ink); }
.step p { margin: 0; color: var(--muted); font-size: 15px; }

/* ---------- Why ---------- */
.why-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 48px;
  align-items: center;
}
.check-list { list-style: none; padding: 0; margin: 26px 0 0; }
.check-list li {
  position: relative;
  padding-left: 30px;
  margin-bottom: 16px;
  font-size: 16.5px;
  color: var(--muted);
}
.check-list li strong { color: var(--ink); }
.check-list li::before {
  content: "✓";
  position: absolute; left: 0; top: 0;
  color: var(--accent);
  font-weight: 700;
}
.why-panel {
  background: linear-gradient(160deg, var(--hero-1), var(--hero-2));
  color: #fff;
  border-radius: 18px;
  padding: 40px 36px;
  box-shadow: var(--shadow-md);
}
.panel-quote {
  font-family: var(--font-display);
  font-size: 24px;
  font-style: italic;
  font-weight: 500;
  line-height: 1.3;
  margin: 0 0 28px;
}
.panel-meta { display: flex; flex-direction: column; gap: 4px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.15); }
.panel-brand { font-weight: 600; }
.panel-tag { font-size: 14px; color: #A9BBB4; }

/* ---------- FAQ ---------- */
.faq { max-width: 760px; }
.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 6px 0;
}
.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 40px 18px 0;
  font-weight: 600;
  font-size: 17px;
  color: var(--ink);
  position: relative;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  font-size: 22px; font-weight: 400; color: var(--accent);
  transition: transform .2s ease;
}
.faq-item[open] summary::after { content: "–"; }
.faq-item p { margin: 0 0 18px; color: var(--muted); font-size: 16px; max-width: 680px; }

/* ---------- CTA band ---------- */
.cta-band {
  background:
    radial-gradient(900px 400px at 20% 120%, rgba(20,184,138,.22), transparent 60%),
    linear-gradient(160deg, var(--hero-2), var(--hero-1));
  color: #fff;
  text-align: center;
  padding: 80px 0;
}
.cta-inner { max-width: 680px; }
.cta-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(28px, 4vw, 40px);
  letter-spacing: -0.02em;
  margin: 0 0 14px;
  color: #fff;
}
.cta-sub { font-size: 18px; color: #C5D3CD; margin: 0 0 30px; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--hero-1);
  color: #C5D3CD;
  padding: 56px 0 28px;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
  padding-bottom: 34px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.footer-tag { margin: 12px 0 0; font-size: 15px; color: #9DAFA8; max-width: 320px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 20px 28px; align-items: flex-start; }
.footer-links a { color: #C5D3CD; font-size: 15px; }
.footer-links a:hover { color: #fff; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 22px;
  font-size: 14px;
  color: #8FA199;
}
.to-top { color: #8FA199; }
.to-top:hover { color: #fff; }

/* ---------- Book page ---------- */
.book-hero {
  background:
    radial-gradient(900px 420px at 90% -10%, rgba(20,184,138,.12), transparent 60%),
    var(--bg);
  padding: 64px 0 88px;
}
.book-grid {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 52px;
  align-items: start;
}
.book-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(30px, 4.4vw, 46px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 12px 0 18px;
  color: var(--ink);
}
.book-sub { font-size: 18px; color: var(--muted); margin: 0 0 28px; }
.book-points { list-style: none; padding: 0; margin: 0 0 32px; }
.book-points li {
  display: flex; align-items: flex-start; gap: 12px;
  font-size: 16.5px; color: var(--ink-soft);
  margin-bottom: 14px;
}
.tick {
  flex: none;
  width: 24px; height: 24px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent-tint); color: var(--accent);
  border-radius: 50%; font-size: 13px; font-weight: 700;
  margin-top: 1px;
}
.book-contact {
  border-top: 1px solid var(--border);
  padding-top: 22px;
}
.book-contact-label { font-size: 14px; color: var(--faint); margin: 0 0 4px; }
.book-email { font-family: var(--font-display); font-size: 20px; font-weight: 500; }

.book-scheduler {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  min-height: 560px;
  position: relative;
}
.scheduler-fallback {
  text-align: center;
  padding: 64px 32px;
}
.fallback-icon {
  display: inline-flex;
  color: var(--accent);
  margin-bottom: 14px;
}
.fallback-icon .icon { width: 40px; height: 40px; }
.scheduler-fallback h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 24px;
  margin: 0 0 10px;
  color: var(--ink);
}
.scheduler-fallback p { color: var(--muted); font-size: 16px; margin: 0 auto 24px; max-width: 360px; }
/* Until a real Calendly widget is active, hide the empty embed div... */
.book-scheduler:not(.scheduler-live) .calendly-inline-widget { display: none; }
/* ...and once it is active, hide the email fallback. */
.scheduler-live .scheduler-fallback { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .why-grid { grid-template-columns: 1fr; gap: 32px; }
  .book-grid { grid-template-columns: 1fr; gap: 36px; }
}

@media (max-width: 720px) {
  .nav, .header-cta { display: none; }
  .nav-toggle { display: flex; }
  .hero { padding: 72px 0 64px; }
  .section { padding: 60px 0; }
  .hero-proof { gap: 18px; }
  .proof-divider { display: none; }
}

@media (max-width: 540px) {
  .cards { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .hero-actions .btn { width: 100%; }
  .footer-inner { flex-direction: column; gap: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
