/* ═══════════════════════════════════════════════════
   Pixenth Mail Landing — Custom Styles
   Tailwind CSS handles utilities; this file handles
   custom components, animations, and mobile overrides.
═══════════════════════════════════════════════════ */

/* ── BASE ── */
*, ::before, ::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Manrope', sans-serif;
  background: #08080c;
  color: #e2e0f0;
  overflow-x: hidden;
}

/* ── GRAIN OVERLAY ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 128px 128px;
}

/* ── GRID PATTERN ── */
.grid-pattern {
  background-image:
    linear-gradient(rgba(108, 92, 231, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(108, 92, 231, 0.035) 1px, transparent 1px);
  background-size: 60px 60px;
}

/* ── ORBS ── */
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  animation: orbFloat 22s ease-in-out infinite alternate;
}
.orb-1 { width: 700px; height: 700px; background: radial-gradient(circle, #6c5ce7, transparent 70%); opacity: .12; top: -200px; left: -200px; animation-duration: 24s; }
.orb-2 { width: 500px; height: 500px; background: radial-gradient(circle, #a78bfa, transparent 70%); opacity: .10; top: 100px; right: -100px; animation-duration: 19s; animation-delay: -7s; }
.orb-3 { width: 450px; height: 450px; background: radial-gradient(circle, #22d3ee, transparent 70%); opacity: .07; bottom: -50px; left: 30%; animation-duration: 28s; animation-delay: -14s; }
.orb-4 { width: 300px; height: 300px; background: radial-gradient(circle, #f472b6, transparent 70%); opacity: .07; top: 40%; right: 15%; animation-duration: 16s; animation-delay: -4s; }

@keyframes orbFloat {
  0%   { transform: translate(0, 0) scale(1); }
  33%  { transform: translate(50px, -70px) scale(1.05); }
  66%  { transform: translate(-35px, 45px) scale(0.97); }
  100% { transform: translate(25px, -25px) scale(1.03); }
}

/* ── HERO GRADIENT ── */
.hero-gradient {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 90% 60% at 50% 0%,  rgba(108, 92, 231, .14) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 20%, rgba(34, 211, 238, .07)  0%, transparent 50%),
    radial-gradient(ellipse 50% 40% at 20% 30%, rgba(244, 114, 182, .05) 0%, transparent 50%);
  animation: hgShift 14s ease-in-out infinite alternate;
}
@keyframes hgShift {
  0%   { opacity: 1; transform: scale(1); }
  100% { opacity: .7; transform: scale(1.08); }
}

/* ── PARTICLES ── */
.particle {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  animation: particleFloat linear infinite;
}
@keyframes particleFloat {
  0%   { transform: translateY(0) translateX(0) scale(1); opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { transform: translateY(-100vh) translateX(40px) scale(.3); opacity: 0; }
}

/* ── REVEAL ANIMATIONS ── */
.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity .75s cubic-bezier(.16, 1, .3, 1), transform .75s cubic-bezier(.16, 1, .3, 1);
}
.reveal.visible { opacity: 1; transform: translateY(0); }

.reveal-left { opacity: 0; transform: translateX(-32px); transition: opacity .75s cubic-bezier(.16, 1, .3, 1), transform .75s cubic-bezier(.16, 1, .3, 1); }
.reveal-left.visible { opacity: 1; transform: translateX(0); }

.reveal-right { opacity: 0; transform: translateX(32px); transition: opacity .75s cubic-bezier(.16, 1, .3, 1), transform .75s cubic-bezier(.16, 1, .3, 1); }
.reveal-right.visible { opacity: 1; transform: translateX(0); }

/* Stagger delays for children */
.stagger > .reveal:nth-child(1)  { transition-delay: .05s; }
.stagger > .reveal:nth-child(2)  { transition-delay: .12s; }
.stagger > .reveal:nth-child(3)  { transition-delay: .19s; }
.stagger > .reveal:nth-child(4)  { transition-delay: .26s; }
.stagger > .reveal:nth-child(5)  { transition-delay: .33s; }
.stagger > .reveal:nth-child(6)  { transition-delay: .40s; }
.stagger > .reveal:nth-child(7)  { transition-delay: .47s; }
.stagger > .reveal:nth-child(8)  { transition-delay: .54s; }
.stagger > .reveal:nth-child(9)  { transition-delay: .61s; }
.stagger > .reveal:nth-child(10) { transition-delay: .68s; }

/* ── HERO ENTRANCE ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero-anim { animation: fadeUp .7s cubic-bezier(.16, 1, .3, 1) both; }

/* ── STRIKE-THROUGH (It's Pochta) ── */
.strike-wrap {
  position: relative;
  display: inline-block;
}
.strike-wrap::after {
  content: '';
  position: absolute;
  left: -4px; right: -4px;
  top: 52%;
  height: 3px;
  background: #f472b6;
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  animation: strikeIn .9s 1.6s cubic-bezier(.16, 1, .3, 1) forwards;
}
@keyframes strikeIn { to { transform: scaleX(1); } }

/* ── SHIMMER TEXT ── */
.ai-shimmer {
  background: linear-gradient(90deg, #6c5ce7, #22d3ee, #34d399, #6c5ce7);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 4s linear infinite;
}
@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position:  200% center; }
}

/* ── GLOW CARD ── */
.glow-card {
  position: relative;
  background: linear-gradient(135deg, #0f0f18 0%, #12121e 100%);
  border: 1px solid #1a1a2e;
  border-radius: 1.25rem;
  overflow: hidden;
  transition: transform .4s cubic-bezier(.16, 1, .3, 1), border-color .4s ease, box-shadow .4s ease;
}
.glow-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(600px circle at var(--mx, 50%) var(--my, 50%), rgba(108, 92, 231, .07), transparent 60%);
  pointer-events: none;
  opacity: 0;
  transition: opacity .3s;
}
.glow-card:hover::before { opacity: 1; }
.glow-card:hover {
  border-color: rgba(108, 92, 231, .32);
  transform: translateY(-5px);
  box-shadow: 0 20px 50px rgba(108, 92, 231, .1);
}

/* ── ICON RING ── */
.icon-ring {
  width: 52px; height: 52px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  position: relative;
  flex-shrink: 0;
}
.icon-ring::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, var(--rf), var(--rt));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

/* ── BUTTONS ── */
.btn-primary {
  position: relative;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 34px;
  border-radius: 14px;
  font-weight: 700; font-size: 1rem;
  font-family: 'Unbounded', sans-serif;
  color: #fff;
  background: linear-gradient(135deg, #6c5ce7, #7c6cf7);
  border: none; cursor: pointer; overflow: hidden;
  transition: transform .3s, box-shadow .3s;
  text-decoration: none;
}
.btn-primary::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, .12), transparent);
  opacity: 0; transition: opacity .3s;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 40px rgba(108, 92, 231, .45); }
.btn-primary:hover::before { opacity: 1; }

.btn-ghost {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 30px;
  border-radius: 14px;
  font-weight: 700; font-size: 1rem;
  font-family: 'Unbounded', sans-serif;
  color: #e2e0f0;
  background: transparent;
  border: 1.5px solid #1a1a2e;
  cursor: pointer;
  transition: transform .3s, border-color .3s, background .3s;
  text-decoration: none;
}
.btn-ghost:hover { transform: translateY(-2px); border-color: #6c5ce7; background: rgba(108, 92, 231, .06); }

/* ── BADGE ── */
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(108, 92, 231, .1);
  border: 1px solid rgba(108, 92, 231, .25);
  border-radius: 100px;
  padding: 7px 16px;
  font-size: 12px;
  font-family: 'Unbounded', sans-serif;
  font-weight: 600;
  color: #a78bfa;
  letter-spacing: .02em;
}
.badge-dot { width: 7px; height: 7px; border-radius: 50%; background: #6c5ce7; animation: bdPulse 2s ease infinite; }
@keyframes bdPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: .5; transform: scale(1.4); }
}

/* ── SECTION LABEL ── */
.sec-label {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-family: 'Unbounded', sans-serif;
}

/* ── SECTION CONNECTOR ── */
.section-connector {
  height: 100px;
  display: flex;
  justify-content: center;
}
.section-connector::before {
  content: '';
  width: 1px;
  background: linear-gradient(to bottom, transparent, #1a1a2e, transparent);
}

/* ── STORY TIMELINE ── */
.tl-line {
  position: absolute;
  left: 27px; top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, #6c5ce7, #22d3ee, transparent);
}
.tl-dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  border: 2px solid #6c5ce7;
  background: #08080c;
  position: absolute;
  left: 22px; top: 5px;
  z-index: 1;
}

/* ── BROWSER MOCKUP ── */
.browser-mockup {
  background: #0c0c14;
  border: 1px solid #1a1a2e;
  border-radius: 16px;
  overflow: hidden;
}
.browser-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 13px 18px;
  background: #0a0a12;
  border-bottom: 1px solid #1a1a2e;
}
.bw-dot { width: 10px; height: 10px; border-radius: 50%; }

/* ── ROADMAP DOTS ── */
.rm-dot {
  width: 14px; height: 14px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6c5ce7, #a78bfa);
  border: 2px solid rgba(108, 92, 231, .35);
  box-shadow: 0 0 12px rgba(108, 92, 231, .5);
  flex-shrink: 0;
}

/* ── SCROLL BOUNCE ── */
@keyframes bounce {
  0%, 100% { transform: translateY(-25%); animation-timing-function: cubic-bezier(.8, 0, 1, 1); }
  50%       { transform: none; animation-timing-function: cubic-bezier(0, 0, .2, 1); }
}
.bounce { animation: bounce 1.4s infinite; }

/* ── GLOW LINE (AI section divider) ── */
.glow-line {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(108, 92, 231, .5), rgba(34, 211, 238, .4), transparent);
}

/* ── AI PILLS ── */
.ai-pill {
  display: inline-block;
  background: rgba(108, 92, 231, .1);
  border: 1px solid rgba(108, 92, 231, .22);
  border-radius: 100px;
  padding: 7px 16px;
  font-size: 12.5px;
  color: #c4b5fd;
  font-weight: 600;
  animation: fpFloat 6s ease-in-out infinite alternate;
}
.ai-pill:nth-child(2) { animation-delay: -1.5s; }
.ai-pill:nth-child(3) { animation-delay: -3s; }
.ai-pill:nth-child(4) { animation-delay: -4.5s; }
.ai-pill:nth-child(5) { animation-delay: -2s; }
.ai-pill:nth-child(6) { animation-delay: -0.8s; }
@keyframes fpFloat {
  0%   { transform: translateY(0); }
  100% { transform: translateY(-8px); }
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #08080c; }
::-webkit-scrollbar-thumb { background: #1a1a2e; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #6c5ce7; }

/* ── SECTION SCROLL OFFSET ── */
section[id] { scroll-margin-top: 80px; }

/* ── MOBILE MENU ── */
#mobileMenu { display: none; }
#mobileMenu.is-open { display: flex; }

/* ══════════════════════════════════════
   MOBILE  (< 768px)
══════════════════════════════════════ */
@media (max-width: 767px) {

  /* Orbs — smaller, less blur */
  .orb-1 { width: 280px; height: 280px; filter: blur(60px); }
  .orb-2 { width: 220px; height: 220px; filter: blur(60px); }
  .orb-3, .orb-4 { display: none; }

  /* Section vertical padding */
  section.py-24 { padding-top: 4rem; padding-bottom: 4rem; }
  section.py-32 { padding-top: 5rem; padding-bottom: 5rem; }
  .section-connector { height: 60px; }

  /* Buttons — full width, tighter padding */
  .btn-primary,
  .btn-ghost {
    width: 100%;
    justify-content: center;
    padding: 13px 20px;
    font-size: .82rem;
  }

  /* Hero stats — 2×2 grid instead of flex row */
  .stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
  .stats-sep  { display: none; }

  /* Story timeline — less left padding */
  .tl-wrap { padding-left: 2.5rem; }

  /* AI pills — smaller */
  .ai-pill { font-size: 11px; padding: 5px 12px; }

  /* E2EE demo row — stack vertically */
  .e2ee-row { flex-direction: column; align-items: flex-start; gap: .75rem; }

  /* Comparison table — compact cells */
  .cmp-table td,
  .cmp-table th { padding: .6rem .5rem; font-size: .72rem; }

  /* AI showcase — hide neural network SVG, show copy only */
  .neural-col { display: none; }
  .ai-copy-col { border-right: none !important; }

  /* Card padding overrides */
  .glow-card.p-7 { padding: 1.25rem; }
  .glow-card.p-8 { padding: 1.25rem; }

  /* Browser mockup inner */
  .mockup-inner { padding: .875rem; }
}
