/* ============ TOKENS ============ */
:root {
  --navy-950: #070c16;
  --navy-900: #0b1220;
  --navy-800: #1a2332;
  --navy-700: #263247;
  --blue: #3b82f6;
  --blue-light: #60a5fa;
  --blue-glow: rgba(59, 130, 246, 0.35);
  --green: #22c55e;
  --ink: #0f172a;
  --ink-soft: #475569;
  --line: #e2e8f0;
  --bg: #ffffff;
  --bg-alt: #f5f7fb;
  --white-soft: #cbd5e1;

  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 10px 40px -12px rgba(15, 23, 42, 0.18);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; }
/* Navy behind the page so the phone status bar and overscroll match the dark nav. */
html { scroll-behavior: smooth; scroll-padding-top: 80px; background: var(--navy-900); }
/* Navy body so phone browsers that tint the status bar from the page (iOS Safari/Chrome) pick
   navy; the content itself sits on white via <main>. */
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--navy-900);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
main { display: block; background: var(--bg); }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 16px; letter-spacing: -0.02em; }
h1 { font-size: clamp(2rem, 4.6vw, 3.6rem); font-weight: 800; }
.hero h1 em { display: block; white-space: nowrap; }
.h1-accent { color: var(--blue-light); }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.75rem); font-weight: 800; }
h3 { font-size: 1.2rem; font-weight: 700; }
h1 em, h2 em { font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--blue-light); }
p { margin: 0 0 16px; }

.container { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 820px; margin-left: auto; margin-right: auto; }
.center { text-align: center; }
.section { padding: 110px 0; }
.section.alt { background: var(--bg-alt); }

.eyebrow {
  display: inline-block;
  font-size: 0.8rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--blue-light); margin-bottom: 16px;
}
.eyebrow.dark { color: var(--blue); }
.eyebrow.white { color: #fff; }
.lead { font-size: 1.15rem; color: var(--white-soft); }
.lead.dark { color: var(--ink-soft); }
.lead strong { color: #fff; }
.lead.dark strong { color: var(--ink); }

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 12px 22px; border-radius: 999px; border: 1px solid transparent;
  font: 600 0.95rem/1 var(--font); cursor: pointer; text-align: center;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.btn-sm { padding: 10px 18px; font-size: 0.875rem; }
.btn-lg { padding: 17px 30px; font-size: 1.05rem; }
.btn-primary { background: var(--blue); color: #fff; box-shadow: 0 8px 24px -6px var(--blue-glow); }
.btn-primary:hover { transform: translateY(-2px); background: #2f74ea; box-shadow: 0 14px 32px -8px var(--blue-glow); }
.btn-ghost { background: rgba(255,255,255,0.06); color: #fff; border-color: rgba(255,255,255,0.18); }
.btn-ghost:hover { background: rgba(255,255,255,0.12); transform: translateY(-2px); }
/* Light grey button — stands out on the dark hero without competing with the blue booking CTA. */
.btn-light { background: #e2e8f0; color: var(--ink); box-shadow: 0 8px 24px -8px rgba(226, 232, 240, 0.35); }
.btn-light:hover { background: #fff; transform: translateY(-2px); box-shadow: 0 14px 32px -8px rgba(226, 232, 240, 0.45); }
.play {
  width: 0; height: 0;
  border-left: 9px solid currentColor; border-top: 6px solid transparent; border-bottom: 6px solid transparent;
}

/* ============ NAV ============ */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  background: rgba(11, 18, 32, 0.7); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 24px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.15rem; color: #fff; }
.logo-ai { color: var(--blue-light); }
.logo-mark {
  width: 26px; height: 26px; border-radius: 8px;
  background: conic-gradient(from 210deg, var(--blue), #93c5fd, var(--blue));
  box-shadow: 0 0 18px var(--blue-glow);
}
.nav-links { display: flex; gap: 32px; }
.nav-links a { color: var(--white-soft); font-size: 0.92rem; font-weight: 500; transition: color .2s; }
.nav-links a:hover { color: #fff; }
/* Menu button: only shown below 960px, where the links are hidden. */
.nav-toggle {
  display: none; flex-direction: column; justify-content: center; gap: 5px; flex: none;
  width: 40px; height: 40px; padding: 0 10px; margin-left: -8px;
  background: transparent; border: 0; border-radius: 10px; cursor: pointer;
}
.nav-toggle span { display: block; height: 2px; border-radius: 2px; background: #fff; transition: transform .25s ease, opacity .2s ease; }
.nav.open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav.open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav.open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.lbl-short { display: none; }

/* ============ HERO ============ */
.hero {
  position: relative; overflow: hidden;
  background: radial-gradient(1200px 600px at 80% -10%, #16233d 0%, var(--navy-900) 55%, var(--navy-950) 100%);
  color: #fff; padding: 160px 0 110px;
}
.hero-glow {
  position: absolute; width: 640px; height: 640px; right: -120px; top: 40px;
  background: radial-gradient(circle, var(--blue-glow), transparent 65%);
  filter: blur(40px); pointer-events: none;
}
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at 50% 30%, #000 30%, transparent 75%);
}
.hero-grid { position: relative; display: grid; grid-template-columns: 1.15fr 1fr; gap: 64px; align-items: center; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; margin: 32px 0 28px; }
.hero-bullets { display: flex; flex-wrap: wrap; gap: 8px 24px; list-style: none; padding: 0; margin: 0; color: var(--white-soft); font-size: 0.9rem; }
.hero-bullets li::before { content: "✓"; color: var(--green); font-weight: 700; margin-right: 8px; }

/* Call card */
.call-card {
  background: linear-gradient(180deg, rgba(38,50,71,0.85), rgba(26,35,50,0.9));
  border: 1px solid rgba(255,255,255,0.1); border-radius: 22px; padding: 24px;
  box-shadow: 0 30px 80px -20px rgba(0,0,0,0.6), 0 0 0 1px rgba(59,130,246,0.08);
}
.call-head { display: flex; justify-content: space-between; align-items: center; font-size: 0.85rem; color: var(--white-soft); }
.call-status { display: flex; align-items: center; gap: 8px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(34,197,94,0.6); animation: pulse 1.8s infinite; }
.call-timer { font-variant-numeric: tabular-nums; }
.wave { display: flex; align-items: center; justify-content: center; gap: 4px; height: 56px; margin: 18px 0; }
.wave span {
  width: 4px; height: 100%; border-radius: 4px; background: linear-gradient(var(--blue-light), var(--blue));
  animation: wave 1.1s ease-in-out infinite; transform-origin: center;
}
.wave span:nth-child(odd) { animation-duration: 0.9s; }
.wave span:nth-child(3n) { animation-duration: 1.3s; }
.wave span:nth-child(4n) { animation-delay: -0.4s; }
.wave span:nth-child(5n) { animation-delay: -0.7s; }
/* The slot holds room for the finished call; the card starts small and grows inside it,
   so the hero (and everything below) never moves. */
.call-slot { position: relative; display: flex; flex-direction: column; justify-content: center; }
.call-lines { display: flex; flex-direction: column; gap: 10px; transition: opacity .5s ease; }
.call-lines.fading { opacity: 0; }
/* The wrapper's height follows the chat (set from JS) and eases between sizes, so the card
   grows smoothly instead of snapping taller with each line. */
.call-lines-wrap { overflow: hidden; height: 0; transition: height .55s cubic-bezier(.22, 1, .36, 1); }
.call-lines .bubble { animation: bubble-in .55s cubic-bezier(.22, 1, .36, 1) both; transform-origin: left bottom; }
.call-lines .bubble.caller { transform-origin: right bottom; }
/* Typing dots fade in/out in place; "reserved" keeps their space while invisible. */
.call-lines .bubble.typing, .transcript-body .bubble.typing { animation: none; transition: opacity .3s ease; }
.call-lines .bubble.typing.reserved, .transcript-body .bubble.typing.reserved { opacity: 0; }
.bubble {
  max-width: 88%; padding: 10px 14px; border-radius: 14px; font-size: 0.9rem; line-height: 1.45;
  animation: rise .4s ease both;
}
.bubble.ai { background: rgba(59,130,246,0.16); border: 1px solid rgba(59,130,246,0.28); align-self: flex-start; border-bottom-left-radius: 4px; }
.bubble.caller { background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.1); align-self: flex-end; border-bottom-right-radius: 4px; }
.bubble b { display: block; font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.6; margin-bottom: 2px; }
.call-foot { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.tag { font-size: 0.75rem; font-weight: 600; padding: 6px 10px; border-radius: 999px; background: rgba(255,255,255,0.07); color: var(--white-soft); }
.tag-green { background: rgba(34,197,94,0.15); color: #86efac; }

/* ============ CALCULATOR ============ */
.calc {
  margin-top: 48px; display: grid; grid-template-columns: 1.2fr 1fr; gap: 0;
  border-radius: 22px; overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--line);
  max-width: 1000px;
}
.calc-inputs { padding: 40px; display: flex; flex-direction: column; gap: 30px; background: #fff; }
.calc-inputs label > span { display: block; font-weight: 600; margin-bottom: 10px; }
.calc-inputs small { color: var(--ink-soft); font-weight: 400; }
.range-row { display: flex; align-items: center; gap: 16px; }
.range-row output { min-width: 84px; text-align: right; font-weight: 800; font-size: 1.1rem; color: var(--blue); font-variant-numeric: tabular-nums; }
/* Custom slider: the input is tall enough for the knob; the 6px track is drawn inside it.
   --fill (set in main.js) colours the part left of the knob. */
input[type="range"] {
  flex: 1; height: 24px; margin: 0; cursor: pointer; background: transparent;
  -webkit-appearance: none; appearance: none;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 6px; border-radius: 999px;
  background: linear-gradient(to right, var(--blue) var(--fill, 50%), var(--line) var(--fill, 50%));
}
input[type="range"]::-moz-range-track { height: 6px; border-radius: 999px; background: var(--line); }
input[type="range"]::-moz-range-progress { height: 6px; border-radius: 999px; background: var(--blue); }
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 20px; height: 20px; margin-top: -7px;
  border-radius: 50%; background: #fff; border: 2px solid var(--blue); box-shadow: 0 1px 4px rgba(15, 23, 42, 0.25);
}
input[type="range"]::-moz-range-thumb {
  width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 2px solid var(--blue);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.25);
}
input[type="range"]:focus-visible { outline: none; }
input[type="range"]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.3); }
input[type="range"]:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.3); }
.calc-result { background: var(--navy-900); color: #fff; padding: 40px; display: flex; flex-direction: column; justify-content: center; }
.calc-label { color: var(--white-soft); font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.8rem; }
.calc-big { font-size: clamp(2.6rem, 5vw, 3.6rem); font-weight: 800; color: #86efac; line-height: 1; margin-bottom: 10px; font-variant-numeric: tabular-nums; }
.calc-big small { font-size: 1rem; color: var(--white-soft); font-weight: 500; margin-left: 6px; }
.calc-sub { color: var(--white-soft); margin-bottom: 28px; }
.calc-sub span { color: #fff; font-weight: 700; }
.calc-note { font-size: 0.82rem; color: #94a3b8; margin: 16px 0 0; }

/* ============ CARDS ============ */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 56px; }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 32px;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: #bfdbfe; }
.card p { color: var(--ink-soft); }
.icon {
  width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 22px;
  background: linear-gradient(135deg, #eff6ff, #dbeafe); color: var(--blue);
}
.icon svg { width: 26px; height: 26px; }
.checks { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 8px; }
.checks li { position: relative; padding-left: 26px; font-size: 0.92rem; font-weight: 500; }
.checks li::before {
  content: "✓"; position: absolute; left: 0; top: 0; color: var(--blue); font-weight: 800;
}
.checks.big li { font-size: 1.05rem; padding-left: 30px; margin-bottom: 6px; }

/* ============ STEPS ============ */
.steps { list-style: none; padding: 0; margin: 56px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; counter-reset: s; }
.step { position: relative; padding: 32px; border-radius: var(--radius); border: 1px solid var(--line); background: #fff; }
.step-num { display: block; font-family: var(--serif); font-size: 3rem; line-height: 1; color: var(--blue); margin-bottom: 14px; }
.step h3 small { font-weight: 500; color: var(--ink-soft); font-size: 0.85rem; }
.step p { color: var(--ink-soft); margin: 0; }

/* ============ DEMO ============ */
.dark-section { background: var(--navy-900); color: #fff; position: relative; overflow: hidden; }
.dark-section::after {
  content: ""; position: absolute; left: -200px; bottom: -200px; width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(59,130,246,0.22), transparent 65%); pointer-events: none;
}
.demo-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.demo-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }
.demo-note { margin-top: 16px; color: #94a3b8; font-size: 0.9rem; }
.demo-note a { color: var(--blue-light); text-decoration: underline; }
.demo-form { margin-top: 28px; }
.demo-fields { display: grid; grid-template-columns: 1fr 1.3fr; gap: 14px; }
.field span { display: block; font-size: 0.85rem; font-weight: 600; color: var(--white-soft); margin-bottom: 6px; }
.field input {
  width: 100%; padding: 14px 16px; border-radius: 12px; font: 500 1rem var(--font);
  color: #fff; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.16);
  transition: border-color .2s, background .2s;
}
.field input::placeholder { color: #64748b; }
.field input:focus { outline: none; border-color: var(--blue-light); background: rgba(255,255,255,0.09); }
.field input[aria-invalid="true"] { border-color: #f87171; }
.consent { display: flex; gap: 10px; align-items: flex-start; margin-top: 16px; font-size: 0.82rem; color: #94a3b8; cursor: pointer; }
.consent input { margin-top: 3px; accent-color: var(--blue); width: 16px; height: 16px; flex: none; }
.turnstile:not(:empty) { margin-top: 16px; }
.demo-form .demo-actions { margin-top: 20px; }
.demo-form button[disabled] { opacity: .6; cursor: wait; transform: none; }
.demo-status { margin: 14px 0 0; font-size: 0.95rem; min-height: 1.5em; }
.demo-status.ok { color: #86efac; }
.demo-status.err { color: #fca5a5; }
.demo-status a { color: #fff; text-decoration: underline; font-weight: 600; }
.transcript {
  background: var(--navy-800); border: 1px solid rgba(255,255,255,0.08); border-radius: 20px; overflow: hidden;
  box-shadow: 0 30px 80px -24px rgba(0,0,0,0.7);
}
.transcript-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 22px; border-bottom: 1px solid rgba(255,255,255,0.08); font-size: 0.85rem; color: var(--white-soft); }
.badge { background: rgba(59,130,246,0.18); color: var(--blue-light); font-weight: 700; padding: 4px 10px; border-radius: 999px; font-size: 0.72rem; }
.transcript-body { padding: 22px; height: 420px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; scroll-behavior: smooth; }
.transcript-body { transition: opacity .5s ease; }
.transcript-body.fading { opacity: 0; }
.summary {
  margin-top: 6px; padding: 14px 16px; border-radius: 12px; font-size: 0.85rem;
  background: rgba(34,197,94,0.1); border: 1px solid rgba(34,197,94,0.3); color: #bbf7d0; animation: rise .4s ease both;
}
.summary strong { color: #fff; display: block; margin-bottom: 4px; }
.typing { display: inline-flex; gap: 4px; padding: 12px 14px; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--white-soft); animation: blink 1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }

/* ============ OFFER STACK ============ */
.stack { margin-top: 48px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.stack-row { display: flex; justify-content: space-between; align-items: center; padding: 18px 24px; border-bottom: 1px solid var(--line); font-weight: 500; }
.stack-row:last-child { border-bottom: none; }
.stack-row:nth-child(even) { background: var(--bg-alt); }
.stack-check { width: 26px; height: 26px; flex: none; border-radius: 50%; display: grid; place-items: center; background: #dcfce7; color: #15803d; font-weight: 800; font-size: 0.8rem; }
.guarantee {
  margin-top: 32px; display: flex; gap: 24px; align-items: flex-start;
  padding: 32px; border-radius: var(--radius); border: 2px dashed #93c5fd; background: #eff6ff;
}
.guarantee p { margin: 0; color: var(--ink-soft); }
.guarantee strong { color: var(--ink); }
.seal { flex: none; width: 60px; height: 60px; border-radius: 50%; background: var(--blue); color: #fff; display: grid; place-items: center; }
.seal svg { width: 30px; height: 30px; }

/* ============ ABOUT ============ */
.about-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: 64px; align-items: start; }

/* ============ BOOKING ============ */
.book-grid { display: grid; grid-template-columns: 1fr 1.25fr; gap: 56px; align-items: start; }
.book-embed { border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); overflow: hidden; background: #fff; min-height: 300px; }
/* With the live calendar: stack the pitch above a full-width calendar (Cal.com's month view
   needs ~900px for its side-by-side layout) in a dark navy card that matches Cal's dark theme. */
.book-grid.has-cal { grid-template-columns: 1fr; gap: 28px; }
.book-grid.has-cal > :first-child { text-align: center; max-width: 820px; margin: 0 auto; }
/* Keep the pitch short so the calendar fits on laptop screens: bullets in one row. */
.book-grid.has-cal .checks.big { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 28px; text-align: left; margin-top: 14px; }
.book-grid.has-cal .checks.big li { margin-bottom: 0; }
.section.book-live { padding-top: 64px; }
.book-grid.has-cal .book-embed { border: 0; background: var(--navy-900); padding: 8px; box-shadow: 0 24px 60px -20px rgba(11, 18, 32, 0.55); }
.cal-embed { width: 100%; min-height: 0; }
.cal-embed.active { min-height: 620px; }
.cal-fallback { padding: 56px 32px; text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 300px; }
.cal-fallback p { color: var(--ink-soft); font-size: 1.05rem; }

/* ============ FAQ ============ */
.faq { margin-top: 40px; display: grid; gap: 12px; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 0 24px; transition: border-color .2s; }
.faq details[open] { border-color: #bfdbfe; }
.faq summary {
  list-style: none; cursor: pointer; padding: 22px 32px 22px 0; font-weight: 600; font-size: 1.05rem; position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  font-size: 1.5rem; font-weight: 400; color: var(--blue); transition: transform .25s;
}
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { color: var(--ink-soft); padding-bottom: 22px; margin: 0; animation: rise .3s ease both; }

/* ============ FINAL CTA ============ */
.final-cta {
  padding: 110px 0; color: #fff;
  background: radial-gradient(800px 400px at 50% 0%, #1e3a8a 0%, var(--navy-900) 70%);
}
.final-cta .lead { margin-bottom: 32px; }
.final-ctas { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }

/* ============ FOOTER ============ */
.footer { background: var(--navy-950); color: var(--white-soft); padding: 56px 0 32px; }
.footer-inner { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 24px; }
.footer-tag { margin-top: 12px; font-size: 0.9rem; }
.footer-links { display: flex; gap: 28px; flex-wrap: wrap; }
.footer-links a:hover { color: #fff; }
.footer-bottom { margin-top: 40px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,0.08); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-size: 0.82rem; color: #64748b; }
.footer-bottom p { margin: 0; }

/* ============ ANIMATION ============ */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
@keyframes wave { 0%, 100% { transform: scaleY(0.2); } 50% { transform: scaleY(1); } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(34,197,94,0.6); } 70% { box-shadow: 0 0 0 10px rgba(34,197,94,0); } 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); } }
@keyframes bubble-in { from { opacity: 0; transform: translateY(10px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes blink { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .wave span, .dot, .typing i, .call-lines .bubble { animation: none; }
  .call-lines-wrap, .call-lines { transition: none; }
}

/* ============ RESPONSIVE ============ */
@media (max-width: 960px) {
  .hero-grid, .demo-grid, .about-grid, .book-grid, .calc { grid-template-columns: 1fr; }
  .hero-grid { gap: 48px; }
  .cards, .steps { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .nav-inner { gap: 12px; }
  .nav-inner > .btn { margin-left: auto; }
  .nav-toggle { display: flex; }
  .nav.open .nav-links {
    display: flex; flex-direction: column; gap: 0;
    position: absolute; top: 100%; left: 0; right: 0; padding: 8px 24px 16px;
    background: var(--navy-900); border-bottom: 1px solid rgba(255,255,255,0.08);
  }
  .nav.open .nav-links a { padding: 14px 0; font-size: 1rem; border-bottom: 1px solid rgba(255,255,255,0.06); }
  .nav.open .nav-links a:last-child { border-bottom: 0; }
  .section { padding: 80px 0; }
  .hero { padding: 120px 0 80px; }
  /* Stacked: a fixed chat window (JS skips the height reserve here and keeps it scrolled to the
     newest line), so the card never leaves a gap below it. Older lines fade out at the top. */
  .call-slot { justify-content: flex-start; }
  .call-lines-wrap { height: 280px; }
  /* Slow, gentle slide as older lines move up; new lines fade in at the same pace. */
  .call-lines { transition: opacity .5s ease, transform 1.2s cubic-bezier(.45, .05, .25, 1); }
  .call-lines .bubble { animation-duration: .9s; animation-timing-function: cubic-bezier(.25, .1, .25, 1); }
}
@media (max-width: 960px) and (prefers-reduced-motion: reduce) {
  .call-lines { transition: none; }
}
@media (max-width: 960px) {
  .call-lines-wrap.scrolled {
    -webkit-mask-image: linear-gradient(transparent, #000 40px); mask-image: linear-gradient(transparent, #000 40px);
  }
  .demo-grid { gap: 48px; }
  .about-grid { gap: 8px; }
  .book-grid { gap: 40px; }
}
@media (max-width: 560px) {
  .container { padding: 0 16px; }
  .nav.open .nav-links { padding: 4px 16px 12px; }
  .lbl-long { display: none; }
  .lbl-short { display: inline; }
  .section { padding: 64px 0; }
  .hero { padding: 100px 0 64px; }
  .final-cta { padding: 72px 0; }
  .section.book-live { padding-top: 48px; }
  .lead { font-size: 1.05rem; }
  .cards, .steps { margin-top: 40px; }
  .calc-inputs, .calc-result { padding: 28px 22px; }
  .card, .step { padding: 26px; }
  .guarantee { flex-direction: column; padding: 24px; }
  .hero-ctas .btn, .demo-actions .btn, .final-ctas .btn { width: 100%; }
  .nav .btn-sm { padding: 9px 14px; font-size: 0.8rem; }
  .logo { font-size: 1rem; }
  .stack-row { padding: 16px 18px; gap: 12px; }
  .demo-fields { grid-template-columns: 1fr; }
}

/* ============ CUSTOM DEVELOPMENT PAGE ============ */
.nav-links a[aria-current="page"] { color: #fff; }

/* Hero architecture card */
.arch-card {
  background: linear-gradient(180deg, rgba(38,50,71,0.85), rgba(26,35,50,0.9));
  border: 1px solid rgba(255,255,255,0.1); border-radius: 22px; padding: 22px;
  box-shadow: 0 30px 80px -20px rgba(0,0,0,0.6), 0 0 0 1px rgba(59,130,246,0.08);
}
.arch-head { display: flex; align-items: center; gap: 12px; font-size: 0.82rem; color: var(--white-soft); margin-bottom: 18px; font-family: ui-monospace, "SF Mono", Menlo, monospace; }
.arch-dots { display: inline-flex; gap: 6px; }
.arch-dots i { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,0.18); }
.arch-live { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; color: #86efac; font-family: var(--font); font-weight: 600; }
.arch-layers { display: flex; flex-direction: column; }
.arch-layer { background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08); border-radius: 14px; padding: 12px 14px; }
.arch-split { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.arch-label { display: block; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--blue-light); margin-bottom: 8px; }
.arch-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.arch-chips span { font-size: 0.8rem; font-weight: 500; padding: 5px 10px; border-radius: 8px; background: rgba(59,130,246,0.14); border: 1px solid rgba(59,130,246,0.25); color: #dbeafe; }
.arch-flow { position: relative; height: 22px; display: flex; justify-content: center; }
.arch-flow::before { content: ""; width: 2px; height: 100%; background: rgba(96,165,250,0.25); }
.arch-flow span {
  position: absolute; top: 0; left: 50%; width: 6px; height: 6px; margin-left: -3px; border-radius: 50%;
  background: var(--blue-light); box-shadow: 0 0 10px var(--blue-glow); animation: flow 1.6s linear infinite;
}
.arch-flow:nth-of-type(4) span { animation-delay: -.5s; }
.arch-flow:nth-of-type(6) span { animation-delay: -1s; }
@keyframes flow { from { transform: translateY(0); opacity: 0; } 20% { opacity: 1; } 80% { opacity: 1; } to { transform: translateY(16px); opacity: 0; } }

/* Built-to-scale grid */
.scale-grid { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 56px; }
.scale-item { padding: 28px; border-radius: var(--radius); background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08); transition: border-color .25s, transform .25s; }
.scale-item:hover { border-color: rgba(96,165,250,0.4); transform: translateY(-4px); }
.scale-item h3 { color: #fff; }
.scale-item p { color: var(--white-soft); margin: 0; }
.tech-stack { position: relative; z-index: 1; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 48px; }
.tech-stack span { font-size: 0.85rem; font-weight: 600; padding: 8px 14px; border-radius: 999px; color: var(--white-soft); border: 1px solid rgba(255,255,255,0.14); background: rgba(255,255,255,0.04); }

/* Four-step process */
.steps.steps-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 960px) {
  .scale-grid, .steps.steps-4 { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .scale-grid, .tech-stack { margin-top: 40px; }
  .scale-item { padding: 24px; }
}
@media (max-width: 1160px) and (min-width: 961px) {
  .steps.steps-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .arch-flow span { animation: none; opacity: 0; }
}
@media (max-width: 1160px) and (min-width: 961px) {
  .nav-links { gap: 20px; }
}

/* ============ PHONE: CALMER, LESS CROWDED ============ */
@media (max-width: 560px) {
  h2 { font-size: 1.6rem; }
  h3 { font-size: 1.08rem; }
  .lead { font-size: 1rem; }
  .eyebrow { font-size: 0.72rem; margin-bottom: 12px; }
  .btn-lg { padding: 15px 22px; font-size: 1rem; }

  /* Hero: tighter button stack, quieter bullets */
  .hero-ctas { gap: 10px; margin: 24px 0 20px; }
  .hero-bullets { font-size: 0.85rem; gap: 6px 18px; }

  /* Calculator */
  .calc { margin-top: 32px; }
  .calc-inputs { gap: 22px; }

  /* Cards: small icon beside the title, compact checklist */
  .cards { gap: 14px; }
  .card { display: grid; grid-template-columns: auto 1fr; column-gap: 14px; align-items: center; padding: 22px; }
  .card .icon { width: 40px; height: 40px; margin: 0; border-radius: 12px; }
  .card .icon svg { width: 20px; height: 20px; }
  .card h3 { margin: 0; }
  .card p, .card .checks { grid-column: 1 / -1; }
  .card p { margin: 12px 0 0; font-size: 0.95rem; }
  .card .checks { margin-top: 14px; gap: 4px; }
  .card .checks li { font-size: 0.85rem; padding-left: 22px; }

  /* Steps: number beside the title */
  .steps { gap: 14px; }
  .step { display: grid; grid-template-columns: auto 1fr; column-gap: 14px; align-items: baseline; padding: 22px; }
  .step-num { font-size: 2rem; margin: 0; }
  .step h3 { margin: 0; }
  .step p { grid-column: 1 / -1; margin-top: 10px; font-size: 0.95rem; }

  /* Demo: the hero already shows a sample call, so skip the second transcript */
  .demo-grid > .transcript { display: none; }
  .demo-form { margin-top: 24px; }

  /* What you get */
  .stack { margin-top: 32px; }
  .stack-row { padding: 14px 16px; font-size: 0.95rem; }
  .stack-check { width: 22px; height: 22px; font-size: 0.7rem; }
  .guarantee { gap: 14px; padding: 22px; margin-top: 20px; }
  .seal { width: 44px; height: 44px; }
  .seal svg { width: 22px; height: 22px; }

  /* Booking + FAQ */
  .checks.big li { font-size: 0.98rem; }
  .faq { margin-top: 28px; gap: 10px; }
  .faq details { padding: 0 18px; }
  .faq summary { padding: 18px 28px 18px 0; font-size: 0.98rem; }
  .faq details p { padding-bottom: 18px; font-size: 0.95rem; }

  /* Custom development page */
  .scale-grid { gap: 14px; }
  .scale-item { padding: 22px; }
  .tech-stack { gap: 8px; }
  .tech-stack span { font-size: 0.8rem; padding: 6px 12px; }
}

/* ============ PHONE: HERO + SAMPLE CALL IN THE FIRST SCREEN ============ */
@media (max-width: 560px) {
  .hero { padding: 84px 0 48px; }
  .hero-grid { gap: 20px; }
  .hero .eyebrow, .hero-bullets, .call-foot { display: none; }
  .hero h1 { font-size: 1.75rem; margin-bottom: 10px; }
  .hero .lead { font-size: 0.95rem; line-height: 1.5; margin-bottom: 0; }
  .hero-ctas { flex-wrap: nowrap; gap: 8px; margin: 16px 0 0; }
  .hero-ctas .btn { width: auto; flex: 1; padding: 13px 10px; font-size: 0.9rem; gap: 8px; }
  .call-card { padding: 14px 16px; border-radius: 18px; }
  .call-head { font-size: 0.78rem; }
  .wave { height: 26px; margin: 8px 0 10px; }
  .call-lines-wrap { height: 172px; }
  .call-lines { gap: 8px; }
  .call-lines .bubble { font-size: 0.85rem; padding: 8px 12px; }
}

/* ============ PHONE: PROBLEM + CALCULATOR IN ONE SCREEN ============ */
@media (max-width: 560px) {
  #math { padding: 28px 0 32px; }
  #math .eyebrow { margin-bottom: 8px; }
  #math h2 { margin-bottom: 10px; }
  #math .lead { font-size: 0.95rem; line-height: 1.5; margin-bottom: 0; }
  /* Inset the card from the screen edges instead of padding inside it, so the dark result panel fills it. */
  .calc.container { width: auto; margin: 18px 16px 0; padding: 0; border-radius: 18px; }
  .calc-inputs { padding: 16px 18px; gap: 12px; }
  .calc-inputs label > span { font-size: 0.88rem; margin-bottom: 2px; }
  .calc-inputs small, .calc-note { display: none; }
  .range-row output { min-width: 64px; font-size: 1rem; }
  .calc-result { padding: 16px 18px; }
  .calc-label { font-size: 0.7rem; margin-bottom: 4px; }
  .calc-big { font-size: 2.3rem; margin-bottom: 4px; }
  .calc-sub { font-size: 0.88rem; margin-bottom: 12px; }
  .calc-result .btn { padding: 12px 14px; font-size: 0.88rem; }
}

/* ============ PHONE: "WHAT CASELINE DOES" IN ONE SCREEN ============ */
/* Cards keep icon, title and ticks; the intro line and card paragraphs are desktop-only. */
@media (max-width: 560px) {
  #solutions { padding: 28px 0 32px; }
  #solutions .eyebrow { margin-bottom: 8px; }
  #solutions h2 { font-size: 1.45rem; margin-bottom: 0; }
  #solutions .lead, #solutions .card p { display: none; }
  #solutions .cards { margin-top: 18px; gap: 10px; }
  #solutions .card { padding: 14px 16px; border-radius: 14px; }
  #solutions .card .icon { width: 34px; height: 34px; border-radius: 10px; }
  #solutions .card .icon svg { width: 18px; height: 18px; }
  #solutions .card h3 { font-size: 1rem; }
  #solutions .card .checks { margin-top: 10px; gap: 2px; }
  #solutions .card .checks li { font-size: 0.84rem; line-height: 1.45; }
}

/* ============ PHONE: "HOW IT WORKS" IN ONE SCREEN ============ */
@media (max-width: 560px) {
  #how { padding: 28px 0 32px; }
  #how .eyebrow { margin-bottom: 8px; }
  #how h2 { font-size: 1.45rem; margin-bottom: 0; }
  #how .steps { margin-top: 18px; gap: 10px; }
  #how .step { padding: 14px 16px; border-radius: 14px; column-gap: 12px; }
  #how .step-num { font-size: 1.7rem; }
  #how .step h3 { font-size: 1rem; }
  #how .step p { margin-top: 6px; font-size: 0.88rem; line-height: 1.5; }
}

/* ============ PHONE: REMAINING SECTIONS, ONE SCREEN EACH ============ */
@media (max-width: 560px) {
  #demo, #included, #about, #book, #faq { padding: 28px 0 32px; }
  #demo h2, #included h2, #about h2, #book h2, #faq h2, .final-cta h2 { font-size: 1.45rem; margin-bottom: 10px; }
  #demo .eyebrow, #included .eyebrow, #about .eyebrow, #book .eyebrow, #faq .eyebrow { margin-bottom: 8px; }

  /* Hear it for yourself: name and number side by side */
  #demo .lead { font-size: 0.95rem; line-height: 1.5; margin-bottom: 0; }
  .demo-form { margin-top: 16px; }
  .demo-fields { grid-template-columns: 1fr 1.25fr; gap: 10px; }
  .field span { font-size: 0.8rem; margin-bottom: 4px; }
  .field input { padding: 11px 12px; }
  .consent { margin-top: 10px; font-size: 0.76rem; line-height: 1.45; }
  .demo-form .demo-actions { margin-top: 14px; }
  .demo-form .btn-lg { padding: 13px 20px; }
  .demo-status { margin-top: 8px; font-size: 0.88rem; min-height: 0; }

  /* What you get */
  #included h2 { margin-bottom: 0; }
  #included .stack { margin-top: 16px; border-radius: 14px; }
  #included .stack-row { padding: 9px 14px; font-size: 0.86rem; line-height: 1.4; }
  #included .stack-check { width: 20px; height: 20px; font-size: 0.65rem; }
  .guarantee { margin-top: 12px; padding: 14px 16px; border-width: 1.5px; }
  .guarantee .seal { display: none; }
  .guarantee h3 { font-size: 0.98rem; margin-bottom: 6px; }
  .guarantee p { font-size: 0.86rem; line-height: 1.5; }

  /* Why firms choose CaseLine */
  #about .about-grid { gap: 0; }
  #about .lead { font-size: 0.95rem; line-height: 1.55; margin-bottom: 12px; }
  #about .lead:last-child { margin-bottom: 0; }

  /* Booking: short pitch plus a button that opens the calendar pop-up (see main.js) */
  #book .book-grid { gap: 16px; }
  #book .lead { font-size: 0.95rem; margin-bottom: 0; }
  #book .checks.big { margin-top: 10px; }
  #book .checks.big li { font-size: 0.9rem; margin-bottom: 4px; padding-left: 26px; }
  #book .book-embed { min-height: 0; border-radius: 16px; }
  .cal-fallback { min-height: 0; padding: 20px 18px; }
  .cal-fallback p { font-size: 0.95rem; margin-bottom: 12px; }
  .cal-fallback .btn { width: 100%; }

  /* FAQ */
  #faq h2 { margin-bottom: 0; }
  #faq .faq { margin-top: 16px; gap: 8px; }
  #faq .faq details { padding: 0 14px; border-radius: 12px; }
  #faq .faq summary { padding: 13px 26px 13px 0; font-size: 0.9rem; line-height: 1.4; }
  #faq .faq summary::after { font-size: 1.3rem; }
  #faq .faq details p { padding-bottom: 14px; font-size: 0.88rem; }

  /* Final CTA: side-by-side short buttons, like the hero */
  .final-cta { padding: 44px 0 48px; }
  .final-cta .lead { font-size: 0.95rem; margin-bottom: 18px; }
  .final-ctas { flex-wrap: nowrap; gap: 8px; }
  .final-ctas .btn { width: auto; flex: 1; padding: 13px 10px; font-size: 0.9rem; gap: 8px; }

  /* Footer */
  .footer { padding: 32px 0 20px; }
  .footer-inner { gap: 14px; }
  .footer-tag { margin: 6px 0 0; font-size: 0.85rem; }
  .footer-links { gap: 8px 18px; font-size: 0.85rem; }
  .footer-bottom { margin-top: 20px; padding-top: 14px; font-size: 0.75rem; }
}

/* ============ PHONE: BOOKING CARD ============ */
/* Dark navy card (matches the desktop calendar): icon, title and note, then the button. */
@media (max-width: 560px) {
  .book-grid .book-embed { background: var(--navy-900); border: 0; border-radius: 18px; box-shadow: 0 20px 44px -18px rgba(11, 18, 32, 0.55); }
  .book-grid .cal-fallback {
    display: grid; grid-template-columns: auto 1fr; column-gap: 14px; row-gap: 2px;
    align-items: center; text-align: left; padding: 20px 18px 18px;
  }
  .book-grid .cal-icon {
    grid-row: 1 / 3; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px;
    background: rgba(59, 130, 246, 0.16); border: 1px solid rgba(59, 130, 246, 0.3); color: var(--blue-light);
  }
  .book-grid .cal-icon svg { width: 22px; height: 22px; }
  .book-grid .cal-fallback p { margin: 0; color: #fff; font-weight: 700; font-size: 1rem; line-height: 1.3; }
  .book-grid .cal-meta { display: block; color: var(--white-soft); font-size: 0.82rem; }
  .book-grid .cal-fallback .btn { grid-column: 1 / -1; margin-top: 16px; }
}

/* ============ PHONE: SOLID NAV ============ */
/* iOS samples the fixed header for the status bar tint; a solid colour blends cleanly. */
@media (max-width: 960px) {
  .nav { background: var(--navy-900); }
}
