/* =====================================
   DESIGN TOKENS
===================================== */
:root {
  --primary: #00c6ff;
  --secondary: #6a11cb;

  --bg: #ffffff;
  --bg-soft: #f4f6f9;
  --text: #1f2937;
  --muted: #6b7280;

  --card: #ffffff;
  --border: rgba(0,0,0,0.08);
  --shadow: 0 20px 40px rgba(0,0,0,0.08);
}

/* DARK MODE VARIABLES */
body.dark {
  --bg: #020617;
  --bg-soft: #020617;
  --text: #e5e7eb;
  --muted: #94a3b8;

  --card: rgba(255,255,255,0.08);
  --border: rgba(255,255,255,0.12);
  --shadow: 0 30px 70px rgba(0,0,0,0.4);
}

/* =====================================
   BASE
===================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
}

/* =====================================
   HEADER
===================================== */
header {
  position: fixed;
  top: 0;
  width: 100%;
  padding: 18px 10%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
}

body.dark header {
  background: rgba(2,6,23,0.85);
}

.logo {
  font-weight: 700;
  letter-spacing: -0.4px;
}

nav a {
  margin-left: 24px;
  text-decoration: none;
  color: var(--text);
  opacity: 0.8;
}

nav a:hover {
  opacity: 1;
}

@media (max-width: 768px) {
header.scrolled {
  background: white;
  box-shadow: 0 3px 15px rgba(0,0,0,0.08);
}
}

.theme-toggle {
  width: fit-content;
  background: none;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
}

/* =====================================
   HERO
===================================== */
.hero {
  min-height: 100vh;
  padding: 12% 10%;
  background:
    radial-gradient(circle at top right, rgba(0,198,255,0.18), transparent 40%),
    radial-gradient(circle at bottom left, rgba(106,17,203,0.18), transparent 40%);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

body.dark .hero {
  background:
    radial-gradient(circle at top right, rgba(0,198,255,0.25), transparent 40%),
    radial-gradient(circle at bottom left, rgba(106,17,203,0.25), transparent 40%);
}

.hero h1 {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  line-height: 1.15;
}

.hero p {
  max-width: 650px;
  margin-top: 20px;
  color: var(--muted);
}

/* ==========================
   SKILL MODAL
========================== */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 9999;
}

.modal.show {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: var(--card);
  color: var(--text);
  padding: 35px;
  border-radius: 18px;
  max-width: 420px;
  width: 90%;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.modal.show .modal-content {
  transform: scale(1);
}

.modal-content h3 {
  margin-bottom: 10px;
}

.modal-content p {
  color: var(--muted);
  line-height: 1.6;
}

.modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  background: none;
  border: none;
  font-size: 1.6rem;
  cursor: pointer;
  color: var(--text);
}

.skills span {
  cursor: pointer;
  transition: all 0.25s ease;
}

.skills span:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.12);
}

/* =====================================
   BUTTONS
===================================== */
.btn {
  margin-top: 30px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  padding: 14px 36px;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  width: fit-content;
  box-shadow: 0 15px 35px rgba(0,198,255,0.35);
  transition: all 0.3s ease;
}

.btn:hover {
  transform: translateY(-4px);
  box-shadow: 0 25px 50px rgba(0,198,255,0.45);
}

/* =====================================
   SECTIONS
===================================== */
.section {
  padding: 100px 10%;
}

.section.dark {
  background: var(--bg-soft);
}

.section h2 {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  margin-bottom: 15px;
}

.section p {
  max-width: 720px;
  color: var(--muted);
}

/* =====================================
   CARDS
===================================== */
.projects,
.pricing,
.testimonials {
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
}

.project-card,
.price-card,
.testimonial-card {
  background: var(--card);
  padding: 30px;
  border-radius: 18px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: all 3s ease;
  will-change: transform;
}

.project-card:hover,
.price-card:hover,
.testimonial-card:hover {
  transform: translateY(-10px);
}

/* =====================================
   FEATURED PRICING
===================================== */
.price-card.featured {
  border: 2px dashed var(--primary);
  transform: scale(1.03);
  opacity: 0.9;
}

.price {
  font-size: 2rem;
  margin: 15px 0;
}

/* =====================================
   SELECTED PRICING (ACTIVE STATE)
===================================== */
.price-card.selected {
  border: 2px solid var(--secondary);
  box-shadow: 0 25px 60px rgba(106, 17, 203, 0.35);
  transform: scale(1.04);
}

/* Selected should override featured */
.price-card.featured.selected {
  border: 2px solid var(--secondary);
}

.price-card:not(.selected) {
  transform: scale(1);
}

/* =====================================
   SKILLS
===================================== */
.skills span {
  display: inline-block;
  margin: 6px;
  padding: 10px 20px;
  background: var(--bg-soft);
  border-radius: 999px;
  font-size: 0.9rem;
}

/* =====================================
   FORMS
===================================== */
form,
.calculator {
  max-width: 495px;
  margin-top: 30px;
}

input,
textarea,
button {
  width: 100%;
  padding: 14px;
  margin-top: 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
}

textarea {
  resize: none;
}

button {
  cursor: pointer;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  border: none;
  font-weight: 600;
}

/* =====================================
   PREMIUM CHECKBOX STYLING
===================================== */
input[type="checkbox"] {
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 2px solid var(--primary);
  cursor: pointer;
  position: relative;
  transition: all 0.25s ease;
  background: transparent;
}

input[type="checkbox"]:hover {
  box-shadow: 0 0 0 4px rgba(0,198,255,0.15);
}

input[type="checkbox"]:checked {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-color: transparent;
  transform: scale(1.05);
}

input[type="checkbox"]::after {
  content: "";
  position: absolute;
  width: 6px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  top: 3px;
  left: 7px;
  transform: rotate(45deg) scale(0);
  transition: transform 0.2s ease;
}

input[type="checkbox"]:checked::after {
  transform: rotate(45deg) scale(1);
}

.menu-btn {
  margin-left: auto;
  z-index: 1001;
}

/* ==========================
   CHECKBOX LIST LAYOUT
========================== */
.calculator fieldset {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.calculator fieldset label {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.25s ease;
  background: var(--card);
}

.calculator fieldset label:hover {
  background: var(--bg-soft);
}

.calculator fieldset input[type="checkbox"] {
  flex-shrink: 0;
}

/* ==========================
   RECOMMENDED EXTRA
========================== */
.calculator fieldset label.recommended {
  border: 2px dashed var(--primary);
  background: rgba(0,198,255,0.08);
  position: relative;
}

.calculator fieldset label.recommended::after {
  content: "Recommended";
  position: absolute;
  top: -10px;
  right: 12px;
  background: var(--primary);
  color: white;
  font-size: 0.7rem;
  padding: 3px 8px;
  border-radius: 999px;
}

/* ==========================
   CALCULATOR ACTION BUTTONS
========================== */
.calculator-actions {
  margin-top: 25px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
}

.calculator-actions .btn {
  width: 100%;
  max-width: 280px;
  text-align: center;
}

.calculator-actions .btn::after {
  content: " →";
}

.hero {
  padding-top: calc(12% + 70px);
}

@media (max-width: 768px) {
  .hero {
    padding-top: 120px;
  }
}

/* ==========================
   MOBILE SPACING POLISH
========================== */
@media (max-width: 768px) {
  .section {
    padding: 0px 4% !important;
  }

  .projects,
  .pricing,
  .testimonials {
    gap: 22px;
  }

  .project-card,
  .price-card,
  .testimonial-card {
    padding: 22px;
  }

  .price-card.selected {
    transform: scale(1.03);
  }

  .skills span {
    margin: 8px 6px;
  }
}

/* ==========================
   MOBILE STICKY CTA
========================== */
.mobile-cta {
  display: none;
}

@media (max-width: 768px) {
  .mobile-cta {
    display: block;
    position: fixed;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    background: #00c6ff;
    color: white;
    padding: 14px 30px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    box-shadow: 0 10px 25px rgba(0,0,0,0.25);
    z-index: 9998;
  }
}

/* =====================================
   POPUP
===================================== */
.popup {
  position: fixed;
  top: 25px;
  right: 25px;
  padding: 16px 28px;
  border-radius: 12px;
  background: #16a34a;
  color: white;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-20px);
  transition: all 0.4s ease;
  z-index: 9999;
}

.popup.show {
  opacity: 1;
  transform: translateY(0);
}

/* =====================================
   FLOATING BUTTONS
===================================== */
.whatsapp-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #25d366;
  color: white;
  font-size: 28px;
  padding: 15px;
  border-radius: 50%;
  box-shadow: var(--shadow);
}

#scrollTopBtn {
  position: fixed;
  bottom: 90px;
  right: 20px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  padding: 14px 18px;
  border: none;
  opacity: 0;
  pointer-events: none;
}

#scrollTopBtn.show {
  opacity: 1;
  pointer-events: auto;
}

/* =====================================
   FOOTER
===================================== */
footer {
  text-align: center;
  padding: 30px 10%;
  border-top: 1px solid var(--border);
  color: var(--muted);
}

/* =====================================
   FADE IN
===================================== */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease;
}

.fade-in.show {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================
   MOBILE (≤768px)
========================== */
@media (max-width: 768px) {
  header {
    padding: 12px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
  }

  /* NAV BASE (hidden state) */
  nav {
    position: absolute;
    top: 70px;
    left: 0;
    width: 100%;

    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);

    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 20px;

    /* 🔥 animation setup */
    opacity: 0;
    transform: translateY(-15px) scale(0.98);
    pointer-events: none;

    transition: all 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  }

  body.dark nav {
    background: rgba(2, 6, 23, 0.95);
  }

  /* ACTIVE (visible state) */
  nav.active {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
  }

  nav a {
    margin: 0;
    font-size: 1rem;
    padding: 10px 0;
    position: relative;
  }

  /* 🔥 subtle hover underline animation */
  nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 4px;
    width: 0%;
    height: 2px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    transition: width 0.3s ease;
  }

  nav a:hover::after {
    width: 100%;
  }

  /* MENU BUTTON */
  .menu-btn {
    display: block;
    font-size: 1.6rem;
    cursor: pointer;
    transition: transform 0.25s ease;
    margin-left: 0px;
  }

  .menu-btn:hover {
    transform: scale(1.1);
  }

  /* ===== OVERLAY ===== */
   #nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  backdrop-filter: blur(4px);

  opacity: 0;
  pointer-events: none;

  transition: opacity 0.3s ease;
  z-index: 999;
}

#nav-overlay.active {
  opacity: 1;
  pointer-events: auto;
}
   
  /* ===== HERO ===== */
  .hero {
    min-height: fit-content !important;
    margin-top: 0px;
    padding: 10% 5% 20%;
    text-align: center;
  }

  .hero h1 {
    font-size: 1.9rem;
  }

  .hero p {
    font-size: 0.95rem;
  }

  .btn {
    display: block;
    margin: 25px auto 0;
    width: 100%;
    max-width: 260px;
    text-align: center;
  }

  /* ===== SECTIONS ===== */
  .section {
    padding: 70px 5%;
    text-align: center;
  }

  .section h2 {
    font-size: 1.6rem;
  }

  .section p {
    font-size: 0.95rem;
    margin: 0 auto;
  }

  /* ===== CARDS / GRID ===== */
  .projects,
  .pricing,
  .testimonials {
    grid-template-columns: 1fr; /* force single column */
    gap: 20px;
  }

  .project-card,
  .price-card,
  .testimonial-card {
    padding: 20px;
  }

  /* remove scale on mobile (prevents overflow) */
  .price-card.featured,
  .price-card.selected {
    transform: none;
  }

  /* ===== SERVICES ===== */
  .services {
    display: flex;
    flex-direction: column;
    gap: 20px;
  }

  .service-card {
    padding: 20px;
  }

  /* ===== SKILLS ===== */
  .skills {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
  }

  .skills span {
    font-size: 0.8rem;
    padding: 8px 14px;
  }

  /* ===== FORMS ===== */
  form,
  .calculator {
    width: 100%;
  }

  input,
  textarea {
    font-size: 0.95rem;
  }

  /* ===== FLOATING BUTTONS ===== */
  .whatsapp-btn {
    bottom: 15px;
    right: 15px;
    font-size: 24px;
    padding: 12px;
  }

  #scrollTopBtn {
    bottom: 80px;
    right: 15px;
  }

  /* ===== MOBILE CTA ===== */
  .mobile-cta {
    width: 90%;
    text-align: center;
  }
}
