/* Pulse Pocket CRM Landing Page Styles */
:root {
  --bg: #0b0f1a;
  --panel: rgba(255,255,255,0.03);
  --border: rgba(255,255,255,0.08);
  --text: #e6e9ef;
  --muted: #a0a8b8;
  --accent-1: #16b0ff; /* electric blue */
  --accent-2: #8b5cf6; /* violet */
  --accent-3: #25d0b4; /* teal */
  --glow: 0 0 0 / 20%;
  --header-h: 72px; /* approximate sticky header height */
  --sticky-offset: calc(var(--header-h) + 8px);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--bg); color: var(--text);
  line-height: 1.6;
}

.container {
  width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px;
}

/* Background gradient waves */
.bg-waves {
  position: fixed; inset: -20vh -20vw auto -20vw; height: 120vh; z-index: -1; filter: blur(60px) saturate(130%);
  background:
    radial-gradient(1000px 500px at 10% 10%, color-mix(in oklab, var(--accent-1) 50%, transparent), transparent 70%),
    radial-gradient(800px 400px at 90% 20%, color-mix(in oklab, var(--accent-2) 55%, transparent), transparent 70%),
    radial-gradient(900px 450px at 50% 90%, color-mix(in oklab, var(--accent-3) 50%, transparent), transparent 70%);
  opacity: .55;
  pointer-events: none;
}

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

.site-header { position: -webkit-sticky; position: sticky; top: 0; backdrop-filter: saturate(140%) blur(10px); background: linear-gradient(180deg, rgba(11,15,26,.75), rgba(11,15,26,.35) 70%, transparent); border-bottom: 1px solid var(--border); z-index: 50; }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; }
.brand-logo { width: 70px; height: auto; object-fit: contain; filter: drop-shadow(0 0 8px rgba(22,176,255,.35)); border-radius: 0px; }
.brand-name { letter-spacing: 0.3px; }
.nav { display: none; gap: 18px; align-items: center; }
.nav a { color: var(--muted); font-weight: 500; }
.nav .btn.small { padding: 10px 14px; font-size: 14px; }
/* Ensure header CTA text is not muted */
.nav a.btn-cta { color: #fff; }
.nav a.btn-cta:hover, .nav a.btn-cta:visited, .nav a.btn-cta:focus { color: #fff; }

.hero { display: grid; grid-template-columns: 1fr; gap: 20px; padding: 56px 0 40px; align-items: center; }
.hero-copy h1 { font-size: clamp(28px, 8vw, 36px); line-height: 1.15; margin: 0 0 10px; }
.subhead { color: var(--muted); margin: 0 0 16px; font-size: clamp(14px, 4.2vw, 18px); }
.hero-visual { display: grid; place-items: center; margin-top: 6px; }
.phone-mockup {
  width: 100%;
  max-width: 320px; /* slightly wider */
  aspect-ratio: 9/18; /* iPhone 15 aspect */
  border-radius: 50px;
  /* background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.02)); */
  background-color: rgb(25 24 24);
  border: 1px solid var(--border);
  box-shadow:
    0 20px 80px rgba(0,0,0,.55),
    0 0 40px rgba(139,92,246,.25),
    inset 0 0 0 1px rgba(255,255,255,.02);
  padding: 10px;
  display: grid;
  place-items: center;
  color: var(--muted);
}

/* Phone screen */
.phone-screen {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 40px;
  background: #0c1220;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.03);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.phone-notch {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 132px; /* dynamic island */
  height: 28px;
  background: #070b14;
  border-radius: 18px;
  box-shadow: 0 2px 12px rgba(0,0,0,.6), inset 0 0 0 1px rgba(255,255,255,.04);
  pointer-events: none;
}

/* Header */
.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 50px 14px 12px; /* extra top padding to clear Dynamic Island */
  background: linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,0));
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.chat-header .contact { display: flex; align-items: center; gap: 10px; }
.chat-header .avatar {
  width: 28px; height: 28px; border-radius: 50%; background: #1a2235; color: #c9d1e8;
  display: grid; place-items: center; font-weight: 700; font-size: 13px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.06);
}
.chat-header .meta .name { font-weight: 700; font-size: 14px; letter-spacing: .2px; }
.chat-header .meta .sub { font-size: 12px; color: var(--muted); opacity: .9; margin-top: 2px; }
.chat-header .header-actions { display: inline-flex; gap: 6px; opacity: .6; }
.chat-header .dot { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.4); display: inline-block; }

/* Chat body */
.chat-body {
  padding: 12px 12px 8px;
  display: grid;
  align-content: start;
  gap: 10px;
  overflow: auto;
  scroll-behavior: smooth;
  overscroll-behavior: contain; /* prevent page from scrolling when chat hits edges */
}
.row { display: flex; width: 100%; }
.row.left { justify-content: flex-start; }
.row.right { justify-content: flex-end; }

.bubble {
  max-width: 86%;
  font-size: 13px;
  line-height: 1.35;
  padding: 10px 12px;
  border-radius: 14px;
  word-wrap: break-word;
}

/* Typing indicator */
.bubble.typing {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 46px;
}
.bubble.typing .dot {
  width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .5; animation: blink 1.2s infinite ease-in-out;
}
.bubble.typing .dot:nth-child(2) { animation-delay: .15s; }
.bubble.typing .dot:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25 } 40% { opacity: .9 } }

.bubble.typing.ai {
  color: #cde6ff;
  background:
    linear-gradient(#0c1220, #0c1220) padding-box,
    linear-gradient(90deg, var(--accent-1), var(--accent-2), var(--accent-3)) border-box;
  border: 1.6px solid transparent;
}
.bubble.typing.customer {
  color: #e6e9ef;
  background: #162035;
  border: 1px solid rgba(255,255,255,.04);
}
.bubble.typing.human {
  color: #0a1713;
  background: #25d0b4;
  border: 1px solid rgba(255,255,255,.1);
}

/* Customer: muted gray, left */
.bubble.customer {
  background: #162035;
  color: #e6e9ef;
  border: 1px solid rgba(255,255,255,.04);
  border-top-left-radius: 6px;
}

/* AI: neon gradient outline only, right */
.bubble.ai {
  color: #e9ecf3;
  background:
    linear-gradient(#0c1220, #0c1220) padding-box,
    linear-gradient(90deg, var(--accent-1), var(--accent-2), var(--accent-3)) border-box;
  border: 1.6px solid transparent;
  border-top-right-radius: 6px;
  box-shadow:
    0 0 22px rgba(139,92,246,.18),
    0 0 12px rgba(22,176,255,.12),
    0 0 18px rgba(37,208,180,.12);
}

/* Human takeover: solid green, right */
.bubble.human {
  color: #08120d;
  background: #25d0b4; /* teal-green to align with accent-3 */
  border: 1px solid rgba(255,255,255,.08);
  border-top-right-radius: 6px;
  box-shadow: 0 8px 24px rgba(37,208,180,.25);
}

/* Input bar */
.chat-input {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 8px 10px 12px;
  background: linear-gradient(180deg, rgba(255,255,255,0), rgba(255,255,255,.02));
  border-top: 1px solid rgba(255,255,255,.06);
}
.chat-input input {
  width: 100%;
  padding: 12px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.02);
  color: var(--text);
  font-size: 13px;
}
.chat-input input::placeholder { color: color-mix(in oklab, var(--muted) 85%, #fff 15%); }
.chat-input input:focus { outline: none; border-color: color-mix(in oklab, var(--accent-1) 50%, rgba(255,255,255,.08)); box-shadow: 0 0 0 6px rgba(22,176,255,.12); }

.chat-input .send {
  display: inline-grid;
  place-items: center;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.08);
  background:
    linear-gradient(#0c1220, #0c1220) padding-box,
    linear-gradient(90deg, var(--accent-1), var(--accent-2), var(--accent-3)) border-box;
  color: #cfe9ff;
  cursor: pointer;
}
.chat-input .send:hover { filter: brightness(1.1); }
.chat-input .send:active { transform: translateY(1px); }

.section { padding: 44px 0; }
.section-title { font-size: 24px; margin: 0 0 18px; }
.lead { color: var(--muted); max-width: 70ch; }
.note { color: var(--muted); opacity: .9; margin-top: 8px; }

.card-grid { display: grid; gap: 14px; }
.card-grid.three { grid-template-columns: 1fr; }
.card-grid.four { grid-template-columns: 1fr; }

.card { background: var(--panel); border: 1px solid var(--border); border-radius: 14px; padding: 16px; }
.card.big { padding: 18px; }
.card h3 { margin: 0 0 8px; font-size: 18px; }
.card p { color: var(--muted); margin: 0; }
.card-icon { font-size: 22px; margin-bottom: 8px; }
.card-link { display: inline-block; margin-top: 10px; color: var(--accent-1); text-decoration: none; }
.card-link:hover { text-decoration: underline; }

.feature-split { display: grid; grid-template-columns: 1fr; gap: 20px; align-items: center; }
.screenshot { width: 100%; max-width: 360px; aspect-ratio: 9/19.5; border-radius: 24px; background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.02)); border: 1px solid var(--border); box-shadow: 0 10px 60px rgba(0,0,0,.5), 0 0 30px rgba(37,208,180,.25); display: grid; place-items: center; color: var(--muted); }
.split-copy h3 { margin: 14px 0 8px; }
.split-copy ul { margin: 6px 0 12px 18px; padding: 0; }
.split-copy li { margin: 6px 0; }

.value-props { display: grid; gap: 12px; margin-top: 14px; }
.value { display: grid; grid-template-columns: 28px 1fr; gap: 12px; align-items: start; background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 12px; }
.value .icon { font-size: 18px; margin-top: 2px; }
.value strong { display: block; margin-bottom: 2px; }

/* Solution section — dark rounded panel with dotted grid (reference look) */
#solution {
  position: relative;
  border-radius: 20px;
  padding: 60px 22px;
  background: #0a0f1a;
  border: 1px solid rgba(255,255,255,.06);
  box-shadow: 0 20px 80px rgba(0,0,0,.55), 0 0 0 6px rgba(139,92,246,.06);
  overflow: hidden;
}
#solution::before {
  /* dotted grid */
  content: '';
  position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(255,255,255,.08) 1px, transparent 1px);
  background-size: 22px 22px;
  opacity: .25;
}
#solution::after {
  /* soft corner glow */
  content: '';
  position: absolute; inset: -20% -10% auto -10%; height: 60%; pointer-events: none;
  background:
    radial-gradient(600px 300px at 15% 10%, color-mix(in oklab, var(--accent-1) 40%, transparent), transparent 70%),
    radial-gradient(500px 260px at 85% 25%, color-mix(in oklab, var(--accent-2) 40%, transparent), transparent 70%);
  filter: blur(40px) saturate(120%);
  opacity: .35;
}
#solution .section-title {
  text-align: center;
  font-size: clamp(28px, 4.2vw, 44px);
  line-height: 1.12;
  margin-bottom: 10px;
  background: linear-gradient(90deg, var(--accent-1), var(--accent-2), var(--accent-3));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
#solution .lead {
  text-align: center; margin: 0 auto; opacity: .9; color: #c7cfdd;
}
#solution .value-props {
  margin-top: 28px;
  grid-template-columns: 1fr;
}
#solution .value {
  background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.015));
  border-color: rgba(255,255,255,.08);
  border-radius: 14px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.02), 0 10px 30px rgba(0,0,0,.35);
}
#solution .value .icon {
  width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; margin-top: 0;
  background: linear-gradient(90deg, var(--accent-1), var(--accent-2), var(--accent-3));
  color: #071019; font-weight: 800; box-shadow: 0 0 18px rgba(22,176,255,.25);
}
#solution .value strong { font-size: 15px; }
#solution .value p { color: #9fb0ca; }

.signup form { margin-top: 10px; }
.form-row { display: grid; gap: 6px; margin-bottom: 12px; }
label { font-size: 14px; color: var(--muted); }
input[type="text"], input[type="tel"] {
  width: 100%; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--border); background: rgba(255,255,255,0.02); color: var(--text);
}
input:focus { outline: none; border-color: color-mix(in oklab, var(--accent-1) 60%, var(--border)); box-shadow: 0 0 0 6px rgba(22,176,255,.12); }

.hp { position: absolute !important; left: -5000px !important; opacity: 0 !important; }

.message { margin: 10px 0; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--panel); }
.message.ok { border-color: rgba(37,208,180,.5); box-shadow: 0 0 0 6px rgba(37,208,180,.12); }
.message.error { border-color: rgba(255,99,99,.5); box-shadow: 0 0 0 6px rgba(255,99,99,.12); }
.message.duplicate { border-color: rgba(139,92,246,.5); box-shadow: 0 0 0 6px rgba(139,92,246,.12); }

.btn { display: inline-block; padding: 12px 18px; border-radius: 12px; border: 1px solid transparent; font-weight: 600; letter-spacing: .2px; transition: transform .06s ease, box-shadow .2s ease, filter .2s ease; }
.btn-cta {
  /* Fallback subtle gradient for browsers without color-mix */
  background: linear-gradient(90deg, #123052, #1a2557 55%, #13433c);
  /* Subtle theme-blended gradient using accent colors */
  background: linear-gradient(
    90deg,
    color-mix(in oklab, var(--accent-1) 35%, var(--bg)),
    color-mix(in oklab, var(--accent-2) 35%, var(--bg)) 55%,
    color-mix(in oklab, var(--accent-3) 35%, var(--bg))
  );
  border: 1px solid var(--border);
  border-color: color-mix(in oklab, var(--accent-2) 30%, var(--border));
  box-shadow: 0 6px 18px rgba(0,0,0,.35), 0 0 0 6px color-mix(in oklab, var(--accent-2) 18%, transparent);
  color: white;
}
.btn-cta:hover {
  filter: none;
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(0,0,0,.4), 0 0 0 8px color-mix(in oklab, var(--accent-2) 22%, transparent);
  text-decoration: none;
}
.btn-cta:active { transform: translateY(0); }

/* Extra spacing between phone field and submit button */
.signup form #submit-btn { margin-top: 16px; }

.gradient-text { background: linear-gradient(90deg, var(--accent-1), var(--accent-2), var(--accent-3)); -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: 0 0 0 rgba(0,0,0,0); }

.site-footer { padding: 36px 0 60px; text-align: center; }
.muted { color: var(--muted); }

/* Larger screens */
@media (min-width: 860px) {
  .nav { display: inline-flex; }
  .hero { grid-template-columns: 1.1fr 0.9fr; padding: 80px 0; }
  .hero-copy h1 { font-size: 54px; }
  .hero-visual { display: grid; place-items: center; }
  .card-grid.three { grid-template-columns: repeat(3, 1fr); }
  .card-grid.four { grid-template-columns: repeat(4, 1fr); }
  .feature-split { grid-template-columns: 1fr 1.2fr; gap: 40px; }
}

/* Mobile-specific padding for hero copy and header sides */
@media (max-width: 859px) {
  .hero { padding: 30px; }
  .hero-copy { padding-left: 15px; padding-right: 12px; }
  .site-header .header-inner { padding-left: 24px; padding-right: 24px; justify-content: center; }
}

/* Two-column layout after hero */
.twocol { display: grid; grid-template-columns: 1fr; gap: 24px; align-items: start; }
.twocol .sticky-form { position: static; }
.twocol .twocol-content { min-width: 0; }

@media (min-width: 980px) {
  .twocol { grid-template-columns: 0.3fr 0.7fr; gap: 28px; }
  .twocol .sticky-form { position: sticky; top: var(--sticky-offset); align-self: start; height: fit-content; z-index: 10; }
}

/* Style the form panel nicely as a sidebar */
.sticky-form .signup { background: var(--panel); border: 1px solid var(--border); border-radius: 14px; padding: 16px; box-shadow: 0 12px 40px rgba(0,0,0,.35); }
.sticky-form .signup .section-title { margin-top: 4px; }
.sticky-form .signup .subhead { margin-bottom: 12px; }
