/* ============================================================
   DecEptioner — Homepage redesign
   Scoped stylesheet: loaded ONLY on index.html, AFTER style.css.
   New marketing markup uses the `hp-` prefix so it never collides
   with shared classes on other pages. A few existing homepage
   containers are overridden here (safe: this file is homepage-only).
   The live paraphraser tool keeps all its functional ids/classes.
   ============================================================ */

:root {
  --hp-bg: #131316;
  --hp-surface: #1b1b20;
  --hp-surface-2: #232329;
  --hp-line: rgba(255, 255, 255, 0.08);
  --hp-line-strong: rgba(255, 255, 255, 0.14);

  --hp-violet: #845ef7;
  --hp-violet-bright: #9d7bff;
  --hp-violet-soft: #c9b8ff;
  --hp-violet-glow: rgba(132, 94, 247, 0.35);

  --hp-flag: #ff5d73;          /* "detected as AI" */
  --hp-flag-bg: rgba(255, 93, 115, 0.12);
  --hp-pass: #34d399;          /* "reads as human" */
  --hp-pass-bg: rgba(52, 211, 153, 0.12);

  --hp-text: #f3f2f7;
  --hp-muted: #9b9aa6;

  --hp-display: "Kalnia", Georgia, serif;
  --hp-body: "Poppins", system-ui, sans-serif;

  --hp-radius: 16px;
  --hp-radius-sm: 11px;
  --hp-maxw: 1180px;
}

/* ---- shared layout helpers (homepage only) ---- */
.hp {
  font-family: var(--hp-body);
  color: var(--hp-text);
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hp-section {
  width: 100%;
  max-width: var(--hp-maxw);
  margin-inline: auto;
  padding-inline: 1.5rem;
}

.hp-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--hp-body);
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--hp-violet-soft);
}
.hp-eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--hp-violet));
}

.hp-section-head {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 2.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
}
.hp-section-title {
  font-family: var(--hp-display);
  font-weight: 500;
  font-size: clamp(1.9rem, 4vw, 2.9rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
  color: var(--hp-text);
}
.hp-section-title em {
  font-style: italic;
  color: var(--hp-violet-soft);
}
.hp-section-sub {
  color: var(--hp-muted);
  font-size: 1.02rem;
  line-height: 1.6;
  max-width: 560px;
}

/* ============================================================
   HERO
   ============================================================ */
.hp-hero {
  position: relative;
  width: 100%;
  max-width: var(--hp-maxw);
  margin: 0.5rem auto 0;
  padding: 2rem 1.5rem 1rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: visible;
}

/* selector kept specific (.hp-hero .hp-hero-glow) so it wins over
   `.hp-hero > *` below — otherwise the glow drops into flow and its
   360px height opens a large empty gap under the announcement. */
.hp-hero .hp-hero-glow {
  position: absolute;
  top: -40px;
  left: 50%;
  transform: translateX(-50%);
  width: min(720px, 90%);
  height: 360px;
  background: radial-gradient(ellipse at center, var(--hp-violet-glow), transparent 70%);
  filter: blur(20px);
  z-index: 0;
  pointer-events: none;
  opacity: 0.7;
}

.hp-hero > * { position: relative; z-index: 1; }

.hp-hero h1 {
  font-family: var(--hp-display);
  font-weight: 500;
  font-size: clamp(2.4rem, 6vw, 4.6rem);
  line-height: 1.04;
  letter-spacing: -0.015em;
  margin: 1.4rem 0 0;
  max-width: 16ch;
}
.hp-hero h1 .hp-flag-word {
  position: relative;
  font-style: italic;
  color: var(--hp-flag);
  white-space: nowrap;
}
.hp-hero h1 .hp-flag-word::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.12em;
  height: 0.09em;
  background: var(--hp-flag);
  opacity: 0.55;
  transform: scaleX(1);
  transform-origin: left;
}
.hp-hero h1 .hp-pass-word {
  font-style: italic;
  color: var(--hp-pass);
  white-space: nowrap;
}

.hp-hero-sub {
  color: var(--hp-muted);
  font-size: clamp(1rem, 1.5vw, 1.18rem);
  line-height: 1.65;
  max-width: 52ch;
  margin: 1.4rem auto 0;
}

.hp-hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  justify-content: center;
  margin-top: 2rem;
}
.hp-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--hp-body);
  font-weight: 700;
  font-size: 1rem;
  padding: 0.95rem 1.7rem;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease;
}
.hp-btn i { margin: 0; }
.hp-btn-primary {
  background: linear-gradient(135deg, var(--hp-violet), var(--hp-violet-bright));
  color: #11071f;
  box-shadow: 0 10px 30px -8px var(--hp-violet-glow);
}
.hp-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px -10px var(--hp-violet-glow);
  color: #11071f;
}
.hp-btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--hp-line-strong);
  color: var(--hp-text);
}
.hp-btn-ghost:hover {
  transform: translateY(-2px);
  border-color: var(--hp-violet);
  color: var(--hp-violet-soft);
}

.hp-hero-trust {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1.8rem;
  padding: 0.5rem 1rem 0.5rem 0.55rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--hp-line);
  color: var(--hp-muted);
  font-size: 0.9rem;
}
.hp-hero-trust img { width: 26px; height: 26px; }
.hp-hero-trust a { color: var(--hp-violet-soft); }
.hp-hero-trust strong { color: var(--hp-text); font-weight: 700; }

/* detector logos strip */
.hp-detectors {
  margin-top: 2.6rem;
  width: 100%;
  max-width: 760px;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  align-items: center;
}
.hp-detectors-label {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--hp-muted);
}
.hp-detectors-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
}
.hp-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--hp-text);
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  background: var(--hp-surface);
  border: 1px solid var(--hp-line);
}
.hp-chip .hp-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--hp-pass);
  box-shadow: 0 0 8px var(--hp-pass);
}

/* ============================================================
   LIVE TOOL FRAME
   Wraps the existing .input-areas paraphraser (kept intact).
   ============================================================ */
.hp-demo {
  width: 100%;
  max-width: var(--hp-maxw);
  margin: 3rem auto 0;
  padding-inline: 1.5rem;
  scroll-margin-top: 90px;
}
.hp-demo-label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  justify-content: center;
  margin-bottom: 1rem;
  color: var(--hp-muted);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.hp-demo-label .hp-live {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--hp-pass);
}
.hp-demo-label .hp-live::before {
  content: "";
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--hp-pass);
  box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.6);
  animation: hp-pulse 2s infinite;
}
@keyframes hp-pulse {
  0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.5); }
  70% { box-shadow: 0 0 0 9px rgba(52, 211, 153, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

/* Override the tool panel surface (homepage only) */
.hp-demo .input-areas {
  background: linear-gradient(180deg, var(--hp-surface), #161619);
  border: 1px solid var(--hp-line-strong);
  border-radius: var(--hp-radius);
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.8),
              0 0 0 1px rgba(132, 94, 247, 0.08),
              0 0 60px -20px var(--hp-violet-glow);
  max-width: 100%;
  margin-top: 0;
}
.hp-demo textarea {
  background: #141417;
  border: 1px solid var(--hp-line);
  border-radius: var(--hp-radius-sm);
}
.hp-demo textarea:focus {
  border-color: var(--hp-violet);
  box-shadow: 0 0 0 3px rgba(132, 94, 247, 0.18);
}
.hp-demo button.rewrite-button,
.hp-demo button.mobile-rewrite-button,
.hp-demo button.copy-button,
.hp-demo button.mobile-copy-button {
  background: linear-gradient(135deg, var(--hp-violet), var(--hp-violet-bright));
}
.hp-demo button.rewrite-button:hover,
.hp-demo button.copy-button:hover {
  background: linear-gradient(135deg, var(--hp-violet-bright), var(--hp-violet-soft));
}
.hp-demo .dropbtn {
  background: rgba(132, 94, 247, 0.16);
  color: var(--hp-violet-soft);
  border: 1px solid var(--hp-line-strong);
}

/* ============================================================
   RECEIPTS — before/after verdict flip (signature element)
   ============================================================ */
.hp-receipts {
  width: 100%;
  padding-block: 5rem 1rem;
}

.hp-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 1.8rem;
}
.hp-tab {
  font-family: var(--hp-body);
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--hp-muted);
  background: var(--hp-surface);
  border: 1px solid var(--hp-line);
  padding: 0.6rem 1.15rem;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.18s ease;
}
.hp-tab:hover { color: var(--hp-text); border-color: var(--hp-line-strong); }
.hp-tab.is-active {
  color: #11071f;
  background: linear-gradient(135deg, var(--hp-violet), var(--hp-violet-bright));
  border-color: transparent;
}

.hp-compare-stage {
  position: relative;
  max-width: 920px;
  margin: 0 auto;
}
.hp-slide { display: none; }
.hp-slide.is-active { display: block; }

.hp-compare {
  position: relative;
  width: 100%;
  border-radius: var(--hp-radius);
  overflow: hidden;
  border: 1px solid var(--hp-line-strong);
  background: #0c0c0e;
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.85);
  --pos: 50%;
  touch-action: none;
  user-select: none;
  cursor: ew-resize;
}
.hp-compare img {
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
}
.hp-compare .hp-compare-before { position: relative; z-index: 1; }
.hp-compare .hp-compare-after {
  position: absolute;
  inset: 0;
  z-index: 2;
  clip-path: inset(0 0 0 var(--pos));
}
.hp-compare .hp-compare-after img { width: 100%; }

/* verdict tags */
.hp-verdict {
  position: absolute;
  top: 14px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  backdrop-filter: blur(6px);
}
.hp-verdict i { margin: 0; }
.hp-verdict-ai {
  left: 14px;
  color: var(--hp-flag);
  background: rgba(20, 8, 11, 0.72);
  border: 1px solid var(--hp-flag);
}
.hp-verdict-human {
  right: 14px;
  color: var(--hp-pass);
  background: rgba(7, 20, 15, 0.72);
  border: 1px solid var(--hp-pass);
}

/* drag handle */
.hp-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--pos);
  z-index: 5;
  width: 2px;
  background: rgba(255, 255, 255, 0.85);
  transform: translateX(-1px);
  pointer-events: none;
}
.hp-handle-grip {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #fff;
  color: #11071f;
  font-size: 0.95rem;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
}
.hp-handle-grip i { margin: 0; }

.hp-compare-caption {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  margin-top: 1.1rem;
  color: var(--hp-muted);
  font-size: 0.92rem;
  text-align: center;
}
.hp-compare-caption strong { color: var(--hp-text); }
.hp-compare-caption .hp-arrow { color: var(--hp-violet); }
.hp-compare-hint {
  display: block;
  text-align: center;
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: var(--hp-muted);
  opacity: 0.75;
}

/* ============================================================
   FEATURES
   ============================================================ */
.hp-features { padding-block: 5rem 1rem; }
.hp-feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.1rem;
}
.hp-card {
  position: relative;
  background: var(--hp-surface);
  border: 1px solid var(--hp-line);
  border-radius: var(--hp-radius);
  padding: 1.6rem 1.5rem;
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
  overflow: hidden;
}
.hp-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--hp-violet), transparent);
  opacity: 0;
  transition: opacity 0.22s ease;
}
.hp-card:hover {
  transform: translateY(-4px);
  border-color: var(--hp-line-strong);
  background: var(--hp-surface-2);
}
.hp-card:hover::before { opacity: 1; }
.hp-card-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--hp-violet-soft);
  background: rgba(132, 94, 247, 0.12);
  border: 1px solid rgba(132, 94, 247, 0.25);
  margin-bottom: 1.1rem;
}
.hp-card-icon i { margin: 0; }
.hp-card h3 {
  font-family: var(--hp-body);
  font-weight: 700;
  font-size: 1.12rem;
  margin-bottom: 0.55rem;
  color: var(--hp-text);
}
.hp-card p {
  color: var(--hp-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}
.hp-card a.hp-card-link {
  color: var(--hp-violet-soft);
  font-weight: 600;
}

/* ============================================================
   VIDEO
   ============================================================ */
.hp-video { padding-block: 5rem 1rem; }
.hp-video-frame {
  max-width: 900px;
  margin: 0 auto;
  background: var(--hp-surface);
  border: 1px solid var(--hp-line-strong);
  border-radius: var(--hp-radius);
  padding: 1rem;
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.8);
}
.hp-video-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: var(--hp-radius-sm);
  background: #0c0c0e;
}
.hp-video-wrapper iframe,
.hp-video-wrapper video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #0c0c0e;
}

/* ============================================================
   TESTIMONIALS (monogram avatars — no broken images)
   ============================================================ */
.hp-testimonials { padding-block: 5rem 1rem; }
.hp-quote-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.1rem;
}
.hp-quote {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: var(--hp-surface);
  border: 1px solid var(--hp-line);
  border-radius: var(--hp-radius);
  padding: 1.5rem;
  transition: transform 0.22s ease, border-color 0.22s ease;
}
.hp-quote:hover { transform: translateY(-3px); border-color: var(--hp-line-strong); }
.hp-quote-stars { color: #ffc857; letter-spacing: 2px; font-size: 0.95rem; }
.hp-quote-text {
  color: #e7e6ee;
  font-size: 0.95rem;
  line-height: 1.65;
  flex-grow: 1;
}
.hp-quote-foot {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-top: 1px solid var(--hp-line);
  padding-top: 1rem;
}
.hp-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  color: #11071f;
  background: linear-gradient(135deg, var(--hp-violet), var(--hp-violet-bright));
  flex-shrink: 0;
}
img.hp-avatar {
  object-fit: cover;
  border: 2px solid rgba(132, 94, 247, 0.45);
  box-shadow: 0 0 0 3px rgba(132, 94, 247, 0.1);
}
.hp-quote-name { font-weight: 600; color: var(--hp-text); font-size: 0.95rem; }
.hp-quote-role { color: var(--hp-muted); font-size: 0.8rem; }

/* ============================================================
   CLOSING CTA
   ============================================================ */
.hp-close {
  width: 100%;
  padding-block: 5rem 4rem;
}
.hp-close-inner {
  position: relative;
  max-width: 880px;
  margin: 0 auto;
  text-align: center;
  padding: 3.5rem 2rem;
  border-radius: 24px;
  background:
    radial-gradient(ellipse at top, rgba(132, 94, 247, 0.18), transparent 60%),
    var(--hp-surface);
  border: 1px solid var(--hp-line-strong);
  overflow: hidden;
}
.hp-close-inner h2 {
  font-family: var(--hp-display);
  font-weight: 500;
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  line-height: 1.08;
  margin-bottom: 1rem;
}
.hp-close-inner h2 em { font-style: italic; color: var(--hp-violet-soft); }
.hp-close-inner p {
  color: var(--hp-muted);
  max-width: 56ch;
  margin: 0 auto 2rem;
  line-height: 1.65;
  font-size: 1.02rem;
}

/* ============================================================
   SCROLL REVEAL
   ============================================================ */
.hp-reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.hp-reveal.is-in {
  opacity: 1;
  transform: none;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 760px) {
  .hp-hero { padding-top: 2.5rem; }
  .hp-receipts, .hp-features, .hp-video, .hp-testimonials, .hp-close { padding-top: 3.5rem; }
  .hp-verdict { font-size: 0.68rem; padding: 0.3rem 0.6rem; }
  .hp-handle::before { width: 34px; height: 34px; font-size: 0.8rem; }
  .hp-btn { width: 100%; justify-content: center; }
  .hp-hero-cta { width: 100%; }
  /* Let the "Live tool · paste your text…" label wrap cleanly onto two
     centered lines instead of staggering its two flex items side by side. */
  .hp-demo-label { flex-wrap: wrap; row-gap: 0.25rem; text-align: center; }
  .hp-demo-label .hp-live { white-space: nowrap; }
}

/* Tool layout on phones — matches style.css's 800px mobile breakpoint where
   the mobile-only Paraphrase/copy buttons appear. Keeps the panel controls
   centered and stops those buttons from overflowing/wrapping (iPhone SE). */
@media (max-width: 800px) {
  /* center the detector dropdown to match the Readability/Stealth controls */
  .hp-demo .dropdown {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    text-align: center;
  }
  /* flex the output area so the textarea is full-width and the two mobile
     buttons share one tidy, equal-height row instead of wrapping */
  .hp-demo .gen-text {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    justify-content: center;
    align-items: stretch;
  }
  .hp-demo .gen-text textarea { flex: 1 1 100%; }
  .hp-demo button.mobile-rewrite-button {
    flex: 3 1 0;
    width: auto;
    border-radius: 10px;
  }
  .hp-demo .mobile-copy-button {
    flex: 1 1 0;
    width: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hp-reveal { opacity: 1; transform: none; transition: none; }
  .hp-demo-label .hp-live::before { animation: none; }
  * { scroll-behavior: auto !important; }
}
