:root {
  --esnet-red: #c1272d;
  --esnet-red-dark: #8f1c21;
  --esnet-red-light: #e94e4e;
  --esnet-dark: #1a1a1a;
  --esnet-gray: #6c757d;
  --esnet-light: #f7f7f8;
  --esnet-border: #e9e5e5;
  --radius: 14px;
  --shadow-sm: 0 2px 8px rgba(0,0,0,.06);
  --shadow-md: 0 10px 30px rgba(0,0,0,.08);
  --shadow-lg: 0 20px 60px rgba(193,39,45,.15);
}

* { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--esnet-dark);
  background: #fff;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, .fw-logo {
  font-family: 'Inter', sans-serif;
  font-weight: 800;
  letter-spacing: -0.02em;
}

a { text-decoration: none; }

.text-esnet-red { color: var(--esnet-red) !important; }
.bg-esnet-red { background: var(--esnet-red) !important; }

.btn-esnet {
  background: linear-gradient(135deg, var(--esnet-red), var(--esnet-red-dark));
  color: #fff;
  border: none;
  padding: .75rem 1.75rem;
  border-radius: 50px;
  font-weight: 700;
  transition: all .25s ease;
  box-shadow: 0 8px 20px rgba(193,39,45,.25);
}
.btn-esnet:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(193,39,45,.35);
}
.btn-esnet-outline {
  border: 2px solid var(--esnet-red);
  color: var(--esnet-red);
  padding: .7rem 1.75rem;
  border-radius: 50px;
  font-weight: 700;
  background: transparent;
  transition: all .25s ease;
}
.btn-esnet-outline:hover {
  background: var(--esnet-red);
  color: #fff;
  transform: translateY(-2px);
}
.btn-esnet-outline-light {
  border: 2px solid rgba(255,255,255,.6);
  color: #fff;
  padding: .7rem 1.75rem;
  border-radius: 50px;
  font-weight: 700;
  background: transparent;
  transition: all .25s ease;
}
.btn-esnet-outline-light:hover {
  background: #fff;
  color: var(--esnet-red);
  border-color: #fff;
  transform: translateY(-2px);
}

/* Ripple click effect */
.btn-esnet, .btn-esnet-outline, .btn-esnet-outline-light, .btn-light {
  position: relative;
  overflow: hidden;
}
.ripple {
  position: absolute;
  border-radius: 50%;
  transform: scale(0);
  animation: rippleAnim .65s ease-out;
  background: rgba(255,255,255,.55);
  pointer-events: none;
}
.btn-esnet-outline .ripple,
.btn-light .ripple {
  background: rgba(193,39,45,.16);
}
@keyframes rippleAnim {
  to { transform: scale(3.2); opacity: 0; }
}

/* Scroll progress bar */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--esnet-red), var(--esnet-red-light));
  z-index: 1200;
  box-shadow: 0 0 8px rgba(193,39,45,.5);
}

/* Navbar */
#mainNav {
  padding: .9rem 0;
  transition: all .3s ease;
  background: rgba(255,255,255,.98);
  backdrop-filter: blur(8px);
}
#mainNav.scrolled {
  padding: .5rem 0;
  box-shadow: 0 2px 20px rgba(0,0,0,.08);
}
#mainNav .navbar-brand img { height: 68px; transition: height .3s ease; }
#mainNav.scrolled .navbar-brand img { height: 54px; }
#mainNav .nav-link {
  font-weight: 600;
  color: var(--esnet-dark) !important;
  margin: 0 .5rem;
  position: relative;
  padding: .5rem .25rem !important;
}
#mainNav .nav-link::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 2px;
  background: var(--esnet-red);
  transition: width .25s ease;
}
#mainNav .nav-link:hover::after,
#mainNav .nav-link.active::after { width: 100%; }
#mainNav .nav-link:hover { color: var(--esnet-red) !important; }
.topbar {
  background: var(--esnet-dark);
  color: #d8d8d8;
  font-size: .85rem;
}
.topbar a { color: #d8d8d8; }
.topbar a:hover { color: #fff; }

/* Hero */
.hero {
  position: relative;
  background: radial-gradient(circle at 15% 20%, #2a2a2a 0%, #111 60%),
              linear-gradient(135deg, #1a1a1a 0%, #111 100%);
  color: #fff;
  padding: 9rem 0 7rem;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -20%; right: -10%;
  width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(193,39,45,.35) 0%, rgba(193,39,45,0) 70%);
  border-radius: 50%;
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -25%; left: -10%;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(193,39,45,.18) 0%, rgba(193,39,45,0) 70%);
  border-radius: 50%;
  pointer-events: none;
}
.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  opacity: .8;
}
.hero .badge-pill {
  background: rgba(193,39,45,.15);
  border: 1px solid rgba(193,39,45,.4);
  color: #ff8a8f;
  padding: .45rem 1rem;
  border-radius: 50px;
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .02em;
  display: inline-flex;
  align-items: center;
}
.hero .badge-pill i { animation: pulseBolt 1.8s ease-in-out infinite; }
@keyframes pulseBolt {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .55; transform: scale(1.15); }
}
.hero h1 { font-size: 3.1rem; line-height: 1.12; }
.hero .lead { color: #c9c9c9; font-size: 1.15rem; }
.hero-stats {
  display: flex;
  gap: 2.2rem;
  margin-top: 2.5rem;
}
.hero-stats .stat-num {
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--esnet-red-light);
}
.hero-stats .stat-label {
  font-size: .82rem;
  color: #aaa;
}
.hero-speedcard {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius);
  padding: 1.75rem;
  backdrop-filter: blur(10px);
  animation: floatCard 6s ease-in-out infinite;
}
@keyframes floatCard {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
.hero-visual {
  position: relative;
  z-index: 2;
}

/* Wave divider */
.wave-divider {
  display: block;
  width: 100%;
  line-height: 0;
}

/* Section titles */
.section-eyebrow {
  color: var(--esnet-red);
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-size: .8rem;
}
.section-title { font-size: 2.3rem; }
.section-sub { color: var(--esnet-gray); font-size: 1.05rem; }

/* Packages section */
#pakiety {
  position: relative;
  overflow: hidden;
  background-image:
    radial-gradient(rgba(193,39,45,.08) 1px, transparent 1px),
    linear-gradient(180deg, #ffffff 0%, #fdf6f6 100%);
  background-size: 24px 24px, 100% 100%;
  background-position: -4px -4px, 0 0;
}
#pakiety::before,
#pakiety::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}
#pakiety::before {
  top: -220px; right: -180px;
  width: 520px; height: 520px;
  background: radial-gradient(circle, rgba(193,39,45,.10) 0%, rgba(193,39,45,0) 70%);
}
#pakiety::after {
  bottom: -220px; left: -180px;
  width: 460px; height: 460px;
  background: radial-gradient(circle, rgba(193,39,45,.07) 0%, rgba(193,39,45,0) 70%);
}
#pakiety > .container { position: relative; z-index: 1; }

/* Package tabs */
.package-tabs {
  display: flex;
  width: fit-content;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  background: #fff;
  border: 1px solid var(--esnet-border);
  border-radius: 50px;
  padding: .35rem;
  box-shadow: var(--shadow-sm);
}
.package-tabs .nav-link {
  border: none;
  border-radius: 50px;
  padding: .8rem 2rem;
  font-weight: 700;
  color: var(--esnet-dark);
  background: transparent;
  margin: 0 .15rem;
  transition: all .25s ease;
  white-space: nowrap;
}
.package-tabs .nav-link i { margin-right: .5rem; }
.package-tabs .nav-link.active {
  background: linear-gradient(135deg, var(--esnet-red), var(--esnet-red-dark));
  color: #fff;
  box-shadow: 0 8px 20px rgba(193,39,45,.3);
}

.plan-card {
  border-radius: var(--radius);
  border: 1px solid var(--esnet-border);
  padding: 2rem 1.75rem;
  height: 100%;
  background: #fff;
  transition: all .3s ease;
  position: relative;
  --glow-x: 50%;
  --glow-y: 0%;
}
.plan-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(280px circle at var(--glow-x) var(--glow-y), rgba(193,39,45,.10), transparent 70%);
  opacity: 0;
  transition: opacity .35s ease;
  pointer-events: none;
}
.plan-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  border-radius: var(--radius) var(--radius) 0 0;
  background: linear-gradient(90deg, var(--esnet-red-light), var(--esnet-red));
  opacity: 0;
  transition: opacity .3s ease;
}
.plan-card:hover::before { opacity: 1; }
.plan-card:hover::after,
.plan-card.featured::after { opacity: 1; }
.plan-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-md);
  border-color: transparent;
}
.plan-icon {
  width: 46px; height: 46px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(193,39,45,.12), rgba(193,39,45,.05));
  color: var(--esnet-red);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  margin-bottom: 1rem;
}
.plan-card.featured .plan-icon {
  background: linear-gradient(135deg, var(--esnet-red), var(--esnet-red-dark));
  color: #fff;
}
.plan-card.featured {
  border: 2px solid var(--esnet-red);
  box-shadow: var(--shadow-lg);
  transform: scale(1.03);
  animation: featuredGlow 3s ease-in-out infinite;
}
.plan-card.featured:hover { transform: scale(1.03) translateY(-8px); }
@keyframes featuredGlow {
  0%, 100% { box-shadow: 0 20px 60px rgba(193,39,45,.15); }
  50% { box-shadow: 0 20px 60px rgba(193,39,45,.32); }
}
.plan-badge {
  position: absolute;
  top: -14px; left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--esnet-red), var(--esnet-red-dark));
  color: #fff;
  font-size: .75rem;
  font-weight: 700;
  padding: .35rem 1.1rem;
  border-radius: 50px;
  white-space: nowrap;
  box-shadow: 0 6px 14px rgba(193,39,45,.35);
  z-index: 2;
}
.plan-speed {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--esnet-gray);
  text-transform: uppercase;
  letter-spacing: .03em;
}
.plan-price {
  font-size: 2.6rem;
  font-weight: 800;
  color: var(--esnet-dark);
  line-height: 1;
}
.plan-price small {
  font-size: 1rem;
  font-weight: 600;
  color: var(--esnet-gray);
}
.plan-card ul { list-style: none; padding: 0; margin: 1.5rem 0; }
.plan-card ul li {
  padding: .5rem 0;
  color: #444;
  font-size: .95rem;
  display: flex;
  align-items: flex-start;
  gap: .6rem;
}
.plan-card ul li i { color: var(--esnet-red); margin-top: .2rem; }
.plan-card ul li.muted { color: #b8b8b8; }
.plan-card ul li.muted i { color: #d5d5d5; }

/* Feature icons */
.feature-icon {
  width: 62px; height: 62px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(193,39,45,.1), rgba(193,39,45,.05));
  display: flex; align-items: center; justify-content: center;
  color: var(--esnet-red);
  font-size: 1.5rem;
  margin-bottom: 1.1rem;
  transition: transform .3s ease;
}

.feature-card {
  padding: 1.8rem;
  border-radius: var(--radius);
  height: 100%;
  transition: all .25s ease;
  position: relative;
  overflow: hidden;
  --glow-x: 50%;
  --glow-y: 0%;
}
.feature-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(240px circle at var(--glow-x) var(--glow-y), rgba(193,39,45,.08), transparent 70%);
  opacity: 0;
  transition: opacity .35s ease;
  pointer-events: none;
}
.feature-card:hover::before { opacity: 1; }
.feature-card:hover { background: var(--esnet-light); }
.feature-card:hover .feature-icon { transform: scale(1.1) rotate(-4deg); }

/* Coverage / how it works */
.step-num {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--esnet-dark);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800;
  flex-shrink: 0;
}

/* Testimonials */
.testimonial-card {
  border-radius: var(--radius);
  background: var(--esnet-light);
  padding: 2rem;
  height: 100%;
  position: relative;
  overflow: hidden;
  transition: transform .3s ease, box-shadow .3s ease;
  --glow-x: 50%;
  --glow-y: 0%;
}
.testimonial-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(240px circle at var(--glow-x) var(--glow-y), rgba(193,39,45,.08), transparent 70%);
  opacity: 0;
  transition: opacity .35s ease;
  pointer-events: none;
}
.testimonial-card:hover::before { opacity: 1; }
.testimonial-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}
.testimonial-card .stars { color: #f5a623; font-size: .9rem; }
.avatar-circle {
  width: 46px; height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--esnet-red), var(--esnet-red-dark));
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
}

/* Contact */
.contact-info-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.2rem 0;
  border-bottom: 1px solid var(--esnet-border);
}
.contact-info-item:last-child { border-bottom: none; }
.contact-info-item .icon {
  width: 46px; height: 46px;
  border-radius: 12px;
  background: rgba(193,39,45,.1);
  color: var(--esnet-red);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.contact-form .form-control, .contact-form .form-select {
  border-radius: 10px;
  padding: .8rem 1rem;
  border: 1px solid var(--esnet-border);
}
.contact-form .form-control:focus, .contact-form .form-select:focus {
  border-color: var(--esnet-red);
  box-shadow: 0 0 0 .2rem rgba(193,39,45,.12);
}

/* CTA band */
.cta-band {
  background: linear-gradient(135deg, var(--esnet-red), var(--esnet-red-dark));
  border-radius: var(--radius);
  padding: 3rem;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.cta-band::before {
  content: '';
  position: absolute;
  top: -50%; right: -5%;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(255,255,255,.12) 0%, transparent 70%);
  border-radius: 50%;
}

/* Footer */
footer {
  background: var(--esnet-dark);
  color: #b8b8b8;
}
footer h6 { color: #fff; font-weight: 700; margin-bottom: 1.1rem; }
footer a { color: #b8b8b8; transition: color .2s ease; }
footer a:hover { color: var(--esnet-red-light); }
footer .social-icon {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  transition: all .25s ease;
}
footer .social-icon:hover { background: var(--esnet-red); transform: translateY(-3px); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 1.3rem 0;
  font-size: .85rem;
}

/* Back to top */
#backToTop {
  position: fixed;
  bottom: 24px; right: 24px;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--esnet-red);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 20px rgba(193,39,45,.35);
  opacity: 0; visibility: hidden;
  transform: translateY(10px);
  transition: all .3s ease;
  z-index: 999;
  border: none;
}
#backToTop.show { opacity: 1; visibility: visible; transform: translateY(0); }

/* Animations */
.reveal { opacity: 0; transform: translateY(24px); transition: all .7s cubic-bezier(.2,.7,.3,1); }
.reveal.in { opacity: 1; transform: translateY(0); }

/* Speed test widget */
.speed-gauge {
  width: 160px; height: 160px;
  border-radius: 50%;
  border: 10px solid rgba(255,255,255,.08);
  border-top-color: var(--esnet-red);
  display: flex; align-items: center; justify-content: center;
  flex-direction: column;
  margin: 0 auto;
}

@media (max-width: 991.98px) {
  .hero h1 { font-size: 2.3rem; }
  .hero { padding: 7.5rem 0 5rem; }
  .plan-card.featured { transform: none; }
  .plan-card.featured:hover { transform: translateY(-8px); }
  .section-title { font-size: 1.8rem; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-speedcard, .hero .badge-pill i, .plan-card.featured { animation: none !important; }
  .reveal { transition: none; }
  * { scroll-behavior: auto !important; }
}
