/**
 * Homepage — mobile & tablet responsive tokens + thick-icon quick dock
 * Loaded after homepage.css. Visible dock ≤1199.98px.
 */

:root {
  /* Dock (defaults; overridden below on touch viewports) */
  --hp-dock-h: 0px;
  --hp-dock-pad-x: 8px;
  --hp-dock-icon: 26px;
  --hp-dock-label: 0.625rem;
  --hp-dock-fab: 52px;

  /* Fluid type / control tokens (desktop defaults; media overrides) */
  --hp2-fs-hero: clamp(2rem, 1.4rem + 2.5vw, 3.5rem);
  --hp2-fs-h2: clamp(1.5rem, 1.15rem + 1.4vw, 2.75rem);
  --hp2-fs-h3: clamp(1.1rem, 1rem + 0.4vw, 1.35rem);
  --hp2-fs-body: clamp(0.9rem, 0.85rem + 0.25vw, 1.05rem);
  --hp2-fs-meta: clamp(0.75rem, 0.7rem + 0.15vw, 0.875rem);
  --hp2-fs-overline: clamp(0.65rem, 0.6rem + 0.12vw, 0.75rem);

  --hp2-btn-h: 48px;
  --hp2-btn-h-lg: 56px;
  --hp2-btn-fs: 0.9375rem;
  --hp2-btn-fs-lg: 1.05rem;
  --hp2-btn-px: 24px;
  --hp2-btn-px-lg: 36px;

  --hp2-pill-h: 28px;
  --hp2-pill-fs: var(--hp2-fs-overline);
  --hp2-pill-px: 12px;

  --hp2-card-pad: 24px;
  --hp2-card-radius: 16px;
  --hp2-section-py: clamp(48px, 8vw, 120px);
}

/* ── Tablet ───────────────────────────────────────────────── */
@media (min-width: 768px) and (max-width: 1199.98px) {
  :root {
    --hp-dock-h: 76px;
    --hp-dock-icon: 28px;
    --hp-dock-label: 0.6875rem;
    --hp-dock-fab: 56px;

    --hp2-fs-hero: clamp(2rem, 1.6rem + 1.5vw, 2.75rem);
    --hp2-fs-h2: clamp(1.5rem, 1.25rem + 1vw, 2.2rem);
    --hp2-fs-body: 1rem;
    --hp2-btn-h: 50px;
    --hp2-btn-h-lg: 56px;
    --hp2-btn-fs: 1rem;
    --hp2-btn-px: 28px;
    --hp2-pill-h: 30px;
    --hp2-card-pad: 22px;
    --hp2-section-py: clamp(56px, 7vw, 88px);
  }
}

/* ── Phone ────────────────────────────────────────────────── */
@media (max-width: 767.98px) {
  :root {
    --hp-dock-h: 72px;
    --hp-dock-icon: 26px;
    --hp-dock-label: 0.625rem;
    --hp-dock-fab: 52px;
    --hp-dock-pad-x: 4px;

    --hp2-fs-hero: clamp(1.65rem, 1.35rem + 2.5vw, 2.15rem);
    --hp2-fs-h2: clamp(1.35rem, 1.15rem + 1.2vw, 1.75rem);
    --hp2-fs-h3: 1.05rem;
    --hp2-fs-body: 0.9375rem;
    --hp2-fs-meta: 0.8125rem;

    --hp2-btn-h: 48px;
    --hp2-btn-h-lg: 52px;
    --hp2-btn-fs: 0.9375rem;
    --hp2-btn-fs-lg: 1rem;
    --hp2-btn-px: 20px;
    --hp2-btn-px-lg: 24px;

    --hp2-pill-h: 26px;
    --hp2-pill-px: 10px;
    --hp2-card-pad: 16px;
    --hp2-card-radius: 14px;
    --hp2-section-py: clamp(40px, 10vw, 64px);
  }
}

/* ============================================================
   APPLY TOKENS — mobile + tablet
   ============================================================ */
@media (max-width: 1199.98px) {
  html {
    scroll-padding-bottom: calc(var(--hp-dock-h) + env(safe-area-inset-bottom, 0px) + 12px);
  }

  body.hp-page {
    padding-bottom: calc(var(--hp-dock-h) + env(safe-area-inset-bottom, 0px) + 8px) !important;
  }

  /* Type */
  .hp2-hero-content h1,
  .hp2-hero h1 {
    font-size: var(--hp2-fs-hero) !important;
    line-height: 1.15 !important;
  }
  .hp2-section-header h2,
  .hp2-roi-left h2,
  .hp2-final-cta h2,
  .hp2-hero-content .hp2-hero-sub,
  .hp2-section-header h2 {
    font-size: var(--hp2-fs-h2) !important;
  }
  .hp2-hero-sub,
  .hp2-section-sub,
  .hp2-pricing-roi-line,
  .hp2-roi-left p,
  .hp2-problem p,
  .hp2-feature-copy p {
    font-size: var(--hp2-fs-body) !important;
  }
  .hp2-pricing-subtitle,
  .hp2-price-desc,
  .hp2-proof-item,
  .hp2-pricing-persuasion {
    font-size: var(--hp2-fs-meta) !important;
  }

  /* Overline / pills */
  .hp2-overline,
  .hp2-section-overline,
  .hp2-pricing-badge,
  .hp2-popular-badge,
  .hp2-price-badge {
    font-size: var(--hp2-pill-fs) !important;
    min-height: var(--hp2-pill-h) !important;
    padding: 0 var(--hp2-pill-px) !important;
    display: inline-flex !important;
    align-items: center !important;
    line-height: 1 !important;
  }

  /* Buttons */
  .hp2-btn,
  .hp-btn,
  .hp-btn-primary {
    min-height: var(--hp2-btn-h) !important;
    font-size: var(--hp2-btn-fs) !important;
    padding: 0 var(--hp2-btn-px) !important;
    border-radius: var(--hp2-radius-full, 999px) !important;
  }
  .hp2-btn-lg,
  .hp-btn-lg {
    min-height: var(--hp2-btn-h-lg) !important;
    font-size: var(--hp2-btn-fs-lg) !important;
    padding: 0 var(--hp2-btn-px-lg) !important;
  }
  .hp2-btn-full { width: 100% !important; }

  /* Cards */
  .hp2-pricing-card,
  .hp2-price-card,
  .hp2-testimonial-card,
  .hp2-problem-card,
  .hp2-roi-stat-card,
  .hp2-feature-card {
    padding: var(--hp2-card-pad) !important;
    border-radius: var(--hp2-card-radius) !important;
  }

  /* Sections */
  .hp2-section,
  .hp-section {
    padding-top: var(--hp2-section-py) !important;
    padding-bottom: var(--hp2-section-py) !important;
  }

  /* Pricing amount stays one line */
  .hp2-pricing-price,
  .hp2-pricing-page .hp2-price-amount {
    flex-wrap: nowrap !important;
    white-space: nowrap !important;
  }
  .hp2-price-amount,
  .hp2-pricing-page .hp2-price-current {
    font-size: clamp(1.2rem, 0.95rem + 2vw, 1.75rem) !important;
  }

  /* Header actions tighten */
  .hp-header-inner {
    min-height: 56px;
    padding-left: 12px;
    padding-right: 12px;
  }
  .hp-mobile-toggle {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    font-size: 1.5rem !important;
  }

  /* Footer clear of dock */
  .hp2-footer,
  .hp-footer {
    padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px)) !important;
  }
}

@media (max-width: 767.98px) {
  .hp2-hero-ctas {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
  }
  .hp2-hero-ctas .hp2-btn {
    width: 100% !important;
    justify-content: center !important;
  }
  .hp2-pricing-grid {
    grid-template-columns: 1fr !important;
    max-width: 420px;
    margin-inline: auto;
  }
  .hp2-roi-right {
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
  }
  .hp2-roi-stat-number {
    font-size: clamp(1.5rem, 1.2rem + 2vw, 2.2rem) !important;
  }
  .hp2-testimonials-grid {
    grid-template-columns: 1fr !important;
  }
  .container {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
}

@media (min-width: 768px) and (max-width: 1199.98px) {
  .hp2-pricing-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    max-width: 820px;
    margin-inline: auto;
  }
  .hp2-roi-right {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  .hp2-testimonials-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  /* Let hp-tablet.css own 992–1199 ROI 4-up / hero stack */
}

/* ============================================================
   QUICK DOCK — thick icons
   ============================================================ */
.hp-quick-dock {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1050;
  height: calc(var(--hp-dock-h) + env(safe-area-inset-bottom, 0px));
  padding: 0 var(--hp-dock-pad-x) env(safe-area-inset-bottom, 0px);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(86, 18, 105, 0.1);
  box-shadow: 0 -8px 32px rgba(15, 23, 42, 0.08);
  align-items: stretch;
  justify-content: space-around;
  gap: 2px;
}

@media (max-width: 1199.98px) {
  .hp-quick-dock {
    display: flex;
  }
}

.hp-dock-item {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  text-decoration: none !important;
  color: #64748b;
  font-family: var(--hp2-font, 'Lexend Deca', sans-serif);
  font-size: var(--hp-dock-label);
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.1;
  padding: 8px 4px 6px;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.15s ease, transform 0.12s ease;
}

.hp-dock-item i {
  font-size: var(--hp-dock-icon);
  line-height: 1;
  display: block;
}

.hp-dock-item span:not(.hp-dock-fab) {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hp-dock-item:active {
  transform: scale(0.94);
}

.hp-dock-item.is-active,
.hp-dock-item:hover {
  color: var(--hp2-primary, #45105a);
}

.hp-dock-item.is-active i {
  color: var(--hp2-primary, #45105a);
}

/* Center FAB — thick primary pricing action */
.hp-dock-item-primary {
  position: relative;
  top: -10px;
  color: var(--hp2-primary, #45105a);
}

.hp-dock-fab {
  width: var(--hp-dock-fab);
  height: var(--hp-dock-fab);
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #561269 0%, #7a1f8f 100%);
  color: #fff !important;
  box-shadow: 0 8px 24px rgba(86, 18, 105, 0.35);
  border: 3px solid #fff;
}

.hp-dock-fab i {
  font-size: calc(var(--hp-dock-icon) + 4px) !important;
  color: #fff !important;
}

.hp-dock-item-primary span:not(.hp-dock-fab) {
  margin-top: 2px;
  font-weight: 700;
  color: var(--hp2-primary, #45105a);
}

.hp-dock-item-primary.is-active .hp-dock-fab,
.hp-dock-item-primary:active .hp-dock-fab {
  box-shadow: 0 4px 16px rgba(86, 18, 105, 0.45);
  transform: scale(0.97);
}

/* Lift floating actions above dock on touch layouts */
@media (max-width: 1199.98px) {
  .hp2-go-top,
  .hp2-whatsapp-btn {
    bottom: calc(var(--hp-dock-h) + env(safe-area-inset-bottom, 0px) + 16px) !important;
  }
  .hp2-go-top {
    right: 16px !important;
  }
  .hp2-whatsapp-btn {
    right: 16px !important;
  }
  .hp2-go-top.visible ~ .hp2-whatsapp-btn,
  body:has(.hp2-go-top.visible) .hp2-whatsapp-btn {
    bottom: calc(var(--hp-dock-h) + env(safe-area-inset-bottom, 0px) + 76px) !important;
  }
}

/* Hide dock when printing */
@media print {
  .hp-quick-dock { display: none !important; }
  body.hp-page { padding-bottom: 0 !important; }
}
