/* MailCraft landing page – animations and the animated product guide */
html { scroll-behavior: smooth; }
:root { --lp-ind: #4f46e5; --lp-pink: #ec4899; --lp-amber: #f59e0b; }

/* reveal on scroll (only hidden when JS is running) */
.lp-js .reveal { opacity: 0; transform: translateY(20px); transition: opacity .65s ease, transform .65s ease; transition-delay: var(--d, 0s); }
.lp-js .reveal.is-in { opacity: 1; transform: none; }

/* hero */
.lp-hero { background: radial-gradient(1100px 500px at 80% -10%, rgba(99,102,241,.16), transparent 60%), radial-gradient(900px 480px at -10% 10%, rgba(236,72,153,.12), transparent 60%); }
.lp-blob { position: absolute; border-radius: 9999px; filter: blur(60px); opacity: .45; pointer-events: none; animation: lp-float 14s ease-in-out infinite; }
.lp-blob-a { width: 340px; height: 340px; right: 8%; top: 6%; background: #a5b4fc; }
.lp-blob-b { width: 280px; height: 280px; left: 4%; bottom: -4%; background: #fbcfe8; animation-delay: -6s; }
@keyframes lp-float { 0%,100% { transform: translate3d(0,0,0) scale(1); } 50% { transform: translate3d(24px,-28px,0) scale(1.08); } }
.lp-eyebrow { display: inline-block; padding: .3rem .8rem; border-radius: 9999px; font-size: .8rem; font-weight: 600; background: #eef2ff; color: #4338ca; border: 1px solid #c7d2fe; }
.dark .lp-eyebrow { background: rgba(99,102,241,.18); color: #c7d2fe; border-color: rgba(99,102,241,.4); }
.lp-grad-text { background: linear-gradient(90deg, #4f46e5, #ec4899 60%, #f59e0b); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* feature + plan cards */
.lp-feature { transition: transform .25s ease, box-shadow .25s ease; }
.lp-feature:hover { transform: translateY(-4px); box-shadow: 0 14px 30px -12px rgba(79,70,229,.35); }
.lp-ico { display: inline-flex; width: 2.75rem; height: 2.75rem; align-items: center; justify-content: center; border-radius: .8rem; color: #fff; background: linear-gradient(135deg, #6366f1, #ec4899); }
.lp-steps-bg { background: linear-gradient(180deg, rgba(238,242,255,.7), rgba(255,255,255,0)); }
.dark .lp-steps-bg { background: linear-gradient(180deg, rgba(30,41,59,.6), rgba(15,23,42,0)); }
.lp-plan { transition: transform .25s ease, box-shadow .25s ease; }
.lp-plan:hover { transform: translateY(-4px); }
.lp-plan.is-popular { border-color: #6366f1; box-shadow: 0 18px 40px -16px rgba(79,70,229,.5); }
.lp-popular { position: absolute; top: -.8rem; left: 50%; transform: translateX(-50%); padding: .2rem .8rem; border-radius: 9999px; background: linear-gradient(90deg, #4f46e5, #ec4899); color: #fff; font-size: .72rem; font-weight: 700; letter-spacing: .02em; white-space: nowrap; }
.lp-toggle { display: inline-flex; padding: .25rem; border-radius: 9999px; background: #e2e8f0; }
.dark .lp-toggle { background: #334155; }
.lp-toggle button { border: 0; background: transparent; padding: .45rem 1.1rem; border-radius: 9999px; font-size: .875rem; font-weight: 600; color: #475569; cursor: pointer; transition: all .2s; }
.dark .lp-toggle button { color: #cbd5e1; }
.lp-toggle button[aria-pressed="true"] { background: #fff; color: #4338ca; box-shadow: 0 1px 4px rgba(15,23,42,.18); }
.dark .lp-toggle button[aria-pressed="true"] { background: #4f46e5; color: #fff; }
.lp-save { padding: .25rem .65rem; border-radius: 9999px; background: #dcfce7; color: #166534; font-size: .75rem; font-weight: 700; }
.lp-faq .lp-plus { position: relative; width: 14px; height: 14px; flex: none; }
.lp-faq .lp-plus::before, .lp-faq .lp-plus::after { content: ""; position: absolute; left: 0; right: 0; top: 6px; height: 2px; background: currentColor; border-radius: 2px; transition: transform .25s; }
.lp-faq .lp-plus::after { transform: rotate(90deg); }
.lp-faq[open] .lp-plus::after { transform: rotate(0deg); }
.lp-faq summary { list-style: none; } .lp-faq summary::-webkit-details-marker { display: none; }
.lp-cta { background: linear-gradient(120deg, #4338ca, #7c3aed 55%, #db2777); box-shadow: 0 24px 50px -20px rgba(79,70,229,.6); }

/* ---------- animated product guide ---------- */
.lp-step { position: relative; display: flex; width: 100%; gap: .9rem; align-items: flex-start; padding: 1rem 1.1rem; border-radius: 1rem; border: 1px solid transparent; background: transparent; cursor: pointer; text-align: left; transition: background .25s, border-color .25s, box-shadow .25s; overflow: hidden; }
.lp-step:hover { background: rgba(99,102,241,.06); }
.lp-step-n { display: inline-flex; flex: none; width: 2rem; height: 2rem; align-items: center; justify-content: center; border-radius: 9999px; background: #e2e8f0; color: #475569; font-weight: 700; font-size: .9rem; transition: all .25s; }
.dark .lp-step-n { background: #334155; color: #cbd5e1; }
.lp-step-text { display: none; }
.lp-step.is-active { background: #fff; border-color: #c7d2fe; box-shadow: 0 10px 28px -14px rgba(79,70,229,.45); }
.dark .lp-step.is-active { background: #1e293b; border-color: #4f46e5; }
.lp-step.is-active .lp-step-n { background: linear-gradient(135deg, #4f46e5, #ec4899); color: #fff; transform: scale(1.1); }
.lp-step.is-active .lp-step-text { display: block; }
.lp-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: transparent; }
.lp-progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #4f46e5, #ec4899); }
.lp-guide.is-playing .lp-step.is-active .lp-progress i { animation: lp-prog var(--dur, 6s) linear forwards; }
.lp-guide.is-paused .lp-step.is-active .lp-progress i { animation-play-state: paused; }
@keyframes lp-prog { to { width: 100%; } }

.lp-browser { border-radius: 1rem; background: #fff; border: 1px solid #e2e8f0; box-shadow: 0 30px 60px -28px rgba(30,27,75,.45), 0 0 0 1px rgba(15,23,42,.03); overflow: hidden; }
.dark .lp-browser { background: #0f172a; border-color: #334155; }
.lp-bar { display: flex; align-items: center; gap: 6px; padding: .6rem .8rem; background: #f1f5f9; border-bottom: 1px solid #e2e8f0; }
.dark .lp-bar { background: #1e293b; border-color: #334155; }
.lp-bar i { width: 10px; height: 10px; border-radius: 9999px; background: #cbd5e1; } .lp-bar i:nth-child(1) { background: #f87171; } .lp-bar i:nth-child(2) { background: #fbbf24; } .lp-bar i:nth-child(3) { background: #34d399; }
.lp-url { margin-left: .6rem; padding: .1rem .8rem; border-radius: 9999px; background: #fff; color: #94a3b8; font-size: .7rem; } .dark .lp-url { background: #0f172a; }
.lp-screen { position: relative; height: 340px; background: linear-gradient(180deg, #f8fafc, #eef2ff); overflow: hidden; }
.dark .lp-screen { background: linear-gradient(180deg, #0f172a, #1e1b4b); }
.lp-scene { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .35s ease; padding: 16px; }
.lp-scene.is-active { opacity: 1; visibility: visible; }
.lp-cursor { position: absolute; width: 18px; height: 18px; z-index: 5; left: 8%; top: 82%; opacity: 0; background: no-repeat center/contain url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M4 3l16 8-7 2-3 7z' fill='%230f172a' stroke='white' stroke-width='1.5' stroke-linejoin='round'/></svg>"); }

/* shared mini email */
.lp-ed { position: relative; display: flex; gap: 12px; height: 100%; }
.lp-side { width: 54px; flex: none; display: flex; flex-direction: column; gap: 8px; padding-top: 4px; }
.lp-side u { display: block; height: 30px; border-radius: 8px; background: #fff; border: 1px solid #e2e8f0; } .dark .lp-side u { background: #1e293b; border-color: #334155; }
.lp-mail, .lp-mail2 { flex: 1; max-width: 330px; margin: 0 auto; background: #fff; border-radius: 10px; border: 1px solid #e2e8f0; padding: 10px; display: flex; flex-direction: column; gap: 9px; box-shadow: 0 8px 22px -12px rgba(15,23,42,.3); }
.dark .lp-mail, .dark .lp-mail2 { background: #1e293b; border-color: #334155; }
.lp-blk { border-radius: 6px; opacity: 0; transform: translateY(-14px) scale(.96); }
.lp-blk.b1 { height: 26px; background: linear-gradient(90deg, #6366f1, #8b5cf6); }
.lp-blk.b2 { height: 74px; background: linear-gradient(135deg, #fde68a, #fbcfe8 60%, #c7d2fe); }
.lp-blk.b3 { display: flex; flex-direction: column; gap: 6px; } .lp-blk.b3 i { display: block; height: 7px; border-radius: 4px; background: #cbd5e1; } .dark .lp-blk.b3 i { background: #475569; } .lp-blk.b3 i.short { width: 60%; }
.lp-blk.b4 { display: flex; justify-content: center; } .lp-blk.b4 span { display: block; width: 90px; height: 22px; border-radius: 7px; background: #4f46e5; }
.lp-swatch { position: absolute; right: 8px; top: 40px; display: flex; gap: 6px; padding: 7px 8px; border-radius: 10px; background: #fff; border: 1px solid #e2e8f0; box-shadow: 0 8px 20px -8px rgba(15,23,42,.35); opacity: 0; transform: scale(.8); }
.dark .lp-swatch { background: #1e293b; border-color: #334155; } .lp-swatch s { display: block; width: 18px; height: 18px; border-radius: 9999px; text-decoration: none; }

/* scene 1: gallery */
.lp-gal { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; height: 100%; align-content: center; }
.lp-card { border-radius: 10px; background: #fff; border: 1px solid #e2e8f0; padding: 7px; display: flex; flex-direction: column; gap: 5px; height: 112px; transition: transform .3s, box-shadow .3s; } .dark .lp-card { background: #1e293b; border-color: #334155; }
.lp-card b { display: block; height: 22px; border-radius: 5px; } .lp-card s { display: block; height: 34px; border-radius: 5px; text-decoration: none; } .lp-card i { display: block; height: 6px; border-radius: 3px; background: #cbd5e1; } .lp-card i.short { width: 55%; }
.lp-pill { position: absolute; left: 41%; top: 43%; padding: .3rem .7rem; border-radius: 9999px; background: #4f46e5; color: #fff; font-size: .72rem; font-weight: 700; opacity: 0; transform: translateY(6px); white-space: nowrap; }

/* scene 3: preview */
.lp-pv { display: flex; flex-direction: column; align-items: center; gap: 12px; height: 100%; }
.lp-seg { display: inline-flex; border-radius: 9px; border: 1px solid #cbd5e1; overflow: hidden; background: #fff; font-size: .72rem; font-weight: 700; } .dark .lp-seg { background: #1e293b; border-color: #475569; }
.lp-seg b { padding: .3rem .8rem; color: #64748b; } .lp-seg b.d { background: #4f46e5; color: #fff; }
.lp-view { flex: 1; width: 100%; display: flex; justify-content: center; align-items: flex-start; }
.lp-mail2 { width: 92%; max-width: 420px; flex: none; }
.lp-mail2 .lp-blk { opacity: 1; transform: none; }

/* scene 4: send */
.lp-send { height: 100%; display: flex; align-items: center; justify-content: center; }
.lp-sendbox { position: relative; width: min(330px, 92%); padding: 16px; border-radius: 14px; background: #fff; border: 1px solid #e2e8f0; box-shadow: 0 10px 26px -12px rgba(15,23,42,.35); display: flex; flex-direction: column; gap: 9px; } .dark .lp-sendbox { background: #1e293b; border-color: #334155; }
.lp-row { display: flex; align-items: center; gap: 8px; } .lp-row i { display: block; height: 8px; border-radius: 4px; background: #cbd5e1; flex: 1; } .lp-row i.short { flex: none; width: 32%; background: #e0e7ff; }
.lp-bar2 { height: 9px; border-radius: 9999px; background: #e2e8f0; overflow: hidden; margin-top: 4px; } .lp-bar2 span { display: block; height: 100%; width: 0; border-radius: 9999px; background: linear-gradient(90deg, #4f46e5, #ec4899); }
.lp-sending, .lp-sent { margin: 0; font-size: .78rem; font-weight: 700; text-align: center; color: #64748b; }
.lp-sent { position: absolute; left: 0; right: 0; bottom: 14px; color: #059669; opacity: 0; }
.lp-plane { position: absolute; width: 26px; height: 26px; right: 14px; top: -12px; color: #4f46e5; opacity: 0; }

/* ----- keyframes: only run on the active scene (and on the hero mock) ----- */
.is-active .lp-blk, .lp-hero-mock .lp-blk { animation: lp-drop .55s cubic-bezier(.2,.9,.3,1.2) forwards; }
.is-active .lp-blk.b1 { animation-delay: .2s; } .is-active .lp-blk.b2 { animation-delay: .8s; } .is-active .lp-blk.b3 { animation-delay: 1.4s; } .is-active .lp-blk.b4 { animation-delay: 2s; }
.lp-hero-mock .lp-blk { animation: lp-drop-loop 9s ease-in-out infinite; }
.lp-hero-mock .lp-blk.b2 { animation-delay: .5s; } .lp-hero-mock .lp-blk.b3 { animation-delay: 1s; } .lp-hero-mock .lp-blk.b4 { animation-delay: 1.5s; }
@keyframes lp-drop { to { opacity: 1; transform: none; } }
@keyframes lp-drop-loop { 0% { opacity: 0; transform: translateY(-14px) scale(.96); } 8%, 82% { opacity: 1; transform: none; } 94%, 100% { opacity: 0; transform: translateY(8px) scale(.98); } }
.lp-hero-mock .lp-ed, .lp-hero .lp-screen { height: 100%; } .lp-hero-mock .lp-screen { height: 330px; padding: 16px; }

.is-active .lp-gal .lp-cursor { animation: lp-cur1 3.4s ease forwards .2s; }
.is-active .lp-card.c2 { animation: lp-pick .5s ease forwards 2.3s; }
.is-active .lp-pill { animation: lp-pop .45s ease forwards 2.6s; }
@keyframes lp-cur1 { 0% { opacity: 0; left: 8%; top: 84%; } 15% { opacity: 1; } 70%, 100% { opacity: 1; left: 49%; top: 34%; } }
@keyframes lp-pick { to { transform: translateY(-5px) scale(1.04); box-shadow: 0 0 0 3px #6366f1, 0 14px 24px -10px rgba(79,70,229,.6); } }
@keyframes lp-pop { to { opacity: 1; transform: none; } }

.is-active .lp-ed .lp-cursor { animation: lp-cur2 2.2s ease forwards 2.6s; }
.is-active .lp-swatch { animation: lp-pop-s .4s ease forwards 3s; }
.is-active .lp-btn-anim { animation: lp-recolor .6s ease forwards 4s; }
@keyframes lp-cur2 { 0% { opacity: 0; left: 55%; top: 90%; } 20% { opacity: 1; } 100% { opacity: 1; left: 72%; top: 34%; } }
@keyframes lp-pop-s { to { opacity: 1; transform: none; } }
@keyframes lp-recolor { to { background: #ec4899; } }

.is-active .lp-mail2 { animation: lp-shrink 1.1s ease forwards 1.3s; }
.is-active .lp-seg b.d { animation: lp-off .01s forwards 1.3s; } .is-active .lp-seg b.m { animation: lp-on .01s forwards 1.3s; }
@keyframes lp-shrink { to { width: 38%; max-width: 160px; } }
@keyframes lp-off { to { background: transparent; color: #64748b; } } @keyframes lp-on { to { background: #4f46e5; color: #fff; } }

.is-active .lp-bar2 span { animation: lp-fill 3.2s ease forwards .4s; }
.is-active .lp-sending { animation: lp-fade-out .3s forwards 3.6s; }
.is-active .lp-sent { animation: lp-fade-in .4s forwards 3.7s; }
.is-active .lp-plane { animation: lp-fly 3.2s ease-in forwards .4s; }
@keyframes lp-fill { to { width: 100%; } } @keyframes lp-fade-out { to { opacity: 0; } } @keyframes lp-fade-in { to { opacity: 1; } }
@keyframes lp-fly { 0% { opacity: 0; transform: translate(-200px, 40px) scale(.7); } 15% { opacity: 1; } 100% { opacity: 0; transform: translate(60px, -40px) scale(1.1); } }

@media (max-width: 1023px) { .lp-screen { height: 300px; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .lp-js .reveal { opacity: 1; transform: none; transition: none; }
  .lp-blob, .lp-hero-mock .lp-blk { animation: none !important; }
  .lp-blk, .lp-swatch, .lp-pill, .lp-sent { opacity: 1 !important; transform: none !important; animation: none !important; }
  .lp-cursor, .lp-plane { display: none; }
  .lp-bar2 span { width: 100% !important; animation: none !important; }
  .lp-progress i { animation: none !important; }
}

/* ---- video / screen-recording support ---- */
.lp-scene.lp-media { padding: 0; background: #0b1020; }
.lp-vid, .lp-img { display: block; width: 100%; height: 100%; object-fit: contain; background: #0b1020; }
.lp-play { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; background: #0b1020; cursor: pointer; }
.lp-play img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .88; transition: opacity .2s; }
.lp-play:hover img { opacity: 1; }
.lp-play-ico { position: absolute; left: 50%; top: 50%; display: flex; width: 4rem; height: 4rem; align-items: center; justify-content: center; border-radius: 9999px; background: rgba(255,255,255,.95); color: #4f46e5; box-shadow: 0 10px 30px rgba(0,0,0,.35); transform: translate(-50%, -50%); transition: transform .2s ease; }
.lp-play-ico svg { margin-left: 3px; }
.lp-play:hover .lp-play-ico, .lp-play:focus-visible .lp-play-ico { transform: translate(-50%, -50%) scale(1.1); }
.lp-embed-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }
.lp-scene .lp-embed-box { position: absolute; inset: 0; background: #000; }
.lp-step-vid { display: inline-flex; width: 1.2rem; height: 1.2rem; margin-left: .5rem; align-items: center; justify-content: center; border-radius: 9999px; background: #eef2ff; color: #4f46e5; vertical-align: middle; }
.dark .lp-step-vid { background: #312e81; color: #c7d2fe; }
.lp-step-vid svg { margin-left: 1px; }
.lp-guide.is-playing .lp-step.has-media.is-active .lp-progress i { animation: none; width: 0; }
.lp-watch svg { flex: none; }
.lp-modal { position: fixed; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center; padding: 1.25rem; background: rgba(2,6,23,.82); backdrop-filter: blur(4px); animation: lp-fade .2s ease; }
.lp-modal-box { position: relative; width: min(980px, 100%); }
.lp-modal-media { position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; border-radius: .9rem; background: #000; box-shadow: 0 30px 80px rgba(0,0,0,.55); }
.lp-modal-media video, .lp-modal-media iframe, .lp-modal-media img { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: contain; }
.lp-modal-close { position: absolute; top: -2.9rem; right: 0; display: inline-flex; align-items: center; gap: .4rem; padding: .4rem .8rem; border-radius: 9999px; border: 0; background: rgba(255,255,255,.14); color: #fff; font-size: .85rem; font-weight: 600; cursor: pointer; }
.lp-modal-close:hover { background: rgba(255,255,255,.25); }
body.lp-modal-open { overflow: hidden; }
@keyframes lp-fade { from { opacity: 0; } to { opacity: 1; } }
