/* ============================================================
   NISARGA CONSTRUCTION — Warm & Earthy Design System
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,400;12..96,500;12..96,600;12..96,700;12..96,800&family=Hanken+Grotesk:wght@400;500;600;700&family=Instrument+Serif:ital@0;1&display=swap');

:root {
  /* --- Warm earthy palette --- */
  --sand-50:  #FBF7F1;
  --sand-100: #F5EEE3;
  --sand-150: #EFE6D8;
  --sand-200: #E8DBC9;
  --sand-300: #D8C4AB;
  --clay-400: #D19C72;
  --terracotta: #C6552E;
  --terracotta-deep: #A23F1F;
  --rust: #7E3A22;
  --espresso: #2A1E16;
  --cocoa: #4A3A2D;
  --stone: #8C7B6B;
  --olive: #6C6A4C;
  --line: rgba(39,30,23,0.12);
  --line-soft: rgba(39,30,23,0.07);

  --shadow-sm: 0 2px 10px rgba(39,30,23,0.08);
  --shadow-md: 0 18px 50px -20px rgba(39,30,23,0.30);
  --shadow-lg: 0 40px 90px -30px rgba(39,30,23,0.45);

  --font-display: 'Bricolage Grotesque', sans-serif;
  --font-body: 'Hanken Grotesk', sans-serif;
  --font-serif: 'Instrument Serif', serif;

  --container: 1280px;
  --pad: clamp(20px, 5vw, 80px);
  --radius: 4px;
}

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

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
  font-family: var(--font-body);
  background: var(--sand-50);
  color: var(--espresso);
  line-height: 1.6;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

::selection { background: var(--terracotta); color: var(--sand-50); }

/* ---------- Typography ---------- */
.eyebrow {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--terracotta);
  display: inline-flex;
  align-items: center;
  gap: 0.7em;
}
.eyebrow::before {
  content: "";
  width: 28px; height: 1.5px;
  background: var(--terracotta);
  display: inline-block;
}
.eyebrow.center::after {
  content: "";
  width: 28px; height: 1.5px;
  background: var(--terracotta);
  display: inline-block;
}

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.04; letter-spacing: -0.02em; color: var(--espresso); }

.display {
  font-size: clamp(2.8rem, 8vw, 7.5rem);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.035em;
}
.h-xl { font-size: clamp(2.2rem, 5.5vw, 4.6rem); line-height: 1.0; }
.h-lg { font-size: clamp(1.8rem, 4vw, 3.2rem); }
.h-md { font-size: clamp(1.4rem, 2.6vw, 2.1rem); }

.serif-accent { font-family: var(--font-serif); font-weight: 400; font-style: italic; letter-spacing: -0.01em; }

.lead { font-size: clamp(1.05rem, 1.5vw, 1.35rem); color: var(--cocoa); line-height: 1.65; font-weight: 400; }
.muted { color: var(--stone); }
.tcolor { color: var(--terracotta); }

/* ---------- Layout ---------- */
.container { max-width: var(--container); margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); }
.section { padding: clamp(72px, 11vw, 160px) 0; position: relative; }
.section-tight { padding: clamp(48px, 7vw, 96px) 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.7em;
  font-family: var(--font-body); font-weight: 600; font-size: 0.92rem;
  letter-spacing: 0.04em;
  padding: 1.05em 1.9em;
  border-radius: 100px;
  cursor: pointer; border: none;
  transition: transform .35s cubic-bezier(.2,.7,.2,1), background .35s, color .35s, box-shadow .35s;
  position: relative; overflow: hidden;
}
.btn .arrow { transition: transform .35s cubic-bezier(.2,.7,.2,1); }
.btn:hover .arrow { transform: translateX(5px); }
.btn-primary { background: var(--terracotta); color: var(--sand-50); box-shadow: 0 12px 30px -12px rgba(184,92,56,0.8); }
.btn-primary:hover { background: var(--terracotta-deep); transform: translateY(-3px); box-shadow: 0 20px 40px -14px rgba(152,72,40,0.85); }
.btn-dark { background: var(--espresso); color: var(--sand-100); }
.btn-dark:hover { background: #160f0a; transform: translateY(-3px); }
.btn-ghost { background: transparent; color: var(--espresso); border: 1.5px solid var(--line); }
.btn-ghost:hover { border-color: var(--espresso); transform: translateY(-3px); }
.btn-light { background: var(--sand-50); color: var(--espresso); }
.btn-light:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }

/* ---------- Navigation ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px var(--pad);
  transition: background .4s, padding .4s, box-shadow .4s, border-color .4s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(251,247,241,0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 14px var(--pad);
  border-bottom: 1px solid var(--line-soft);
  box-shadow: 0 8px 30px -24px rgba(39,30,23,0.5);
}
.nav.on-dark:not(.scrolled) { color: var(--sand-50); }
.nav.on-dark:not(.scrolled) .nav-links a { color: var(--sand-50); }

.wordmark { display: inline-flex; align-items: center; }
.wordmark img { display: block; height: 34px; width: auto; transition: opacity .35s; }
.wordmark .logo-light { display: none; }
/* On dark hero (nav not yet scrolled) → light logo */
.nav.on-dark:not(.scrolled) .wordmark .logo-light { display: block; }
.nav.on-dark:not(.scrolled) .wordmark .logo-dark { display: none; }
.nav.scrolled .wordmark img { height: 30px; }
/* Footer & mobile menu sit on dark → always light logo */
.footer .wordmark .logo-light, .mobile-menu .wordmark .logo-light { display: block; }
.footer .wordmark .logo-dark, .mobile-menu .wordmark .logo-dark { display: none; }

.nav-links { display: flex; align-items: center; gap: 34px; }
.nav-links a { font-weight: 500; font-size: 0.95rem; color: var(--cocoa); transition: color .25s; position: relative; }
.nav-links a::after { content: ""; position: absolute; left: 0; bottom: -5px; width: 0; height: 1.5px; background: var(--terracotta); transition: width .3s; }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
.nav-links a:hover, .nav-links a.active { color: var(--terracotta); }
.nav-right { display: flex; align-items: center; gap: 18px; }

.nav-toggle { display: none; background: none; border: none; cursor: pointer; flex-direction: column; gap: 5px; padding: 8px; }
.nav-toggle span { width: 24px; height: 2px; background: currentColor; transition: .3s; }

.mobile-menu {
  position: fixed; inset: 0; z-index: 99;
  background: var(--espresso); color: var(--sand-100);
  display: flex; flex-direction: column; justify-content: center; gap: 8px;
  padding: var(--pad);
  transform: translateY(-100%); transition: transform .6s cubic-bezier(.7,0,.2,1);
}
.mobile-menu.open { transform: translateY(0); }
.mobile-menu a { font-family: var(--font-display); font-size: clamp(2rem, 9vw, 3.4rem); font-weight: 700; color: var(--sand-100); padding: 10px 0; border-bottom: 1px solid rgba(245,238,227,0.12); transition: color .3s, padding-left .3s; }
.mobile-menu a:hover { color: var(--clay-400); padding-left: 14px; }
.mobile-menu .mm-foot { margin-top: 34px; font-family: var(--font-body); color: var(--clay-400); font-size: 0.95rem; }

/* ---------- Reveal animations ----------
   Robust pattern: content is VISIBLE by default. The hidden
   pre-animation state is only applied when JS is active
   (html.has-js) AND motion is allowed. So if JS fails, motion
   is reduced, or a capture context freezes transitions, content
   still shows. */
@media (prefers-reduced-motion: no-preference) {
  .has-js [data-reveal]:not(.in) { opacity: 0; transform: translateY(38px); }
  .has-js [data-reveal="left"]:not(.in) { transform: translateX(-50px); }
  .has-js [data-reveal="right"]:not(.in) { transform: translateX(50px); }
  .has-js [data-reveal="scale"]:not(.in) { transform: scale(.92); }
  .has-js .reveal-lines:not(.in) .line > span { transform: translateY(105%); }
}
[data-reveal] { transition: opacity 1s cubic-bezier(.2,.7,.2,1), transform 1s cubic-bezier(.2,.7,.2,1); will-change: opacity, transform; }
[data-delay="1"] { transition-delay: .1s; }
[data-delay="2"] { transition-delay: .2s; }
[data-delay="3"] { transition-delay: .3s; }
[data-delay="4"] { transition-delay: .4s; }
[data-delay="5"] { transition-delay: .5s; }

/* line-by-line mask reveal for headings */
.reveal-lines .line { display: block; overflow: hidden; }
.reveal-lines .line > span { display: block; transition: transform 1.1s cubic-bezier(.16,1,.3,1); }
.reveal-lines.in .line:nth-child(2) > span { transition-delay: .08s; }
.reveal-lines.in .line:nth-child(3) > span { transition-delay: .16s; }

/* ---------- Parallax ---------- */
.parallax-wrap { position: relative; overflow: hidden; }
.parallax-img { position: absolute; inset: -12% 0; width: 100%; height: 124%; object-fit: cover; will-change: transform; }

/* ---------- Cards ---------- */
.card { background: var(--sand-50); border: 1px solid var(--line-soft); border-radius: 14px; padding: 38px 34px; transition: transform .5s cubic-bezier(.2,.7,.2,1), box-shadow .5s, border-color .5s; }
.card:hover { transform: translateY(-8px); box-shadow: var(--shadow-md); border-color: transparent; }

/* ---------- FAQ ---------- */
.faq-item { border-top: 1px solid var(--line); }
.faq-item:last-child { border-bottom: 1px solid var(--line); }
.faq-q { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 30px 4px; cursor: pointer; font-family: var(--font-display); font-weight: 600; font-size: clamp(1.05rem, 2vw, 1.45rem); color: var(--espresso); transition: color .3s; }
.faq-q:hover { color: var(--terracotta); }
.faq-icon { flex-shrink: 0; width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid var(--line); display: grid; place-items: center; transition: .4s; position: relative; }
.faq-icon::before, .faq-icon::after { content: ""; position: absolute; background: currentColor; transition: .4s; }
.faq-icon::before { width: 14px; height: 2px; }
.faq-icon::after { width: 2px; height: 14px; }
.faq-item.open .faq-icon { background: var(--terracotta); border-color: var(--terracotta); color: var(--sand-50); transform: rotate(135deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .55s cubic-bezier(.4,0,.2,1); }
.faq-a-inner { padding: 0 4px 30px; max-width: 80ch; color: var(--cocoa); font-size: 1.05rem; }

/* ---------- Footer ---------- */
.footer { background: var(--espresso); color: var(--sand-200); padding: clamp(60px, 9vw, 120px) 0 40px; position: relative; overflow: hidden; }
.footer a { color: var(--sand-200); transition: color .25s; }
.footer a:hover { color: var(--clay-400); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.3fr; gap: 40px; padding-bottom: 60px; border-bottom: 1px solid rgba(245,238,227,0.12); }
.footer-social { display: flex; gap: 18px; margin-top: 26px; flex-wrap: wrap; }
.footer-social a { font-size: 0.85rem; font-weight: 600; letter-spacing: 0.03em; }
.footer-col h4 { color: var(--sand-50); font-size: 0.82rem; letter-spacing: 0.18em; text-transform: uppercase; margin-bottom: 18px; }
.footer-col a { display: block; margin-bottom: 12px; color: var(--sand-300); font-size: 0.98rem; }
.footer-bottom { display: flex; justify-content: space-between; padding-top: 30px; color: var(--sand-300); font-size: 0.85rem; flex-wrap: wrap; gap: 10px; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Marquee ---------- */
.marquee { display: flex; overflow: hidden; user-select: none; gap: 0; }
.marquee-track { display: flex; flex-shrink: 0; align-items: center; gap: 28px; animation: marquee 32s linear infinite; padding-right: 28px; }
@keyframes marquee { to { transform: translateX(-100%); } }
.marquee .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--terracotta); flex-shrink: 0; }
.marquee .item { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.4rem, 3.2vw, 2.6rem); white-space: nowrap; color: var(--espresso); }
.marquee .item.outline { color: transparent; -webkit-text-stroke: 1.4px var(--espresso); }

/* ---------- Misc ---------- */
.tag { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 100px; border: 1px solid var(--line); font-size: 0.8rem; font-weight: 600; letter-spacing: 0.04em; color: var(--cocoa); background: var(--sand-50); }
.divider { height: 1px; background: var(--line); border: none; }
.kicker-num { font-family: var(--font-serif); font-style: italic; color: var(--terracotta); font-size: 1.3rem; }

.scroll-progress { position: fixed; top: 0; left: 0; height: 3px; background: var(--terracotta); z-index: 200; width: 0; }

/* count-up stat */
.stat-num { font-family: var(--font-display); font-weight: 800; font-size: clamp(2.8rem, 6vw, 5rem); line-height: 1; letter-spacing: -0.03em; color: var(--espresso); }

/* ---------- Forms ---------- */
.field { margin-bottom: 22px; }
.field label { display: block; font-size: 0.82rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--stone); margin-bottom: 9px; }
.field input, .field select, .field textarea {
  width: 100%; font-family: var(--font-body); font-size: 1rem; color: var(--espresso);
  background: var(--sand-50); border: 1.5px solid var(--line); border-radius: 10px;
  padding: 15px 17px; transition: border-color .3s, box-shadow .3s, background .3s;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--terracotta); box-shadow: 0 0 0 4px rgba(184,92,56,0.12); background: #fff; }
.field textarea { resize: vertical; min-height: 130px; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .nav-links, .nav-right .btn { display: none; }
  .nav-toggle { display: flex; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
  .reveal-lines .line > span { transform: none !important; }
  .parallax-img { transform: none !important; }
}
