/* ════════
 * v4.16 — Elite SaaS polish (2026-05-12)
 * 1) Section visual rhythm  2) Plan hierarchy  3) Hover micro
 * 4) CTA prominence         5) Typography precision
 * Constraint: pure CSS, no JS, no DOM changes, no perf hit.
 * ════════ */

/* ── 1. SECTION VISUAL RHYTHM — alternating subtle bg + thin top accent ── */
@media (min-width: 641px){
  html body section.exfg,
  html body #plans,
  html body #faq,
  html body #compare{
    background: linear-gradient(180deg, #fbfcfe 0%, #ffffff 100%);
  }
  html body #locations,
  html body .me-block,
  html body #windows-vps,
  html body #how,
  html body #reviews{
    background: #ffffff;
  }
  html body section.exfg::before,
  html body #plans::before,
  html body #windows-vps::before,
  html body #reviews::before,
  html body #faq::before,
  html body #compare::before{
    content: "";
    display: block;
    height: 1px;
    width: 100%;
    background: linear-gradient(90deg, transparent 0%, rgba(66,153,225,0.18) 50%, transparent 100%);
    margin-top: -1px;
  }
}
html[data-theme="dark"] body section.exfg,
html[data-theme="dark"] body #plans,
html[data-theme="dark"] body #faq,
html[data-theme="dark"] body #compare{
  background: linear-gradient(180deg, #0f1623 0%, #0a0f1a 100%) !important;
}

/* ── 2. PLAN CARD HIERARCHY — premium emphasis on popular ── */
@media (min-width: 641px){
  html body .plan,
  html body .plan-card{
    background: linear-gradient(180deg, #ffffff 0%, #fbfcfe 100%) !important;
    border: 1px solid rgba(15,23,42,0.08) !important;
    box-shadow: 0 1px 3px rgba(15,23,42,0.04), 0 1px 2px rgba(15,23,42,0.02) !important;
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease !important;
  }
  html body .plan.popular,
  html body .plan-card.popular,
  html body .plan:has(.plan-pop),
  html body .plan-card:has(.plan-pop){
    background: linear-gradient(180deg, #ffffff 0%, #f0f7ff 100%) !important;
    border: 1.5px solid rgba(66,153,225,0.35) !important;
    box-shadow: 0 4px 18px rgba(66,153,225,0.12), 0 2px 6px rgba(15,23,42,0.05) !important;
    transform: scale(1.02);
    position: relative;
  }
  @media (hover: hover){
    html body .plan:hover,
    html body .plan-card:hover{
      transform: translateY(-3px);
      box-shadow: 0 12px 30px rgba(15,23,42,0.08), 0 4px 10px rgba(66,153,225,0.06) !important;
      border-color: rgba(66,153,225,0.30) !important;
    }
    html body .plan.popular:hover,
    html body .plan-card.popular:hover,
    html body .plan:has(.plan-pop):hover,
    html body .plan-card:has(.plan-pop):hover{
      transform: scale(1.02) translateY(-3px);
      box-shadow: 0 16px 36px rgba(66,153,225,0.18), 0 4px 12px rgba(15,23,42,0.06) !important;
    }
  }
}
html[data-theme="dark"] body .plan,
html[data-theme="dark"] body .plan-card{
  background: linear-gradient(180deg, #131c2c 0%, #0f1623 100%) !important;
  border: 1px solid rgba(255,255,255,0.06) !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3) !important;
}

/* ── 3. PLAN PRICE — stronger visual anchor ── */
html body .plan-price{
  font-feature-settings: "tnum" 1, "ss01" 1;
  letter-spacing: -0.02em;
  background: linear-gradient(180deg, #2563eb 0%, #1e40af 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 800 !important;
}
@supports not (background-clip: text){
  html body .plan-price{ color: #2563eb !important; background: none !important }
}
html body .plan-period{
  color: #64748b !important;
  font-feature-settings: "tnum" 1;
  letter-spacing: 0.01em;
}

/* ── 4. PLAN BUTTON — sharper gradient + subtle inner sheen ── */
html body .plan-btn,
html body .plan .plan-btn{
  background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%) !important;
  box-shadow: 0 3px 10px rgba(37,99,235,0.30), inset 0 1px 0 rgba(255,255,255,0.18) !important;
  border: none !important;
  color: #fff !important;
  font-weight: 700 !important;
  letter-spacing: 0.01em;
  transition: all .2s ease !important;
}
@media (hover: hover){
  html body .plan-btn:hover,
  html body .plan .plan-btn:hover{
    background: linear-gradient(180deg, #2563eb 0%, #1e40af 100%) !important;
    box-shadow: 0 6px 18px rgba(37,99,235,0.36), inset 0 1px 0 rgba(255,255,255,0.22) !important;
    transform: translateY(-1px);
  }
}

/* ── 5. SPECS — cleaner row hierarchy ── */
html body .plan-specs{ font-feature-settings: "tnum" 1 }
html body .plan-specs .spec{
  background: rgba(15,23,42,0.025) !important;
  border: 1px solid rgba(15,23,42,0.05) !important;
  border-radius: 8px !important;
  font-weight: 500 !important;
}
html[data-theme="dark"] body .plan-specs .spec{
  background: rgba(255,255,255,0.04) !important;
  border-color: rgba(255,255,255,0.07) !important;
}

/* ── 6. SECTION TITLES — premium rhythm + tighter tracking ── */
html body .section-label{
  font-feature-settings: "tnum" 1, "case" 1;
  letter-spacing: 0.14em !important;
  font-weight: 700 !important;
  font-size: 11px !important;
  text-transform: uppercase;
  color: var(--ds-blue-text) !important;
  margin-bottom: 10px !important;
  display: inline-block;
  padding: 4px 12px;
  background: rgba(66,153,225,0.08);
  border-radius: 20px;
  border: 1px solid rgba(66,153,225,0.18);
}
html body .section-title{
  letter-spacing: -0.025em !important;
  line-height: 1.12 !important;
  font-weight: 700 !important;
  margin-bottom: 8px !important;
}
html body .section-sub{
  line-height: 1.55 !important;
  color: var(--ds-text-muted) !important;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

/* ── 7. TRUST BADGES — refined visual weight ── */
html body .tbadge{
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%) !important;
  border: 1px solid rgba(15,23,42,0.06) !important;
  box-shadow: 0 1px 2px rgba(15,23,42,0.03) !important;
  font-weight: 600 !important;
  letter-spacing: 0.01em;
  color: #475569 !important;
}
html[data-theme="dark"] body .tbadge{
  background: linear-gradient(180deg, #1e293b 0%, #131c2c 100%) !important;
  border-color: rgba(255,255,255,0.06) !important;
  color: #cbd5e1 !important;
}

/* ── 8. HERO PRIMARY CTA — premium gradient + soft glow ── */
html body .hero .btn-main,
html body #t-cta1,
html body .btn-main[href="#plans"]{
  background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%) !important;
  box-shadow: 0 8px 24px rgba(37,99,235,0.30), inset 0 1px 0 rgba(255,255,255,0.20) !important;
  border: none !important;
  font-weight: 700 !important;
  letter-spacing: 0.02em;
  position: relative;
  overflow: hidden;
  transition: all .25s ease !important;
}
@media (hover: hover){
  html body .hero .btn-main:hover,
  html body #t-cta1:hover{
    box-shadow: 0 12px 32px rgba(37,99,235,0.38), inset 0 1px 0 rgba(255,255,255,0.24) !important;
    transform: translateY(-1px);
  }
}

/* ── 9. FAQ — premium accordion polish ── */
html body .faq-item{
  background: linear-gradient(180deg, #ffffff 0%, #fbfcfe 100%) !important;
  border: 1px solid rgba(15,23,42,0.06) !important;
  box-shadow: 0 1px 2px rgba(15,23,42,0.03) !important;
  transition: all .2s ease !important;
}
@media (hover: hover){
  html body .faq-item:hover{
    border-color: rgba(66,153,225,0.20) !important;
    box-shadow: 0 4px 12px rgba(15,23,42,0.05) !important;
  }
}
html body .faq-item.open{
  border-color: rgba(66,153,225,0.30) !important;
  box-shadow: 0 4px 16px rgba(15,23,42,0.06) !important;
  background: linear-gradient(180deg, #ffffff 0%, #f0f7ff 100%) !important;
}

/* ── 10. TESTIMONIAL CARDS — refined elevation ── */
html body .testi-card{
  background: linear-gradient(180deg, #ffffff 0%, #fbfcfe 100%) !important;
  border: 1px solid rgba(15,23,42,0.06) !important;
  box-shadow: 0 2px 6px rgba(15,23,42,0.04) !important;
  transition: all .2s ease !important;
}
@media (hover: hover){
  html body .testi-card:hover{
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(15,23,42,0.07) !important;
  }
}

/* ── 11. EXFG cards — consistent elevation ── */
html body .exfg-card{
  background: linear-gradient(180deg, #ffffff 0%, #fbfcfe 100%) !important;
  border: 1px solid rgba(15,23,42,0.06) !important;
  box-shadow: 0 1px 3px rgba(15,23,42,0.04) !important;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease !important;
}
@media (hover: hover){
  html body .exfg-card:hover{
    transform: translateY(-3px);
    box-shadow: 0 10px 26px rgba(15,23,42,0.07), 0 0 0 1px rgba(66,153,225,0.20) !important;
  }
}

/* ── 12. MOBILE polish — tighter density, better hierarchy ── */
@media (max-width: 640px){
  html body .plan{ text-align: center }
  html body .plan-name{ margin-bottom: 6px !important }
  html body .plan-price-wrap{ margin: 6px 0 8px !important }
  html body .plan-price{ font-size: 26px !important; line-height: 1 !important }
  html body .plan-period{ font-size: 10px !important }
  html body .plan-specs{
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 3px !important;
    margin: 8px 0 !important;
  }
  html body .plan-specs .spec{
    font-size: 10.5px !important;
    padding: 4px 7px !important;
    text-align: start !important;
  }
  html body .plan-btn{
    margin-top: 8px !important;
    min-height: 38px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
  }
  html body .plan.popular,
  html body .plan:has(.plan-pop){
    border: 1.5px solid rgba(66,153,225,0.35) !important;
    background: linear-gradient(180deg, #ffffff 0%, #f0f7ff 100%) !important;
  }
  html body section + section,
  html body section + .me-block,
  html body .me-block + section{ margin-top: 0 !important }
  html body .trust-bar{ padding: 10px 0 !important }
  html body .tbadge{
    font-size: 10.5px !important;
    padding: 5px 9px !important;
    border-radius: 7px !important;
  }
  html body .section-label{
    font-size: 10px !important;
    padding: 3px 10px !important;
    margin-bottom: 6px !important;
  }
  html body .section-title{ font-size: 22px !important }
  html body .section-sub{ font-size: 13px !important }
}

/* ── 13. SCROLL ANCHORING ── */
html{ scroll-behavior: smooth }
html body section[id]{ scroll-margin-top: 80px }

/* ── 14. FOCUS RINGS ── */
html body button:focus-visible,
html body a:focus-visible,
html body .plan-btn:focus-visible{
  outline: 2px solid #2563eb !important;
  outline-offset: 3px;
  border-radius: 8px;
}

/* ── 15. SELECTION COLOR ── */
::selection{ background: rgba(66,153,225,0.25); color: inherit }

/* ── 16. RENDER POLISH ── */
html body .plan,
html body .plan-card,
html body .exfg-card,
html body .testi-card,
html body .feat-card{
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

/* ── v4.16b: fix popular-plan selectors (actual marker = .featured / .plan-chip) ── */

/* Desktop: popular plan elevated treatment */
@media (min-width: 641px){
  html body .plan.featured,
  html body .plan-card.featured,
  html body .plan:has(> .plan-chip),
  html body .plan-card:has(> .plan-chip){
    background: linear-gradient(180deg, #ffffff 0%, #eff6ff 100%) !important;
    border: 1.5px solid rgba(37,99,235,0.40) !important;
    box-shadow:
      0 4px 18px rgba(37,99,235,0.14),
      0 2px 6px rgba(15,23,42,0.05),
      inset 0 1px 0 rgba(255,255,255,0.9) !important;
    transform: scale(1.03);
    z-index: 2;
    position: relative;
  }
  /* Popular-plan chip itself: premium ribbon */
  html body .plan-chip{
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%) !important;
    color: #fff !important;
    box-shadow: 0 3px 10px rgba(37,99,235,0.35) !important;
    font-weight: 700 !important;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-size: 10px !important;
    padding: 4px 12px !important;
    border-radius: 999px !important;
    position: absolute;
    inset-block-start: -12px;
    inset-inline-start: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    z-index: 3;
  }
  /* RTL: keep chip horizontally centered */
  html[dir="rtl"] body .plan-chip{
    transform: translateX(50%);
  }
  @media (hover: hover){
    html body .plan.featured:hover,
    html body .plan-card.featured:hover,
    html body .plan:has(> .plan-chip):hover,
    html body .plan-card:has(> .plan-chip):hover{
      transform: scale(1.03) translateY(-3px);
      box-shadow:
        0 16px 36px rgba(37,99,235,0.20),
        0 4px 12px rgba(15,23,42,0.06),
        inset 0 1px 0 rgba(255,255,255,0.9) !important;
    }
  }
}

/* Mobile: same emphasis but no scale to avoid overflow in tight 2-col grid */
@media (max-width: 640px){
  html body .plan.featured,
  html body .plan-card.featured,
  html body .plan:has(> .plan-chip),
  html body .plan-card:has(> .plan-chip){
    background: linear-gradient(180deg, #ffffff 0%, #eff6ff 100%) !important;
    border: 1.5px solid rgba(37,99,235,0.40) !important;
    box-shadow:
      0 4px 14px rgba(37,99,235,0.14),
      0 2px 6px rgba(15,23,42,0.04) !important;
    position: relative;
  }
  html body .plan-chip{
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%) !important;
    color: #fff !important;
    font-size: 9px !important;
    padding: 3px 9px !important;
    border-radius: 999px !important;
    font-weight: 700 !important;
    letter-spacing: 0.03em;
    box-shadow: 0 2px 6px rgba(37,99,235,0.30) !important;
    position: absolute;
    inset-block-start: -8px;
    inset-inline-start: 50%;
    transform: translateX(-50%);
    z-index: 3;
    white-space: nowrap;
  }
  html[dir="rtl"] body .plan-chip{
    transform: translateX(50%);
  }
}

/* Dark mode override */
html[data-theme="dark"] body .plan.featured,
html[data-theme="dark"] body .plan-card.featured,
html[data-theme="dark"] body .plan:has(> .plan-chip){
  background: linear-gradient(180deg, #1a2842 0%, #131c2c 100%) !important;
  border: 1.5px solid rgba(96,165,250,0.40) !important;
}
