/* ============================================================
   Zoho Books (IN) page replica — stylesheet
   Blue #006FDA / dark #004A94 · CTA yellow #F5BA30 · Inter
   ============================================================ */

:root {
    --blue: #006FDA;
    --blue-dark: #004A94;
    --blue-deeper: #033E75;
    --yellow: #F5BA30;
    --ink: #1E2329;
    --ink-soft: #5F6B7A;
    --line: #E4E9F0;
    --bg: #FFFFFF;
    --bg-soft: #F9FCFF;
    --radius: 8px;
    --radius-lg: 14px;
    --shadow-sm: 0 1px 2px rgba(16,24,40,.06), 0 1px 3px rgba(16,24,40,.1);
    --shadow-md: 0 8px 24px rgba(16,24,40,.12);
    --shadow-lg: 0 24px 60px rgba(16,24,40,.24);
    --maxw: 1200px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; color: var(--ink); background: var(--bg); line-height: 1.55; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
svg.icon { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.center { text-align: center; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; font: inherit; font-weight: 600; font-size: 15px; padding: 11px 24px; border-radius: var(--radius); border: 1px solid transparent; cursor: pointer; transition: transform .12s ease, background .2s ease; white-space: nowrap; }
.btn:hover { transform: translateY(-1px); }
.btn-lg { padding: 15px 32px; font-size: 16px; }
.btn-yellow { background: var(--yellow); color: #222; box-shadow: var(--shadow-sm); }
.btn-yellow:hover { background: #E7A81C; }
.btn-blue { background: var(--blue); color: #fff; }
.btn-blue:hover { background: var(--blue-dark); }
.btn-ghost-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.55); }
.btn-ghost-light:hover { background: rgba(255,255,255,.12); border-color: #fff; }
.btn-outline { background: #fff; color: var(--blue-dark); border-color: var(--blue); }
.btn-outline:hover { background: var(--blue); color: #fff; }
.btn-outline-dark { background: transparent; color: var(--ink); border-color: #9AA5B1; }
.btn-outline-dark:hover { border-color: var(--ink); }
.text-link { color: var(--blue-dark); font-weight: 600; font-size: 15px; cursor: pointer; }
.text-link:hover { text-decoration: underline; }
.link-quiet { color: #fff; font-weight: 500; font-size: 15px; padding: 8px 4px; cursor: pointer; }
.link-quiet:hover { color: var(--yellow); }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 100; background: var(--blue-dark); }
.header-inner { display: flex; align-items: center; gap: 26px; height: 66px; }
.brand { display: flex; align-items: center; gap: 9px; cursor: pointer; }
.brand-name { font-size: 21px; font-weight: 700; color: #fff; letter-spacing: -.01em; }
.brand-name em { font-style: normal; color: var(--yellow); }
.main-nav { flex: 1; }
.nav-list { display: flex; align-items: center; gap: 4px; list-style: none; }
.nav-item > a { display: inline-flex; align-items: center; gap: 5px; padding: 10px 13px; border-radius: var(--radius); font-weight: 500; font-size: 14.5px; color: #EAF3EE; cursor: pointer; }
.nav-item > a:hover { background: rgba(255,255,255,.12); color: #fff; }
.caret { opacity: .6; }
.header-actions { display: flex; align-items: center; gap: 12px; }
.hamburger { display: none; flex-direction: column; gap: 4px; background: none; border: 0; cursor: pointer; padding: 8px; }
.hamburger span { width: 22px; height: 2px; background: #fff; border-radius: 2px; }

/* Mega menu */
.mega-menu { position: absolute; top: 100%; left: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 22px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); padding: 24px 28px; width: min(560px, 90vw); opacity: 0; visibility: hidden; transform: translateY(8px); transition: all .18s ease; }
.nav-item.has-mega { position: static; }
.nav-item.has-mega:hover .mega-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.mega-col-title { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); margin-bottom: 8px; }
.mega-col ul { list-style: none; }
.mega-col li a { display: block; padding: 5px 0; font-size: 14px; color: var(--ink); cursor: pointer; }
.mega-col li a:hover { color: var(--blue); }

/* ---------- Hero ---------- */
.hero { background: radial-gradient(1000px 480px at 78% -10%, #3B91E0 0%, rgba(59,145,224,0) 55%), linear-gradient(160deg, var(--blue-deeper) 0%, var(--blue-dark) 55%, #0B5CB0 100%); color: #fff; text-align: center; padding: 72px 0 80px; }
.hero-eyebrow { display: inline-block; font-size: 14px; font-weight: 600; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.22); padding: 7px 16px; border-radius: 999px; margin-bottom: 24px; }
.hero-title { font-size: clamp(34px, 4.6vw, 52px); font-weight: 700; line-height: 1.1; letter-spacing: -.015em; }
.hero-sub { margin-top: 18px; font-size: clamp(15px, 1.6vw, 18px); color: #D9EAE1; }
.hero-cta { display: flex; gap: 14px; justify-content: center; margin-top: 30px; flex-wrap: wrap; }

/* Hero dashboard（居中笔记本 + 两侧浮动部件 + CTA 徽章） */
.hero-dashboard { position: relative; margin-top: 58px; padding: 0 190px; }
.dash-bg { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-54%); width: 660px; max-width: none; opacity: .9; pointer-events: none; }
.dash-center { position: relative; z-index: 2; max-width: 620px; margin: 0 auto; }
.hero-laptop { display: block; cursor: pointer; }
.hero-laptop img { width: 100%; filter: drop-shadow(0 30px 50px rgba(2,32,64,.45)); }
.demo-cta { position: absolute; left: 50%; bottom: -24px; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 9px; background: var(--yellow); color: #232323; font-weight: 700; font-size: 15px; padding: 13px 28px; border-radius: 10px; box-shadow: 0 10px 28px rgba(2,32,64,.35); cursor: pointer; white-space: nowrap; z-index: 3; transition: transform .15s ease, background .2s ease; }
.demo-cta:hover { transform: translateX(-50%) translateY(-3px); background: #E7A81C; }
.demo-arrow { color: #fff; }
.dash-widgets { position: absolute; top: 14px; z-index: 3; display: flex; flex-direction: column; gap: 22px; width: 170px; }
.dash-left { left: 0; }
.dash-right { right: 0; }
.dash-widget { cursor: pointer; filter: drop-shadow(0 12px 24px rgba(2,32,64,.30)); animation: dashFloat 5.2s ease-in-out infinite; }
.dash-right .dash-widget:nth-child(1) { animation-delay: .9s; }
.dash-left  .dash-widget:nth-child(2) { animation-delay: 1.6s; }
.dash-right .dash-widget:nth-child(2) { animation-delay: 2.4s; }
.dash-widget img { width: 100%; }
.dash-widget:hover { animation-play-state: paused; }
@keyframes dashFloat { 0%,100% { transform: translateY(0) } 50% { transform: translateY(-12px) } }
.dash-star { position: absolute; top: -16px; right: 150px; width: 46px; z-index: 3; pointer-events: none; animation: dashFloat 4s ease-in-out infinite; }

/* ---------- Migration / webinar banner ---------- */
.webinar { background: var(--bg-soft); border-bottom: 1px solid var(--line); }
.webinar-inner { display: flex; align-items: center; gap: 20px; padding: 18px 24px; flex-wrap: wrap; }
.webinar-inner > img { width: 74px; }
.webinar-inner p { flex: 1; font-size: 15px; color: var(--ink); min-width: 240px; }

/* ---------- Section titles ---------- */
.section-title { text-align: center; font-size: clamp(26px, 3.2vw, 38px); font-weight: 700; letter-spacing: -.01em; line-height: 1.15; }
.section-title.dark { color: #0F3A63; }
.band-lead { text-align: center; margin-top: 10px; color: var(--ink-soft); font-size: 17px; }

/* ---------- Testimonials ---------- */
.testimonials { padding: 72px 0; background: #fff; overflow: hidden; }
.testimonial-track { display: grid; grid-auto-flow: column; grid-auto-columns: 380px; gap: 18px; overflow-x: auto; padding: 30px 24px 12px; scroll-snap-type: x mandatory; }
.testimonial-card { scroll-snap-align: start; background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.t-quote { width: 30px; opacity: .5; }
.testimonial-card blockquote { font-size: 14.5px; color: var(--ink); flex: 1; }
.testimonial-card figcaption { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.t-user { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; }
.t-who strong { display: block; font-size: 14px; color: var(--ink); }
.t-who span { font-size: 12px; color: var(--ink-soft); }
.t-company { margin-left: auto; height: 26px; }
.wall-of-love { text-align: center; margin-top: 26px; }

/* ---------- Spotlight ---------- */
.spotlight { padding: 72px 0; background: var(--bg-soft); }
.spotlight-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 40px; }
.spot-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px; cursor: pointer; transition: transform .15s ease, box-shadow .2s ease; }
.spot-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.spot-card img { height: 150px; width: 100%; object-fit: contain; }
.spot-card h3 { margin-top: 14px; font-size: 17px; font-weight: 700; color: var(--ink); }
.spot-card p { margin-top: 8px; font-size: 14px; color: var(--ink-soft); }

/* ---------- Favorites ---------- */
.favorites { padding: 72px 0; }
.favorites-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; margin-top: 40px; }
.fav-card { background: var(--bg-soft); border-radius: var(--radius-lg); padding: 22px 18px; text-align: center; cursor: pointer; transition: transform .15s ease, background .2s ease; }
.fav-card:hover { transform: translateY(-4px); background: #E8EFF5; }
.fav-card img { height: 110px; width: 100%; object-fit: contain; }
.fav-card h3 { margin-top: 12px; font-size: 16.5px; font-weight: 700; color: var(--blue-dark); }
.fav-card p { margin-top: 6px; font-size: 13.5px; color: var(--ink-soft); }
.favorites .btn { margin-top: 34px; }

/* ---------- Pricing ---------- */
.pricing { padding: 72px 0; background: var(--bg-soft); }
.billing-toggle { display: flex; justify-content: center; align-items: center; gap: 12px; margin: 24px 0 34px; }
.toggle-opt { background: none; border: 0; font: inherit; font-weight: 600; font-size: 16px; color: var(--ink-soft); cursor: pointer; padding: 4px 2px; }
.toggle-opt small { font-size: 12px; color: var(--blue); }
.toggle-opt.active { color: var(--blue-dark); border-bottom: 2px solid var(--yellow); }
.toggle-sep { color: #C3CCD5; }
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.price-card { position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 26px 22px; text-align: center; display: flex; flex-direction: column; }
.price-card.popular { border: 2px solid var(--blue); box-shadow: var(--shadow-md); }
.pop-badge { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); background: var(--blue); color: #fff; font-size: 12px; font-weight: 600; padding: 4px 14px; border-radius: 999px; white-space: nowrap; }
.price-card h3 { font-size: 15px; font-weight: 700; letter-spacing: .05em; color: var(--ink-soft); }
.price { margin-top: 12px; color: var(--blue-dark); }
.price .cur { font-size: 20px; font-weight: 600; vertical-align: 6px; }
.price .amt { font-size: 38px; font-weight: 800; letter-spacing: -.02em; }
.per { font-size: 12.5px; color: var(--ink-soft); }
.price-card ul { list-style: none; margin: 18px 0; flex: 1; text-align: left; }
.price-card ul li { position: relative; padding: 5px 0 5px 22px; font-size: 13.5px; color: var(--ink); }
.price-card ul li::before { content: "✓"; position: absolute; left: 2px; color: var(--blue); font-weight: 700; }
.pricing-note { text-align: center; margin-top: 22px; font-size: 13px; color: var(--ink-soft); }

/* ---------- Tailored ---------- */
.tailored { padding: 72px 0; }
.tailored-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 40px; }
.tail-card { background: var(--bg-soft); border-radius: var(--radius-lg); padding: 26px 20px; text-align: center; cursor: pointer; transition: transform .15s ease; }
.tail-card:hover { transform: translateY(-4px); }
.tail-card img { height: 120px; width: 100%; object-fit: contain; }
.tail-card h3 { margin-top: 12px; font-size: 16px; font-weight: 700; color: var(--ink); }
.tail-card p { margin-top: 6px; font-size: 13.5px; color: var(--ink-soft); }

/* ---------- Integrations ---------- */
.integrations { padding: 72px 0; background: var(--bg-soft); }
.chip-row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin: 30px 0 34px; }
.chip { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 9px 20px; font-size: 14.5px; font-weight: 500; cursor: pointer; box-shadow: var(--shadow-sm); transition: all .15s ease; }
.chip:hover { border-color: var(--blue); color: var(--blue-dark); transform: translateY(-2px); }

/* ---------- Apps ---------- */
.apps { padding: 72px 0; }
.apps-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: center; }
.app-block { text-align: center; }
.app-tag { display: inline-block; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--blue-dark); background: #E3F0FC; padding: 5px 14px; border-radius: 999px; margin-bottom: 14px; }
.app-block .section-title { font-size: clamp(22px, 2.6vw, 30px); }
.app-block > img { margin: 24px auto 0; max-width: 460px; }
.store-row { display: flex; gap: 14px; justify-content: center; margin-top: 20px; }
.store-row a img { height: 44px; cursor: pointer; }

/* ---------- Privacy ---------- */
.privacy { background: linear-gradient(150deg, var(--blue-deeper), var(--blue-dark)); color: #fff; text-align: center; padding: 72px 0; }
.privacy .section-title { color: #fff; }
.privacy p { margin-top: 12px; color: #D9EAE1; font-size: 16px; max-width: 720px; margin-left: auto; margin-right: auto; }
.privacy img { margin: 28px auto 0; max-width: 620px; }

/* ---------- Quick links ---------- */
.quicklinks { padding: 60px 0; }
.ql-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.ql-card { display: flex; align-items: center; gap: 14px; background: var(--bg-soft); border-radius: var(--radius-lg); padding: 18px 22px; cursor: pointer; transition: transform .15s ease; }
.ql-card:hover { transform: translateY(-3px); }
.ql-card img { width: 44px; height: 44px; object-fit: contain; }
.ql-card strong { display: block; font-size: 15px; color: var(--blue-dark); }
.ql-card span { font-size: 12.5px; color: var(--ink-soft); }

/* ---------- Footer ---------- */
.site-footer { background: var(--blue-deeper); color: #C9D8D0; padding: 60px 0 26px; }
.footer-grid { display: grid; grid-template-columns: 280px 1fr 1fr 1fr; gap: 40px; padding-bottom: 36px; border-bottom: 1px solid rgba(255,255,255,.12); }
.footer-col h5 { font-size: 15px; font-weight: 700; color: #fff; margin-bottom: 12px; }
.footer-col ul { list-style: none; }
.footer-col ul li a { display: block; padding: 4px 0; font-size: 13.5px; color: #A9BCB2; cursor: pointer; }
.footer-col ul li a:hover { color: #fff; }
.footer-contact ul li { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; color: #A9BCB2; margin-bottom: 14px; }
.footer-contact ul li img { width: 18px; margin-top: 3px; }
.footer-contact ul li a { color: #fff; font-weight: 600; }
.store-row img { border-radius: 6px; }
.footer-social { display: flex; gap: 12px; margin-top: 18px; }
.footer-social a { width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.1); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.footer-social a:hover { background: var(--blue); }
.footer-social img { width: 16px; height: 16px; }
.footer-apps li a { display: flex; align-items: center; gap: 10px; }
.footer-apps img { width: 22px; height: 22px; object-fit: contain; }
.rating-row { display: flex; gap: 10px; flex-wrap: wrap; }
.rating-row img { height: 34px; }
.footer-copy { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding-top: 22px; font-size: 13px; color: #8FA9B8; }
.footer-copy a { color: #A9BCB2; cursor: pointer; }
.footer-copy a:hover { color: #fff; }

/* ---------- Floating chat launcher ---------- */
.chat-launcher { position: fixed; right: 24px; bottom: 24px; z-index: 200; width: 58px; height: 58px; border-radius: 50%; border: 0; cursor: pointer; background: var(--blue); color: #fff; box-shadow: var(--shadow-lg); display: flex; align-items: center; justify-content: center; transition: transform .15s ease; }
.chat-launcher:hover { transform: scale(1.08); background: var(--blue-dark); }
.chat-launcher svg.icon { width: 28px; height: 28px; }

/* ============================================================
   POPUP — fixed 340 × 820 window with full chat iframe
   ============================================================ */
.popup-overlay { position: fixed; inset: 0; z-index: 1000; background: rgba(10,20,15,.5); backdrop-filter: blur(2px); display: flex; align-items: center; justify-content: center; opacity: 0; visibility: hidden; transition: opacity .2s ease; }
.popup-overlay.open { opacity: 1; visibility: visible; }
.popup-window { position: relative; background: #fff; border-radius: 14px; overflow: hidden; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; transform: scale(.94); transition: transform .22s cubic-bezier(.2,.8,.2,1); max-height: calc(100vh - 32px); }
.popup-overlay.open .popup-window { transform: scale(1); }
.popup-head { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; background: var(--blue-dark); color: #fff; }
.popup-head__left { display: flex; align-items: center; gap: 10px; }
.popup-avatar { width: 32px; height: 32px; border-radius: 50%; background: rgba(255,255,255,.18); display: flex; align-items: center; justify-content: center; }
.popup-avatar svg { width: 19px; height: 19px; }
.popup-title { font-weight: 600; font-size: 15px; }
.popup-close { width: 30px; height: 30px; border-radius: 50%; border: 0; cursor: pointer; background: rgba(255,255,255,.16); color: #fff; font-size: 22px; line-height: 1; display: grid; place-items: center; transition: background .15s ease; }
.popup-close:hover { background: rgba(255,255,255,.32); }
.popup-body { flex: 1 1 auto; position: relative; background: #fff; min-height: 0; }
.popup-frame { width: 100%; height: 100%; border: 0; display: block; background: #fff; }
body.popup-open { overflow: hidden; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1024px) {
    .spotlight-grid { grid-template-columns: repeat(2, 1fr); }
    .favorites-row { grid-template-columns: repeat(3, 1fr); }
    .tailored-row, .ql-grid { grid-template-columns: repeat(2, 1fr); }
    .hero-dashboard { padding: 0 150px; }
    .dash-widgets { width: 140px; }
    .pricing-grid { grid-template-columns: repeat(2, 1fr); }
    .apps-grid { grid-template-columns: 1fr; gap: 28px; }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
    .main-nav { display: none; position: absolute; top: 66px; left: 0; right: 0; background: var(--blue-dark); border-bottom: 1px solid rgba(255,255,255,.15); box-shadow: var(--shadow-md); padding: 12px 24px; }
    .main-nav.nav-open { display: block; }
    .main-nav .nav-list { flex-direction: column; align-items: flex-start; gap: 0; }
    .main-nav .nav-item { width: 100%; }
    .main-nav .nav-item > a { display: block; padding: 12px 8px; border-bottom: 1px solid rgba(255,255,255,.12); }
    .main-nav .mega-menu { display: none; }
    .hamburger { display: flex; }
    .header-actions .link-quiet { display: none; }
    /* 小屏：两侧浮动部件收起 */
    .hero-dashboard { padding: 0; margin-top: 40px; }
    .dash-widgets { display: none; }
    .dash-star { right: 6%; width: 34px; }
    .dash-bg { width: 420px; }
    .popup-window { width: min(340px, 94vw) !important; height: min(820px, 92vh) !important; }
}
@media (max-width: 520px) {
    .spotlight-grid, .favorites-row, .tailored-row, .pricing-grid, .ql-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .hero-cta { flex-direction: column; }
    .hero-cta .btn { width: 100%; }
}
