/* =========================================================
   DIVINE PROJECTS BHARAT — Design System
   Palette: Navy (trust/engineering) + Gold (craftsmanship/premium)
   ========================================================= */

:root {
  --navy-900: #0a1f3d;
  --navy-800: #0f2a52;
  --navy-700: #163a6e;
  --navy-600: #1e4d8f;
  --gold-500: #d9a441;
  --gold-400: #e6b955;
  --gold-100: #faf1de;
  --ink: #1c2530;
  --ink-soft: #4a5568;
  --paper: #ffffff;
  --paper-soft: #f6f7f9;
  --border: #e2e6ec;
  --success: #1e7d4a;
  --danger: #b3261e;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow-sm: 0 1px 3px rgba(10,31,61,0.08);
  --shadow-md: 0 6px 20px rgba(10,31,61,0.10);
  --shadow-lg: 0 16px 40px rgba(10,31,61,0.16);
  --maxw: 1180px;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-head: Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy-700); text-decoration: none; }
a:hover { color: var(--gold-500); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid var(--gold-500);
  outline-offset: 2px;
}
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--navy-900); line-height: 1.25; margin: 0 0 0.6em; }
h1 { font-size: clamp(2rem, 4vw, 2.9rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; color: var(--ink-soft); }
ul, ol { color: var(--ink-soft); }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
section { padding: 64px 0; }
.section-tight { padding: 40px 0; }
.section-alt { background: var(--paper-soft); }
.section-navy { background: var(--navy-900); color: #fff; }
.section-navy h2, .section-navy h3, .section-navy p, .section-navy a { color: #fff; }
.section-navy a:hover { color: var(--gold-400); }
.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-500);
  margin-bottom: 10px;
}
.center { text-align: center; }
.section-head { max-width: 720px; margin: 0 auto 40px; }
.section-head.center { text-align: center; }
.lede { font-size: 1.1rem; }

/* Skip link */
.skip-link {
  position: absolute; left: -9999px; top: 0; background: var(--navy-900); color: #fff;
  padding: 10px 16px; z-index: 1000; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 26px; border-radius: var(--radius-sm); font-weight: 700; font-size: 0.95rem;
  border: 2px solid transparent; cursor: pointer; transition: all .15s ease; line-height: 1.2;
}
.btn-primary { background: var(--gold-500); color: var(--navy-900); }
.btn-primary:hover { background: var(--gold-400); color: var(--navy-900); transform: translateY(-1px); }
.btn-outline { background: transparent; border-color: currentColor; color: var(--navy-900); }
.btn-outline:hover { background: var(--navy-900); color: #fff; }
.section-navy .btn-outline { color: #fff; }
.section-navy .btn-outline:hover { background: #fff; color: var(--navy-900); }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 16px; font-size: 0.85rem; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 500; background: rgba(255,255,255,0.99);
  border-bottom: 1px solid var(--border);
  /* Note: no backdrop-filter here — it creates a containing block for any
     position:fixed descendant (like the mobile nav drawer below), which
     traps that drawer inside the header's own height instead of the
     full viewport. Keep this rule filter/transform-free. */
}
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; max-width: var(--maxw); margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-head); font-weight: 700; font-size: 1.15rem; color: var(--navy-900); }
.brand img { height: 40px; width: auto; }
.brand small { display: block; font-family: var(--font-body); font-weight: 500; font-size: 0.68rem; color: var(--ink-soft); letter-spacing: 0.04em; }
.nav-toggle {
  display: none; background: none; border: none; cursor: pointer; padding: 6px;
}
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--navy-900); margin: 5px 0; }
.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav ul { list-style: none; display: flex; gap: 2px; margin: 0; padding: 0; align-items: center; }
.main-nav a.nav-link {
  display: block; padding: 10px 14px; font-weight: 600; font-size: 0.92rem; color: var(--navy-900); border-radius: var(--radius-sm);
}
.main-nav a.nav-link:hover, .main-nav a.nav-link[aria-current="page"] { color: var(--gold-500); background: var(--gold-100); }
.nav-cta { margin-left: 10px; }
.has-dropdown { position: relative; }
.dropdown {
  position: absolute; top: 100%; left: 0; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md); min-width: 260px; padding: 8px; display: none; z-index: 50;
}
.has-dropdown:hover .dropdown, .has-dropdown:focus-within .dropdown { display: block; }
.dropdown a { display: block; padding: 9px 12px; border-radius: var(--radius-sm); font-size: 0.9rem; color: var(--ink); }
.dropdown a:hover { background: var(--gold-100); color: var(--navy-900); }
.topbar { background: var(--navy-900); color: #cfe0f5; font-size: 0.82rem; }
.topbar .container { display: flex; justify-content: space-between; align-items: center; padding: 7px 20px; flex-wrap: wrap; gap: 6px; }
.topbar a { color: #fff; font-weight: 600; }
.topbar-links { display: flex; gap: 18px; }

.nav-backdrop {
  position: fixed; inset: 0; background: rgba(8,14,26,0.55); opacity: 0; pointer-events: none;
  transition: opacity .25s ease; z-index: 600;
}
.nav-backdrop.show { opacity: 1; pointer-events: auto; }
.nav-close {
  display: none; margin-left: auto; background: var(--paper-soft); border: none; width: 38px; height: 38px;
  border-radius: 50%; font-size: 1.4rem; line-height: 1; color: var(--navy-900); cursor: pointer;
}
.nav-close:hover { background: var(--gold-100); color: var(--gold-500); }

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .main-nav {
    position: fixed; inset: 0 0 0 auto; width: min(340px, 88vw); max-width: 340px; background: #fff; flex-direction: column; align-items: stretch;
    padding: 18px 22px 26px; transform: translateX(100%); transition: transform .3s ease; box-shadow: var(--shadow-lg);
    overflow-y: auto; z-index: 700;
  }
  .main-nav.open { transform: translateX(0); }
  .nav-close { display: flex; align-items: center; justify-content: center; margin-bottom: 10px; }
  .main-nav ul { flex-direction: column; align-items: stretch; gap: 2px; }
  .main-nav ul li { border-bottom: 1px solid var(--border); }
  .main-nav ul li:last-child { border-bottom: none; }
  .main-nav a.nav-link { padding: 15px 6px; font-size: 1.02rem; border-radius: 0; }
  .has-dropdown > a.nav-link::after { content: "\2304"; float: right; font-size: 0.85em; color: var(--ink-soft); }
  .dropdown { position: static; box-shadow: none; border: none; display: none; padding: 0 0 8px 10px; }
  .dropdown a { padding: 11px 12px; font-size: 0.94rem; }
  .has-dropdown.open .dropdown { display: block; }
  .nav-cta { margin: 18px 0 0; text-align: center; }
  .topbar-links { display: none; }
}

/* Hero — dark navy/gold blueprint theme (self-contained SVG, no photo dependency) */
.hero {
  position: relative; color: #fff; overflow: hidden;
  background: linear-gradient(120deg, rgba(6,16,32,.94), rgba(10,31,61,.88) 45%, rgba(22,58,110,.85)),
              url('../images/hero-bg-pattern.svg');
  background-size: cover;
  background-position: center;
  padding: 100px 0 90px;
}
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 48px; align-items: center; }
.hero h1 { color: #fff; text-shadow: 0 2px 18px rgba(0,0,0,0.35); }
.hero p.lede { color: #e3ecf9; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 24px; }
.hero-figure { position: relative; }
.hero-figure::before {
  content: ""; position: absolute; inset: -14px -14px auto auto; width: 92%; height: 92%;
  border: 2px solid var(--gold-500); border-radius: var(--radius); z-index: 0; opacity: .55;
}
.hero-figure img {
  position: relative; z-index: 1; border-radius: var(--radius); box-shadow: 0 24px 60px rgba(0,0,0,0.45);
  width: 100%; max-width: 420px; margin: 0 auto; display: block;
}
.hero-figure-caption {
  position: relative; z-index: 1; text-align: center; font-size: 0.8rem; color: var(--gold-400);
  font-weight: 700; letter-spacing: .04em; text-transform: uppercase; margin-top: 14px;
}
.hero-stats { display: flex; gap: 28px; margin-top: 36px; flex-wrap: wrap; }
.hero-stats div strong { display: block; font-size: 1.8rem; color: var(--gold-400); font-family: var(--font-head); }
.hero-stats div span { font-size: 0.82rem; color: #cfe0f5; }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; } .hero-figure { max-width: 320px; margin: 0 auto; } }

.page-hero {
  background: linear-gradient(135deg, var(--navy-900), var(--navy-700));
  color: #fff; padding: 56px 0 48px;
}
.page-hero h1 { color: #fff; margin-bottom: 8px; }
.page-hero p { color: #cfe0f5; max-width: 680px; }
.breadcrumbs { font-size: 0.85rem; color: #b9cbe3; margin-bottom: 14px; }
.breadcrumbs a { color: #dce8f7; }
.breadcrumbs a:hover { color: var(--gold-400); }

/* Grids & cards */
.grid { display: grid; gap: 26px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 26px;
  box-shadow: var(--shadow-sm); transition: box-shadow .15s ease, transform .15s ease;
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.icon-circle {
  width: 52px; height: 52px; border-radius: 50%; background: var(--gold-100); color: var(--navy-800);
  display: flex; align-items: center; justify-content: center; font-size: 1.4rem; margin-bottom: 16px; font-weight: 700;
}
.card h3 { margin-bottom: 8px; font-size: 1.15rem; }
.card p { margin-bottom: 10px; }
.card a.card-link { font-weight: 700; font-size: 0.88rem; }

/* Service page specific */
.service-block { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: center; padding: 56px 0; border-bottom: 1px solid var(--border); }
.service-block:last-child { border-bottom: none; }
.service-block.reverse .service-media { order: 2; }
.service-media img { border-radius: var(--radius); box-shadow: var(--shadow-md); }
@media (max-width: 860px) { .service-block, .service-block.reverse .service-media { grid-template-columns: 1fr; order: 0; } }
.checklist { list-style: none; padding: 0; margin: 18px 0; }
.checklist li { padding-left: 30px; position: relative; margin-bottom: 10px; }
.checklist li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--success); font-weight: 900; }

/* Project / case study cards */
.project-card { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); background: #fff; box-shadow: var(--shadow-sm); }
.project-card .thumb { aspect-ratio: 4/3; overflow: hidden; }
.project-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.project-card .body { padding: 20px; }
.project-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 0.82rem; color: var(--ink-soft); margin: 10px 0; }
.project-meta span strong { color: var(--navy-800); }
.tag { display: inline-block; background: var(--gold-100); color: var(--navy-800); font-size: 0.72rem; font-weight: 700; padding: 4px 10px; border-radius: 20px; letter-spacing: .03em; }

.case-study { padding: 56px 0; border-bottom: 1px solid var(--border); }
.case-study:last-of-type { border-bottom: none; }
.case-facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; background: var(--paper-soft); border-radius: var(--radius); padding: 20px; margin: 20px 0 28px; }
.case-facts div span { display: block; font-size: 0.75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-soft); }
.case-facts div strong { font-size: 1.05rem; color: var(--navy-900); }
@media (max-width: 700px) { .case-facts { grid-template-columns: repeat(2, 1fr); } }

/* Gallery / lightbox */
.gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 900px) { .gallery-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); } }
.gallery-item { border-radius: var(--radius-sm); overflow: hidden; cursor: pointer; aspect-ratio: 1/1; border: none; padding: 0; background: none; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .2s ease; }
.gallery-item:hover img { transform: scale(1.06); }
.lightbox { position: fixed; inset: 0; background: rgba(10,15,25,0.92); display: none; align-items: center; justify-content: center; z-index: 1000; padding: 30px; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 90vw; max-height: 82vh; border-radius: 8px; }
.lightbox-caption { color: #fff; text-align: center; margin-top: 12px; font-size: 0.9rem; }
.lightbox-close, .lightbox-prev, .lightbox-next {
  position: absolute; background: rgba(255,255,255,0.12); color: #fff; border: none; width: 44px; height: 44px; border-radius: 50%;
  font-size: 1.3rem; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.lightbox-close { top: 20px; right: 20px; }
.lightbox-prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 20px; top: 50%; transform: translateY(-50%); }
.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover { background: var(--gold-500); color: var(--navy-900); }

/* Filters */
.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 28px; }
.filter-btn { border: 1px solid var(--border); background: #fff; padding: 8px 16px; border-radius: 20px; font-size: 0.85rem; font-weight: 600; cursor: pointer; }
.filter-btn.active, .filter-btn:hover { background: var(--navy-900); color: #fff; border-color: var(--navy-900); }

/* Team */
.team-card { text-align: center; }
.team-card img { border-radius: 50%; width: 140px; height: 140px; object-fit: cover; margin: 0 auto 16px; box-shadow: var(--shadow-md); }
.team-card .role { color: var(--gold-500); font-weight: 700; font-size: 0.85rem; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 8px; }

/* FAQ accordion */
.faq-item { border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 12px; overflow: hidden; }
.faq-q { width: 100%; text-align: left; background: #fff; border: none; padding: 18px 20px; font-weight: 700; font-size: 1rem; cursor: pointer; display: flex; justify-content: space-between; align-items: center; color: var(--navy-900); }
.faq-q::after { content: "+"; font-size: 1.4rem; color: var(--gold-500); }
.faq-item.open .faq-q::after { content: "–"; }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .2s ease; padding: 0 20px; background: var(--paper-soft); }
.faq-item.open .faq-a { max-height: 600px; padding: 4px 20px 20px; }

/* Forms */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 4px; }
.field.full { grid-column: 1 / -1; }
label { font-weight: 700; font-size: 0.88rem; color: var(--navy-900); }
input, textarea, select {
  padding: 12px 14px; border: 1.5px solid var(--border); border-radius: var(--radius-sm); font-size: 0.95rem; font-family: inherit; color: var(--ink);
  background: #fff;
}
textarea { resize: vertical; min-height: 120px; }
input:focus, textarea:focus, select:focus { border-color: var(--navy-700); }
.hp-field { position: absolute; left: -9999px; }
.form-note { font-size: 0.8rem; color: var(--ink-soft); margin-top: 10px; }
.error-text { color: var(--danger); font-size: 0.8rem; display: none; }
.field.invalid input, .field.invalid textarea { border-color: var(--danger); }
.field.invalid .error-text { display: block; }
.form-alert { padding: 14px 16px; border-radius: var(--radius-sm); margin-bottom: 20px; font-weight: 600; font-size: 0.9rem; }
.form-alert.success { background: #e7f6ed; color: var(--success); border: 1px solid #b7e3c6; }
.form-alert.error { background: #fdecea; color: var(--danger); border: 1px solid #f6c6c2; }

/* WhatsApp send button (contact form) */
.form-btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.form-btn-row .btn { flex: 1 1 200px; }
.btn-whatsapp { background: #25D366; color: #fff; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn-whatsapp:hover { background: #1ebe5b; color: #fff; transform: translateY(-1px); }
.btn-whatsapp svg { flex-shrink: 0; }

/* Tables */
table.compare { width: 100%; border-collapse: collapse; margin: 20px 0; }
table.compare th, table.compare td { border: 1px solid var(--border); padding: 12px 14px; text-align: left; font-size: 0.92rem; }
table.compare th { background: var(--navy-900); color: #fff; }
table.compare tr:nth-child(even) td { background: var(--paper-soft); }

/* Testimonial / proof strip */
.proof-strip { display: flex; flex-wrap: wrap; gap: 30px; align-items: center; justify-content: space-between; }
.proof-item { text-align: center; }
.proof-item strong { display: block; font-size: 2rem; font-family: var(--font-head); color: var(--gold-400); }
.proof-item span { font-size: 0.82rem; color: #cfe0f5; }

/* Blog */
.blog-card img { border-radius: var(--radius) var(--radius) 0 0; aspect-ratio: 16/10; object-fit: cover; }
.blog-card .body { padding: 20px; }
.blog-meta { font-size: 0.78rem; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 8px; }
article.post { max-width: 780px; margin: 0 auto; }
article.post h2 { margin-top: 1.6em; }
article.post ul, article.post ol { padding-left: 1.4em; }
article.post img { border-radius: var(--radius); margin: 24px 0; }

/* CTA band */
.cta-band { background: linear-gradient(135deg, var(--navy-900), var(--navy-700)); color: #fff; border-radius: var(--radius); padding: 44px; text-align: center; }
.cta-band h2 { color: #fff; }
.cta-band p { color: #dbe6f5; }

/* Footer */
.site-footer { background: var(--navy-900); color: #b9cbe3; padding: 56px 0 24px; font-size: 0.9rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 32px; margin-bottom: 36px; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 500px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h4 { color: #fff; font-family: var(--font-body); font-size: 0.95rem; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 14px; }
.site-footer a { color: #b9cbe3; }
.site-footer a:hover { color: var(--gold-400); }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 9px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.12); padding-top: 20px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: 0.8rem; }
.footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.footer-brand img { height: 38px; }
.social-row { display: flex; gap: 10px; margin-top: 14px; }
.social-row a { width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,0.1); display: flex; align-items: center; justify-content: center; font-size: 0.9rem; }
.social-row a:hover { background: var(--gold-500); color: var(--navy-900); }

/* Utility */
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.text-muted { color: var(--ink-soft); }
.badge-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0; }
.badge { background: var(--paper-soft); border: 1px solid var(--border); padding: 6px 14px; border-radius: 20px; font-size: 0.8rem; font-weight: 700; color: var(--navy-800); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.whatsapp-float, .phone-float {
  position: fixed; right: 24px; width: 58px; height: 58px; border-radius: 50%;
  color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-lg); z-index: 400;
  transition: transform .15s ease;
}
.whatsapp-float:hover, .phone-float:hover { transform: scale(1.06); color: #fff; }
.whatsapp-float { bottom: 24px; background: #25D366; }
.phone-float { bottom: 94px; background: var(--navy-900); }
.back-to-top { position: fixed; bottom: 24px; left: 24px; background: var(--navy-900); color: #fff; width: 44px; height: 44px; border-radius: 50%; display: none; align-items: center; justify-content: center; z-index: 400; border: none; cursor: pointer; }
.back-to-top.show { display: flex; }
.notfound { text-align: center; padding: 100px 0; }
.notfound h1 { font-size: 6rem; margin-bottom: 0; color: var(--gold-500); }
