/* =========================================================
   Daniyal Ahmad — Portfolio
   Custom styles layered on top of Tailwind (Play CDN)
   ========================================================= */

:root {
  --ink: #090909;
  --lime: #d8ff3e;
}

html,
body {
  background-color: var(--ink);
}

/* Lenis smooth scroll */
html.lenis,
html.lenis body {
  height: auto;
}
.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}
.lenis.lenis-stopped {
  overflow: hidden;
}

/* ---------- Glassmorphism ---------- */
.glass {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

/* ---------- Hover lift ---------- */
.hover-lift {
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.4s ease, box-shadow 0.4s ease;
  will-change: transform;
}
.hover-lift:hover {
  transform: translateY(-8px);
  border-color: rgba(216, 255, 62, 0.35);
  box-shadow: 0 24px 60px -20px rgba(216, 255, 62, 0.15);
}

/* ---------- Reveal animation (fallback if JS disabled) ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
}
.no-js .reveal {
  opacity: 1;
  transform: none;
}

/* ---------- Floating stat cards ---------- */
.float-card {
  animation: float 6s ease-in-out infinite;
}
.float-card--delay {
  animation-delay: 1.5s;
}
@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-12px);
  }
}

/* ---------- Cursor glow ---------- */
#cursor-glow {
  background: radial-gradient(
    circle,
    rgba(216, 255, 62, 0.12) 0%,
    rgba(216, 255, 62, 0) 65%
  );
  transform: translate(-50%, -50%);
}

/* ---------- Navbar scrolled state ---------- */
#navbar.scrolled {
  background: rgba(9, 9, 9, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

/* ---------- Nav link underline ---------- */
.nav-link {
  position: relative;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  height: 1.5px;
  width: 0;
  background: var(--lime);
  transition: width 0.3s ease;
}
.nav-link:hover::after {
  width: 100%;
}

/* ---------- Edit mode ---------- */
#edit-panel.open {
  transform: translateX(0);
}
.edit-active [data-edit],
.edit-active [data-edit-img] {
  outline: 1.5px dashed rgba(216, 255, 62, 0.5);
  outline-offset: 4px;
  border-radius: 6px;
  cursor: pointer;
  transition: outline-color 0.2s ease;
}
.edit-active [data-edit]:hover,
.edit-active [data-edit-img]:hover {
  outline-color: var(--lime);
}

.field-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 6px;
}
.field-input,
.field-textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 14px;
  color: #fff;
  outline: none;
  transition: border-color 0.2s ease;
}
.field-input:focus,
.field-textarea:focus {
  border-color: var(--lime);
}
.field-textarea {
  resize: vertical;
  min-height: 72px;
  line-height: 1.5;
}
.field-group {
  padding-bottom: 6px;
}
.field-section-title {
  font-family: "Instrument Serif", serif;
  font-size: 20px;
  color: var(--lime);
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.field-section-title:first-child {
  border-top: none;
  padding-top: 0;
}
.img-upload {
  display: flex;
  align-items: center;
  gap: 12px;
}
.img-upload img {
  height: 48px;
  width: 48px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.img-upload label {
  flex: 1;
  cursor: pointer;
  text-align: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 9px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.8);
  transition: border-color 0.2s ease, color 0.2s ease;
}
.img-upload label:hover {
  border-color: var(--lime);
  color: var(--lime);
}
.img-upload input {
  display: none;
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .float-card {
    animation: none;
  }
  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
  * {
    scroll-behavior: auto !important;
  }
}

/* ---------- Loader text font ---------- */
div#loader > span.font-serif.text-5xl {
  font-family: "Montserrat", sans-serif;
}

/* ========== COMPREHENSIVE TYPOGRAPHY OVERRIDES ========== */

/* Hero headline - main CTA */
main#top h1[data-edit="heroHeadline"] {
  font-family: "Montserrat", sans-serif;
  font-weight: 800;
  text-transform: capitalize;
  box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  font-size: 48px;
  color: #ffffff;
}

/* Navbar logo */
header#navbar > nav.mx-auto.flex > a.font-serif.text-2xl:nth-of-type(1) {
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
}

/* Hero eyebrow text */
main#top p[data-edit="heroEyebrow"] {
  font-family: "Montserrat", sans-serif;
}

/* Hero subtitle */
main#top p[data-edit="heroSub"] {
  font-family: "Montserrat", sans-serif;
  color: rgba(255, 255, 255, 0.6);
}

/* Book a Call button */
main#top div.reveal.mt-9 a:nth-of-type(2) {
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
}

/* About section first paragraph */
section#about p[data-edit="aboutP1"] {
  font-family: "Montserrat", sans-serif;
  font-size: 24px;
}

/* About section second paragraph */
section#about p[data-edit="aboutP2"] {
  font-family: "Montserrat", sans-serif;
  font-size: 24px;
}

/* About section third paragraph */
section#about p[data-edit="aboutP3"] {
  font-family: "Montserrat", sans-serif;
  font-weight: 800;
}

/* About stat card 1 number */
section#about p[data-edit="aboutStat1Num"] {
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
}

/* About stat card 2 number */
section#about p[data-edit="aboutStat2Num"] {
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
}

/* Services section heading */
section#services h2.font-serif.text-4xl {
  font-family: "Montserrat", sans-serif;
}

/* Service card titles */
section#services h3.font-serif.text-2xl {
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
}

/* Portfolio section heading */
section#portfolio h2.font-serif.text-4xl {
  font-family: "Montserrat", sans-serif;
}

/* Portfolio card titles */
section#portfolio h3.mt-2.font-serif {
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
}

/* Contact section heading */
section#contact h2.font-serif {
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
}

/* Footer logo */
footer a.font-serif.text-2xl {
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
}

/* Scrollbar for edit panel */
#edit-fields::-webkit-scrollbar {
  width: 8px;
}
#edit-fields::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 8px;
}
