/* UPNAC — Final UI Polish Layer */

::selection {
  background: rgba(59, 130, 246, 0.25);
  color: var(--navy-900);
}

body {
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 40%, #eef2f7 100%);
}

/* Refined typography rhythm */
.section { padding: clamp(4rem, 8vw, 6rem) 0; }
.section-head .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.section-head .eyebrow::before,
.section-head .eyebrow::after {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--gradient-brand);
}
.page-hero {
  padding: clamp(4rem, 10vw, 6rem) 0;
  position: relative;
}
.page-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(34, 211, 238, 0.4), transparent);
}

/* Header polish */
.site-header.scrolled .lang-switch a { color: var(--slate-500); }
.site-header.scrolled .lang-switch a.active {
  background: rgba(59, 130, 246, 0.12);
  color: var(--blue-600);
}
.main-nav a.active {
  position: relative;
}
.main-nav a.active::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 2px;
  background: var(--cyan-400);
  border-radius: 2px;
}
.site-header.scrolled .main-nav a.active::after {
  background: var(--blue-600);
}
.logo {
  transition: transform 0.3s var(--ease), opacity 0.3s;
}
.logo:hover { transform: scale(1.02); opacity: 0.95; }

/* Hamburger → X */
.nav-toggle.is-open span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.nav-toggle.is-open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.nav-toggle.is-open span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}
.nav-toggle span { transition: transform 0.3s var(--ease), opacity 0.2s; }

/* Hero grid overlay */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(180deg, black 0%, transparent 85%);
}
.hero-slider { position: relative; z-index: 2; }
.hero-content h1 {
  text-shadow: 0 2px 40px rgba(0, 0, 0, 0.35);
}
.hero-stats {
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 24px 80px rgba(3, 7, 18, 0.2);
}
.hero-stats > div {
  transition: background 0.25s;
}
.hero-stats > div:not(:last-child) {
  border-right: 1px solid rgba(15, 23, 42, 0.06);
}

/* Staggered reveals */
.services-grid .service-card:nth-child(1) { transition-delay: 0.05s; }
.services-grid .service-card:nth-child(2) { transition-delay: 0.1s; }
.services-grid .service-card:nth-child(3) { transition-delay: 0.15s; }
.services-grid .service-card:nth-child(4) { transition-delay: 0.2s; }
.services-grid .service-card:nth-child(5) { transition-delay: 0.25s; }
.services-grid .service-card:nth-child(6) { transition-delay: 0.3s; }
.reveal {
  transition-duration: 0.85s;
}

/* Cards — glass edge */
.service-card,
.blog-card,
.portfolio-card,
.marketing-card,
.process-step {
  backdrop-filter: blur(0);
}
.service-card {
  background: linear-gradient(180deg, #fff 0%, #fafbfc 100%);
}
.portfolio-card {
  background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
}

/* Trust bar marquee feel */
.trust-logos span {
  opacity: 0.35;
  transition: opacity 0.3s, color 0.3s;
  letter-spacing: 0.12em;
}
.trust-logos span:hover {
  opacity: 0.85;
  color: var(--blue-600);
}

/* Tech pills */
.tech-grid span {
  background: linear-gradient(180deg, #fff, #f8fafc);
}

/* Testimonials quote mark */
.testimonial-card::before {
  content: '"';
  font-family: Georgia, serif;
  font-size: 4rem;
  line-height: 1;
  color: rgba(34, 211, 238, 0.15);
  position: absolute;
  top: 0.5rem;
  left: 1.25rem;
}
.testimonial-card { position: relative; padding-top: 2.5rem; }

/* CTA polish */
.cta-box {
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Forms */
.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  border-color: var(--indigo-500);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
}
.form-row input,
.form-row select,
.form-row textarea {
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

/* Footer */
.site-footer {
  background: linear-gradient(180deg, var(--navy-950) 0%, #020617 100%);
}
.footer-brand img {
  margin-bottom: 0.25rem;
  filter: drop-shadow(0 4px 12px rgba(59, 130, 246, 0.2));
}
.footer-bottom a { color: var(--cyan-400); }
.footer-cta-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 2rem 0;
  margin-bottom: 0.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.footer-cta-bar p {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  color: #fff;
}
body.is-loaded .hero-content {
  animation: fadeUp 0.9s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Focus visible */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--cyan-400);
  outline-offset: 3px;
}

/* Pricing featured polish */
.pricing-featured {
  background: linear-gradient(180deg, #fff 0%, #f0f7ff 100%);
}
.pricing-card .btn { margin-top: auto; width: 100%; }

/* FAQ smooth open */
.faq-item summary { transition: background 0.2s; }
.faq-item[open] summary {
  background: #f8fafc;
  color: var(--blue-600);
}
.faq-item p {
  animation: faqOpen 0.35s var(--ease);
}
@keyframes faqOpen {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Loader brand */
.page-loader .loader-ring {
  box-shadow: 0 0 30px rgba(34, 211, 238, 0.3);
}
.page-loader::after {
  content: 'UPNAC';
  position: absolute;
  margin-top: 80px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.35em;
  color: var(--slate-400);
}

/* WhatsApp + back-top harmony */
.whatsapp-float {
  transition: transform 0.3s var(--ease), box-shadow 0.3s;
}
body:has(.cookie-consent:not([hidden])) .whatsapp-float {
  bottom: 88px;
}

/* Inner pages light sections */
.section-alt {
  background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
}

/* Breadcrumb */
.breadcrumb {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Mobile nav overlay polish */
@media (max-width: 768px) {
  .main-nav.open {
    background: linear-gradient(180deg, var(--navy-950) 0%, var(--navy-900) 100%);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
  }
  .main-nav.open a {
    font-size: 1.05rem;
    padding: 0.85rem 1rem;
    border-radius: var(--radius-sm);
  }
  .header-inner { gap: 0.75rem; }
  .main-nav > ul > li { width: 100%; }
  .hero-stats { grid-template-columns: 1fr 1fr; margin-top: -1.5rem; }
  .hero-stats > div { padding: 1.25rem 0.75rem; }
  .hero-stats > div:nth-child(2) { border-right: none; }
  .section-head .eyebrow::before,
  .section-head .eyebrow::after { width: 12px; }
  .pricing-featured { transform: none; }
  .cookie-consent {
    flex-direction: column;
    text-align: center;
    padding: 1.25rem;
  }
}

/* Smooth anchor scroll offset for sticky header */
:target {
  scroll-margin-top: calc(var(--topbar-h) + var(--header-h) + 16px);
}
html {
  scroll-padding-top: calc(var(--topbar-h) + var(--header-h) + 16px);
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  align-items: center;
}
.btn-group .btn-outline:hover {
  background: var(--navy-900);
  color: #fff !important;
  border-color: var(--navy-900) !important;
}

/* Print */
@media print {
  .top-bar, .site-header, .whatsapp-float, .back-to-top, .cookie-consent, .page-loader { display: none !important; }
}

/* ─── Polish v7 — Premium refinements ─── */

/* Subtle page texture */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  opacity: 0.4;
  background-image: radial-gradient(circle at 20% 20%, rgba(59, 130, 246, 0.04) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(34, 211, 238, 0.03) 0%, transparent 45%);
}

.section-head h2 {
  letter-spacing: -0.03em;
  line-height: 1.15;
}

/* Hero crossfade polish */
.hero-slide {
  transform: scale(1.02);
  transition: opacity 1.1s var(--ease), transform 8s linear;
}
.hero-slide.active {
  transform: scale(1);
}
.hero-slide.active .hero-content {
  animation: heroContentIn 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes heroContentIn {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: translateY(0); }
}
.hero-dots button {
  position: relative;
  overflow: hidden;
}
.hero-dots button.active::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--cyan-400), var(--blue-500));
  animation: dotProgress 8s linear forwards;
  border-radius: inherit;
  opacity: 0.35;
}
@keyframes dotProgress {
  from { transform: translateX(-100%); }
  to { transform: translateX(0); }
}

/* Stats bar shine */
.stats-strong {
  position: relative;
  overflow: hidden;
}
.stats-strong::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
  animation: statsShine 6s ease-in-out infinite;
}
@keyframes statsShine {
  0%, 100% { left: -100%; }
  50% { left: 120%; }
}
.stat-strong.visible .stat-num {
  text-shadow: 0 0 40px rgba(59, 130, 246, 0.25);
}

/* Service cards */
.service-card {
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset, var(--shadow-sm);
}
.service-card:hover {
  box-shadow: 0 24px 48px rgba(3, 7, 18, 0.1), 0 0 0 1px rgba(59, 130, 246, 0.12);
}
.service-card .service-icon {
  transition: transform 0.35s var(--ease), box-shadow 0.35s;
}
.service-card:hover .service-icon {
  transform: scale(1.08) rotate(-3deg);
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.2);
}
.link-arrow {
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* Portfolio accent */
.portfolio-card {
  border-left: 3px solid transparent;
  transition: border-color 0.3s, transform 0.35s var(--ease), box-shadow 0.35s;
}
.portfolio-card:hover {
  border-left-color: var(--blue-500);
}

/* Guarantees */
.guarantee-card {
  transition: transform 0.3s var(--ease), box-shadow 0.3s;
}
.guarantee-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}
.guarantee-icon {
  transition: transform 0.4s var(--ease);
}
.guarantee-card:hover .guarantee-icon {
  transform: scale(1.15);
}

/* Split image frame */
.split-media img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  transition: transform 0.5s var(--ease), box-shadow 0.5s;
}
.split-media:hover img {
  transform: scale(1.02);
  box-shadow: 0 32px 64px rgba(3, 7, 18, 0.15);
}
.premium-panel {
  border-radius: var(--radius-lg);
  border: 1px solid var(--slate-200);
  box-shadow: var(--shadow-sm);
}

/* Marketing cards */
.marketing-card {
  transition: transform 0.3s var(--ease), border-color 0.3s;
}
.marketing-card:hover {
  transform: translateY(-4px);
  border-color: rgba(59, 130, 246, 0.35);
}

/* Trust bar */
.trust-bar {
  border-block: 1px solid var(--slate-200);
  background: linear-gradient(90deg, #fff 0%, #f8fafc 50%, #fff 100%);
}

/* CTA section glow */
.cta-section .cta-box {
  position: relative;
  overflow: hidden;
}
.cta-section .cta-box::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.2), transparent 70%);
  pointer-events: none;
}

/* Header CTA pulse */
.header-cta {
  animation: ctaPulse 4s ease-in-out infinite;
}
@keyframes ctaPulse {
  0%, 100% { box-shadow: 0 4px 24px rgba(59, 130, 246, 0.4); }
  50% { box-shadow: 0 6px 32px rgba(59, 130, 246, 0.55); }
}
.site-header.scrolled .header-cta {
  animation: none;
}

/* Cookie bar glass */
.cookie-consent {
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 -12px 40px rgba(3, 7, 18, 0.25);
}

/* Back to top */
.back-to-top {
  border: 1px solid rgba(255, 255, 255, 0.15);
  font-family: var(--font-display);
  font-weight: 700;
}

/* Light-section outline buttons */
.btn-on-light {
  color: var(--navy-700) !important;
  border-color: var(--slate-200) !important;
  background: #fff !important;
}
.btn-on-light:hover {
  border-color: var(--blue-500) !important;
  color: var(--blue-600) !important;
  background: #f0f7ff !important;
}

/* Intl cards glow */
.intl-standard-card:hover .intl-standard-icon {
  box-shadow: 0 0 24px rgba(34, 211, 238, 0.35);
}
.region-card {
  position: relative;
  overflow: hidden;
}
.region-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 60%, rgba(59, 130, 246, 0.06));
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
.region-card:hover::after {
  opacity: 1;
}

/* Blog cards */
.blog-card:hover h3 a {
  color: var(--blue-600);
}

/* Legal pages */
.legal-page h2 {
  margin-top: 2rem;
  font-size: 1.15rem;
  color: var(--navy-900);
}
.legal-page h2:first-of-type {
  margin-top: 0;
}
.legal-page ul {
  padding-left: 1.25rem;
  color: var(--slate-500);
}
.legal-page li {
  margin-bottom: 0.35rem;
}

/* Loader exit */
.page-loader.hidden {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s var(--ease), visibility 0.5s;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .hero-slide,
  .hero-dots button.active::after,
  .stats-strong::before,
  .header-cta,
  .reveal {
    animation: none !important;
    transition: none !important;
  }
  .hero-slide { transform: none; }
  html { scroll-behavior: auto; }
}

/* ─── Full polish — inner pages v8 ─── */

.page-hero .container.reveal,
.page-hero .container {
  animation: fadeUp 0.7s var(--ease) forwards;
}
.page-hero h1 {
  background: linear-gradient(135deg, #fff 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.site-header.scrolled ~ main .page-hero h1,
.section-alt .page-hero h1 {
  background: linear-gradient(135deg, var(--navy-900) 0%, var(--navy-700) 100%);
  -webkit-background-clip: text;
  background-clip: text;
}
.page-hero-marketing {
  background: linear-gradient(135deg, var(--navy-950) 0%, #1e3a5f 50%, var(--navy-900) 100%);
}

.content-panel,
.panel-light {
  background: linear-gradient(180deg, #fff 0%, #fafbfc 100%);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 4vw, 2.5rem);
  box-shadow: var(--shadow-sm);
}

.feature-box {
  background: #fff;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: transform 0.3s var(--ease), box-shadow 0.3s, border-color 0.3s;
  height: 100%;
}
.feature-box:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
  border-color: rgba(59, 130, 246, 0.25);
}
.feature-box h3 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
  color: var(--navy-900);
}

.contact-layout {
  align-items: start;
  gap: clamp(2rem, 5vw, 3.5rem);
}
.contact-mini-card {
  background: #fff;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius);
  padding: 1.25rem;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.contact-mini-card:hover {
  border-color: var(--blue-500);
  box-shadow: var(--shadow-sm);
}
.contact-form-wrap {
  background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 4vw, 2.5rem);
  box-shadow: var(--shadow);
}
.alert-success {
  border-left: 4px solid #22c55e;
}
.alert-error {
  border-left: 4px solid #ef4444;
}

.pricing-card {
  display: flex;
  flex-direction: column;
  transition: transform 0.35s var(--ease), box-shadow 0.35s;
}
.pricing-card:hover {
  transform: translateY(-8px);
}
.pricing-badge {
  animation: badgePulse 3s ease-in-out infinite;
}
@keyframes badgePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4); }
  50% { box-shadow: 0 0 0 8px rgba(59, 130, 246, 0); }
}
.pricing-note {
  text-align: center;
  color: var(--slate-500);
  font-size: 0.9rem;
  margin-top: 2rem;
}

.career-card {
  background: #fff;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius);
  padding: 1.75rem 2rem;
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
}
.career-card:hover {
  border-color: var(--blue-500);
  transform: translateX(6px);
  box-shadow: var(--shadow-sm);
}

.faq-list {
  max-width: 820px;
  margin-inline: auto;
}
.faq-item {
  background: #fff;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
  overflow: hidden;
  transition: box-shadow 0.25s;
}
.faq-item:hover {
  box-shadow: var(--shadow-sm);
}
.faq-item[open] {
  border-color: rgba(59, 130, 246, 0.35);
  box-shadow: var(--shadow-sm);
}

.marketing-grid-full .marketing-card.featured {
  grid-column: 1 / -1;
  background: linear-gradient(145deg, #fff 0%, #f0f7ff 100%);
  border: 1px solid rgba(59, 130, 246, 0.2);
}
.process-list {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
}
.process-list li {
  position: relative;
  padding: 1rem 1rem 1rem 3rem;
  margin-bottom: 0.75rem;
  background: #fff;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-sm);
  counter-increment: step;
}
.process-list li::before {
  content: counter(step);
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-brand);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: 50%;
}

.article-body {
  max-width: 720px;
  margin-inline: auto;
  font-size: 1.05rem;
  line-height: 1.75;
}
.article-body h2,
.article-body h3 {
  margin-top: 2rem;
  color: var(--navy-900);
}
.article-cta {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--slate-200);
}

.page-404 {
  min-height: 55vh;
  display: flex;
  align-items: center;
}
.page-404 h1 {
  font-size: clamp(2rem, 6vw, 3rem);
}

.breadcrumb {
  margin-bottom: 1.25rem;
}
.breadcrumb a {
  color: var(--cyan-400);
  font-weight: 500;
}
.breadcrumb a:hover {
  color: #fff;
}
.breadcrumb-sep {
  opacity: 0.5;
  margin: 0 0.15rem;
}

.service-hero-row .service-icon.lg {
  flex-shrink: 0;
  padding: 1.25rem;
  background: rgba(34, 211, 238, 0.12);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(34, 211, 238, 0.25);
}

.footer-grid h4 {
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.78rem;
  color: var(--cyan-400);
}
.footer-grid a {
  transition: color 0.2s, padding-left 0.2s;
}
.footer-grid a:hover {
  color: #fff;
  padding-left: 4px;
}

@media (max-width: 768px) {
  .contact-layout {
    grid-template-columns: 1fr;
  }
  .service-hero-row {
    flex-direction: column;
    text-align: center;
  }
  .marketing-grid-full .marketing-card.featured {
    grid-column: auto;
  }
}
