/* =========================================================
   Ali & Jaiswal Realestate Pvt. Ltd. — site styles
   ========================================================= */

/* ---------- Design tokens ---------- */
:root {
  --white: #FFFFFF;
  --paper: #FBFAF6;          /* alternating section background */
  --ink: #0E1B2B;            /* primary navy */
  --gold: #C9A227;           /* accent: buttons, rings, text on navy */
  --gold-text: #8A6A0C;      /* darker gold for small text on light bg (WCAG AA 4.5:1+) */
  --muted: #4A5566;          /* secondary text on light bg */
  --line: rgba(14, 27, 43, 0.10);
  --on-ink: #FFFFFF;
  --on-ink-muted: rgba(255, 255, 255, 0.78);

  --font-head: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --radius: 8px;
  --radius-lg: 14px;
  --container: 1200px;
  --gutter: clamp(16px, 5vw, 48px);
  --section-y: clamp(64px, 9vw, 104px);
  --header-h: 80px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
h1, h2, h3 { margin: 0; font-family: var(--font-head); font-weight: 600; line-height: 1.15; }
p { margin: 0; }
a { color: inherit; }
ul[role="list"] { list-style: none; margin: 0; padding: 0; }
address { font-style: normal; }

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

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  background: var(--ink);
  color: var(--white);
  padding: 10px 16px;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 600;
}
.skip-link:focus { top: 12px; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- Shared pieces ---------- */
.eyebrow {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-text);
}

.section { padding: var(--section-y) 0; position: relative; }
.section-alt { background: var(--paper); }

.section-head { text-align: center; margin-bottom: clamp(32px, 5vw, 52px); }
.section-head h2 {
  margin-top: 10px;
  font-size: clamp(1.75rem, 3.2vw, 2.4rem);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 28px;
  border-radius: var(--radius);
  font: 600 0.95rem/1 var(--font-body);
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: background-color .2s, color .2s, border-color .2s, transform .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn-gold { background: var(--gold); color: var(--ink); border-color: var(--gold); }
.btn-gold:hover { background: #B8921C; border-color: #B8921C; }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: var(--white); }

.btn-row { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }

/* Large faint logo watermark behind a section */
.has-watermark { position: relative; overflow: hidden; isolation: isolate; }
.watermark {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(680px, 110vw);
  height: auto;
  transform: translate(-50%, -50%);
  opacity: 0.05;
  pointer-events: none;
  user-select: none;
  z-index: -1;
}

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 24px;
  min-height: var(--header-h);
  padding-top: 10px;
  padding-bottom: 10px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
}
.brand-logo { width: 48px; height: 48px; object-fit: contain; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-name { font-family: var(--font-head); font-weight: 600; font-size: 1.15rem; letter-spacing: 0.02em; }
.brand-sub { margin-top: 5px; font-size: 0.64rem; font-weight: 600; letter-spacing: 0.18em; color: var(--muted); }

.main-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.main-nav a {
  display: inline-block;
  padding: 10px 10px;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink);
  text-decoration: none;
  border-radius: 6px;
  position: relative;
}
.main-nav a::after {
  content: "";
  position: absolute;
  left: 10px; right: 10px; bottom: 4px;
  height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .2s;
}
.main-nav a:hover::after,
.main-nav a[aria-current="true"]::after,
.main-nav a[aria-current="page"]::after { transform: scaleX(1); }

@media (max-width: 720px) {
  :root { --header-h: 108px; }
  .header-inner { justify-content: center; gap: 2px; padding-top: 8px; padding-bottom: 2px; }
  .brand-logo { width: 38px; height: 38px; }
  .brand-name { font-size: 1rem; }
  .brand-sub { font-size: 0.58rem; margin-top: 4px; }
  .main-nav ul { justify-content: center; gap: 0; }
  .main-nav a { padding: 8px 7px; font-size: 0.84rem; }
  .main-nav a::after { left: 7px; right: 7px; bottom: 3px; }
}

/* ---------- Hero ---------- */
.hero { padding: clamp(80px, 12vw, 140px) 0 clamp(72px, 11vw, 128px); }
.hero .watermark { opacity: 0.045; width: min(720px, 120vw); }
.hero-inner { text-align: center; }
.hero-title {
  margin: 18px auto 0;
  max-width: 20ch;
  text-wrap: balance;
  font-size: clamp(2.4rem, 6.4vw, 4.4rem);
  line-height: 1.06;
  letter-spacing: -0.01em;
}
.hero-lead {
  margin: 22px auto 0;
  max-width: 40rem;
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  color: var(--muted);
}
.hero .btn-row { margin-top: 34px; }

/* ---------- Group companies ---------- */
.company-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
}
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  transition: box-shadow .2s, transform .2s;
}
.card:hover { box-shadow: 0 10px 30px rgba(14, 27, 43, 0.08); transform: translateY(-2px); }
.icon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: rgba(201, 162, 39, 0.14);
  color: var(--gold-text);
}
.icon-badge svg,
.value-strip svg,
.director-photo svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon-badge svg { width: 24px; height: 24px; }
.company h3 { margin-top: 18px; font-size: 1.2rem; }
.company p { margin-top: 6px; font-size: 0.92rem; color: var(--muted); }

/* ---------- Projects at a glance ---------- */
.glance-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.glance { background: var(--paper); padding: clamp(24px, 3.5vw, 36px); }
.glance h3 { font-size: 1.3rem; }
.glance h3::before {
  content: "";
  display: block;
  width: 28px;
  height: 3px;
  background: var(--gold);
  border-radius: 2px;
  margin-bottom: 14px;
}
.glance p { margin-top: 8px; font-size: 0.95rem; color: var(--muted); }

.value-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: clamp(40px, 6vw, 60px);
  text-align: center;
}
.value-strip li { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.value-strip svg {
  width: 52px;
  height: 52px;
  padding: 12px;
  border-radius: 50%;
  border: 1.5px solid rgba(201, 162, 39, 0.55);
  color: var(--gold-text);
}
.value-strip span { font-weight: 600; font-size: 0.95rem; }
@media (max-width: 720px) {
  .value-strip { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Directors ---------- */
.section-navy { background: var(--ink); color: var(--on-ink); }
.section-navy .eyebrow { color: var(--gold); }
.section-navy .section-head h2 { color: var(--on-ink); }
.section-navy .watermark { opacity: 0.06; }

.director-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 40px clamp(40px, 8vw, 96px);
}
.director { text-align: center; flex: 0 1 300px; }
.director-photo {
  width: 160px;
  height: 160px;
  margin: 0 auto;
  border-radius: 50%;
  border: 3px solid var(--gold);
  box-shadow: 0 0 0 6px rgba(201, 162, 39, 0.15);
  background: rgba(255, 255, 255, 0.06);
  object-fit: cover;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.35);
  overflow: hidden;
}
.director-photo svg { width: 64px; height: 64px; stroke-width: 1.2; }
.director-label {
  margin-top: 22px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--on-ink-muted);
}
.director-name {
  margin-top: 8px;
  font-size: clamp(1.6rem, 3vw, 2rem);
  color: var(--gold);
}
.director-title { margin-top: 6px; color: var(--on-ink); font-weight: 500; }
.director-phone { margin-top: 6px; color: var(--on-ink-muted); font-size: 0.95rem; }
.director-phone a { color: inherit; text-decoration: none; white-space: nowrap; }
.director-phone a:hover { color: var(--gold); text-decoration: underline; }
.director-caption {
  margin: clamp(40px, 6vw, 56px) auto 0;
  max-width: 36rem;
  text-align: center;
  font-family: var(--font-head);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--on-ink-muted);
}

/* ---------- Projects gallery ---------- */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: 20px;
}
.project {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 12px;
  overflow: hidden;
  background: var(--paper);
}
.project img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.project:hover img { transform: scale(1.04); }
.project-caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 28px 16px 14px;
  background: linear-gradient(to top, rgba(14, 27, 43, 0.85), transparent);
  color: var(--white);
  font-weight: 600;
  font-size: 0.92rem;
}
.project-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px dashed rgba(14, 27, 43, 0.25);
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
}

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: start;
}
@media (max-width: 820px) {
  .contact-grid { grid-template-columns: 1fr; }
}

.contact-form {
  display: grid;
  gap: 16px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(20px, 3.5vw, 32px);
}
.field { display: grid; gap: 6px; }
.field label { font-weight: 600; font-size: 0.9rem; }
.field input,
.field textarea {
  width: 100%;
  font: 400 1rem/1.4 var(--font-body);
  color: var(--ink);
  background: var(--white);
  border: 1px solid rgba(14, 27, 43, 0.28);
  border-radius: var(--radius);
  padding: 12px 14px;
  transition: border-color .2s, box-shadow .2s;
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.45);
}
.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] { border-color: #B42318; }
.contact-form .btn { justify-self: start; border: none; }
.form-status { font-size: 0.92rem; min-height: 1.4em; }
.form-status.is-error { color: #B42318; }
.form-status.is-ok { color: #1E6B3A; }

.contact-details { display: grid; gap: 28px; }
.detail-label {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-text);
  margin-bottom: 8px;
}
.detail p { color: var(--ink); }
.contact-list { display: grid; gap: 8px; }
.contact-list li { overflow-wrap: anywhere; }
.contact-list .k { display: block; font-size: 0.82rem; color: var(--muted); }
.contact-list a { text-decoration: none; font-weight: 500; }
.contact-list a:hover { color: var(--gold-text); text-decoration: underline; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: var(--on-ink); padding: clamp(48px, 7vw, 72px) 0 28px; }
.footer-cols {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.3fr;
  gap: 36px;
  padding-bottom: 36px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}
@media (max-width: 960px) {
  .footer-cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .footer-cols { grid-template-columns: 1fr; }
}
.brand-on-dark { color: var(--on-ink); }
.brand-on-dark .brand-sub { color: var(--on-ink-muted); }
.footer-brand p { margin-top: 16px; font-size: 0.92rem; color: var(--on-ink-muted); max-width: 28rem; }
.footer-col h2,
.footer-col h3 {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 12px;
}
.footer-col p,
.footer-col li { font-size: 0.92rem; color: var(--on-ink-muted); line-height: 1.8; overflow-wrap: anywhere; }
.footer-col a { color: var(--on-ink); text-decoration: none; }
.footer-col a:hover { color: var(--gold); text-decoration: underline; }
.copyright { margin-top: 24px; text-align: center; font-size: 0.85rem; color: rgba(255, 255, 255, 0.7); }

/* ---------- Home "Our Work" tiles link into the gallery ---------- */
.project-link { position: absolute; inset: 0; display: block; color: inherit; }
.project-link:focus-visible { outline-offset: -3px; }
.projects-more { margin-top: 36px; text-align: center; }

/* ---------- Gallery page ---------- */
.gallery-section { padding-top: clamp(48px, 7vw, 80px); }
.gallery-title { margin-top: 10px; font-size: clamp(2rem, 4.5vw, 3rem); }
.gallery-lead { margin: 14px auto 0; max-width: 36rem; color: var(--muted); }

.g-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}
.g-filter {
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1.5px solid rgba(14, 27, 43, 0.2);
  background: var(--white);
  color: var(--ink);
  font: 600 0.9rem/1 var(--font-body);
  cursor: pointer;
  transition: background-color .2s, border-color .2s, color .2s;
}
.g-filter:hover { border-color: var(--ink); }
.g-filter[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--white); }
.g-count { margin: 14px 0 22px; text-align: center; font-size: 0.88rem; color: var(--muted); }

.g-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
  gap: 14px;
}
.g-item[hidden] { display: none; }
.g-link {
  display: block;
  aspect-ratio: 4 / 3;
  border-radius: 10px;
  overflow: hidden;
  background: var(--paper);
}
.g-link img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s, filter .35s; }
.g-link:hover img { transform: scale(1.05); filter: brightness(1.05); }
.g-link:focus-visible { outline-offset: 2px; }
@media (max-width: 480px) {
  .g-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .g-filter { padding: 0 14px; font-size: 0.85rem; }
}
.g-back { margin-top: 44px; text-align: center; }

/* ---------- Lightbox ---------- */
body.lb-open { overflow: hidden; }
.lightbox {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(8, 14, 23, 0.94);
  color: var(--white);
}
.lightbox::backdrop { background: rgba(8, 14, 23, 0.6); }
.lightbox[open] { display: flex; align-items: center; justify-content: center; }
.lb-figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 64px 72px 24px;
  max-width: 100%;
  max-height: 100%;
  pointer-events: none;
}
.lb-img {
  max-width: min(1400px, 100%);
  max-height: calc(100dvh - 140px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  pointer-events: auto;
}
.lb-caption { font-size: 0.95rem; text-align: center; color: rgba(255, 255, 255, 0.9); }
.lb-pos { margin-left: 8px; color: var(--gold); font-weight: 600; }
.lb-btn {
  position: absolute;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
  cursor: pointer;
  transition: background-color .2s, border-color .2s;
}
.lb-btn:hover { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.lb-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lb-close { top: 14px; right: 14px; }
.lb-prev { left: 14px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 14px; top: 50%; transform: translateY(-50%); }
@media (max-width: 640px) {
  .lb-figure { padding: 64px 8px 84px; }
  .lb-img { max-height: calc(100dvh - 170px); }
  .lb-prev, .lb-next { top: auto; bottom: 18px; transform: none; }
  .lb-prev { left: calc(50% - 60px); }
  .lb-next { right: calc(50% - 60px); }
}

/* Netlify Forms honeypot: hidden from people, visible to bots */
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.contact-form { position: relative; }
.contact-form .btn:disabled { opacity: 0.6; cursor: wait; transform: none; }

/* Thank-you page */
.thanks { min-height: 60vh; display: flex; align-items: center; text-align: center; }
.thanks h1 { margin-top: 10px; font-size: clamp(2rem, 4.5vw, 3rem); }
.thanks p.lead { margin: 16px auto 28px; max-width: 32rem; color: var(--muted); }
