/* ==========================================================================
   EmailHelp — Home page styles (css/pages/home.css)
   Only home-specific rules live here: the hero chat mockup, floating provider
   chips, and small layout tweaks. Everything else comes from css/style.css.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Hero visual: chat window mockup
   -------------------------------------------------------------------------- */
.hero--home .hero__visual {
  position: relative;
  display: flex;
  justify-content: center;
  padding: 28px 0;                 /* room for the chips that hang over the edges */
}
.hero--home .hero__glow {
  position: absolute;
  inset: 8% 4%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(99, 102, 241, .38), rgba(139, 92, 246, .16) 55%, transparent 100%);
  filter: blur(30px);
  pointer-events: none;
  z-index: 0;
}
.chat-demo {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  padding: 0;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: rgba(13, 20, 37, .9); /* no backdrop-filter: the tilt would re-blur the backdrop on every mouse frame */
  border: 1px solid rgba(255, 255, 255, .14);
  box-shadow:
    0 40px 80px -30px rgba(0, 0, 0, .75),
    0 0 0 1px rgba(255, 255, 255, .04) inset,
    var(--shadow-glow);
}
.chat-demo__head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  background: linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, 0));
}
.chat-demo__who { min-width: 0; flex: 1; }
.chat-demo__name {
  font-weight: 600;
  font-size: .95rem;
  color: #fff;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chat-demo__status {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
  font-size: .78rem;
  color: var(--text-muted-dark);
}
.chat-demo__status .pill__dot { width: 8px; height: 8px; }
.chat-demo__secure {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .02em;
  color: #A7F3D0;
  background: rgba(16, 185, 129, .12);
  border: 1px solid rgba(16, 185, 129, .3);
  white-space: nowrap;
}
.chat-demo__secure .icon { width: .95em; height: .95em; }
/* Fixed height: the card must not grow while the demo plays (it would shift the whole page below the hero).
   The top mask fades scrolled-away bubbles instead of hard-clipping them mid-line. */
.chat-demo__msgs {
  padding: 24px 18px 20px;
  height: 400px;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 40px);
  mask-image: linear-gradient(to bottom, transparent 0, #000 40px);
}
.chat-demo__msgs::-webkit-scrollbar { display: none; }
.chat-demo__foot {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px 14px;
  border-top: 1px solid rgba(255, 255, 255, .08);
}
.chat-demo__input {
  flex: 1;
  height: 42px;
  display: flex;
  align-items: center;
  padding: 0 16px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .1);
  color: var(--text-muted-dark);
  font-size: .88rem;
}
.chat-demo__send {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--grad);
  color: #fff;
  box-shadow: var(--shadow-glow);
}
.chat-demo__send .icon { width: 1.05em; height: 1.05em; }

/* --------------------------------------------------------------------------
   Floating provider chips (plain text, desktop only)
   -------------------------------------------------------------------------- */
.hero__chips {
  list-style: none;
  margin: 0;
  padding: 0;
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: none;                   /* shown on wide viewports only */
}
.hero__chips .float-chip { pointer-events: none; }
.float-chip--1 { top: -2%;   right: -2%;  animation: home-float-a 9s ease-in-out infinite; }
.float-chip--2 { top: 24%;   left: -13%;  animation: home-float-b 11s ease-in-out infinite; animation-delay: -2s; }
.float-chip--3 { top: 47%;   right: -6%;  animation: home-float-c 10s ease-in-out infinite; animation-delay: -5s; }
.float-chip--4 { bottom: 30%; left: -15%; animation: home-float-a 12s ease-in-out infinite; animation-delay: -7s; }
.float-chip--5 { bottom: -5%; right: 10%; animation: home-float-b 9.5s ease-in-out infinite; animation-delay: -3.5s; }
.float-chip--6 { bottom: -4%; left: 8%;   animation: home-float-c 13s ease-in-out infinite; animation-delay: -9s; }
.float-chip--6 .icon { color: #C4B5FD; }

@keyframes home-float-a {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(0deg); }
  50%      { transform: translate3d(6px, -14px, 0) rotate(-1.5deg); }
}
@keyframes home-float-b {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(0deg); }
  50%      { transform: translate3d(-8px, -10px, 0) rotate(1.5deg); }
}
@keyframes home-float-c {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50%      { transform: translate3d(4px, -16px, 0); }
}

@media (min-width: 1024px) {
  .hero__chips { display: block; }
  .hero--home .hero__visual { padding: 48px 28px 52px; } /* room for the chips hanging over the top/bottom edges */
}
/* Narrow desktops (1024–1279px): the visual column is tighter — keep chips 1, 5 and 6 only */
@media (min-width: 1024px) and (max-width: 1279px) {
  .float-chip--2, .float-chip--4 { display: none; }   /* left-side chips would sit over the chat bubbles */
  .float-chip--3 { display: none; }                   /* would land on top of the bubbles inside the mockup */
  .float-chip--1 { right: 0; }
}
@media (max-width: 860px) {
  .chat-demo__msgs { height: 300px; } /* shorter mockup on phones so the hero is not ~1400px tall */
}
@media (max-width: 480px) {
  .chat-demo__secure { display: none; }
}

/* Hero H1 gradient: each line fragment gets its own complete sweep so the hue does not jump at a line break */
.hero--home h1 .gradient-text {
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  background-image: linear-gradient(90deg, #818CF8 0%, #A78BFA 45%, #22D3EE 100%);
}

/* One-line independence disclaimer next to the floating provider chips (SPEC 1.1 #2) */
.hero--home .hero__disclaimer {
  margin: 14px 0 0;
  max-width: 560px;
  font-size: .78rem;
  line-height: 1.5;
  color: var(--text-muted-dark);
  opacity: .85;
}

/* Home hero type: one notch under .display so the headline holds 3–4 lines above the fold */
.hero--home .hero__content h1 { font-size: clamp(2.4rem, 4.6vw, 3.9rem); letter-spacing: -.035em; }
.hero--home .hero__content .lead { max-width: 560px; }

/* --------------------------------------------------------------------------
   Section tweaks
   -------------------------------------------------------------------------- */
.providers .section-head { margin-bottom: clamp(28px, 4vw, 44px); }
.services-grid .card--feature h3 { font-size: 1.12rem; }

.why { position: relative; }
.why .hero__bg { z-index: 0; }
.why .container { position: relative; z-index: 1; }
.why__copy .section-head { margin-bottom: 28px; }
.why__list { gap: 14px; }
.why__list li { font-size: 1rem; color: var(--text-muted-dark); }
.why__list li strong { color: var(--text-on-dark); }
.why__list li .icon { color: var(--cyan); }

.pricing-grid { align-items: stretch; }

@media (max-width: 860px) {
  .why .stats { margin-top: 8px; }
}

/* Phones: compact row layout for the eight service cards (icon left, copy right) — cuts the stack by ~a third */
@media (max-width: 720px) {
  .services-grid { gap: 12px; }
  .services-grid .card--feature {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    column-gap: 14px;
    row-gap: 6px;
    padding: 18px;
    border-radius: var(--radius);
  }
  .services-grid .card--feature .icon-tile {
    grid-row: 1 / span 3;
    width: 44px;
    height: 44px;
    flex-basis: 44px;
    margin: 0;
    border-radius: 12px;
  }
  .services-grid .card--feature .icon-tile .icon { width: 22px; height: 22px; }
  .services-grid .card--feature h3,
  .services-grid .card--feature p,
  .services-grid .card--feature .card__link { grid-column: 2; }
  .services-grid .card--feature p { font-size: .92rem; }
}

/* Phones: the four micro-trust items as a tidy 2×2 grid (matches .trust-bar and the landing hero) instead of a ragged 2 / 1 / 1 wrap */
@media (max-width: 560px) {
  .hero--home .hero__trust {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 16px;
  }
  .hero--home .hero__trust li { align-items: flex-start; line-height: 1.3; }
}

/* --------------------------------------------------------------------------
   Reduced motion / screenshot mode
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .float-chip--1, .float-chip--2, .float-chip--3, .float-chip--4, .float-chip--5, .float-chip--6 { animation: none; }
}
html.is-shot .float-chip { animation: none; }
