/* ============================
   EMAIL MARKETING PAGE
   ============================ */

/* HERO */
#em-hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: #030510;
  padding: 100px 60px;
  gap: 60px;
}

.em-hero-bg { position: absolute; inset: 0; pointer-events: none; }
.em-glow-1 { position: absolute; top: 10%; left: 20%; width: 500px; height: 500px; background: radial-gradient(circle, rgba(0,230,118,0.06), transparent 60%); filter: blur(60px); }
.em-glow-2 { position: absolute; bottom: 10%; right: 15%; width: 400px; height: 400px; background: radial-gradient(circle, rgba(0,229,255,0.05), transparent 60%); filter: blur(50px); }
.em-grid-dots { position: absolute; inset: 0; background-image: radial-gradient(circle, rgba(0,230,118,0.04) 1px, transparent 1px); background-size: 50px 50px; }

.em-hero-content { position: relative; z-index: 2; max-width: 500px; }
.em-badge { display: inline-block; padding: 5px 14px; background: rgba(0,230,118,0.1); border: 1px solid rgba(0,230,118,0.25); border-radius: 20px; font-size: 12px; font-weight: 600; color: var(--green); margin-bottom: 20px; }

#em-hero h1 { font-size: clamp(40px, 5vw, 64px); font-weight: 900; line-height: 1.05; letter-spacing: -2px; margin-bottom: 20px; }
.em-accent { background: linear-gradient(135deg, var(--green), var(--cyan)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.em-sub { color: var(--text2); font-size: 15px; line-height: 1.7; margin-bottom: 28px; max-width: 440px; }
.em-hero-btns { display: flex; gap: 14px; margin-bottom: 36px; }

.em-hero-stats { display: flex; gap: 32px; }
.em-hs { display: flex; flex-direction: column; }
.em-hs strong { font-size: 24px; font-weight: 900; color: #fff; }
.em-hs span { font-size: 11px; color: var(--text2); margin-top: 2px; }

/* Hero visual */
.em-hero-visual { flex: 1; position: relative; z-index: 1; max-width: 500px; }

.em-hero-mockup {
  border-radius: 12px; overflow: hidden;
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 30px 70px rgba(0,0,0,0.5);
}

.em-hm-bar { height: 32px; background: #080c14; display: flex; align-items: center; padding: 0 12px; gap: 6px; }
.em-hm-dot { width: 9px; height: 9px; border-radius: 50%; }
.em-hm-dot.r { background: #ff5f57; } .em-hm-dot.y { background: #ffbd2e; } .em-hm-dot.g { background: #28ca42; }
.em-hm-body { background: #0b0f18; padding: 18px; }

.em-hm-email { display: flex; flex-direction: column; gap: 4px; }
.em-hm-from, .em-hm-to, .em-hm-subj { font-size: 11px; color: var(--text2); }
.em-hm-from strong, .em-hm-to strong, .em-hm-subj strong { color: #fff; }
.em-hm-ai-badge { display: inline-block; padding: 3px 8px; background: rgba(0,230,118,0.1); border: 1px solid rgba(0,230,118,0.2); border-radius: 8px; font-size: 9px; font-weight: 600; color: var(--green); margin: 8px 0; }
.em-hm-text { display: flex; flex-direction: column; gap: 4px; }
.em-hm-text span { font-size: 12px; color: rgba(255,255,255,0.6); line-height: 1.5; }
.em-cursor { color: var(--green); animation: blink 1s step-end infinite; }
@keyframes blink { 0%,50%{opacity:1} 51%,100%{opacity:0} }

/* Floating cards */
.em-float { position: absolute; display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: rgba(17,24,39,0.92); border: 1px solid rgba(255,255,255,0.08); border-radius: 12px; backdrop-filter: blur(10px); box-shadow: 0 10px 25px rgba(0,0,0,0.3); animation: floatEM 6s ease-in-out infinite; }
.em-float-1 { top: -15px; right: -20px; animation-delay: 0s; }
.em-float-2 { bottom: 20px; left: -30px; animation-delay: -3s; }
@keyframes floatEM { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-8px)} }
.em-fl-icon { width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 14px; flex-shrink: 0; }
.em-fl-green { background: rgba(0,230,118,0.15); color: var(--green); }
.em-fl-cyan { background: rgba(0,229,255,0.15); color: var(--cyan); }
.em-fl-text strong { font-size: 12px; display: block; }
.em-fl-text span { font-size: 10px; color: var(--text2); }

/* STATS */
.em-stats-bar { background: var(--bg2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 24px 40px; }
.em-sb-grid { display: flex; justify-content: center; gap: 24px; }
.em-sb { display: flex; align-items: center; gap: 14px; padding: 16px 22px; background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.05); border-radius: 12px; min-width: 200px; }
.em-sb-ico { width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; }
.em-sb-num { font-size: 26px; font-weight: 900; color: #fff; font-family: 'JetBrains Mono', monospace; line-height: 1; }
.em-sb-num::after { content: '+'; font-size: 12px; color: var(--green); margin-left: 2px; }
.em-sb-pct::after { content: ''; }
.em-sb-label { font-size: 11px; color: var(--text2); margin-top: 2px; }

/* SECTIONS */
.em-section { padding: 120px 0; background: var(--bg); }
.em-dark { background: var(--bg2); }
.em-section-sub { color: var(--text2); font-size: 15px; max-width: 520px; margin: 10px auto 0; text-align: center; line-height: 1.6; }

/* FLOW BUILDER */
.em-flow-showcase { margin-top: 50px; }
.em-flow-nodes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 40px; }
.em-fn { padding: 24px; background: var(--card); border: 1px solid var(--border); border-radius: 14px; transition: transform 0.4s cubic-bezier(0.16,1,0.3,1), box-shadow 0.4s; }
.em-fn:hover { transform: translateY(-4px); box-shadow: 0 12px 30px rgba(0,0,0,0.3); }
.em-fn-icon { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 20px; margin-bottom: 14px; }
.em-fn-purple { background: rgba(149,117,205,0.1); }
.em-fn-orange { background: rgba(255,171,0,0.1); }
.em-fn-blue { background: rgba(68,138,255,0.1); }
.em-fn h4 { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.em-fn p { font-size: 12px; color: var(--text2); line-height: 1.5; }

/* Video frame (inline fallback) */
.em-fv-title { font-size: 11px; color: var(--text2); margin-left: 10px; }

/* VIDEO ZOOM SECTION */
#video-zoom {
  height: 250vh;
  position: relative;
  background: var(--bg2);
  margin-top: -80px;
}

.vz-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.vz-frame {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 30px 80px rgba(0,0,0,0.5);
  will-change: transform;
  position: relative;
  z-index: 2;
  /* Size controlled by JS via transform scale */
}

.vz-frame video {
  display: block;
  width: auto;
  height: auto;
  /* Initial size: fits in the viewport with room to spare */
  max-height: 55vh;
}

/* Blurred backdrop behind the frame */
.vz-backdrop {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0;
  transition: none;
  background: rgba(3,5,16,0.5);
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  pointer-events: none;
}

.vz-label {
  position: absolute;
  top: 12%;
  font-size: 14px;
  font-weight: 600;
  color: var(--text2);
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: opacity 0.3s;
}

/* AI CONTENT */
.em-ai-layout { display: flex; gap: 60px; align-items: center; }
.em-ai-text { flex: 1; max-width: 420px; }
.em-ai-text h2 { font-size: 36px; font-weight: 800; line-height: 1.1; letter-spacing: -1px; margin-bottom: 14px; }
.em-ai-text p { font-size: 14px; color: var(--text2); line-height: 1.6; margin-bottom: 24px; }
.em-ai-visual { flex: 1; }

.em-ai-demo { display: flex; flex-direction: column; gap: 14px; }
.em-ai-prompt { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 18px; }
.em-ai-p-label { font-size: 10px; font-weight: 700; color: var(--text2); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 8px; }
.em-ai-p-text { font-size: 13px; color: rgba(255,255,255,0.7); font-style: italic; line-height: 1.5; }
.em-ai-arrow { text-align: center; font-size: 13px; font-weight: 700; color: var(--green); padding: 4px 0; }
.em-ai-result { background: var(--card); border: 1px solid rgba(0,230,118,0.15); border-radius: 12px; padding: 18px; }
.em-ai-r-label { font-size: 10px; font-weight: 700; color: var(--green); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 10px; }
.em-ai-r-field { font-size: 12px; color: #fff; margin-bottom: 10px; padding-bottom: 10px; border-bottom: 1px solid rgba(255,255,255,0.05); }
.em-ai-key { color: var(--text2); margin-right: 4px; }
.em-ai-r-body { display: flex; flex-direction: column; gap: 3px; }
.em-ai-r-body span { font-size: 12px; color: rgba(255,255,255,0.6); line-height: 1.5; }
.em-ai-cta-line { color: var(--green) !important; font-weight: 600; }

/* DELIVERABILITY */
.em-deliver-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 50px; }
.em-d-card { padding: 24px; background: var(--card); border: 1px solid var(--border); border-radius: 14px; transition: transform 0.4s cubic-bezier(0.16,1,0.3,1), box-shadow 0.4s; }
.em-d-card:hover { transform: translateY(-4px); box-shadow: 0 12px 30px rgba(0,0,0,0.3); }
.em-d-icon { font-size: 28px; margin-bottom: 12px; }
.em-d-card h4 { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.em-d-card > p { font-size: 12px; color: var(--text2); line-height: 1.5; margin-bottom: 16px; }

.em-d-visual { background: rgba(0,0,0,0.2); border: 1px solid rgba(255,255,255,0.04); border-radius: 10px; padding: 12px; }
.em-d-sender { display: flex; align-items: center; gap: 8px; padding: 6px 0; font-size: 11px; color: var(--text2); border-bottom: 1px solid rgba(255,255,255,0.03); }
.em-d-sender:last-child { border-bottom: none; }
.em-d-sender strong { margin-left: auto; color: #fff; font-family: 'JetBrains Mono', monospace; font-size: 10px; }
.em-d-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }

.em-d-warmup { display: flex; flex-direction: column; gap: 6px; }
.em-d-w-row { display: flex; align-items: center; gap: 8px; font-size: 10px; color: var(--text2); }
.em-d-w-row span:first-child { min-width: 55px; }
.em-d-w-row span:last-child { min-width: 55px; text-align: right; color: #fff; font-weight: 600; font-family: 'JetBrains Mono', monospace; }
.em-d-w-bar { flex: 1; height: 5px; background: linear-gradient(90deg, var(--orange), rgba(255,109,0,0.3)); border-radius: 3px; }

.em-d-window { margin-bottom: 10px; }
.em-d-win-bar { height: 8px; background: rgba(255,255,255,0.04); border-radius: 4px; position: relative; overflow: hidden; }
.em-d-win-active { position: absolute; top: 0; height: 100%; background: linear-gradient(90deg, var(--green), rgba(0,230,118,0.4)); border-radius: 4px; }
.em-d-win-labels { display: flex; justify-content: space-between; font-size: 9px; color: var(--text2); margin-top: 4px; }
.em-d-days { display: flex; gap: 4px; margin-top: 8px; }
.em-d-day { padding: 4px 8px; border-radius: 6px; font-size: 10px; font-weight: 600; }
.em-d-day.on { background: rgba(0,230,118,0.1); color: var(--green); border: 1px solid rgba(0,230,118,0.2); }
.em-d-day.off { background: rgba(255,255,255,0.03); color: var(--text2); border: 1px solid rgba(255,255,255,0.05); }

/* TRACKING */
.em-track-layout { display: flex; gap: 60px; align-items: center; }
.em-track-visual { flex: 1.2; }
.em-track-text { flex: 1; max-width: 400px; }
.em-track-text h2 { font-size: 36px; font-weight: 800; line-height: 1.1; letter-spacing: -1px; margin-bottom: 14px; }
.em-track-text p { font-size: 14px; color: var(--text2); line-height: 1.6; margin-bottom: 24px; }

.em-track-mockup { border-radius: 12px; overflow: hidden; border: 1px solid rgba(255,255,255,0.08); box-shadow: 0 20px 60px rgba(0,0,0,0.5); }
.em-track-body { background: #0b0f18; padding: 16px; }

.em-track-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 14px; }
.em-tk { text-align: center; padding: 10px 6px; background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.04); border-radius: 8px; }
.em-tk-val { font-size: 20px; font-weight: 900; font-family: 'JetBrains Mono', monospace; }
.em-tk-label { font-size: 9px; color: var(--text2); margin-top: 2px; }
.em-tk-bar { height: 3px; background: rgba(255,255,255,0.04); border-radius: 2px; margin-top: 6px; overflow: hidden; }
.em-tk-bar div { height: 100%; border-radius: 2px; }

.em-track-chart { margin-bottom: 14px; background: rgba(255,255,255,0.02); border-radius: 8px; padding: 10px; border: 1px solid rgba(255,255,255,0.03); }
.em-chart-svg { width: 100%; height: auto; }

.em-track-replies { background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.04); border-radius: 8px; padding: 12px; }
.em-tr-title { font-size: 10px; font-weight: 700; color: var(--text2); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 8px; }
.em-tr-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,0.03); }
.em-tr-row:last-child { border-bottom: none; }
.em-tr-avatar { width: 24px; height: 24px; border-radius: 50%; background: rgba(0,230,118,0.15); color: var(--green); display: flex; align-items: center; justify-content: center; font-size: 9px; font-weight: 800; flex-shrink: 0; }
.em-tr-name { font-size: 11px; font-weight: 600; min-width: 90px; }
.em-tr-preview { font-size: 10px; color: var(--text2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* DOMAIN FLOW */
.em-domain-flow { display: flex; align-items: flex-start; justify-content: center; gap: 0; margin-top: 50px; }
.em-df-step { text-align: center; padding: 24px 20px; background: var(--card); border: 1px solid var(--border); border-radius: 14px; width: 200px; min-height: 210px; display: flex; flex-direction: column; align-items: center; transition: transform 0.4s cubic-bezier(0.16,1,0.3,1), box-shadow 0.4s; }
.em-df-step:hover { transform: translateY(-4px); box-shadow: 0 10px 30px rgba(0,0,0,0.3); }
.em-df-num { width: 28px; height: 28px; border-radius: 50%; background: linear-gradient(135deg, var(--green), var(--cyan)); color: #fff; font-weight: 900; font-size: 12px; display: flex; align-items: center; justify-content: center; margin: 0 auto 10px; }
.em-df-icon { font-size: 28px; margin-bottom: 8px; }
.em-df-step h4 { font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.em-df-step p { font-size: 11px; color: var(--text2); line-height: 1.4; }
.em-df-arrow { display: flex; align-items: center; padding: 30px 12px 0; font-size: 20px; color: rgba(255,255,255,0.12); }

/* ============================
   RESPONSIVE
   ============================ */
@media (max-width: 1024px) {
  #em-hero { padding: 80px 40px; gap: 40px; }
  .em-flow-nodes { grid-template-columns: repeat(2, 1fr); }
  .em-deliver-grid { grid-template-columns: repeat(2, 1fr); }
  .em-track-kpis { grid-template-columns: repeat(2, 1fr); }
  .em-track-layout { flex-direction: column; gap: 30px; }
  .em-ai-layout { flex-direction: column; gap: 30px; }
  .em-section { padding: 80px 0; }
}

@media (max-width: 768px) {
  /* Hero */
  #em-hero {
    flex-direction: column !important;
    padding: 90px 20px 40px !important;
    text-align: center;
    gap: 30px;
    min-height: auto;
  }
  .em-hero-content { max-width: 100%; }
  .em-sub { max-width: 100%; }
  .em-hero-btns { justify-content: center; flex-wrap: wrap; }
  .em-hero-stats { justify-content: center; gap: 20px; flex-wrap: wrap; }
  .em-hero-visual { max-width: 100%; }
  .em-hero-mockup { width: 100%; }
  .em-float { display: none !important; }

  /* Stats bar */
  .em-stats-bar { padding: 20px 16px; }
  .em-sb-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .em-sb { min-width: 0; padding: 12px 14px; }
  .em-sb-num { font-size: 20px; }
  .em-sb-label { font-size: 10px; }
  .em-sb-ico { width: 32px; height: 32px; font-size: 14px; }

  /* Sections */
  .em-section { padding: 60px 0; }

  /* Flow builder */
  .em-flow-nodes { grid-template-columns: 1fr !important; }

  /* Video zoom */
  #video-zoom { height: auto; margin-top: 0; }
  .vz-sticky { position: relative; height: auto; padding: 40px 20px; }
  .vz-frame video { max-height: none; width: 100%; }
  .vz-label { display: none; }
  .vz-backdrop { display: none; }

  /* AI content */
  .em-ai-layout { flex-direction: column !important; gap: 24px; }
  .em-ai-text { max-width: 100%; text-align: center; }
  .em-ai-text h2 { font-size: 28px; }
  .feature-list { display: inline-block; text-align: left; }
  .em-ai-visual { width: 100%; }

  /* Deliverability */
  .em-deliver-grid { grid-template-columns: 1fr !important; }

  /* Tracking */
  .em-track-layout { flex-direction: column !important; gap: 24px; }
  .em-track-text { max-width: 100%; text-align: center; }
  .em-track-text h2 { font-size: 28px; }
  .em-track-visual { width: 100%; }
  .em-track-kpis { grid-template-columns: repeat(2, 1fr) !important; }
  .em-track-mockup { width: 100%; }

  /* Domain flow */
  .em-domain-flow { flex-direction: column !important; align-items: center; gap: 0; }
  .em-df-step { width: 100% !important; max-width: 100%; min-height: auto; }
  .em-df-arrow { transform: rotate(90deg); padding: 8px 0; font-size: 18px; }
}

@media (max-width: 480px) {
  #em-hero { padding: 80px 16px 30px !important; }
  #em-hero h1 { font-size: 28px !important; letter-spacing: -1px; }
  .em-sb-grid { grid-template-columns: 1fr !important; }
  .em-track-kpis { grid-template-columns: 1fr !important; }
  .em-ai-text h2 { font-size: 24px; }
  .em-track-text h2 { font-size: 24px; }
}
