/* ==========================================================================
   Ysnip — Landing page styles
   ========================================================================== */

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  height: var(--nav-h);
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.nav.scrolled { border-color: var(--border); }
.nav .container { position: relative; height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.15rem; letter-spacing: -0.02em; }
.brand .logo-mark {
  width: 30px; height: 30px; border-radius: 9px;
  background: var(--ink); color: #fff;
  display: grid; place-items: center; font-size: 15px; font-weight: 800;
}
.nav-links { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: flex; align-items: center; gap: 6px; }
.nav-links a { padding: 8px 14px; border-radius: var(--r-full); font-size: 0.92rem; font-weight: 500; color: var(--gray-700); transition: background 0.16s, color 0.16s; }
.nav-links a:hover { background: var(--gray-100); color: var(--ink); }
.nav-links .only-mobile { display: none; }
.nav-cta { display: flex; align-items: center; gap: 10px; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }

/* Landing hero nav — transparent over the orange hero, solid orange when scrolled */
.nav-hero { background: transparent; backdrop-filter: none; border-bottom-color: transparent; }
.nav-hero .brand { color: #fff; }
.nav-hero .nav-links a { color: rgba(255,255,255,0.85); }
.nav-hero .nav-links a:hover { background: rgba(255,255,255,0.14); color: #fff; }
.nav-hero .nav-cta .btn-ghost { color: #fff; }
.nav-hero .nav-cta .btn-ghost:hover { background: rgba(255,255,255,0.14); }
.nav-hero .nav-toggle { color: #fff; }
.nav-hero .brand, .nav-hero .nav-links a, .nav-hero .nav-cta .btn, .nav-hero .nav-toggle { transition: color 0.2s ease, background 0.2s ease; }
/* Past the hero (over white sections) — frosted white bar with dark text */
.nav-hero.scrolled { background: rgba(255,255,255,0.85); backdrop-filter: saturate(180%) blur(14px); border-bottom-color: var(--border); box-shadow: 0 6px 20px rgba(0,0,0,0.06); }
.nav-hero.scrolled .brand { color: var(--ink); }
.nav-hero.scrolled .nav-links a { color: var(--gray-700); }
.nav-hero.scrolled .nav-links a:hover { background: var(--gray-100); color: var(--ink); }
.nav-hero.scrolled .nav-cta .btn-ghost { color: var(--ink); }
.nav-hero.scrolled .nav-cta .btn-ghost:hover { background: var(--gray-100); }
.nav-hero.scrolled .nav-toggle { color: var(--ink); }
.nav-hero.scrolled .nav-cta .btn-white { background: var(--brand); color: var(--brand-contrast); }
.nav-hero.scrolled .nav-cta .btn-white:hover { background: var(--brand-strong); color: #fff; }

/* ---------- Hero ---------- */
.hero { position: relative; margin-top: calc(-1 * var(--nav-h)); padding: calc(var(--nav-h) + clamp(56px, 9vw, 116px)) 0 clamp(48px, 6vw, 80px); overflow: hidden; background: var(--brand-dark); color: #fff; }
.hero::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(1000px 480px at 78% -8%, rgba(255,255,255,0.14), transparent 60%),
    radial-gradient(720px 400px at 8% 8%, rgba(0,0,0,0.10), transparent 55%);
}
.hero-grid { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 48px; }
.hero-copy { max-width: 760px; }
.hero h1 { margin-bottom: 20px; color: #fff; }
.hero .eyebrow { color: rgba(255,255,255,0.85); }
.hero .lead { margin: 0 auto 28px; font-size: 1.24rem; max-width: 620px; color: rgba(255,255,255,0.9); }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 22px; justify-content: center; }
.hero-proof { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; color: rgba(255,255,255,0.8); font-size: 0.88rem; justify-content: center; }
.avatars { display: flex; }
.avatars span { width: 34px; height: 34px; border-radius: 50%; border: 2px solid #fff; margin-left: -10px; background: var(--gray-200); display: grid; place-items: center; font-size: 12px; font-weight: 700; color: var(--gray-700); }
.avatars span:first-child { margin-left: 0; }
.stars { color: #ffd97a; letter-spacing: 2px; }

/* Hero visual: mock browser with widget */
.hero-visual { position: relative; width: 100%; max-width: 640px; margin: 0 auto; }
.browser {
  border-radius: var(--r-lg); border: 1px solid var(--border);
  background: var(--white); box-shadow: var(--shadow-lg); overflow: hidden;
}
.browser-bar { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--border); background: var(--gray-50); }
.browser-bar .dot { width: 11px; height: 11px; border-radius: 50%; background: var(--gray-300); }
.browser-bar .url { margin-left: 10px; flex: 1; height: 24px; border-radius: var(--r-full); background: var(--white); border: 1px solid var(--border); display: flex; align-items: center; padding: 0 12px; font-size: 0.72rem; color: var(--gray-500); }
.browser-body { position: relative; height: 360px; background:
    linear-gradient(var(--gray-100) 0 0) 0 24px / 60% 14px no-repeat,
    linear-gradient(var(--gray-100) 0 0) 0 52px / 80% 10px no-repeat,
    linear-gradient(var(--gray-100) 0 0) 0 72px / 72% 10px no-repeat,
    linear-gradient(var(--gray-50) 0 0) 0 120px / 100% 120px no-repeat;
  padding: 24px; }

/* Floating widget mock inside hero */
.mock-widget { position: absolute; right: 20px; bottom: 20px; width: 300px; }
.mock-bubble {
  background: #fff; border: 1px solid var(--border); border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg); padding: 16px; margin-bottom: 14px;
  animation: floatUp 0.6s ease both;
}
.mock-bubble .who { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.mock-bubble .who img, .mock-bubble .who .ph { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; background: var(--ink); color: #fff; display: grid; place-items: center; font-weight: 700; }
.mock-bubble .who b { font-size: 0.9rem; }
.mock-bubble .who small { color: var(--success); font-size: 0.72rem; display: flex; align-items: center; gap: 5px; }
.mock-bubble .who small::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--success); }
.mock-bubble p { font-size: 0.9rem; margin: 0; color: var(--gray-800); }
.mock-avatar {
  width: 66px; height: 66px; border-radius: 50%; margin-left: auto;
  background: var(--ink); color: #fff; display: grid; place-items: center;
  box-shadow: var(--shadow-lg); border: 3px solid #fff; font-size: 26px;
  animation: bob 3s ease-in-out infinite;
}
@keyframes floatUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }

/* ---------- Logos strip ---------- */
.logos { padding: 30px 0 10px; }
.logos p { text-align: center; font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gray-400); margin-bottom: 18px; }
.logos-row { display: flex; align-items: center; justify-content: center; gap: 44px; flex-wrap: wrap; opacity: 0.7; }
.logos-row span { font-weight: 700; font-size: 1.1rem; color: var(--gray-500); letter-spacing: -0.02em; }

/* ---------- Section shell ---------- */
.section { padding: clamp(64px, 9vw, 110px) 0; }
.section-head { max-width: 680px; margin: 0 auto 52px; text-align: center; }
.section-head .eyebrow { margin-bottom: 14px; }
.section-head p { font-size: 1.1rem; color: var(--gray-500); margin: 0; }
.section-alt { background: var(--bg-soft); border-block: 1px solid var(--border); }

/* ---------- Demo ---------- */
.demo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: center; }
.demo-copy h3 { font-size: 1.6rem; margin-bottom: 12px; }
.demo-steps { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 14px; }
.demo-steps li { display: flex; gap: 14px; align-items: flex-start; }
.demo-steps .n { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--brand); color: var(--brand-contrast); display: grid; place-items: center; font-weight: 700; font-size: 0.85rem; }
.demo-steps b { display: block; font-size: 0.98rem; }
.demo-steps span { font-size: 0.9rem; color: var(--text-soft); }
/* Centered card row (steps as a 4-up grid) */
.demo-steps-row { grid-template-columns: repeat(4, 1fr); gap: 22px; margin-top: 44px; }
.demo-steps-row li { flex-direction: column; align-items: flex-start; gap: 14px; border: 1px solid var(--border); border-radius: var(--r-lg); padding: 26px; background: #fff; }

/* Live demo chat window */
.demo-chat { border: 1px solid var(--border); border-radius: var(--r-lg); background: #fff; box-shadow: var(--shadow-lg); overflow: hidden; display: flex; flex-direction: column; height: 520px; }
.demo-chat-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--border); background: var(--ink); color: #fff; }
.demo-chat-head .ava { width: 40px; height: 40px; border-radius: 50%; background: #fff; color: var(--ink); display: grid; place-items: center; font-weight: 800; }
.demo-chat-head b { font-size: 0.95rem; display: block; }
.demo-chat-head small { font-size: 0.74rem; opacity: 0.8; display: flex; align-items: center; gap: 5px; }
.demo-chat-head small::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #34d399; }
.demo-chat-body { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 12px; background: var(--gray-50); }
.demo-chat-foot { padding: 12px; border-top: 1px solid var(--border); display: flex; gap: 8px; }
.demo-chat-foot input { flex: 1; border: 1px solid var(--border-strong); border-radius: var(--r-full); padding: 11px 15px; font-family: inherit; font-size: 0.9rem; }
.demo-chat-foot input:focus { outline: none; border-color: var(--ink); }
.msg { max-width: 82%; padding: 11px 14px; border-radius: 16px; font-size: 0.9rem; line-height: 1.45; animation: floatUp 0.3s ease both; }
.msg.bot { background: #fff; border: 1px solid var(--border); border-bottom-left-radius: 4px; align-self: flex-start; }
.msg.user { background: var(--ink); color: #fff; border-bottom-right-radius: 4px; align-self: flex-end; }
.msg.typing { display: inline-flex; gap: 4px; align-self: flex-start; }
.msg.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--gray-400); animation: blink 1.2s infinite; }
.msg.typing i:nth-child(2) { animation-delay: 0.2s; } .msg.typing i:nth-child(3) { animation-delay: 0.4s; }
@keyframes blink { 0%,60%,100% { opacity: 0.25; } 30% { opacity: 1; } }
.demo-suggestions { display: flex; gap: 8px; flex-wrap: wrap; padding: 0 18px 12px; background: var(--gray-50); }
.chip { border: 1px solid var(--border-strong); background: #fff; border-radius: var(--r-full); padding: 7px 13px; font-size: 0.82rem; cursor: pointer; transition: 0.15s; }
.chip:hover { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ---------- Features ---------- */
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.feature {
  border: 1px solid var(--border); border-radius: var(--r-lg); padding: 26px;
  background: #fff; transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s;
}
.feature:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.feature .ico { width: 46px; height: 46px; border-radius: 12px; background: var(--brand); color: var(--brand-contrast); display: grid; place-items: center; margin-bottom: 16px; }
.feature h3 { font-size: 1.12rem; margin-bottom: 8px; }
.feature p { font-size: 0.93rem; color: var(--text-soft); margin: 0; }

/* ---------- Pricing ---------- */
.billing-toggle { display: inline-flex; align-items: center; gap: 12px; justify-content: center; margin: 0 auto 40px; padding: 6px; background: var(--gray-100); border-radius: var(--r-full); }
.billing-toggle button { border: 0; background: transparent; padding: 9px 20px; border-radius: var(--r-full); font-family: inherit; font-weight: 600; font-size: 0.9rem; cursor: pointer; color: var(--gray-600); transition: 0.18s; }
.billing-toggle button.active { background: var(--brand); color: var(--brand-contrast); box-shadow: var(--shadow-sm); }
.save-badge { font-size: 0.72rem; background: #ecfdf3; color: #067647; padding: 3px 8px; border-radius: var(--r-full); font-weight: 700; }

.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; align-items: stretch; }
.plan { border: 1px solid var(--border); border-radius: var(--r-lg); padding: 30px; background: #fff; display: flex; flex-direction: column; position: relative; }
.plan.featured { border-color: var(--brand); box-shadow: var(--shadow-lg); }
.plan.featured .ribbon { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--brand); color: var(--brand-contrast); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; padding: 5px 14px; border-radius: var(--r-full); }
.plan h3 { font-size: 1.2rem; margin-bottom: 4px; }
.plan .plan-desc { font-size: 0.88rem; color: var(--text-soft); min-height: 40px; }
.plan .price { display: flex; align-items: baseline; gap: 4px; margin: 14px 0 4px; }
.plan .price .amount { font-size: 2.6rem; font-weight: 800; letter-spacing: -0.03em; }
.plan .price .per { color: var(--text-soft); font-size: 0.9rem; }
.plan .price-note { font-size: 0.8rem; color: var(--text-soft); min-height: 18px; margin-bottom: 18px; }
.plan ul { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 11px; }
.plan ul li { display: flex; gap: 10px; align-items: flex-start; font-size: 0.9rem; }
.plan ul li svg { flex: none; margin-top: 2px; color: var(--ink); }
.plan .btn { margin-top: auto; }

/* ---------- Testimonials ---------- */
.testi-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.testi { border: 1px solid var(--border); border-radius: var(--r-lg); padding: 26px; background: #fff; display: flex; flex-direction: column; }
.testi .stars { margin-bottom: 12px; }
.testi p { font-size: 0.98rem; color: var(--gray-800); flex: 1; }
.testi .who { display: flex; align-items: center; gap: 12px; margin-top: 16px; }
.testi .who .ph { width: 42px; height: 42px; border-radius: 50%; background: var(--gray-200); display: grid; place-items: center; font-weight: 700; color: var(--gray-700); }
.testi .who b { display: block; font-size: 0.9rem; }
.testi .who span { font-size: 0.8rem; color: var(--text-soft); }

/* ---------- FAQ ---------- */
.faq-list { max-width: 760px; margin: 0 auto; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-q { width: 100%; text-align: left; background: none; border: 0; padding: 22px 4px; font-family: inherit; font-size: 1.05rem; font-weight: 600; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 16px; color: var(--ink); }
.faq-q .ic { flex: none; transition: transform 0.2s ease; }
.faq-item.open .faq-q .ic { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height 0.28s ease; }
.faq-a p { padding: 0 4px 22px; color: var(--text-soft); margin: 0; font-size: 0.96rem; }

/* ---------- CTA ---------- */
.cta { padding: clamp(56px, 8vw, 96px) 0; }
.cta-box { background: var(--brand-dark); color: #fff; border-radius: var(--r-xl); padding: clamp(40px, 6vw, 72px); text-align: center; position: relative; overflow: hidden; }
.cta-box::before { content: ""; position: absolute; inset: 0; background: radial-gradient(600px 300px at 80% 0%, rgba(255,255,255,0.12), transparent 60%); }
.cta-box h2 { color: #fff; position: relative; }
.cta-box p { color: rgba(255,255,255,0.9); max-width: 520px; margin: 0 auto 28px; position: relative; }
.cta-box .hero-actions { justify-content: center; position: relative; }
.cta-notes { list-style: none; margin: 20px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: center; position: relative; }
.cta-notes li { display: inline-flex; align-items: center; gap: 7px; font-size: 0.9rem; font-weight: 500; color: rgba(255,255,255,0.9); }
.cta-notes li::before { content: ""; width: 16px; height: 16px; flex: none; background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E"); opacity: 0.9; }

/* ---------- Footer ---------- */
.footer { border-top: 0; padding: 56px 0 32px; background: var(--brand-dark); color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 32px; margin-bottom: 40px; }
.footer .brand { margin-bottom: 14px; color: #fff; }
.footer .muted { color: rgba(255,255,255,0.75); }
.footer-col h4 { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: rgba(255,255,255,0.6); margin-bottom: 14px; }
.footer-col a { display: block; font-size: 0.9rem; color: rgba(255,255,255,0.8); padding: 5px 0; }
.footer-col a:hover { color: #fff; }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,0.15); font-size: 0.85rem; color: rgba(255,255,255,0.7); flex-wrap: wrap; }

/* ---------- Legal pages (privacy / terms) ---------- */
.legal { padding: 0 0 clamp(48px, 7vw, 88px); }
.legal .container { max-width: 820px; }
.legal-head { position: relative; overflow: hidden; margin: calc(-1 * var(--nav-h)) 0 40px; padding: calc(var(--nav-h) + clamp(48px, 7vw, 80px)) 0 clamp(40px, 5vw, 64px); background: var(--brand-dark); color: #fff; }
.legal-head::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(1000px 480px at 78% -8%, rgba(255,255,255,0.14), transparent 60%),
    radial-gradient(720px 400px at 8% 8%, rgba(0,0,0,0.10), transparent 55%);
}
.legal-head .container { position: relative; }
.legal-head h1 { color: #fff; font-size: clamp(2rem, 4vw, 2.6rem); letter-spacing: -0.02em; margin: 14px 0 10px; }
.legal-head .eyebrow { color: rgba(255,255,255,0.85); }
.legal-head p { color: rgba(255,255,255,0.85); margin: 0; font-size: 0.95rem; }
.legal-body h2 { font-size: 1.3rem; letter-spacing: -0.01em; margin: 38px 0 12px; }
.legal-body h3 { font-size: 1.05rem; margin: 26px 0 8px; }
.legal-body p, .legal-body li { color: var(--gray-700); line-height: 1.7; font-size: 0.98rem; }
.legal-body p { margin: 0 0 14px; }
.legal-body ul { margin: 0 0 16px; padding-left: 22px; }
.legal-body li { margin-bottom: 6px; }
.legal-body a { color: var(--ink); text-decoration: underline; }
.legal-body strong { color: var(--ink); }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-grid { gap: 40px; }
  .hero-visual { max-width: 520px; }
  .demo-grid { grid-template-columns: 1fr; }
  .demo-steps-row { grid-template-columns: 1fr 1fr; }
  .features-grid, .pricing-grid, .testi-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .nav-links, .nav-cta .btn-ghost { display: none; }
  .nav-toggle { display: block; }
  .nav.open .nav-links { display: flex; position: absolute; top: var(--nav-h); left: 0; right: 0; transform: none; flex-direction: column; background: #fff; border-bottom: 1px solid var(--border); padding: 12px; gap: 4px; }
  .nav.open .nav-links a { padding: 12px; color: var(--gray-700); }
  .nav.open .nav-links a:hover { background: var(--gray-100); color: var(--ink); }
  .nav.open .nav-links .only-mobile { display: block; }
  .footer-grid { grid-template-columns: 1fr; }
  .demo-steps-row { grid-template-columns: 1fr; }
}
