/* ==========================================================================
   CodeYantra — Business Portfolio
   1. Tokens & reset   2. Buttons   3. Navbar   4. Hero   5. Sections
   6. Services   7. Work gallery   8. Pricing   9. Process   10. About
   11. FAQ   12. Contact   13. Footer   14. Responsive
   ========================================================================== */

/* 1. Tokens & reset ------------------------------------------------------- */
:root {
  --bg-main: #F8FAFC;
  --bg-alt: #EEF2F7;
  --bg-card: #FFFFFF;
  --bg-dark: #0B1120;
  --primary: #2563EB;
  --primary-hover: #1D4ED8;
  --primary-soft: rgba(37, 99, 235, 0.08);
  --glow: #3B82F6;
  --text-main: #0F172A;
  --text-muted: #64748B;
  --text-on-dark: #E2E8F0;
  --border-color: #E2E8F0;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 6px 16px -4px rgba(15, 23, 42, 0.10);
  --shadow-lg: 0 16px 32px -8px rgba(15, 23, 42, 0.14);
  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  --nav-h: 72px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

a { text-decoration: none; color: inherit; }
ul, ol { list-style: none; }
img { max-width: 100%; height: auto; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }

:focus-visible { outline: 3px solid var(--glow); outline-offset: 2px; border-radius: 4px; }

.skip-link {
  position: absolute; left: 16px; top: -48px; z-index: 2000;
  background: var(--primary); color: #fff; padding: 8px 16px; border-radius: var(--radius-sm);
}
.skip-link:focus { top: 16px; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.accent { color: var(--primary); }

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 12px;
}

/* 2. Buttons -------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-weight: 600; font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
  text-align: center;
}
.btn-sm { padding: 9px 18px; font-size: 0.9rem; }
.btn-lg { padding: 15px 28px; font-size: 1rem; }
.btn-block { width: 100%; }

.btn-primary { background: var(--primary); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--primary-hover); transform: translateY(-2px); box-shadow: 0 8px 20px -6px rgba(37, 99, 235, 0.5); }

.btn-secondary { background: var(--bg-card); color: var(--text-main); border-color: var(--border-color); }
.btn-secondary:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-2px); }

.btn-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.28); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.08); border-color: #fff; transform: translateY(-2px); }

.btn-link { font-weight: 600; color: var(--primary); font-size: 0.92rem; }
.btn-link:hover { color: var(--primary-hover); text-decoration: underline; }

/* 3. Navbar --------------------------------------------------------------- */
.navbar {
  position: sticky; top: 0; z-index: 1000;
  background: rgba(11, 17, 32, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  transition: var(--transition);
}
.navbar.scrolled { background: rgba(11, 17, 32, 0.96); box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25); }

.nav-container {
  display: flex; align-items: center; justify-content: space-between;
  height: var(--nav-h); max-width: 1200px; margin: 0 auto; padding: 0 24px;
}

.logo { display: flex; align-items: center; gap: 10px; }
.logo-img { width: 40px; height: 40px; border-radius: 50%; }
.logo-text { font-size: 1.25rem; font-weight: 800; letter-spacing: -0.02em; color: #fff; }
.logo-text .accent { color: var(--glow); }

.nav-menu { display: flex; align-items: center; gap: 28px; }
.nav-link { font-weight: 500; font-size: 0.95rem; color: #CBD5E1; transition: var(--transition); }
.nav-link:hover, .nav-link.active { color: #fff; }

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  background: transparent; border: 0; cursor: pointer;
  flex-direction: column; justify-content: center; align-items: center; gap: 5px;
}
.nav-toggle span { display: block; width: 22px; height: 2px; background: #fff; border-radius: 2px; transition: var(--transition); }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* 4. Hero ----------------------------------------------------------------- */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(60% 60% at 80% 10%, rgba(59, 130, 246, 0.28) 0%, transparent 60%),
    radial-gradient(50% 50% at 10% 90%, rgba(37, 99, 235, 0.18) 0%, transparent 60%),
    var(--bg-dark);
  color: var(--text-on-dark);
  padding: 110px 0 100px;
  text-align: center;
}
.hero::before {
  /* subtle circuit grid, echoing the Instagram brand */
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.06) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(70% 70% at 50% 40%, #000 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(70% 70% at 50% 40%, #000 30%, transparent 100%);
  pointer-events: none;
}
.hero-content { position: relative; max-width: 860px; }
.hero .eyebrow { color: #93C5FD; }

.hero-title {
  font-size: clamp(2.2rem, 5.5vw, 3.8rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: #fff;
  margin-bottom: 20px;
}
.hero-title .accent {
  background: linear-gradient(90deg, #60A5FA, #3B82F6);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}

.hero-description { font-size: 1.15rem; color: #94A3B8; max-width: 640px; margin: 0 auto 36px; }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.hero-trust {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 28px;
  margin-top: 40px; font-size: 0.92rem; color: #94A3B8;
}

/* 5. Sections ------------------------------------------------------------- */
.section { padding: 96px 0; }
.section-alt { background: var(--bg-alt); }

.section-header { text-align: center; max-width: 640px; margin: 0 auto 52px; }
.section-title { font-size: clamp(1.6rem, 3.2vw, 2.25rem); font-weight: 800; letter-spacing: -0.02em; margin-bottom: 12px; line-height: 1.2; }
.section-subtitle { color: var(--text-muted); font-size: 1.05rem; }

/* 6. Services ------------------------------------------------------------- */
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }

.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 30px;
  transition: var(--transition);
}
.service-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: #BFDBFE; }
.service-icon {
  width: 52px; height: 52px; border-radius: 14px;
  display: grid; place-items: center;
  font-size: 1.6rem; background: var(--primary-soft); margin-bottom: 18px;
}
.service-card h3 { font-size: 1.15rem; margin-bottom: 8px; }
.service-card p { color: var(--text-muted); font-size: 0.95rem; }

.industries { margin-top: 48px; text-align: center; }
.industries-label { font-weight: 600; color: var(--text-muted); margin-bottom: 14px; }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.chip {
  padding: 8px 16px; border-radius: 999px;
  background: var(--bg-card); border: 1px solid var(--border-color);
  font-size: 0.9rem; font-weight: 500;
}

/* 7. Work gallery --------------------------------------------------------- */
.gallery-controls { display: flex; flex-direction: column; gap: 20px; align-items: center; margin-bottom: 44px; }
.search-wrapper { width: 100%; max-width: 480px; }
.search-input {
  width: 100%; padding: 14px 20px;
  border-radius: 999px; border: 1px solid var(--border-color);
  background: var(--bg-card); box-shadow: var(--shadow-sm);
  outline: none; transition: var(--transition);
}
.search-input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12); }

.filter-buttons { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.filter-btn {
  padding: 8px 18px; border-radius: 999px;
  border: 1px solid var(--border-color); background: var(--bg-card);
  color: var(--text-muted); font-weight: 500; font-size: 0.9rem;
  cursor: pointer; transition: var(--transition);
}
.filter-btn:hover, .filter-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }

.projects-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 28px; }

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: var(--transition);
}
.project-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.project-card.is-hidden { display: none; }

.card-image { display: block; aspect-ratio: 16 / 10; background: #E2E8F0; overflow: hidden; border-bottom: 1px solid var(--border-color); }
.card-image img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform 0.4s ease; }
.project-card:hover .card-image img { transform: scale(1.04); }

.card-content { padding: 22px; display: flex; flex-direction: column; flex-grow: 1; }
.project-number { font-size: 0.78rem; font-weight: 700; color: var(--primary); letter-spacing: 0.05em; margin-bottom: 6px; }
.badge { background: #DCFCE7; color: #166534; padding: 2px 8px; border-radius: 999px; font-size: 0.72rem; }
.project-title { font-size: 1.15rem; font-weight: 700; margin-bottom: 6px; }
.project-desc { color: var(--text-muted); font-size: 0.93rem; margin-bottom: 18px; flex-grow: 1; }

.no-results { text-align: center; color: var(--text-muted); margin-top: 32px; }

/* Service category tabs */
.service-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 36px; }
.service-tab {
  padding: 10px 20px; border-radius: 999px;
  border: 1px solid var(--border-color); background: var(--bg-card);
  color: var(--text-muted); font-weight: 600; font-size: 0.95rem;
  cursor: pointer; transition: var(--transition);
}
.service-tab:hover { border-color: var(--primary); color: var(--primary); }
.service-tab.active { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 6px 16px -6px rgba(37, 99, 235, 0.5); }
#services .services-grid { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }
#services .service-card { padding: 24px; display: flex; flex-direction: column; }
#services .service-card p { flex-grow: 1; }
.service-price { display: inline-block; margin-top: 14px; font-weight: 700; font-size: 0.9rem; color: var(--primary); }
.service-note { text-align: center; color: var(--text-muted); font-size: 0.93rem; margin: 28px auto 0; max-width: 720px; }
.service-note a { color: var(--primary); font-weight: 600; }
.service-note a:hover { text-decoration: underline; }

@media (max-width: 640px) {
  .service-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .service-tab { padding: 10px 8px; font-size: 0.85rem; }
}

/* 8. Pricing -------------------------------------------------------------- */
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; align-items: stretch; }

.price-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 34px 30px;
  display: flex; flex-direction: column;
}
.price-card-featured { border: 2px solid var(--primary); box-shadow: var(--shadow-lg); }
.popular {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  background: var(--primary); color: #fff;
  font-size: 0.75rem; font-weight: 700; padding: 4px 14px; border-radius: 999px; white-space: nowrap;
}
.price-card h3 { font-size: 1.2rem; margin-bottom: 8px; }
.price { font-size: 2.4rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
.price .from { font-size: 0.95rem; font-weight: 500; color: var(--text-muted); }
.price-note { color: var(--text-muted); font-size: 0.92rem; margin: 6px 0 22px; }
.price-features { display: grid; gap: 10px; margin-bottom: 28px; flex-grow: 1; }
.price-features li { padding-left: 26px; position: relative; font-size: 0.95rem; }
.price-features li::before { content: "✓"; position: absolute; left: 0; color: var(--primary); font-weight: 700; }

.pricing-extra { text-align: center; color: var(--text-muted); margin-top: 32px; font-size: 0.95rem; }
.pricing-extra strong { color: var(--text-main); }

/* 9. Process -------------------------------------------------------------- */
.process-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; counter-reset: step; }
.process-step {
  background: var(--bg-card); border: 1px solid var(--border-color);
  border-radius: var(--radius); padding: 28px;
}
.step-num {
  display: grid; place-items: center;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--primary); color: #fff; font-weight: 700; margin-bottom: 16px;
}
.process-step h3 { font-size: 1.1rem; margin-bottom: 6px; }
.process-step p { color: var(--text-muted); font-size: 0.93rem; }

/* 10. About --------------------------------------------------------------- */
.about-card {
  max-width: 900px; margin: 0 auto;
  background: var(--bg-card); border: 1px solid var(--border-color);
  border-radius: var(--radius); padding: 48px;
  display: flex; align-items: center; gap: 44px;
}
.about-avatar { flex-shrink: 0; width: 140px; height: 140px; border-radius: 50%; box-shadow: 0 0 0 6px var(--primary-soft); }
.about-text h2 { font-size: 1.6rem; margin-bottom: 14px; }
.about-text p { color: var(--text-muted); margin-bottom: 14px; }
.about-stats { display: flex; gap: 32px; margin-top: 20px; flex-wrap: wrap; }
.about-stats strong { display: block; font-size: 1.8rem; font-weight: 800; color: var(--primary); line-height: 1.1; }
.about-stats span { font-size: 0.88rem; color: var(--text-muted); }

/* 11. FAQ ----------------------------------------------------------------- */
.faq-container { max-width: 780px; }
.faq-item {
  background: var(--bg-card); border: 1px solid var(--border-color);
  border-radius: var(--radius-sm); margin-bottom: 12px;
}
.faq-item summary {
  cursor: pointer; list-style: none;
  padding: 18px 52px 18px 22px; font-weight: 600; position: relative;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+"; position: absolute; right: 22px; top: 50%; transform: translateY(-50%);
  font-size: 1.4rem; color: var(--primary); transition: var(--transition);
}
.faq-item[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq-item p { padding: 0 22px 20px; color: var(--text-muted); }

/* 12. Contact ------------------------------------------------------------- */
.contact-card {
  display: grid; grid-template-columns: 1fr 1fr; gap: 48px;
  background: var(--bg-card); border: 1px solid var(--border-color);
  border-radius: var(--radius); padding: 52px;
  box-shadow: var(--shadow-md);
}
.contact-intro .section-subtitle { margin-bottom: 28px; }
.contact-details { display: grid; gap: 14px; }
.contact-details li { display: flex; gap: 12px; align-items: center; font-weight: 500; }
.contact-details a { color: var(--primary); word-break: break-all; }
.contact-details a:hover { text-decoration: underline; }

.contact-form { display: grid; gap: 16px; }
.form-row { display: grid; gap: 6px; }
.form-row label { font-weight: 600; font-size: 0.9rem; }
.form-row input, .form-row select, .form-row textarea {
  width: 100%; padding: 12px 14px;
  border: 1px solid var(--border-color); border-radius: var(--radius-sm);
  background: var(--bg-main); transition: var(--transition);
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12); background: #fff;
}
.form-row textarea { resize: vertical; }
.form-error { color: #B91C1C; font-size: 0.9rem; }
.form-hint { color: var(--text-muted); font-size: 0.82rem; text-align: center; }

/* 13. Footer -------------------------------------------------------------- */
.footer { background: var(--bg-dark); color: #94A3B8; padding: 56px 0 36px; font-size: 0.92rem; }
.footer-content { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; }
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; justify-content: center; }
.footer-links a:hover { color: #fff; }
.footer-copyright { font-size: 0.85rem; color: #64748B; }

.scroll-top-btn {
  position: fixed; bottom: 28px; right: 28px; z-index: 999;
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--primary); color: #fff; border: none; font-size: 1.2rem;
  cursor: pointer; box-shadow: var(--shadow-md);
  opacity: 0; visibility: hidden; transform: translateY(16px);
  transition: var(--transition);
}
.scroll-top-btn.show { opacity: 1; visibility: visible; transform: translateY(0); }
.scroll-top-btn:hover { background: var(--primary-hover); }

/* 14. Responsive ---------------------------------------------------------- */
@media (max-width: 992px) {
  .nav-toggle { display: flex; }
  .nav-menu {
    position: absolute; top: var(--nav-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg-dark);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 8px 24px 20px;
    transform: translateY(-8px); opacity: 0; visibility: hidden;
    transition: var(--transition);
  }
  .nav-menu.open { transform: translateY(0); opacity: 1; visibility: visible; }
  .nav-link { padding: 14px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
  .nav-menu .btn { margin-top: 14px; }

  .process-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-card { grid-template-columns: 1fr; padding: 40px 32px; gap: 32px; }
  .about-card { flex-direction: column; text-align: center; padding: 40px 28px; }
  .about-stats { justify-content: center; }
}

@media (max-width: 640px) {
  .section { padding: 64px 0; }
  .container, .nav-container { padding: 0 16px; }
  .hero { padding: 72px 0 64px; }
  .hero-actions .btn { width: 100%; }
  .hero-trust { flex-direction: column; gap: 6px; }
  .services-grid, .projects-grid, .pricing-grid { grid-template-columns: 1fr; }
  .process-grid { grid-template-columns: 1fr; }
  .contact-card { padding: 28px 20px; }
  .price-card { padding: 30px 22px; }
  .scroll-top-btn { bottom: 18px; right: 18px; width: 44px; height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
