/* ============================================================
   Build Bench Pvt Ltd — Construction, Interiors & Real Estate
   Modern & minimal, single-page. No build step required.
   Design tokens live in :root — change brand colors here.
   ============================================================ */

:root {
  /* Brand palette — warm, grounded, premium */
  --ink:        #15110d;   /* near-black, warm */
  --ink-soft:   #3a322a;
  --paper:      #faf7f2;   /* off-white background */
  --paper-2:    #f1ebe1;   /* tinted section background */
  --line:       #e4dccf;   /* hairline borders */
  --muted:      #7a7065;   /* secondary text */
  --accent:     #bf7733;   /* bronze / amber */
  --accent-dk:  #9c5e23;
  --white:      #ffffff;

  /* Type */
  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;

  /* Layout */
  --container: 1180px;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 18px 50px -18px rgba(21, 17, 13, 0.28);
  --shadow-sm: 0 8px 24px -12px rgba(21, 17, 13, 0.25);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  font-size: 1rem;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent; /* no grey flash on tap (mobile) */
}
/* lock scroll while the mobile menu is open (non-Lenis / reduced-motion path) */
body.menu-open { overflow: hidden; touch-action: none; }

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

h1, h2, h3 { font-family: var(--font-display); line-height: 1.08; font-weight: 600; letter-spacing: -0.02em; }

/* Gutters respect notch safe-areas in landscape; tighten a touch on phones */
.container {
  width: 100%; max-width: var(--container); margin-inline: auto;
  padding-left: max(20px, env(safe-area-inset-left));
  padding-right: max(20px, env(safe-area-inset-right));
}
@media (min-width: 600px) { .container { padding-left: max(24px, env(safe-area-inset-left)); padding-right: max(24px, env(safe-area-inset-right)); } }

.accent { color: var(--accent); }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 8px;
  transition: top 0.2s;
}
.skip-link:focus { top: 12px; }

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: var(--ink);
  --btn-fg: var(--paper);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--font-display); font-weight: 500; font-size: 0.95rem;
  background: var(--btn-bg); color: var(--btn-fg);
  padding: 12px 22px; border-radius: 100px; border: 1px solid transparent;
  cursor: pointer; transition: transform 0.25s var(--ease), background 0.25s, box-shadow 0.25s, color 0.25s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn--primary { --btn-bg: var(--accent); --btn-fg: #fff; box-shadow: var(--shadow-sm); }
.btn--primary:hover { --btn-bg: var(--accent-dk); }
.btn--ghost { --btn-bg: transparent; --btn-fg: var(--ink); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--ink); }
.btn--light { --btn-bg: var(--paper); --btn-fg: var(--ink); }
.btn--whatsapp { --btn-bg: #1fae54; --btn-fg: #fff; }
.btn--whatsapp:hover { --btn-bg: #18914a; }
.btn--whatsapp svg { width: 18px; height: 18px; }
.btn--lg { padding: 15px 30px; font-size: 1.02rem; }
.btn--block { width: 100%; }

/* ---------- Header / Nav ---------- */
.header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  padding: 18px 0;
  transition: padding 0.35s var(--ease), background 0.35s, box-shadow 0.35s;
}
.header.is-scrolled {
  padding: 10px 0;
  background: rgba(250, 247, 242, 0.82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  box-shadow: 0 1px 0 var(--line);
}
.header__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }

.logo { display: inline-flex; align-items: center; gap: 12px; font-family: var(--font-display); font-weight: 700; letter-spacing: -0.02em; }
.logo__mark {
  display: inline-grid; place-items: center;
  width: 38px; height: 38px; border-radius: 10px;
  background: var(--accent); color: #fff; font-size: 0.78rem; font-weight: 700; letter-spacing: 0;
}
.logo__text { font-size: 1.12rem; color: var(--ink); }
.logo--light .logo__text { color: var(--paper); }

.nav { display: flex; align-items: center; gap: 30px; }
.nav__link { position: relative; font-size: 0.96rem; color: var(--ink-soft); transition: color 0.2s; }
.nav__link::after {
  content: ''; position: absolute; left: 0; bottom: -6px; height: 2px; width: 0;
  background: var(--accent); transition: width 0.3s var(--ease);
}
.nav__link:hover { color: var(--ink); }
.nav__link:hover::after, .nav__link.is-active::after { width: 100%; }
.nav__link.is-active { color: var(--ink); }
.nav__cta { margin-left: 6px; }

.nav-toggle {
  display: none; flex-direction: column; gap: 5px; padding: 8px;
  background: none; border: 0; cursor: pointer;
}
.nav-toggle span { width: 26px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform 0.3s var(--ease), opacity 0.2s; }
.nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100svh; display: flex; align-items: center;
  color: var(--paper); overflow: hidden;
}
.hero__bg {
  position: absolute; inset: -8% 0; background-size: cover; background-position: center;
  background-color: #2a2118; will-change: transform; z-index: 0;
}
.hero__overlay {
  position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(115deg, rgba(13,10,6,0.9) 0%, rgba(13,10,6,0.64) 48%, rgba(13,10,6,0.42) 100%),
    linear-gradient(to top, rgba(13,10,6,0.55), transparent 38%);
}
.hero__inner { position: relative; z-index: 2; padding-block: 120px 90px; max-width: 800px; }
.hero__title, .hero__lead { text-shadow: 0 2px 24px rgba(0,0,0,0.35); }
.hero__eyebrow {
  font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.22em;
  font-size: 0.78rem; color: var(--accent); margin-bottom: 22px; font-weight: 600;
}
.hero__title { font-size: clamp(2.6rem, 6vw, 4.6rem); font-weight: 700; margin-bottom: 24px; }
.hero__lead { font-size: clamp(1.05rem, 2.2vw, 1.28rem); max-width: 560px; color: rgba(250,247,242,0.86); margin-bottom: 36px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hero__actions .btn--ghost { --btn-fg: #fff; border-color: rgba(255,255,255,0.45); }
.hero__actions .btn--ghost:hover { border-color: #fff; background: rgba(255,255,255,0.08); }

.hero__scroll {
  position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  font-family: var(--font-display); font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: rgba(250,247,242,0.7);
}
.hero__scroll-line { width: 1px; height: 42px; background: rgba(250,247,242,0.5); position: relative; overflow: hidden; }
.hero__scroll-line::after { content: ''; position: absolute; top: -100%; left: 0; width: 100%; height: 100%; background: var(--accent); animation: scrollCue 1.8s var(--ease) infinite; }
@keyframes scrollCue { 0% { top: -100%; } 60%,100% { top: 100%; } }

/* ---------- Sections ---------- */
.section { padding: clamp(70px, 10vw, 120px) 0; }
.section--tint { background: var(--paper-2); }
.section__head { max-width: 640px; margin-bottom: 56px; }
.section__eyebrow {
  font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.2em;
  font-size: 0.76rem; color: var(--accent); font-weight: 600; margin-bottom: 14px;
}
.section__title { font-size: clamp(1.9rem, 4vw, 2.85rem); margin-bottom: 16px; }
.section__sub { color: var(--muted); font-size: 1.08rem; }

/* ---------- Services / What we do ---------- */
.services { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.service {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 28px; transition: transform 0.35s var(--ease), box-shadow 0.35s, border-color 0.35s;
}
.service:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: transparent; }
.service__icon {
  width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center;
  background: var(--paper-2); color: var(--accent); margin-bottom: 20px;
  transition: background 0.35s, color 0.35s;
}
.service:hover .service__icon { background: var(--accent); color: #fff; }
.service__icon svg { width: 26px; height: 26px; }
.service__title { font-size: 1.22rem; margin-bottom: 10px; }
.service p { color: var(--muted); font-size: 0.98rem; }

/* ---------- Work: filter pills ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 28px; }
.filter {
  font-family: var(--font-display); font-size: 0.9rem; font-weight: 500;
  padding: 9px 18px; border-radius: 100px; border: 1px solid var(--line);
  background: transparent; color: var(--ink-soft); cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.filter:hover { border-color: var(--ink); }
.filter.is-active { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* ---------- Work / Gallery (masonry) ---------- */
.gallery { column-count: 3; column-gap: 16px; }
.gallery__item.is-hidden { display: none; }
.gallery__item {
  display: block; width: 100%; margin: 0 0 16px; padding: 0; border: 0; cursor: pointer;
  break-inside: avoid; position: relative; overflow: hidden; border-radius: var(--radius);
  background: linear-gradient(135deg, #d8cdba, #bcae97); box-shadow: var(--shadow-sm);
  -webkit-appearance: none; appearance: none;
}
.gallery__item img { width: 100%; height: auto; display: block; transition: transform 0.6s var(--ease); }
.gallery__item:hover img { transform: scale(1.05); }
.gallery__cap {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 30px 16px 14px; text-align: left;
  color: #fff; font-family: var(--font-display); font-weight: 500; font-size: 0.95rem;
  background: linear-gradient(to top, rgba(13,10,6,0.82), transparent);
  opacity: 0; transform: translateY(8px); transition: opacity 0.3s, transform 0.3s;
}
.gallery__item:hover .gallery__cap,
.gallery__item:focus-visible .gallery__cap { opacity: 1; transform: none; }
.gallery__item:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center;
  padding: 24px; background: rgba(11,8,5,0.93);
  opacity: 0; visibility: hidden; transition: opacity 0.3s, visibility 0.3s;
}
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox__stage { margin: 0; max-width: min(1100px, 92vw); display: flex; flex-direction: column; align-items: center; }
.lightbox__img {
  max-width: 100%; max-height: 82vh; object-fit: contain; border-radius: 8px;
  box-shadow: 0 24px 70px rgba(0,0,0,0.55); background: #1a1610;
}
.lightbox__cap { margin-top: 14px; color: rgba(255,255,255,0.85); font-family: var(--font-display); font-size: 0.95rem; }
.lightbox__btn {
  position: absolute; width: 48px; height: 48px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255,255,255,0.13); color: #fff; font-size: 1.7rem; line-height: 1;
  display: grid; place-items: center; transition: background 0.2s; backdrop-filter: blur(4px);
}
.lightbox__btn:hover { background: rgba(255,255,255,0.28); }
.lightbox__close { top: max(18px, env(safe-area-inset-top)); right: 18px; font-size: 1.9rem; }
.lightbox__prev { left: 14px; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 14px; top: 50%; transform: translateY(-50%); }

/* ---------- Contact (WhatsApp / call — no form) ---------- */
.contact { max-width: 600px; margin-inline: auto; text-align: center; }
.contact__lead { color: var(--muted); margin: 16px 0 28px; }
.contact__quick { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-bottom: 36px; }
.contact__list { display: grid; gap: 18px; justify-items: center; }
.contact__list li { display: grid; gap: 3px; }
.contact__label { font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.72rem; color: var(--muted); }
.contact__list a { font-size: 1.08rem; transition: color 0.2s; }
.contact__list a:hover { color: var(--accent); }

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: rgba(250,247,242,0.72); padding: 40px 0; }
.footer__bottom { display: flex; justify-content: space-between; align-items: center; gap: 16px; font-size: 0.88rem; color: rgba(250,247,242,0.55); flex-wrap: wrap; }
.footer__bottom .logo__text { font-size: 1.05rem; }

/* ---------- Mobile menu backdrop ---------- */
.nav-backdrop {
  position: fixed; inset: 0; z-index: 95;
  background: rgba(21,17,13,0.45); backdrop-filter: blur(2px);
  opacity: 0; visibility: hidden; transition: opacity 0.35s, visibility 0.35s;
}
.nav-backdrop.is-open { opacity: 1; visibility: visible; }

/* ---------- Back to top ---------- */
.to-top {
  position: fixed; right: 22px; bottom: max(22px, env(safe-area-inset-bottom)); z-index: 90;
  width: 48px; height: 48px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--ink); color: var(--paper); display: grid; place-items: center;
  opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: opacity 0.3s, transform 0.3s, visibility 0.3s, background 0.2s;
  box-shadow: var(--shadow-sm);
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.to-top:hover { background: var(--accent); }
.to-top svg { width: 20px; height: 20px; }

/* ---------- Reveal animations ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
/* stagger children within a grid */
.services .reveal:nth-child(3n+2) { transition-delay: 0.07s; }
.services .reveal:nth-child(3n+3) { transition-delay: 0.14s; }
.gallery .reveal:nth-child(3n+2) { transition-delay: 0.07s; }
.gallery .reveal:nth-child(3n+3) { transition-delay: 0.14s; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 940px) {
  .gallery { column-count: 2; }
  .contact { grid-template-columns: 1fr; gap: 36px; }
}

@media (max-width: 760px) {
  /* Mobile nav: full-height slide-in panel */
  .nav {
    position: fixed; inset: 0 0 0 auto; width: min(82vw, 340px); height: 100dvh;
    flex-direction: column; align-items: stretch; justify-content: center; gap: 8px;
    background: var(--paper); transform: translateX(100%); z-index: 105;
    padding: 88px max(28px, env(safe-area-inset-right)) calc(28px + env(safe-area-inset-bottom)) 28px;
    transition: transform 0.4s var(--ease); box-shadow: var(--shadow); overflow-y: auto;
  }
  .nav.is-open { transform: translateX(0); }
  .nav__link { font-size: 1.2rem; padding: 14px 4px; } /* taller tap targets */
  .nav__link::after { display: none; }
  .nav__cta { margin: 12px 0 0; padding: 15px 22px; justify-content: center; }
  .nav-toggle { display: flex; z-index: 110; margin-right: -8px; }

  /* Tighter vertical rhythm on phones */
  .section { padding: 64px 0; }
  .section__head { margin-bottom: 36px; }
  .services { grid-template-columns: 1fr; }
  .gallery { column-count: 1; }
  .service { padding: 28px 24px; }

  /* Hero: easier-to-read sizing + thumb-friendly full-width buttons */
  .hero__inner { padding-block: 110px 96px; }
  .hero__title { font-size: clamp(2.2rem, 9vw, 3rem); }
  .hero__lead { font-size: 1.06rem; }
  .hero__actions { width: 100%; }
  .hero__actions .btn { flex: 1 1 auto; }

  .footer__bottom { flex-direction: column; align-items: flex-start; }
  .contact__quick .btn { flex: 1 1 auto; justify-content: center; }
  .lightbox__btn { width: 44px; height: 44px; font-size: 1.5rem; }
  .lightbox__prev { left: 8px; }
  .lightbox__next { right: 8px; }
}

@media (max-width: 380px) {
  .hero__actions { flex-direction: column; }
  .hero__actions .btn { width: 100%; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
