/* ============================================================
   Khurana Constructions — site stylesheet
   Shared header, nav, footer, buttons and reused DS component
   patterns, authored on top of the design-system tokens.
   ============================================================ */

html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--surface-page);
  color: var(--text-strong);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: var(--kc-ink); text-decoration: none; }
a:hover { color: var(--kc-n-600); }
img { max-width: 100%; }

/* Visible keyboard focus */
:focus-visible { outline: 3px solid var(--kc-ink); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

.container {
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: clamp(20px, 5vw, 64px);
}

/* Skip link for keyboard users */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--kc-ink);
  color: var(--kc-white);
  padding: 12px 18px;
  font-family: var(--font-mono);
  font-size: 13px;
}
.skip-link:focus { left: 12px; top: 12px; color: var(--kc-white); }

/* ------------------------------------------------------------
   Header / navigation
   ------------------------------------------------------------ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(248, 247, 243, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-subtle);
}
.site-header__inner {
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: clamp(20px, 5vw, 64px);
  min-height: 86px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.site-header__logo { display: flex; align-items: center; flex: none; }
.site-header__logo img { height: 46px; width: auto; display: block; }

.site-nav { display: flex; align-items: center; gap: 20px; flex: none; }
.site-nav a {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
}
.site-nav a:hover { color: var(--kc-ink); }
.site-nav a[aria-current="page"] {
  color: var(--kc-ink);
  border-bottom: 2px solid var(--kc-yellow);
  padding-bottom: 3px;
}

.header-cta {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 12px 20px;
  background: var(--kc-ink);
  color: var(--kc-white);
  border-radius: var(--radius-sm);
  flex: none;
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.header-cta:hover { background: var(--kc-yellow); color: var(--kc-ink); }

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 8px;
  cursor: pointer;
  color: var(--kc-ink);
}
.nav-toggle svg { display: block; }

.mobile-nav { display: none; }
.mobile-nav a {
  padding: 13px 0;
  border-bottom: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--kc-ink);
}
.mobile-nav a:last-child { border-bottom: 0; }

@media (max-width: 1100px) {
  .site-nav, .header-cta { display: none; }
  .nav-toggle { display: flex; }
  .site-header.nav-open .mobile-nav {
    display: flex;
    flex-direction: column;
    background: var(--surface-page);
    border-top: 1px solid var(--border-subtle);
    padding: 4px clamp(20px, 5vw, 64px) 18px;
  }
}

/* ------------------------------------------------------------
   Buttons (DS Button component, as CSS)
   ------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-family: var(--font-body);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  transition: background var(--dur-fast) var(--ease-out),
              color var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out),
              transform var(--dur-fast) var(--ease-out);
}
.btn svg { display: block; flex: 0 0 auto; }
.btn--md { padding: 11px 22px; font-size: 15px; height: 44px; }
.btn--lg { padding: 15px 30px; font-size: 17px; height: 54px; }
.btn--primary { background: var(--kc-yellow); color: var(--kc-ink); border-color: var(--kc-yellow); }
.btn--primary:hover { background: var(--kc-yellow-600); transform: translateY(-1px); }
.btn--secondary { background: var(--kc-ink); color: var(--kc-white); border-color: var(--kc-ink); }
.btn--secondary:hover { background: var(--kc-n-800); color: var(--kc-white); transform: translateY(-1px); }
.btn--outline { background: transparent; color: var(--kc-ink); border-color: var(--kc-ink); }
.btn--outline:hover { background: var(--kc-n-100); transform: translateY(-1px); }
.btn--on-dark { color: var(--kc-white); border-color: var(--kc-white); }
.btn--on-dark:hover { background: var(--kc-white); color: var(--kc-ink); border-color: var(--kc-white); }
.btn:active { transform: translateY(0) scale(0.98); }

/* ------------------------------------------------------------
   Section heading (DS SectionHeading component, as CSS)
   ------------------------------------------------------------ */
.section-heading { text-align: left; max-width: 640px; }
.section-heading__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.section-heading__eyebrow::before {
  content: "";
  width: 18px;
  height: 3px;
  background: var(--kc-yellow);
  display: inline-block;
}
.section-heading h2 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: var(--fs-display-m);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--text-strong);
  margin: 0;
}
.section-heading__lead {
  font-size: 1.1875rem;
  line-height: 1.5;
  color: var(--text-muted);
  margin: 18px 0 0;
}
.section-heading--light .section-heading__eyebrow { color: rgba(255, 255, 255, 0.7); }
.section-heading--light h2 { color: var(--kc-white); }
.section-heading--light .section-heading__lead { color: rgba(255, 255, 255, 0.78); }

/* Eyebrow used inline in page sections (with wider tick on heroes) */
.kc-eyebrow-row {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.kc-eyebrow-row::before {
  content: "";
  width: 34px;
  height: 3px;
  background: var(--kc-yellow);
  display: inline-block;
}
.kc-eyebrow-row--sm::before { width: 18px; }

/* ------------------------------------------------------------
   Stat (DS Stat component, as CSS)
   ------------------------------------------------------------ */
.kc-stat__value {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 3.25rem;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--text-strong);
}
.kc-stat__value span { color: var(--kc-yellow); }
.kc-stat__rule { width: 28px; height: 3px; background: var(--kc-yellow); margin: 12px 0; }
.kc-stat__label {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 12.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ------------------------------------------------------------
   Card (DS Card component, top-rule variant)
   ------------------------------------------------------------ */
.kc-card {
  background: var(--surface-card);
  border-top: 3px solid var(--kc-yellow);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out);
}

/* ------------------------------------------------------------
   Scroll-reveal
   ------------------------------------------------------------ */
[data-reveal].reveal-init {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
[data-reveal].reveal-in { opacity: 1; transform: none; }

/* ------------------------------------------------------------
   Footer
   ------------------------------------------------------------ */
.site-footer {
  background: var(--kc-n-950);
  color: rgba(255, 255, 255, 0.72);
  padding: 56px 0 34px;
}
.site-footer__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 36px;
}
.site-footer__logo { height: 36px; width: auto; display: block; }
.site-footer p { margin: 0; }
.site-footer h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--kc-n-400);
  margin: 0 0 14px;
  font-weight: 600;
}
.site-footer .site-footer__about {
  margin: 28px 0 0;
  max-width: 34ch;
  font-size: 14.5px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.66);
}
.site-footer__addr { font-size: 14.5px; line-height: 1.7; color: rgba(255, 255, 255, 0.78); }
.site-footer__contact { font-size: 14.5px; line-height: 1.7; }
.site-footer__contact a { color: rgba(255, 255, 255, 0.78); }
.site-footer__contact a:hover { color: var(--kc-yellow); }
.site-footer__bar {
  margin-top: 44px;
  padding-top: 20px;
  border-top: 1px solid var(--kc-n-800);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--kc-n-400);
}
.site-footer__bar b { color: var(--kc-yellow); font-weight: 600; }

/* ------------------------------------------------------------
   Page section helpers (reused across pages)
   ------------------------------------------------------------ */
.section { padding: clamp(64px, 8vw, 120px) 0; }
.section--sunken {
  background: var(--surface-sunken);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}
.section--ink { background: var(--kc-ink); color: var(--kc-white); }

/* Hero */
.hero { position: relative; overflow: hidden; }
.hero__grid {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.55;
  background-image:
    linear-gradient(var(--kc-n-200) 1px, transparent 1px),
    linear-gradient(90deg, var(--kc-n-200) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(120% 90% at 80% 28%, #000 18%, transparent 72%);
  mask-image: radial-gradient(120% 90% at 80% 28%, #000 18%, transparent 72%);
}
.hero__inner { position: relative; z-index: 1; }

/* CTA band (ink, with faint yellow rule motif) */
.cta-band { position: relative; overflow: hidden; }
.cta-band__motif {
  position: absolute;
  inset: 0;
  opacity: 0.5;
  background-image: linear-gradient(90deg, rgba(252, 212, 16, 0.14) 1px, transparent 1px);
  background-size: 44px 100%;
}
.cta-band__inner { position: relative; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }

/* Stat band */
.stat-band {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}
.stat-band > div { padding: 36px 24px; border-left: 1px solid var(--border-subtle); }
.stat-band > div:first-child { padding-left: 0; border-left: 0; }

/* Client logo wall */
.logo-wall {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 1px;
  background: var(--border-subtle);
  border: 1px solid var(--border-subtle);
}
.logo-wall span {
  background: var(--kc-white);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px 26px;
  min-height: 104px;
}
.logo-wall img {
  max-width: 78%;
  max-height: 44px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

/* Project card (featured work) */
.pcard {
  border: 1px solid var(--border-subtle);
  background: var(--surface-card);
  display: flex;
  flex-direction: column;
}
.pcard__media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--kc-ink);
}
.pcard__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.pcard__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20, 19, 17, 0.62) 0%, rgba(20, 19, 17, 0.06) 42%, rgba(20, 19, 17, 0.1) 100%);
}
.pcard__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  color: var(--kc-white);
}
.pcard__tag {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--kc-yellow);
}
.pcard__meta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.88);
  text-align: right;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}
.pcard__rule {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 4px;
  width: 64px;
  background: var(--kc-yellow);
}
.pcard__gcount {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(20, 19, 17, 0.74);
  color: var(--kc-white);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  padding: 6px 10px;
}
.pcard__body { padding: 22px; }
.pcard__body h3 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 21px;
  letter-spacing: -0.01em;
  margin: 0 0 8px;
}
.pcard__body p { margin: 0; color: var(--text-muted); font-size: 14.5px; line-height: 1.55; text-wrap: pretty; }
.pcard__cue {
  margin-top: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--kc-ink);
}
.pcard--interactive {
  cursor: pointer;
  transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}
.pcard--interactive:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(20, 19, 17, 0.14); }
.pcard[hidden] { display: none; }
.record-group[hidden] { display: none; }

/* Projects filter tabs */
.filter-tabs { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 34px; }
.filter-tab {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 11px 18px;
  border: 1px solid var(--kc-ink);
  cursor: pointer;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--kc-ink);
  transition: background 0.16s, color 0.16s;
}
.filter-tab[aria-pressed="true"] { background: var(--kc-ink); color: var(--kc-white); }

/* Full-record tables */
.record-group__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-bottom: 14px;
  border-bottom: 3px solid var(--kc-ink);
}
.record-group__head h3 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(24px, 2.6vw, 32px);
  letter-spacing: -0.02em;
  margin: 0;
}
.record-group__count {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.record-row {
  display: grid;
  grid-template-columns: minmax(160px, 1.05fr) minmax(200px, 1.75fr) minmax(110px, 0.85fr);
  gap: 20px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border-subtle);
  align-items: baseline;
}
.record-row--head {
  padding: 14px 0 12px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.record-row__c { font-family: var(--font-body); font-weight: 700; font-size: 15px; line-height: 1.4; color: var(--kc-ink); text-wrap: pretty; }
.record-row__s { font-size: 14.5px; line-height: 1.5; color: var(--text-body); text-wrap: pretty; }
.record-row__l { font-family: var(--font-mono); font-size: 12.5px; line-height: 1.5; letter-spacing: 0.02em; color: var(--text-muted); text-wrap: pretty; }
@media (max-width: 640px) {
  .record-row { grid-template-columns: 1fr; gap: 4px; }
  .record-row--head { display: none; }
  .record-row__l { color: var(--text-faint); }
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(15, 14, 12, 0.93);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(64px, 8vw, 88px) clamp(16px, 4vw, 56px) clamp(24px, 4vw, 48px);
}
.lightbox[hidden] { display: none; }
.lightbox__bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px clamp(16px, 4vw, 40px);
}
.lightbox__title {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--kc-yellow);
}
.lightbox__close, .lightbox__nav {
  background: none;
  border: 0;
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  display: flex;
  padding: 6px;
}
.lightbox__close:hover { color: var(--kc-white); }
.lightbox__stage { display: flex; flex-direction: column; align-items: center; gap: 14px; width: 100%; }
.lightbox__row { position: relative; display: flex; align-items: center; justify-content: center; width: 100%; }
.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  flex: none;
  background: rgba(20, 19, 17, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: var(--kc-white);
  width: 46px;
  height: 46px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
}
.lightbox__nav--prev { left: 8px; }
.lightbox__nav--next { right: 8px; }
.lightbox__nav:hover { background: var(--kc-yellow); color: var(--kc-ink); border-color: var(--kc-yellow); }
.lightbox__img {
  display: block;
  max-width: min(1100px, 92vw);
  max-height: 72vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: var(--kc-ink);
}
@media (max-width: 640px) {
  .lightbox { padding: 54px 10px 20px; }
  .lightbox__nav { width: 40px; height: 40px; }
  .lightbox__img { max-width: 94vw; max-height: 66vh; }
}
.lightbox__cap { display: flex; align-items: center; gap: 16px; color: rgba(255, 255, 255, 0.78); }
.lightbox__cap span:first-child { font-size: 14px; }
.lightbox__counter { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; color: rgba(255, 255, 255, 0.5); }
