/*
Theme Name: Khatri Consulting
Description: Custom theme for M.F. Khatri Consulting Engineers — HVAC & MEP design, Vadodara.
Version: 1.0.5
Requires at least: 5.8
Requires PHP: 7.4
Author: Khatri Consulting
License: GPL-2.0-or-later
Text Domain: khatri-consulting
*/

:root {
	--navy: #0b2545;
	--navy-2: #13315c;
	--ink: #1b2430;
	--muted: #5b6676;
	--amber: #f2a900;
	--amber-d: #d48f00;
	--paper: #ffffff;
	--alt: #f3f6fa;
	--line: #dde3ec;
	--r: 10px;
	--font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
	--display: 'Barlow Condensed', 'Arial Narrow', Impact, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font: 400 17px/1.65 var(--font); color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy-2); }
h1, h2, h3 { font-family: var(--display); line-height: 1.1; letter-spacing: .01em; color: var(--navy); margin: 0 0 .5em; }
h1 { font-size: clamp(2.4rem, 5.5vw, 4.2rem); font-weight: 700; }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); font-weight: 700; }
h3 { font-size: 1.45rem; font-weight: 600; }
p { margin: 0 0 1em; }
.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }
.narrow { max-width: 860px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip { position: absolute; left: -999px; top: 0; background: var(--amber); color: #000; padding: 8px 14px; z-index: 100; }
.skip:focus { left: 8px; top: 8px; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }

/* top bar + header */
.topbar { background: var(--navy); color: #c9d6ea; font-size: 13px; }
.topbar .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 8px 0; }
.topbar a { color: #fff; text-decoration: none; }
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.96); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 76px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--navy); }
.mark { display: grid; place-items: center; width: 44px; height: 44px; background: var(--navy); color: var(--amber); font: 700 28px/1 var(--display); border-radius: 8px; box-shadow: inset 0 -4px 0 var(--amber); }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { font: 700 1.5rem var(--display); letter-spacing: .02em; }
.brand-text small { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.primary-nav { display: flex; align-items: center; gap: 22px; }
.menu { list-style: none; display: flex; gap: 6px; margin: 0; padding: 0; }
.menu a { display: block; padding: 8px 12px; color: var(--ink); text-decoration: none; font-weight: 500; border-radius: 6px; }
.menu a:hover, .menu a[aria-current], .menu .current-menu-item > a { color: var(--navy); background: var(--alt); box-shadow: inset 0 -3px 0 var(--amber); }
.menu li { position: relative; }
.caret { display: inline-block; width: 6px; height: 6px; margin-left: 4px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); }
.sub-menu { list-style: none; margin: 0; padding: 8px; position: absolute; left: 0; top: 100%; min-width: 280px; background: #fff; border: 1px solid var(--line); border-top: 3px solid var(--amber); border-radius: 0 0 8px 8px; box-shadow: 0 14px 30px rgba(11,37,69,.16); opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .15s, transform .15s, visibility .15s; z-index: 60; }
.menu li:hover > .sub-menu, .menu li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.sub-menu a { padding: 10px 12px; white-space: nowrap; }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 8px; width: 46px; height: 46px; cursor: pointer; }
.nav-toggle i, .nav-toggle i::before, .nav-toggle i::after { display: block; width: 20px; height: 2px; background: var(--navy); margin: auto; position: relative; content: ''; }
.nav-toggle i::before { position: absolute; top: -6px; left: 0; } .nav-toggle i::after { position: absolute; top: 6px; left: 0; }

.logo-img { height: 52px; width: auto; max-width: 100%; }
.brand-foot .logo-img { background: #fff; padding: 8px 12px; border-radius: 8px; height: 56px; }
@media (max-width: 560px) { .logo-img { height: 42px; } }

/* buttons */
.btn { display: inline-block; background: var(--amber); color: #151515; font-weight: 600; text-decoration: none; padding: 14px 26px; border-radius: 8px; border: 0; cursor: pointer; font-size: 16px; font-family: var(--font); transition: transform .15s, background .15s; }
.btn:hover { background: var(--amber-d); transform: translateY(-2px); }
.btn-sm { padding: 10px 18px; font-size: 14px; }
.btn-ghost { background: transparent; color: #fff; box-shadow: inset 0 0 0 2px rgba(255,255,255,.6); }
.btn-ghost:hover { background: rgba(255,255,255,.12); }

/* hero */
.hero, .page-hero { position: relative; color: #fff; background: linear-gradient(105deg, rgba(11,37,69,.94) 0%, rgba(11,37,69,.78) 55%, rgba(11,37,69,.45) 100%), var(--hero) center/cover no-repeat; }
.hero { padding: clamp(70px, 11vw, 150px) 0; }
.page-hero { padding: clamp(48px, 7vw, 90px) 0; }
.hero h1, .page-hero h1 { color: #fff; max-width: 16ch; }
.page-hero h1 { max-width: 22ch; font-size: clamp(2.2rem, 4.6vw, 3.4rem); }
.hero .lede, .page-hero .lede { max-width: 62ch; font-size: 1.15rem; color: #dbe6f5; }
.eyebrow { font: 600 13px var(--font); letter-spacing: .18em; text-transform: uppercase; color: var(--amber); margin-bottom: 14px; }
.eyebrow.dark { color: var(--amber-d); }
.actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 28px; }
.crumbs { font-size: 14px; color: #b9c8de; } .crumbs a { color: #fff; }

/* stats */
.stats { background: var(--navy); color: #fff; border-top: 4px solid var(--amber); }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.stats .grid4 > div { padding: 28px 0; text-align: center; }
.stats b { display: block; font: 700 clamp(2rem, 4vw, 3rem) var(--display); color: var(--amber); }
.stats span { font-size: 14px; color: #c9d6ea; letter-spacing: .04em; }

/* sections */
.section { padding: clamp(56px, 8vw, 100px) 0; }
.section.alt { background: var(--alt); }
.head { max-width: 720px; margin-bottom: 40px; }
.head p { color: var(--muted); }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 24px; }
.card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; text-decoration: none; color: inherit; transition: transform .2s, box-shadow .2s; }
.card:hover { transform: translateY(-5px); box-shadow: 0 14px 32px rgba(11,37,69,.14); }
.card .ph { aspect-ratio: 16/10; background-size: cover; background-position: center; border-bottom: 4px solid var(--amber); }
.card .body { display: flex; flex-direction: column; gap: 8px; padding: 22px; flex: 1; }
.card h3 { margin: 0; }
.muted { color: var(--muted); font-size: 15px; }
.more { margin-top: auto; padding-top: 10px; color: var(--navy-2); font-weight: 600; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.split img { border-radius: var(--r); box-shadow: 0 18px 40px rgba(11,37,69,.2); border-bottom: 6px solid var(--amber); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 64px); }
.values > div { border-top: 4px solid var(--amber); padding-top: 14px; }
.values p { color: var(--muted); font-size: 15px; }
.cta { background: var(--navy-2); color: #fff; text-align: center; padding: clamp(48px, 7vw, 84px) 0; }
.cta h2 { color: #fff; } .cta p { color: #c9d6ea; }

/* inner pages */
.block { margin-bottom: 44px; }
.block h2 { font-size: 1.9rem; padding-bottom: 8px; border-bottom: 3px solid var(--amber); display: inline-block; }
.ticks { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 10px; }
.ticks li { position: relative; padding: 12px 14px 12px 44px; background: var(--alt); border-radius: 8px; }
.ticks li::before { content: ''; position: absolute; left: 16px; top: 1.15em; width: 14px; height: 8px; border-left: 3px solid var(--amber-d); border-bottom: 3px solid var(--amber-d); transform: rotate(-45deg); }
.projects { display: grid; gap: 16px; }
.proj { padding: 22px 24px; border: 1px solid var(--line); border-left: 5px solid var(--amber); border-radius: var(--r); background: #fff; }
.proj h3 { margin-bottom: 6px; } .proj p { margin: 0; color: var(--muted); }
.entry > * + * { margin-top: 1em; }

.with-side { display: grid; grid-template-columns: 340px 1fr; gap: clamp(28px, 4vw, 56px); align-items: start; }
.side-imgs { display: grid; gap: 18px; position: sticky; top: 100px; }
.side-imgs img { width: 100%; border-radius: var(--r); border-bottom: 5px solid var(--amber); box-shadow: 0 12px 28px rgba(11,37,69,.16); }
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.gallery img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: var(--r); }
@media (max-width: 900px) { .with-side { grid-template-columns: 1fr; } .side-imgs { position: static; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); } .gallery { grid-template-columns: repeat(2, 1fr); } }

/* contact */
.contact { display: grid; grid-template-columns: 1fr 1.3fr; gap: clamp(28px, 5vw, 64px); }
.contact dt { font: 600 13px var(--font); letter-spacing: .14em; text-transform: uppercase; color: var(--amber-d); margin-top: 18px; }
.contact dd { margin: 4px 0 0; }
.form { background: var(--alt); padding: clamp(22px, 4vw, 40px); border-radius: var(--r); border-top: 5px solid var(--amber); }
.form label { display: block; font-weight: 500; margin-bottom: 16px; }
.form input, .form textarea { width: 100%; margin-top: 6px; padding: 12px 14px; font: inherit; border: 1px solid #b8c3d3; border-radius: 8px; background: #fff; }
.hp { position: absolute; left: -9999px; }
.notice { padding: 12px 16px; border-radius: 8px; font-weight: 500; }
.notice.ok { background: #e3f6e8; color: #17613a; } .notice.err { background: #fde8e6; color: #9b2118; }

/* footer */
.site-footer { background: #071a31; color: #b9c8de; padding-top: 56px; font-size: 15px; }
.site-footer a { color: #fff; text-decoration: none; } .site-footer a:hover { color: var(--amber); }
.site-footer h3 { color: #fff; font-size: 1.2rem; letter-spacing: .08em; text-transform: uppercase; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.cols { display: grid; grid-template-columns: 1.3fr 1fr 1.2fr .8fr; gap: 36px; }
.brand-foot, .brand-foot .brand-text strong { color: #fff; } .brand-foot { margin-bottom: 14px; }
.hours { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0; } .hours dd { margin: 0; }
.legal { margin-top: 40px; padding: 20px 0; border-top: 1px solid rgba(255,255,255,.1); font-size: 13px; }

/* CTAs */
.cta-bar { display: none; }
.wa-float { position: fixed; right: 20px; bottom: 20px; z-index: 70; width: 56px; height: 56px; display: grid; place-items: center; background: #25d366; color: #fff; border-radius: 50%; box-shadow: 0 8px 22px rgba(0,0,0,.28); transition: transform .15s; }
.wa-float:hover { transform: scale(1.08); }
@media (max-width: 760px) {
	.wa-float { display: none; }
	.cta-bar { display: grid; grid-template-columns: 1fr 1fr 1.2fr; position: fixed; left: 0; right: 0; bottom: 0; z-index: 80; background: var(--navy); box-shadow: 0 -4px 18px rgba(0,0,0,.25); padding-bottom: env(safe-area-inset-bottom); }
	.cta-bar a { text-align: center; padding: 14px 6px; font: 600 15px var(--font); color: #fff; text-decoration: none; border-right: 1px solid rgba(255,255,255,.14); }
	.cta-bar .cta-wa { background: #1fa855; }
	.cta-bar .cta-quote { background: var(--amber); color: #151515; border-right: 0; }
	body { padding-bottom: 52px; }
}

/* motion */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s, transform .6s; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } .btn, .card { transition: none; } }

/* responsive */
@media (max-width: 900px) {
	.nav-toggle { display: block; }
	.primary-nav { position: absolute; inset: 100% 0 auto 0; flex-direction: column; align-items: stretch; background: #fff; padding: 12px 16px 20px; border-bottom: 1px solid var(--line); display: none; }
	.primary-nav.open { display: flex; }
	.menu { flex-direction: column; }
	.sub-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; border-left: 3px solid var(--amber); border-radius: 0; margin-left: 12px; padding: 0 0 0 4px; min-width: 0; }
	.sub-menu a { white-space: normal; }
	.split, .two, .contact { grid-template-columns: 1fr; }
	.grid4 { grid-template-columns: repeat(2, 1fr); }
	.cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
	body { font-size: 16px; }
	.topbar .wrap { flex-direction: column; gap: 2px; }
	.cols { grid-template-columns: 1fr; }
}
.no-js .reveal { opacity: 1; transform: none; }
