/**
 * Hourly pages: shared palette + Hero V2
 * Scope: page-id 7940 (front page), 8901 (app-hosting), 8914 (app-hosting-calc)
 *
 * Goals:
 * - Adopt STYLE.md token palette + Rubik/JetBrains typography
 * - Reuse the Cloud VPS “Hero V2” structure on related pages
 * - Keep changes page-scoped (page-id)
 */

/* ============================================
   Tokens + typography
   (moved to `site-palette.css` for site-wide reuse)
   ============================================ */

/* ============================================
   Shared button styling (page-scoped)
   ============================================ */

body.page-id-7940 a.btn,
body.page-id-7940 button.btn {
  background: var(--brand-cta);
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.85rem 1.2rem;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  box-shadow: 0 6px 18px rgba(245, 146, 30, 0.22);
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

body.page-id-7940 a.btn:hover,
body.page-id-7940 button.btn:hover {
  background: var(--brand-highlight);
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(245, 146, 30, 0.25);
}

/* Align legacy App Hosting CTA classes to STYLE.md palette. */
body.page-id-8901 .btn-primary-cta {
  background: var(--brand-cta) !important;
  box-shadow: 0 6px 18px rgba(245, 146, 30, 0.25);
}

body.page-id-8901 .btn-primary-cta:hover {
  background: var(--brand-highlight) !important;
  box-shadow: 0 10px 22px rgba(245, 146, 30, 0.25);
}

/* ============================================
   App Hosting (8901): calculator CTA
   ============================================ */

/* App Hosting (8901): proof strip
   Keep the dark slate strip used on these pages (override shared default). */
body.page-id-8901 .proof-strip--app-hosting {
  --proof-strip-duration: 30s;
  background: linear-gradient(90deg, var(--hvps-slate-950, #020617) 0%, var(--text-primary, #0f172a) 50%, var(--hvps-slate-950, #020617) 100%);
  border-top: 0;
  border-bottom: 0;
}

body.page-id-8901 #calc-btn {
  background: var(--brand-cta);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 10px 22px rgba(245, 146, 30, 0.25);
}

body.page-id-8901 #calc-btn div:first-child {
  background: var(--surface-dark);
}

body.page-id-8901 #calc-btn a {
  background: var(--brand-cta);
  text-decoration: none;
}

body.page-id-8901 #calc-btn a:hover,
body.page-id-8901 #calc-btn a:focus-visible {
  background: var(--brand-highlight);
}

/* ============================================
   App Hosting (8901): section jump bar
   ============================================ */

body.page-id-8901 .tbox-jump-bar {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: #ffffff;
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: var(--header-height-scrolled, 80px);
  z-index: 200;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

body.page-id-8901 #trial-details,
body.page-id-8901 #advanced-capabilities {
  scroll-margin-top: calc(var(--header-height-scrolled, 80px) + 90px);
}

body.page-id-8901 .tbox-jump-link {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: 999px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

body.page-id-8901 .tbox-jump-link:hover {
  color: var(--brand-primary);
  background: rgba(41, 167, 230, 0.08);
}

body.page-id-8901 .tbox-jump-link.is-active {
  color: var(--brand-primary-dark);
  background: rgba(41, 167, 230, 0.12);
  font-weight: 600;
}

body.page-id-8901 .tbox-jump-link:focus-visible {
  outline: 2px solid var(--brand-primary);
  outline-offset: 2px;
}

@media (max-width: 768px) {
  body.page-id-8901 .tbox-jump-bar {
    justify-content: flex-start;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    gap: 0.375rem;
  }

  body.page-id-8901 .tbox-jump-bar::-webkit-scrollbar {
    display: none;
  }

  body.page-id-8901 .tbox-jump-link {
    padding: 0.4rem 0.75rem;
    font-size: 0.8125rem;
    flex-shrink: 0;
  }
}

/* ============================================
   App Hosting (8901): equalize feature cards
   ============================================ */

body.page-id-8901 .feature-card.featured {
  border-color: var(--gray-3) !important;
  background: #ffffff !important;
  box-shadow: none !important;
}

body.page-id-8901 .feature-card.featured::before {
  content: none !important;
}

body.page-id-8901 .feature-card.featured:hover {
  border-color: #0ea5e9 !important;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.12), 0 12px 24px rgba(0, 0, 0, 0.06) !important;
}

/* ============================================
   Home (7940): palette cleanup + cards
   ============================================ */

body.page-id-7940 #hero-section {
  background: linear-gradient(135deg, var(--brand-primary-dark) 0%, #045a84 50%, var(--brand-primary-dark) 100%);
  background-size: 200% 200%;
  animation: heroGradientShift 8s ease infinite;
}

body.page-id-7940 #hero-section h1 {
  letter-spacing: -0.02em;
}

body.page-id-7940 #hero-section h1 .tbox-muted {
  color: rgba(255, 255, 255, 0.7);
  font-weight: 400;
}

body.page-id-7940 .hero-trust-badges {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 1.5rem 0 2rem;
  font-size: 0.95rem;
}

body.page-id-7940 .hero-trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: rgba(255, 255, 255, 0.92);
}

body.page-id-7940 .hero-trust-badge .check {
  color: var(--success);
  font-weight: 800;
}

body.page-id-7940 #product-cards {
  gap: 1rem;
}

body.page-id-7940 #product-cards > div {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--border-light);
  border-top: 6px solid var(--brand-primary-dark);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  color: var(--text-primary);
}

body.page-id-7940 #product-cards > div:last-child {
  border-top-color: var(--brand-cta);
}

body.page-id-7940 #product-cards h3 {
  color: var(--text-primary);
}

body.page-id-7940 #product-cards p {
  color: var(--text-secondary);
}

body.page-id-7940 #product-cards a.btn {
  font-family: var(--tbox-font-body) !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 55%;
  padding: 0.75rem 1.25rem;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  box-shadow: 0 10px 22px rgba(2, 6, 23, 0.12);
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

body.page-id-7940 #product-cards > div:first-child a.btn {
  background: var(--brand-primary-dark);
  color: #ffffff;
}

body.page-id-7940 #product-cards > div:first-child a.btn:hover {
  background: #035b85;
  transform: translateY(-1px);
}

body.page-id-7940 #product-cards > div:last-child a.btn {
  background: var(--brand-cta);
  color: #ffffff;
}

body.page-id-7940 #product-cards > div:last-child a.btn:hover {
  background: var(--brand-highlight);
  transform: translateY(-1px);
}

/* ============================================
   Hero V2 (App Hosting pages)
   ============================================ */

@keyframes heroGradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

body.page-id-8901 #hero-section.hero-v2,
body.page-id-8914 #hero-section.hero-v2 {
  --tbox-hero-cta-height: 52px;
  --tbox-hero-cta-radius: 12px;

  background: linear-gradient(135deg, var(--brand-primary-dark) 0%, #045a84 50%, var(--brand-primary-dark) 100%) !important;
  background-image: linear-gradient(135deg, var(--brand-primary-dark) 0%, #045a84 50%, var(--brand-primary-dark) 100%) !important;
  background-color: transparent !important;
  background-size: 200% 200% !important;
  animation: heroGradientShift 8s ease infinite;
  position: relative;
  overflow: hidden;
  padding: 60px 40px 50px !important;
}

body.page-id-8901 #hero-section.hero-v2::before,
body.page-id-8914 #hero-section.hero-v2::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 50%, rgba(41, 167, 230, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(41, 167, 230, 0.10) 0%, transparent 40%),
    url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%2329A7E6' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

body.page-id-8901 #hero-section.hero-v2 .hero-content,
body.page-id-8914 #hero-section.hero-v2 .hero-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
}

body.page-id-8901 #hero-section.hero-v2 .hero-header,
body.page-id-8914 #hero-section.hero-v2 .hero-header {
  text-align: center;
  margin-bottom: 40px;
}

body.page-id-8901 #hero-section.hero-v2 .hero-header h1,
body.page-id-8914 #hero-section.hero-v2 .hero-header h1 {
  font-family: var(--tbox-font-body);
  font-size: 2.75rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.1;
  padding: 0;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

body.page-id-8901 #hero-section.hero-v2 .hero-header .tagline,
body.page-id-8914 #hero-section.hero-v2 .hero-header .tagline {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--brand-primary);
  margin-bottom: 8px;
}

body.page-id-8901 #hero-section.hero-v2 .hero-header .subtitle,
body.page-id-8914 #hero-section.hero-v2 .hero-header .subtitle {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.65);
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.5;
}

body.page-id-8901 .hero-v2 .features-grid,
body.page-id-8914 .hero-v2 .features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: 32px;
}

body.page-id-8901 .hero-v2 .feature-card,
body.page-id-8914 .hero-v2 .feature-card {
  background: #ffffff;
  border-radius: 12px;
  padding: 16px 18px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

body.page-id-8901 .hero-v2 .feature-card:hover,
body.page-id-8914 .hero-v2 .feature-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

body.page-id-8901 .hero-v2 .feature-icon,
body.page-id-8914 .hero-v2 .feature-icon {
  width: 36px;
  height: 36px;
  min-width: 36px;
  background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-primary-dark) 100%);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

body.page-id-8901 .hero-v2 .feature-icon svg,
body.page-id-8914 .hero-v2 .feature-icon svg {
  width: 18px;
  height: 18px;
  color: #ffffff;
}

body.page-id-8901 #hero-section.hero-v2 .feature-text,
body.page-id-8914 #hero-section.hero-v2 .feature-text {
  flex: 1;
  text-align: left !important;
}

body.page-id-8901 #hero-section.hero-v2 .feature-card h3,
body.page-id-8914 #hero-section.hero-v2 .feature-card h3 {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 2px;
  padding: 0;
  line-height: 1.2;
  text-align: left !important;
}

body.page-id-8901 #hero-section.hero-v2 .feature-card p,
body.page-id-8914 #hero-section.hero-v2 .feature-card p {
  font-size: 0.78rem;
  color: var(--text-secondary) !important;
  line-height: 1.4;
  text-align: left !important;
  margin: 0;
}

body.page-id-8901 #hero-section.hero-v2 .trust-bar,
body.page-id-8914 #hero-section.hero-v2 .trust-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
  margin-bottom: 16px;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.85) !important;
}

body.page-id-8901 #hero-section.hero-v2 .trust-divider,
body.page-id-8914 #hero-section.hero-v2 .trust-divider {
  color: rgba(255, 255, 255, 0.3) !important;
}

body.page-id-8901 #hero-section.hero-v2 .social-proof,
body.page-id-8914 #hero-section.hero-v2 .social-proof {
  text-align: center;
  font-size: 0.95rem;
  font-weight: 500;
  color: #ffffff !important;
  margin-bottom: 28px;
  opacity: 0.9;
}

body.page-id-8901 .hero-v2 .cta-zone,
body.page-id-8914 .hero-v2 .cta-zone {
  text-align: center;
}

body.page-id-8901 .hero-v2 .cta-headline,
body.page-id-8914 .hero-v2 .cta-headline {
  font-size: 0.95rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.92);
  margin: 0 0 10px;
}

body.page-id-8901 .hero-v2 .cta-widget-row,
body.page-id-8914 .hero-v2 .cta-widget-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

body.page-id-8901 .hero-v2 .cta-widget-row .jlc-wrapper,
body.page-id-8914 .hero-v2 .cta-widget-row .jlc-wrapper {
  max-width: 340px;
  margin: 0;
}

/* Hero CTA sizing: keep the JLC button and the expanded email form consistent. */
body.page-id-8901 #hero-section.hero-v2 .jlc-wrapper .jlc-cover,
body.page-id-8914 #hero-section.hero-v2 .jlc-wrapper .jlc-cover {
  height: var(--tbox-hero-cta-height);
  border-radius: var(--tbox-hero-cta-radius);
  overflow: hidden;
}

body.page-id-8901 #hero-section.hero-v2 .jlc-wrapper .jlc-cover .jlc-btn,
body.page-id-8914 #hero-section.hero-v2 .jlc-wrapper .jlc-cover .jlc-btn {
  height: var(--tbox-hero-cta-height);
  line-height: var(--tbox-hero-cta-height);
  border-radius: var(--tbox-hero-cta-radius);
  font-size: 0.95rem !important;
  font-weight: 700;
  padding: 0 22px;
}

/* Bring the JLC widget into the STYLE.md CTA color system. */
body.page-id-8901 .jlc-wrapper.bg-color-2 .jlc-cover .jlc-btn,
body.page-id-8914 .jlc-wrapper.bg-color-2 .jlc-cover .jlc-btn {
  background-color: var(--brand-cta);
}

body.page-id-8901 .jlc-wrapper.bg-color-2 .jlc-cover .jlc-btn:hover,
body.page-id-8914 .jlc-wrapper.bg-color-2 .jlc-cover .jlc-btn:hover {
  background-color: var(--brand-highlight);
}

body.page-id-8901 .jlc-wrapper .jlc-cover .jlc-form .jlc-input-wrapper,
body.page-id-8914 .jlc-wrapper .jlc-cover .jlc-form .jlc-input-wrapper {
  border-radius: var(--tbox-hero-cta-radius);
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.10);
  background-color: rgba(255, 255, 255, 0.95);
}

body.page-id-8901 #hero-section.hero-v2 .jlc-wrapper .jlc-cover .jlc-input,
body.page-id-8901 #hero-section.hero-v2 .jlc-wrapper .jlc-cover .jlc-sbmt,
body.page-id-8914 #hero-section.hero-v2 .jlc-wrapper .jlc-cover .jlc-input,
body.page-id-8914 #hero-section.hero-v2 .jlc-wrapper .jlc-cover .jlc-sbmt {
  height: var(--tbox-hero-cta-height);
}

body.page-id-8901 #hero-section.hero-v2 .jlc-wrapper .jlc-cover .jlc-sbmt,
body.page-id-8914 #hero-section.hero-v2 .jlc-wrapper .jlc-cover .jlc-sbmt {
  width: var(--tbox-hero-cta-height);
}

body.page-id-8901 #hero-section.hero-v2 .jlc-wrapper .jlc-cover .jlc-input,
body.page-id-8914 #hero-section.hero-v2 .jlc-wrapper .jlc-cover .jlc-input {
  width: calc(100% - var(--tbox-hero-cta-height));
  font-size: 0.95rem;
}

body.page-id-8901 .jlc-wrapper .jlc-cover .jlc-sbmt,
body.page-id-8914 .jlc-wrapper .jlc-cover .jlc-sbmt {
  background-color: var(--brand-primary-dark);
}

body.page-id-8901 .jlc-wrapper .jlc-cover .jlc-form.jlc-form__valid .jlc-sbmt,
body.page-id-8914 .jlc-wrapper .jlc-cover .jlc-form.jlc-form__valid .jlc-sbmt {
  background-color: var(--brand-cta);
}

body.page-id-8901 .hero-v2 .btn-secondary,
body.page-id-8914 .hero-v2 .btn-secondary {
  background: #ffffff;
  color: var(--brand-primary-dark);
  font-size: 0.95rem;
  font-weight: 600;
  min-height: var(--tbox-hero-cta-height);
  padding: 0 22px;
  border: none;
  border-radius: var(--tbox-hero-cta-radius);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

body.page-id-8901 .hero-v2 .btn-secondary:hover,
body.page-id-8914 .hero-v2 .btn-secondary:hover {
  background: #f8fafc;
  transform: translateY(-1px);
  color: var(--brand-primary-dark);
}

body.page-id-8901 #hero-section.hero-v2 .cta-subtext,
body.page-id-8914 #hero-section.hero-v2 .cta-subtext {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.65) !important;
  margin: 0;
}

@media (max-width: 700px) {
  body.page-id-8901 .hero-v2 .features-grid,
  body.page-id-8914 .hero-v2 .features-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  body.page-id-8901 #hero-section.hero-v2,
  body.page-id-8914 #hero-section.hero-v2 {
    padding: 40px 24px !important;
  }

  body.page-id-8901 #hero-section.hero-v2 .cta-widget-row,
  body.page-id-8914 #hero-section.hero-v2 .cta-widget-row {
    flex-direction: column;
    align-items: center;
  }

  body.page-id-8901 #hero-section.hero-v2 .cta-widget-row .btn-secondary,
  body.page-id-8914 #hero-section.hero-v2 .cta-widget-row .btn-secondary {
    width: 100%;
    max-width: 340px;
  }

  body.page-id-8901 #hero-section.hero-v2 .hero-header h1,
  body.page-id-8914 #hero-section.hero-v2 .hero-header h1 {
    font-size: 2rem;
  }

  body.page-id-8901 #hero-section.hero-v2 .trust-bar,
  body.page-id-8914 #hero-section.hero-v2 .trust-bar {
    flex-direction: column;
    gap: 12px;
  }

  body.page-id-8901 #hero-section.hero-v2 .trust-divider,
  body.page-id-8914 #hero-section.hero-v2 .trust-divider {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.page-id-7940 #hero-section,
  body.page-id-8901 #hero-section.hero-v2,
  body.page-id-8914 #hero-section.hero-v2 {
    animation: none !important;
  }

  body.page-id-8901 .proof-strip__track {
    animation: none !important;
    transform: none !important;
  }
}
