/* ==========================================================================
   Siddhani Digital — design tokens + base + components
   Light theme, teal-to-blue gradient pulled from the logo mark.
   ========================================================================== */

:root {
  /* Brand */
  --navy: #0b1e3d;
  --navy-soft: #16274a;
  --slate: #55617a;
  --teal: #14b8a6;
  --teal-dark: #0d9488;
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --gradient: linear-gradient(135deg, var(--teal) 0%, var(--blue) 100%);
  --gradient-soft: linear-gradient(135deg, rgba(20, 184, 166, 0.12) 0%, rgba(37, 99, 235, 0.12) 100%);

  /* Surfaces */
  --bg: #ffffff;
  --bg-soft: #f5f8fc;
  --bg-alt: #eef2f9;
  --border: #e4e9f2;
  --shadow: 0 10px 30px rgba(11, 30, 61, 0.08);
  --shadow-lg: 0 20px 60px rgba(11, 30, 61, 0.14);

  /* Type */
  --font: 'Poppins', system-ui, -apple-system, sans-serif;
  --text: #1b2436;
  --text-muted: var(--slate);

  /* Rhythm */
  --radius: 16px;
  --radius-sm: 10px;
  --container: 1200px;
  --header-h: 84px;
}

* { box-sizing: border-box; }
html { scroll-behavior: auto; } /* Lenis takes over smooth scroll */
html, body { width: 100%; overflow-x: hidden; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  margin: 0;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body.no-scroll { overflow: hidden; }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

h1, h2, h3, h4 {
  color: var(--navy);
  font-weight: 700;
  line-height: 1.15;
  margin: 0;
}

.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal-dark);
  background: var(--gradient-soft);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 16px;
}

.section { padding: 96px 0; }
.section-soft { background: var(--bg-soft); }
.section-head { max-width: 640px; margin: 0 auto 56px; text-align: center; }
.section-head h2 { font-size: clamp(28px, 4vw, 42px); }
.section-head p { color: var(--text-muted); margin-top: 14px; font-size: 17px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  border: none;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.btn-primary { background: var(--gradient); color: #fff; box-shadow: 0 8px 24px rgba(37, 99, 235, 0.25); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(37, 99, 235, 0.32); }
.btn-secondary { background: var(--bg-alt); color: var(--navy); }
.btn-secondary:hover { transform: translateY(-2px); background: #e2e8f4; }
.btn-block { width: 100%; }

/* ---------- Header ---------- */
#header {
  position: fixed; top: 0; left: 0; width: 100%; z-index: 100;
  height: var(--header-h);
  display: flex; align-items: center;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
#header.scrolled { border-color: var(--border); box-shadow: 0 4px 20px rgba(11,30,61,0.06); }
#header .container { display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; white-space: nowrap; }
.logo img { height: 40px; width: auto; flex-shrink: 0; }
.logo span { font-weight: 700; font-size: 19px; color: var(--navy); white-space: nowrap; }

nav.main-nav { display: flex; align-items: center; gap: 36px; }
nav.main-nav a:not(.btn) {
  position: relative; font-weight: 500; color: var(--navy-soft); font-size: 15px;
}
nav.main-nav a:not(.btn)::after {
  content: ''; position: absolute; left: 0; bottom: -6px; width: 0; height: 2px;
  background: var(--gradient); transition: width 0.25s ease;
}
nav.main-nav a:not(.btn):hover::after { width: 100%; }

.menu-toggle {
  display: none; background: none; border: none; cursor: pointer; padding: 6px;
}
.menu-toggle span {
  display: block; width: 26px; height: 2px; background: var(--navy); margin: 6px 0; transition: 0.3s;
}

/* ---------- Mobile slide-in menu ---------- */
#mobile-menu {
  position: fixed; top: 0; right: 0; height: 100%; width: 78%; max-width: 320px;
  background: #fff; z-index: 200; box-shadow: -10px 0 40px rgba(11,30,61,0.15);
  transform: translateX(100%); transition: transform 0.35s cubic-bezier(.4,0,.2,1);
  display: flex; flex-direction: column; padding: 28px 28px 32px;
}
#mobile-menu.open { transform: translateX(0); }
#mobile-menu .close-btn { align-self: flex-end; background: none; border: none; font-size: 28px; color: var(--navy); cursor: pointer; }
#mobile-menu a { display: block; padding: 14px 0; font-size: 17px; font-weight: 600; color: var(--navy); border-bottom: 1px solid var(--border); }
#mobile-menu a.btn { border: none; text-align: center; margin-top: 20px; }
#mobile-menu-overlay {
  position: fixed; inset: 0; background: rgba(11,30,61,0.45); z-index: 199;
  opacity: 0; pointer-events: none; transition: opacity 0.3s ease;
}
#mobile-menu-overlay.open { opacity: 1; pointer-events: auto; }

@media (max-width: 900px) {
  nav.main-nav { display: none; }
  .menu-toggle { display: block; }
}

/* ---------- Hero ---------- */
#hero {
  min-height: 100vh; display: flex; align-items: center; position: relative;
  padding-top: var(--header-h); overflow: hidden;
}
#hero .blob {
  position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.35; z-index: 0;
  animation: float-blob 12s ease-in-out infinite alternate;
}
#hero .blob-1 { width: 420px; height: 420px; background: var(--teal); top: -100px; left: -120px; }
#hero .blob-2 { width: 480px; height: 480px; background: var(--blue); bottom: -160px; right: -140px; animation-delay: -4s; }
@keyframes float-blob { 0% { transform: translate(0,0) scale(1); } 100% { transform: translate(40px,-30px) scale(1.08); } }

.hero-inner { position: relative; z-index: 1; text-align: center; max-width: 880px; margin: 0 auto; }
.hero-inner h1 { font-size: clamp(34px, 6vw, 64px); }
.hero-inner .word { display: inline-block; will-change: transform, opacity; }
.hero-inner p.lead { margin-top: 24px; font-size: 18px; color: var(--text-muted); max-width: 640px; margin-left: auto; margin-right: auto; }
.hero-cta { margin-top: 40px; display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

.stats-strip { display: flex; justify-content: center; gap: 56px; margin-top: 72px; flex-wrap: wrap; }
.stat { text-align: center; }
.stat .num { font-size: 36px; font-weight: 800; color: var(--navy); }
.stat .num span.suffix { color: var(--teal-dark); }
.stat .label { font-size: 13px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em; margin-top: 4px; }

/* ---------- Services ---------- */
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 28px; }
.service-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 34px 28px; position: relative; overflow: hidden;
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
  will-change: transform;
}
.service-card::before {
  content: ''; position: absolute; inset: 0; background: var(--gradient); opacity: 0;
  transition: opacity 0.35s ease; z-index: 0;
}
.service-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); border-color: transparent; }
.service-card .icon-badge {
  width: 52px; height: 52px; border-radius: 14px; background: var(--gradient-soft);
  display: flex; align-items: center; justify-content: center; margin-bottom: 20px;
  font-size: 22px; position: relative; z-index: 1;
}
.service-card h3 { font-size: 20px; margin-bottom: 10px; position: relative; z-index: 1; }
.service-card p { color: var(--text-muted); font-size: 15px; margin: 0; position: relative; z-index: 1; }

/* ---------- Tech stack / gravity canvas ---------- */
#tech-stack .gravity-wrap {
  position: relative; width: 100%; height: 420px; max-width: 720px; margin: 0 auto;
  background: var(--bg-soft); border-radius: 24px; border: 1px solid var(--border);
  overflow: hidden;
}
/* No forced width/height here on purpose: Matter.js sets the canvas's
   inline style.width/height itself, in lockstep with its drawing-buffer
   size and devicePixelRatio scale. Overriding it from CSS (as an earlier
   version of this rule did with !important) lets the two disagree —
   the visible box stretches to the CSS size while the buffer stays at
   whatever size JS measured, producing a blurry, misaligned canvas. */
#tech-stack canvas { position: absolute; inset: 0; }
#tech-stack .gravity-hint { text-align: center; font-size: 13px; color: var(--text-muted); margin-top: 12px; }
.tech-icon-fallback {
  display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; max-width: 640px; margin: 0 auto;
}
.tech-icon-fallback .pill {
  padding: 10px 18px; border-radius: 999px; background: var(--bg-soft); border: 1px solid var(--border);
  font-size: 14px; font-weight: 600; color: var(--navy-soft);
}

/* ---------- Portfolio ---------- */
.portfolio-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 28px; }
.portfolio-item { border-radius: var(--radius); overflow: hidden; cursor: pointer; position: relative; box-shadow: var(--shadow); }
.portfolio-item img { width: 100%; height: 280px; object-fit: cover; object-position: top; transition: transform 0.6s cubic-bezier(.2,.8,.2,1); }
.portfolio-item:hover img { transform: scale(1.08); }
.portfolio-item .overlay {
  position: absolute; inset: 0; background: linear-gradient(0deg, rgba(11,30,61,0.85), transparent 60%);
  display: flex; align-items: flex-end; padding: 22px; opacity: 0; transition: opacity 0.35s ease;
}
.portfolio-item:hover .overlay { opacity: 1; }
.portfolio-item .overlay h3 { color: #fff; font-size: 19px; }
.portfolio-item .overlay span { color: rgba(255,255,255,0.8); font-size: 13px; }

/* ---------- Packages ---------- */
.packages-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 28px; align-items: stretch; }
.package-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 36px 30px; display: flex; flex-direction: column; }
.package-card.featured { border: 2px solid transparent; background: linear-gradient(#fff,#fff) padding-box, var(--gradient) border-box; box-shadow: var(--shadow-lg); position: relative; }
.package-card .badge { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); background: var(--gradient); color: #fff; font-size: 12px; font-weight: 700; padding: 5px 14px; border-radius: 999px; }
.package-card h3 { font-size: 22px; }
.package-card p.desc { color: var(--text-muted); margin: 12px 0 24px; }
.package-card ul { flex-grow: 1; margin-bottom: 28px; }
.package-card li { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 12px; font-size: 14.5px; color: var(--text); }
.package-card li svg { flex-shrink: 0; margin-top: 2px; color: var(--teal-dark); }

/* ---------- Testimonials / marquee ---------- */
.testimonial-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 28px; }
.testimonial-card { background: var(--bg-soft); border-radius: var(--radius); padding: 32px; border: 1px solid var(--border); }
.testimonial-card blockquote { font-style: italic; color: var(--text); margin: 0 0 18px; }
.testimonial-card footer { font-weight: 700; color: var(--navy); }
.testimonial-card footer span { color: var(--teal-dark); font-weight: 500; }

.marquee { overflow: hidden; white-space: nowrap; margin-top: 64px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 22px 0; }
.marquee-track { display: inline-flex; gap: 60px; animation: marquee 22s linear infinite; }
.marquee-track span { font-size: 20px; font-weight: 700; color: var(--navy); opacity: 0.35; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- Contact ---------- */
.contact-panel { background: var(--bg-soft); border-radius: 28px; padding: 56px 40px; border: 1px solid var(--border); }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.contact-info a { display: flex; align-items: center; gap: 12px; font-size: 17px; color: var(--navy-soft); margin-top: 18px; }
.contact-info a:hover { color: var(--blue); }
.contact-info svg { color: var(--teal-dark); }
.form-group { margin-bottom: 16px; }
.form-group input, .form-group textarea {
  width: 100%; padding: 14px 16px; border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: #fff; font-family: var(--font); font-size: 15px; color: var(--text); transition: border-color 0.2s ease;
}
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--blue); }
.form-note { font-size: 13px; margin-top: 10px; }
.form-note.success { color: var(--teal-dark); }
.form-note.error { color: #dc2626; }
.honeypot-field { position: absolute; left: -9999px; opacity: 0; height: 0; }

/* ---------- Footer ---------- */
footer.site-footer { background: var(--navy); color: rgba(255,255,255,0.7); padding: 48px 0; }
footer.site-footer .container { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }
footer.site-footer a { color: rgba(255,255,255,0.7); }
footer.site-footer a:hover { color: #fff; }
.footer-links { display: flex; gap: 20px; }

/* ---------- Blog ---------- */
.blog-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.blog-card { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: #fff; transition: transform .3s ease, box-shadow .3s ease; }
.blog-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.blog-card img { width: 100%; height: 190px; object-fit: cover; }
.blog-card .body { padding: 22px; }
.blog-card .date { font-size: 12.5px; color: var(--teal-dark); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.blog-card h3 { font-size: 19px; margin: 10px 0; }
.blog-card p { color: var(--text-muted); font-size: 14.5px; }
.pagination { display: flex; justify-content: center; gap: 10px; margin-top: 48px; }
.pagination a, .pagination span { padding: 10px 16px; border-radius: 999px; border: 1px solid var(--border); font-size: 14px; font-weight: 600; }
.pagination .active { background: var(--gradient); color: #fff; border-color: transparent; }

.post-header { padding: calc(var(--header-h) + 60px) 0 40px; text-align: center; }
.post-header .date { color: var(--teal-dark); font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; }
.post-header h1 { font-size: clamp(28px, 5vw, 46px); margin: 16px 0; }
.post-cover { max-width: 900px; margin: 0 auto 40px; border-radius: 20px; overflow: hidden; }
.post-body { max-width: 720px; margin: 0 auto; font-size: 17px; line-height: 1.85; }
.post-body h2, .post-body h3 { margin-top: 36px; margin-bottom: 14px; }
.post-body img { border-radius: 14px; margin: 24px 0; }
.post-body p { margin: 0 0 20px; }

/* ---------- Modal (portfolio) ---------- */
#portfolio-modal { position: fixed; inset: 0; background: rgba(11,30,61,0.6); backdrop-filter: blur(6px); z-index: 300; display: flex; align-items: center; justify-content: center; padding: 20px; opacity: 0; pointer-events: none; transition: opacity 0.3s ease; }
#portfolio-modal.open { opacity: 1; pointer-events: auto; }
#modal-content { background: #fff; width: 100%; max-width: 780px; max-height: 90vh; border-radius: 22px; padding: 26px; position: relative; overflow-y: auto; transform: scale(0.94); transition: transform 0.3s ease; }
#portfolio-modal.open #modal-content { transform: scale(1); }
#modal-close-btn { position: absolute; top: -16px; right: -16px; width: 40px; height: 40px; border-radius: 50%; background: var(--gradient); color: #fff; border: none; font-size: 22px; cursor: pointer; }
#modal-image { width: 100%; border-radius: 14px; margin-bottom: 18px; max-height: 46vh; object-fit: cover; }

/* ---------- Custom cursor (desktop only) ---------- */
.cursor-dot {
  position: fixed; top: 0; left: 0; width: 14px; height: 14px; border-radius: 50%;
  background: var(--gradient); pointer-events: none; z-index: 999; mix-blend-mode: normal;
  transform: translate(-50%, -50%); transition: width .2s ease, height .2s ease, opacity .2s ease;
  opacity: 0;
}
.cursor-dot.active { opacity: 1; }
.cursor-dot.hovering { width: 34px; height: 34px; background: transparent; border: 2px solid var(--blue); }
@media (hover: none), (max-width: 900px) { .cursor-dot { display: none; } }

/* ---------- Reveal utility (GSAP hooks) ---------- */
.reveal-up { opacity: 0; transform: translateY(36px); }
.reveal-fade { opacity: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 800px) {
  .section { padding: 64px 0; }
  .contact-grid { grid-template-columns: 1fr; }
  .stats-strip { gap: 32px; }
  #tech-stack .gravity-wrap { height: 320px; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal-up, .reveal-fade { opacity: 1 !important; transform: none !important; }
  #hero .blob, .marquee-track { animation: none !important; }
}
