/* ═══════════════════════════════════════════════════════════════════
   SoftPhonez — Premium layer (sp-premium.css)
   Site-wide polish: scroll reveals, micro-interactions, hero ambience,
   SVG decoration support. Loaded AFTER style.css + brand override.
   Color scheme unchanged: navy #001947/#003275 · gold #F0C36D.
   Pairs with assets/homepage/js/sp-premium.js
   ═══════════════════════════════════════════════════════════════════ */

/* ── 1. Global refinement ─────────────────────────────────────────── */
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
::selection { background: #F0C36D; color: #001947; }

/* Fixed header: elevate softly once the page scrolls (JS adds .sp-scrolled) */
#header {
  transition: box-shadow 0.35s ease, background 0.35s ease;
}
#header.sp-scrolled {
  box-shadow: 0 8px 28px rgba(0, 25, 71, 0.10);
}

/* Gold underline slide-in on nav links */
#header .navbar a.nav-link {
  position: relative;
}
#header .navbar a.nav-link::after {
  content: '';
  position: absolute;
  left: 14px; right: 14px; bottom: 2px;
  height: 2px;
  background: linear-gradient(90deg, #F0C36D, #d9a644);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}
#header .navbar a.nav-link:hover::after,
#header .navbar a.nav-link.active::after {
  transform: scaleX(1);
}

/* ── 2. Scroll-reveal system (JS toggles .sp-in) ─────────────────── */
@media (prefers-reduced-motion: no-preference) {
  .sp-rv {
    opacity: 0;
    transform: translateY(28px);
    transition:
      opacity 0.75s cubic-bezier(0.22, 0.61, 0.36, 1),
      transform 0.75s cubic-bezier(0.22, 0.61, 0.36, 1);
    will-change: opacity, transform;
  }
  .sp-rv.sp-rv-l  { transform: translateX(-36px); }
  .sp-rv.sp-rv-r  { transform: translateX(36px); }
  .sp-rv.sp-rv-sc { transform: scale(0.92); }
  .sp-rv.sp-in {
    opacity: 1;
    transform: none;
  }
}
/* Reduced motion / no-JS safety: never hide content */
@media (prefers-reduced-motion: reduce) {
  .sp-rv { opacity: 1 !important; transform: none !important; }
}
.no-js .sp-rv { opacity: 1; transform: none; }

/* ── 3. Card micro-interactions (site-wide) ──────────────────────── */
/* Gold accent bar that draws itself across the card top on hover */
.feat-card,
.reason-card,
#download .download-card,
#pricing .box,
.sp-card {
  position: relative;
  overflow: hidden;
}
.feat-card::before,
.reason-card::before,
.sp-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, #F0C36D, #d9a644);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s cubic-bezier(0.22, 0.61, 0.36, 1);
  z-index: 1;
}
.feat-card:hover::before,
.reason-card:hover::before,
.sp-card:hover::before {
  transform: scaleX(1);
}

/* Icon tile lift + gold glow on card hover */
.feat-card .feat-icon,
#download .platform-icon {
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.35s ease;
}
.feat-card:hover .feat-icon {
  transform: translateY(-4px) scale(1.07) !important;
  box-shadow: 0 10px 22px rgba(240, 195, 109, 0.35);
}
#download .download-card:hover .platform-icon {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 12px 26px rgba(240, 195, 109, 0.35);
}
.reason-card i {
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.reason-card:hover i {
  transform: translateY(-4px) scale(1.1);
}

/* Guide cards (anchor cards on the homepage + elsewhere) */
#guides a[href]:hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 36px rgba(10, 27, 58, 0.12);
  border-color: #F0C36D !important;
}

/* ── 4. Button sheen sweep (JS adds .sp-sheen to CTAs) ───────────── */
.sp-sheen {
  position: relative;
  overflow: hidden;
}
.sp-sheen::after {
  content: '';
  position: absolute;
  top: 0;
  left: -85%;
  width: 55%;
  height: 100%;
  background: linear-gradient(105deg,
    rgba(255,255,255,0) 0%,
    rgba(255,255,255,0.38) 50%,
    rgba(255,255,255,0) 100%);
  transform: skewX(-20deg);
  pointer-events: none;
  transition: left 0.65s ease;
}
.sp-sheen:hover::after { left: 135%; }

/* ── 5. Hero ambience: floating orbs, rings, grid, waveform ──────── */
#hero .sp-orbs {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}
.sp-orb { position: absolute; will-change: transform; }

@media (prefers-reduced-motion: no-preference) {
  .sp-anim-float    { animation: sp-float 7s ease-in-out infinite alternate; }
  .sp-anim-float-2  { animation: sp-float 9s ease-in-out 1.2s infinite alternate; }
  .sp-anim-float-3  { animation: sp-float 11s ease-in-out 0.6s infinite alternate; }
  .sp-anim-spin     { animation: sp-spin 48s linear infinite; transform-origin: center; }
  .sp-anim-pulse    { animation: sp-pulse 2.4s ease-out infinite; }
  .sp-anim-eq span  { animation: sp-eq 1.1s ease-in-out infinite alternate; }
}
@keyframes sp-float {
  from { transform: translateY(0) rotate(0deg); }
  to   { transform: translateY(-22px) rotate(3deg); }
}
@keyframes sp-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
@keyframes sp-pulse {
  0%   { transform: scale(1);    opacity: 0.55; }
  100% { transform: scale(2.15); opacity: 0; }
}
@keyframes sp-eq {
  from { transform: scaleY(0.35); }
  to   { transform: scaleY(1); }
}

/* SVG wave divider under dark sections */
.sp-wave {
  display: block;
  width: 100%;
  height: 70px;
  margin-top: -1px;
}
@media (max-width: 768px) { .sp-wave { height: 42px; } }

/* ── 6. Hero phone mockup (pure CSS device, SVG-decorated) ───────── */
.sp-phone-wrap {
  position: relative;
  display: flex;
  justify-content: center;
  padding: 10px 0 30px;
}
.sp-phone {
  position: relative;
  width: 265px;
  border-radius: 38px;
  padding: 12px;
  background: linear-gradient(160deg, #0b2a5c, #001235);
  border: 1px solid rgba(240, 195, 109, 0.35);
  box-shadow:
    0 30px 70px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  z-index: 2;
}
.sp-phone-screen {
  border-radius: 28px;
  background: linear-gradient(175deg, #F7FAFF 0%, #E9F0FA 100%);
  overflow: hidden;
  padding: 20px 16px 18px;
  min-height: 430px;
  display: flex;
  flex-direction: column;
}
.sp-phone-notch {
  position: absolute;
  top: 12px; left: 50%;
  transform: translateX(-50%);
  width: 92px; height: 22px;
  background: #001235;
  border-radius: 0 0 14px 14px;
  z-index: 3;
}
.sp-phone-status {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: #5B6A82;
  font-weight: 600;
  margin-bottom: 22px;
  padding: 0 2px;
}
.sp-call-card { text-align: center; }
.sp-call-label {
  font-size: 11px;
  letter-spacing: 2.5px;
  color: #003275;
  font-weight: 700;
  text-transform: uppercase;
}
.sp-call-avatar {
  position: relative;
  width: 84px; height: 84px;
  margin: 16px auto 12px;
}
.sp-call-avatar .sp-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid #F0C36D;
}
.sp-call-avatar .sp-ring:nth-child(2) { animation-delay: 0.8s; }
.sp-call-avatar .sp-avatar-core {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, #001947, #003275);
  color: #F0C36D;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  box-shadow: 0 10px 24px rgba(0, 25, 71, 0.35);
}
.sp-call-name  { color: #001947; font-weight: 800; font-size: 19px; margin: 2px 0; }
.sp-call-num   { color: #5B6A82; font-size: 13px; margin-bottom: 4px; }
.sp-call-via   {
  display: inline-block;
  background: rgba(240, 195, 109, 0.18);
  color: #8a6a1f;
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: 999px;
  letter-spacing: 0.4px;
}
.sp-call-actions {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-top: auto;
  padding-top: 26px;
}
.sp-call-btn {
  width: 58px; height: 58px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 24px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22);
}
.sp-call-btn.decline { background: linear-gradient(135deg, #e5484d, #c22f34); }
.sp-call-btn.accept  { background: linear-gradient(135deg, #30a46c, #1f7a4d); }
@media (prefers-reduced-motion: no-preference) {
  .sp-call-btn.accept { animation: sp-nudge 1.6s ease-in-out infinite; }
}
@keyframes sp-nudge {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-5px); }
}

/* Floating chips around the phone */
.sp-float-chip {
  position: absolute;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 14px 34px rgba(0, 25, 71, 0.22);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  font-weight: 600;
  color: #001947;
  z-index: 3;
  white-space: nowrap;
}
.sp-float-chip .chip-ico {
  width: 30px; height: 30px;
  border-radius: 9px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  background: linear-gradient(135deg, #001947, #003275);
  color: #F0C36D;
}
.sp-float-chip small { display: block; font-weight: 400; color: #5B6A82; font-size: 10.5px; }
.sp-chip-sms   { top: 6%;  right: -4%; }
.sp-chip-rec   { top: 38%; left: -14%; }
.sp-chip-vm    { bottom: 10%; right: -10%; }
@media (max-width: 1199px) {
  .sp-chip-rec { left: -4%; }
  .sp-chip-vm  { right: -2%; }
}

/* Equalizer bars inside the recording chip */
.sp-eq {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 14px;
}
.sp-eq span {
  width: 3px;
  background: #F0C36D;
  border-radius: 2px;
  height: 100%;
  transform-origin: bottom;
}
.sp-eq span:nth-child(1) { animation-delay: 0s; }
.sp-eq span:nth-child(2) { animation-delay: 0.15s; }
.sp-eq span:nth-child(3) { animation-delay: 0.3s; }
.sp-eq span:nth-child(4) { animation-delay: 0.45s; }
@media (prefers-reduced-motion: reduce) {
  .sp-eq span { transform: scaleY(0.7); }
}

/* ── 7. Section headers: gold shimmer accent ─────────────────────── */
@media (prefers-reduced-motion: no-preference) {
  .section-title h2::after {
    background: linear-gradient(90deg, #F0C36D 0%, #ffe3a8 50%, #F0C36D 100%) !important;
    background-size: 200% 100% !important;
    animation: sp-shimmer 3s linear infinite;
  }
}
@keyframes sp-shimmer {
  from { background-position: 200% 0; }
  to   { background-position: -200% 0; }
}

/* ── 8. Counts band: subtle radial glow + number pop ─────────────── */
#counts.counts {
  position: relative;
  overflow: hidden;
}
#counts.counts .sp-glow {
  position: absolute;
  width: 560px; height: 560px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(240,195,109,0.14) 0%, rgba(240,195,109,0) 65%);
  pointer-events: none;
}
#counts .count-box {
  transition: transform 0.3s ease;
}
#counts .count-box:hover { transform: translateY(-4px); }

/* ── 9. FAQ polish ────────────────────────────────────────────────── */
.faq .faq-list li {
  transition: box-shadow 0.3s ease, transform 0.3s ease;
  border-radius: 12px;
}
.faq .faq-list li:hover {
  transform: translateX(4px);
}
.faq .faq-list a {
  transition: color 0.25s ease;
}

/* ── 10. Forms: focus glow in brand colors ───────────────────────── */
.php-email-form .form-control:focus,
#subscribe-form input[type="email"]:focus {
  border-color: #F0C36D !important;
  box-shadow: 0 0 0 0.2rem rgba(240, 195, 109, 0.25) !important;
}
.php-email-form button[type="submit"] {
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}
.php-email-form button[type="submit"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0, 50, 117, 0.30);
}

/* ── 11. Floating action buttons: gentle presence ────────────────── */
@media (prefers-reduced-motion: no-preference) {
  .whatsapp-icon {
    animation: sp-fab 3.2s ease-in-out infinite;
  }
}
@keyframes sp-fab {
  0%, 100% { box-shadow: 0 4px 6px rgba(0,0,0,0.1), 0 0 0 0 rgba(37, 211, 102, 0.45); }
  50%      { box-shadow: 0 4px 6px rgba(0,0,0,0.1), 0 0 0 12px rgba(37, 211, 102, 0); }
}
.whatsapp-icon { transition: transform 0.25s ease; }
.whatsapp-icon:hover { transform: scale(1.1); }
.back-to-top { transition: transform 0.25s ease, opacity 0.3s ease; }
.back-to-top:hover { transform: translateY(-3px); }

/* ── 12. Gallery: refined zoom ───────────────────────────────────── */
#gallery .gallery-item {
  border-radius: 12px;
}
#gallery .gallery-item img {
  transition: transform 0.6s cubic-bezier(0.22, 0.61, 0.36, 1);
}
#gallery .gallery-item:hover img {
  transform: scale(1.045);
}
#gallery .gallery-item:hover {
  transform: none;
  box-shadow: 0 18px 40px rgba(0, 25, 71, 0.20);
}

/* ── 13. Final CTA ambience ──────────────────────────────────────── */
.final-cta {
  position: relative;
  overflow: hidden;
}
.final-cta .sp-orbs {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.final-cta .container { position: relative; z-index: 1; }

/* ── 14. Inner-page hero band (About / Services / Contact / etc.) ── */
.sp-page-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #001947 0%, #003275 100%);
  color: #fff;
  padding: 150px 0 64px;
  text-align: center;
}
.sp-page-hero h1 {
  font-weight: 800;
  font-size: clamp(1.9rem, 3.6vw, 2.8rem);
  color: #fff;
  margin-bottom: 12px;
}
.sp-page-hero p {
  color: rgba(255, 255, 255, 0.85);
  max-width: 640px;
  margin: 0 auto;
  font-size: 1.02rem;
}
.sp-page-hero .sp-eyebrow {
  display: inline-block;
  letter-spacing: 4px;
  font-size: 12px;
  color: #F0C36D;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 14px;
}

/* ── 15. Inner-page heroes (#page-hero / #nf-hero): orb support ──── */
#page-hero, #nf-hero {
  position: relative;
  overflow: hidden;
}
#page-hero .container, #nf-hero .container {
  position: relative;
  z-index: 2;
}
#page-hero .sp-orbs, #nf-hero .sp-orbs {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

/* Inner-page card families get the same gold accent bar */
.sp-help, .sp-info-card {
  position: relative;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.sp-help:hover, .sp-info-card:hover {
  transform: translateY(-3px);
  border-color: #F0C36D;
  box-shadow: 0 14px 28px rgba(10, 27, 58, 0.10);
}

/* ═══════════════════════════════════════════════════════════════════
   16. APP-BRAND ALIGNMENT (from the Android app brand system, May 2026)
   Source of truth: app/src/theme/brand.ts + softphonez-app-icon.svg.
   Same navy+gold family, richer stops:
     navy hero   #062A63 → #003275 → #001A4B  (+ light-blue glow lift)
     gold        #FCE7AE → #F1C76E → #C8922F
   Selectors use element+id/class so they outrank the per-page overrides.
   ═══════════════════════════════════════════════════════════════════ */

/* Dark bands: app hero gradient + BrandGlow lift */
section#hero,
section#page-hero,
section#nf-hero {
  background:
    radial-gradient(900px 480px at 78% -10%, rgba(120,170,255,0.22), rgba(120,170,255,0) 60%),
    linear-gradient(135deg, #062A63 0%, #003275 55%, #001A4B 100%) !important;
}
section#counts.counts,
section.final-cta {
  background:
    radial-gradient(700px 420px at 20% 110%, rgba(120,170,255,0.16), rgba(120,170,255,0) 60%),
    linear-gradient(135deg, #062A63 0%, #003275 55%, #001A4B 100%) !important;
}

/* Richer app-gold on the accent details */
.feat-card::before,
.reason-card::before,
.sp-card::before {
  background: linear-gradient(90deg, #FCE7AE, #F1C76E, #C8922F);
}
#header .navbar a.nav-link::after {
  background: linear-gradient(90deg, #FCE7AE, #F1C76E, #C8922F);
}
@media (prefers-reduced-motion: no-preference) {
  .section-title h2::after {
    background: linear-gradient(90deg, #F1C76E 0%, #FCE7AE 50%, #C8922F 100%) !important;
    background-size: 200% 100% !important;
  }
}

/* Brand mark (real app icon) in header, footer, phone screen */
.sp-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.sp-logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  box-shadow: 0 4px 10px rgba(0, 25, 71, 0.25);
  flex-shrink: 0;
}
#footer .sp-logo-mark {
  width: 30px;
  height: 30px;
  border-radius: 8px;
}
#footer h3.sp-logo { margin-bottom: 12px; }
.sp-screen-mark {
  display: block;
  margin: 0 auto 10px;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 25, 71, 0.18);
}

/* Android download card shows the real Play Store icon */
#download .platform-icon.sp-appicon {
  background: none !important;
  padding: 0;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(0, 25, 71, 0.22);
}
#download .platform-icon.sp-appicon img {
  width: 88px;
  height: 88px;
  border-radius: 20px;
  display: block;
}

/* App typography: Sora for display, DM Mono for numbers */
h1, h2, h3, h4, h5,
.section-title h2,
#header .logo a,
.sp-call-name,
.final-cta h2 {
  font-family: 'Sora', 'Raleway', sans-serif;
}
#header .logo a { letter-spacing: 1px; }
#counts.counts .count-box span,
#counts.counts .count-box span.purecounter,
#pricing .box h4,
.sp-call-num,
.sp-phone-status {
  font-family: 'DM Mono', 'Courier New', monospace;
}
