/* ==========================================================================
   Sobha Seinna — Reusable components
   Buttons · Cards · Highlights · Tables · Forms · Accordion · Modal
   Slider · Gallery · Lightbox · Sticky CTA · Notices · Badges
   ========================================================================== */

/* ---- Buttons ------------------------------------------------------------- */

.btn {
  --btn-bg: var(--color-ink);
  --btn-fg: var(--color-inverse);
  --btn-border: var(--color-ink);

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 46px;
  padding: 0.7rem 1.5rem;
  background: var(--btn-bg);
  color: var(--btn-fg);
  border: 1px solid var(--btn-border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease),
              border-color var(--dur) var(--ease), transform var(--dur-fast) var(--ease);
}

.btn:hover {
  background: var(--color-accent-strong);
  border-color: var(--color-accent-strong);
  color: #fff;
}

.btn:active { transform: translateY(1px); }

.btn--accent {
  --btn-bg: var(--color-accent);
  --btn-fg: #fff;
  --btn-border: var(--color-accent);
}

.btn--outline {
  --btn-bg: transparent;
  --btn-fg: var(--color-ink);
  --btn-border: var(--color-border-strong);
}

.btn--outline:hover {
  background: var(--color-ink);
  border-color: var(--color-ink);
  color: var(--color-inverse);
}

.btn--ghost-light {
  --btn-bg: transparent;
  --btn-fg: var(--color-inverse);
  --btn-border: rgba(246, 243, 237, 0.4);
}

.btn--ghost-light:hover {
  background: var(--color-inverse);
  border-color: var(--color-inverse);
  color: var(--color-ink);
}

.btn--whatsapp {
  --btn-bg: var(--color-whatsapp);
  --btn-fg: #fff;
  --btn-border: var(--color-whatsapp);
}

.btn--whatsapp:hover {
  background: #0f7568;
  border-color: #0f7568;
}

.btn--sm { min-height: 38px; padding: 0.45rem 1rem; font-size: var(--fs-xs); }
.btn--lg { min-height: 54px; padding: 0.9rem 2rem; font-size: var(--fs-base); }
.btn--block { display: flex; width: 100%; }

.btn[disabled],
.btn[aria-disabled="true"] {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-5);
}

.btn-row--center { justify-content: center; }

/* Text link with arrow */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--color-accent-strong);
}

.link-arrow::after {
  content: "\2192";
  transition: transform var(--dur) var(--ease);
}

.link-arrow:hover::after { transform: translateX(4px); }

/* Submit button spinner state */
.btn__spinner {
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ---- Badges & status pills ----------------------------------------------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.7rem;
  border-radius: var(--radius-pill);
  background: var(--color-accent-soft);
  color: var(--color-accent-strong);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: var(--ls-mid);
  text-transform: uppercase;
}

.badge--dark {
  background: rgba(246, 243, 237, 0.12);
  color: var(--color-inverse);
}

.badge--pending {
  background: var(--color-notice-bg);
  color: #7a5b12;
  border: 1px solid var(--color-notice-border);
}

/* Small "status" dot that does not rely on colour alone */
.badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* ---- Cards --------------------------------------------------------------- */

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: clamp(1.25rem, 0.9rem + 1.2vw, 1.85rem);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
              transform var(--dur) var(--ease);
}

.card:hover {
  border-color: var(--color-border-strong);
  box-shadow: var(--shadow-md);
}

.card h3 { margin-bottom: var(--space-3); }

.card p { font-size: var(--fs-base); }

.card__foot { margin-top: var(--space-5); }

.card--flat { box-shadow: none; }
.card--flat:hover { transform: none; }

/* ---- Highlight cards (key project facts) --------------------------------- */

.highlights {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--color-border);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

@media (min-width: 640px) { .highlights { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1000px) { .highlights { grid-template-columns: repeat(5, 1fr); } }

.highlight {
  background: var(--color-surface);
  padding: clamp(1rem, 0.8rem + 0.8vw, 1.6rem);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  transition: background var(--dur) var(--ease);
}

.highlight:hover { background: var(--color-surface-sunken); }

.highlight__value {
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 1.2rem + 1vw, 1.95rem);
  font-weight: 600;
  color: var(--color-ink);
  line-height: 1.1;
}

.highlight__label {
  font-size: var(--fs-xs);
  letter-spacing: var(--ls-mid);
  text-transform: uppercase;
  color: var(--color-muted);
}

/* ---- Fact list (definition pairs) ---------------------------------------- */

.facts {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--color-border);
}

.facts > div {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--color-border);
}

.facts dt {
  font-size: var(--fs-sm);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--color-muted);
}

.facts dd {
  margin: 0;
  font-weight: 600;
  color: var(--color-ink);
  text-align: right;
}

/* ---- Media frame / image placeholder ------------------------------------- */

.media {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--color-surface-sunken);
  border: 1px solid var(--color-border);
}

.media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media--4x3 { aspect-ratio: 4 / 3; }
.media--3x2 { aspect-ratio: 3 / 2; }
.media--16x9 { aspect-ratio: 16 / 9; }
.media--1x1 { aspect-ratio: 1 / 1; }

/*
  Placeholder frame shown until real project photography, renders,
  master plans and floor plans are supplied. It never pretends to be
  an actual project image.
*/
.placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-align: center;
  padding: var(--space-5);
  background:
    repeating-linear-gradient(
      135deg,
      var(--color-surface-sunken),
      var(--color-surface-sunken) 12px,
      #f1ece2 12px,
      #f1ece2 24px
    );
  color: var(--color-muted);
  border: 1px dashed var(--color-border-strong);
  border-radius: var(--radius-lg);
}

.placeholder__icon {
  width: 34px;
  height: 34px;
  opacity: 0.55;
}

.placeholder__title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--color-ink);
}

.placeholder__note {
  font-size: var(--fs-sm);
  max-width: 34ch;
}

.placeholder--dark {
  background: rgba(246, 243, 237, 0.05);
  border-color: rgba(246, 243, 237, 0.2);
  color: rgba(246, 243, 237, 0.65);
}

.placeholder--dark .placeholder__title { color: var(--color-inverse); }

/* ---- Notices ------------------------------------------------------------- */

.notice {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  background: var(--color-notice-bg);
  border: 1px solid var(--color-notice-border);
  border-radius: var(--radius);
  font-size: var(--fs-base);
  line-height: 1.6;
}

.notice p { max-width: none; }

.notice__icon { flex-shrink: 0; width: 20px; height: 20px; color: #a9822b; }

.notice--muted {
  background: var(--color-surface-sunken);
  border-color: var(--color-border);
}

.notice--dark {
  background: rgba(246, 243, 237, 0.06);
  border-color: var(--color-border-dark);
  color: rgba(246, 243, 237, 0.75);
}

/* ---- Tables -------------------------------------------------------------- */

/* Horizontal scroll container keeps wide tables inside the viewport */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
}

.table-wrap:focus-visible { outline: 2px solid var(--color-accent); }

.table {
  min-width: 520px;
  font-size: var(--fs-base);
}

.table caption {
  caption-side: top;
  text-align: left;
  padding: var(--space-4) var(--space-5) 0;
  font-size: var(--fs-sm);
  color: var(--color-muted);
}

.table th,
.table td {
  padding: var(--space-4) var(--space-5);
  text-align: left;
  border-bottom: 1px solid var(--color-border);
  vertical-align: top;
}

.table thead th {
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: var(--ls-mid);
  text-transform: uppercase;
  color: var(--color-muted);
  background: var(--color-surface-sunken);
  white-space: nowrap;
}

.table tbody tr:last-child td { border-bottom: 0; }

.table tbody tr:hover { background: var(--color-surface-sunken); }

.table .num { text-align: right; font-variant-numeric: tabular-nums; }

.table__hint {
  display: block;
  margin-top: var(--space-3);
  font-size: var(--fs-sm);
  color: var(--color-muted);
}

/* Stacked card layout for narrow screens */
@media (max-width: 599px) {
  .table--stack { min-width: 0; }
  .table--stack thead { display: none; }
  .table--stack tbody tr {
    display: block;
    padding: var(--space-4) var(--space-5);
    border-bottom: 1px solid var(--color-border);
  }
  .table--stack tbody tr:last-child { border-bottom: 0; }
  .table--stack td {
    display: flex;
    justify-content: space-between;
    gap: var(--space-4);
    padding: 0.35rem 0;
    border: 0;
    text-align: right;
  }
  .table--stack td::before {
    content: attr(data-label);
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--color-muted);
    text-align: left;
  }
  .table--stack .num { text-align: right; }
}

/* ---- Forms --------------------------------------------------------------- */

.lead-form {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: clamp(1.25rem, 0.9rem + 1.4vw, 2rem);
  box-shadow: var(--shadow-sm);
}

.lead-form--onDark { box-shadow: var(--shadow-lg); }

.lead-form__head { margin-bottom: var(--space-5); }

.lead-form__head h2,
.lead-form__head h3 {
  font-size: var(--fs-xl);
  margin-bottom: var(--space-2);
}

.lead-form__head p {
  font-size: var(--fs-base);
  color: var(--color-muted);
}

.form-grid {
  display: grid;
  gap: var(--space-4);
}

@media (min-width: 560px) {
  .form-grid--2 { grid-template-columns: 1fr 1fr; }
  .form-field--full { grid-column: 1 / -1; }
}

.form-field { display: flex; flex-direction: column; gap: 0.4rem; }

.form-field label {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--color-ink);
}

.form-field .req { color: var(--color-error); }

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  min-height: 46px;
  padding: 0.65rem 0.85rem;
  background: var(--color-bg);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius);
  font-size: var(--fs-base);
  color: var(--color-ink);
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}

.form-field textarea { min-height: 96px; resize: vertical; }

.form-field select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath fill='%237a746a' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  background-size: 12px;
  padding-right: 2.25rem;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(156, 122, 53, 0.16);
}

.form-field input[aria-invalid="true"],
.form-field select[aria-invalid="true"],
.form-field textarea[aria-invalid="true"] {
  border-color: var(--color-error);
  background: var(--color-error-bg);
}

.form-field__error {
  display: none;
  font-size: var(--fs-sm);
  color: var(--color-error);
}

/* Error text is paired with an icon glyph so colour is not the only cue */
.form-field__error::before { content: "\26A0 "; }

.form-field.has-error .form-field__error { display: block; }

.form-field__hint { font-size: var(--fs-sm); color: var(--color-muted); }

/* Phone input with fixed country code */
.input-phone { display: flex; }

.input-phone__code {
  display: inline-flex;
  align-items: center;
  padding: 0 0.75rem;
  background: var(--color-surface-sunken);
  border: 1px solid var(--color-border-strong);
  border-right: 0;
  border-radius: var(--radius) 0 0 var(--radius);
  font-size: var(--fs-base);
  color: var(--color-muted);
}

.input-phone input { border-radius: 0 var(--radius) var(--radius) 0; }

/* Consent checkbox */
.form-consent {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-size: var(--fs-sm);
  line-height: 1.5;
  color: var(--color-ink-soft);
}

.form-consent input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-height: 0;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--color-accent);
}

.form-consent.has-error { color: var(--color-error); }

/* Honeypot — hidden from humans, visible to naive bots */
.hp-field {
  position: absolute !important;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-foot { margin-top: var(--space-5); display: grid; gap: var(--space-3); }

.form-privacy { font-size: var(--fs-xs); color: var(--color-muted); }

/* Form status region (announced to screen readers) */
.form-status {
  display: none;
  margin-top: var(--space-4);
  padding: var(--space-4);
  border-radius: var(--radius);
  font-size: var(--fs-base);
}

.form-status.is-visible { display: block; }

.form-status--success {
  background: var(--color-success-bg);
  border: 1px solid #bcd9c8;
  color: var(--color-success);
}

.form-status--error {
  background: var(--color-error-bg);
  border: 1px solid #edc4c0;
  color: var(--color-error);
}

/* Multi-step form */
.form-steps { display: grid; gap: var(--space-4); }

.form-step[hidden] { display: none; }

.step-indicator {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
  font-size: var(--fs-xs);
  letter-spacing: var(--ls-mid);
  text-transform: uppercase;
  color: var(--color-muted);
}

.step-indicator__bar {
  flex: 1;
  height: 2px;
  background: var(--color-border);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.step-indicator__fill {
  display: block;
  height: 100%;
  width: 50%;
  background: var(--color-accent);
  transition: width var(--dur-slow) var(--ease);
}

/* ---- FAQ accordion ------------------------------------------------------- */

.faq {
  border-top: 1px solid var(--color-border);
  max-width: 860px;
}

.faq__item { border-bottom: 1px solid var(--color-border); }

.faq__trigger {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  width: 100%;
  padding: var(--space-5) 0;
  text-align: left;
  font-family: var(--font-body);
  font-size: var(--fs-md);
  font-weight: 600;
  color: var(--color-ink);
  line-height: 1.45;
}

.faq__trigger:hover { color: var(--color-accent-strong); }

.faq__icon {
  flex-shrink: 0;
  position: relative;
  width: 18px;
  height: 18px;
  margin-top: 4px;
}

.faq__icon::before,
.faq__icon::after {
  content: "";
  position: absolute;
  background: var(--color-accent);
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
}

.faq__icon::before { top: 8px; left: 0; width: 18px; height: 1.5px; }
.faq__icon::after { top: 0; left: 8px; width: 1.5px; height: 18px; }

.faq__trigger[aria-expanded="true"] .faq__icon::after {
  transform: rotate(90deg);
  opacity: 0;
}

.faq__panel { display: none; padding-bottom: var(--space-5); }

.faq__panel p { font-size: var(--fs-base); }
.faq__panel p + p { margin-top: var(--space-3); }

/* ---- Hero slider --------------------------------------------------------- */

.hero {
  position: relative;
  background: var(--color-dark);
  color: var(--color-inverse);
  overflow: hidden;
}

.hero__viewport {
  position: relative;
  display: grid;
  min-height: clamp(520px, 74vh, 720px);
}

/* Every slide occupies the same grid cell, so the hero is as tall as the
   tallest slide and nothing is ever cut off. */
.hero__slide {
  grid-area: 1 / 1;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--dur-slow) var(--ease), visibility var(--dur-slow);
  display: flex;
  align-items: center;
  min-width: 0;
}

.hero__slide.is-active { opacity: 1; visibility: visible; }

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Gradient scrim guarantees text contrast over any future photography */
.hero__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right,
      rgba(16, 15, 11, 0.82) 0%,
      rgba(16, 15, 11, 0.62) 30%,
      rgba(16, 15, 11, 0.28) 60%,
      rgba(16, 15, 11, 0.06) 100%),
    linear-gradient(to top, rgba(16, 15, 11, 0.5), transparent 58%);
}

/* Placeholder background used until real imagery is supplied */
.hero__bg--placeholder {
  background:
    radial-gradient(90% 70% at 20% 20%, #2c281c 0%, transparent 60%),
    radial-gradient(80% 80% at 90% 80%, #3a3222 0%, transparent 65%),
    linear-gradient(135deg, #1b1a13 0%, #24221a 100%);
}

.hero__content {
  position: relative;
  z-index: 1;
  width: 100%;
  padding-block: clamp(3rem, 2rem + 5vw, 5rem);
}

.hero__inner { max-width: 660px; }

.hero__eyebrow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.hero__slide h1 {
  color: var(--color-inverse);
  font-size: clamp(1.75rem, 1.15rem + 2.1vw, 2.85rem);
  margin-bottom: var(--space-4);
}

.hero__slide h2 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 1.2rem + 2vw, 2.6rem);
  color: var(--color-inverse);
  margin-bottom: var(--space-4);
}

.hero__lede {
  font-size: var(--fs-lg);
  color: rgba(246, 243, 237, 0.8);
  max-width: 52ch;
}

.hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4) var(--space-6);
  margin-top: var(--space-6);
  padding-top: var(--space-5);
  border-top: 1px solid var(--color-border-dark);
}

.hero__stat dt {
  font-size: var(--fs-xs);
  letter-spacing: var(--ls-mid);
  text-transform: uppercase;
  color: rgba(246, 243, 237, 0.55);
}

.hero__stat dd {
  margin: 4px 0 0;
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--color-inverse);
}

.hero__cta { margin-top: var(--space-6); }

/* Slider controls */
.hero__controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: var(--space-5);
  z-index: 2;
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.hero__controls .container {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.slider-btn {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(246, 243, 237, 0.35);
  border-radius: 50%;
  color: var(--color-inverse);
  background: rgba(16, 15, 11, 0.35);
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.slider-btn:hover {
  background: var(--color-inverse);
  border-color: var(--color-inverse);
  color: var(--color-ink);
}

.slider-dots {
  display: flex;
  gap: var(--space-2);
  margin-left: auto;
}

.slider-dot {
  width: 30px;
  height: 3px;
  border-radius: var(--radius-pill);
  background: rgba(246, 243, 237, 0.3);
  transition: background var(--dur) var(--ease);
}

.slider-dot[aria-selected="true"] { background: var(--color-accent); }

/* Hero-adjacent enquiry card (desktop) */
.hero-form {
  display: none;
  position: relative;
  z-index: 2;
}

@media (min-width: 1080px) {
  .hero__inner { max-width: min(600px, 58%); }

  .hero-form {
    display: block;
    position: absolute;
    right: var(--gutter);
    top: 50%;
    transform: translateY(-50%);
    width: 360px;
    max-height: calc(100% - 2.5rem);
    overflow-y: auto;
    overscroll-behavior: contain;
    z-index: 3;
  }

  .hero__content .container { position: relative; }
}

@media (min-width: 1280px) {
  .hero-form { width: 390px; }
}

/* ---- Gallery ------------------------------------------------------------- */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  gap: var(--space-4);
}

.gallery-item {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--color-surface-sunken);
  cursor: zoom-in;
}

.gallery-item .media,
.gallery-item .placeholder { border-radius: var(--radius-lg); height: 100%; }

.gallery-item__caption {
  display: block;
  padding: var(--space-3) var(--space-1) 0;
  font-size: var(--fs-sm);
  color: var(--color-muted);
  text-align: left;
}

.gallery-item:hover .media img { transform: scale(1.03); }

.gallery-item .media img { transition: transform var(--dur-slow) var(--ease); }

/* Gallery filter tabs */
.gallery-filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
}

.gallery-filter {
  padding: 0.5rem 1.1rem;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-pill);
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--color-ink-soft);
  background: var(--color-surface);
  transition: all var(--dur) var(--ease);
}

.gallery-filter[aria-pressed="true"] {
  background: var(--color-ink);
  border-color: var(--color-ink);
  color: var(--color-inverse);
}

/* ---- Lightbox ------------------------------------------------------------ */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: var(--z-lightbox);
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--space-5);
  background: rgba(14, 13, 10, 0.94);
}

.lightbox.is-open { display: flex; }

.lightbox__figure {
  max-width: min(1100px, 92vw);
  max-height: 86vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.lightbox__stage {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox__stage img {
  max-width: 100%;
  max-height: 72vh;
  object-fit: contain;
  border-radius: var(--radius);
}

.lightbox__stage .placeholder {
  width: min(900px, 88vw);
  aspect-ratio: 3 / 2;
}

.lightbox__caption {
  color: rgba(246, 243, 237, 0.8);
  font-size: var(--fs-base);
  text-align: center;
}

.lightbox__close,
.lightbox__prev,
.lightbox__next {
  position: absolute;
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(246, 243, 237, 0.3);
  border-radius: 50%;
  color: var(--color-inverse);
  background: rgba(20, 19, 14, 0.6);
}

.lightbox__close { top: var(--space-5); right: var(--space-5); font-size: 1.4rem; }
.lightbox__prev { left: var(--space-4); top: 50%; transform: translateY(-50%); }
.lightbox__next { right: var(--space-4); top: 50%; transform: translateY(-50%); }

.lightbox__close:hover,
.lightbox__prev:hover,
.lightbox__next:hover {
  background: var(--color-inverse);
  color: var(--color-ink);
}

.lightbox__counter {
  position: absolute;
  bottom: var(--space-5);
  left: 50%;
  transform: translateX(-50%);
  font-size: var(--fs-sm);
  color: rgba(246, 243, 237, 0.7);
  font-variant-numeric: tabular-nums;
}

/* ---- Modal --------------------------------------------------------------- */

.modal {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  overflow-y: auto;
}

.modal.is-open { display: flex; }

.modal__backdrop {
  position: fixed;
  inset: 0;
  background: rgba(16, 15, 11, 0.6);
}

.modal__dialog {
  position: relative;
  width: min(520px, 100%);
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--color-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: clamp(1.25rem, 1rem + 1.5vw, 2rem);
  margin: auto;
}

.modal__close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 1.35rem;
  line-height: 1;
  color: var(--color-muted);
}

.modal__close:hover { background: var(--color-surface-sunken); color: var(--color-ink); }

.modal__dialog .lead-form {
  border: 0;
  box-shadow: none;
  padding: 0;
  background: transparent;
}

/* ---- Sticky mobile action bar -------------------------------------------- */

.mobile-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: var(--z-mobilebar);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  box-shadow: 0 -4px 20px rgba(26, 25, 23, 0.08);
  padding-bottom: env(safe-area-inset-bottom);
}

.mobile-bar__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: var(--mobile-bar-height);
  padding: 0.4rem 0.25rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--color-ink);
  border-right: 1px solid var(--color-border);
}

.mobile-bar__item:last-child {
  border-right: 0;
  background: var(--color-ink);
  color: var(--color-inverse);
}

.mobile-bar__item svg { width: 19px; height: 19px; }

.mobile-bar__item--whatsapp { color: var(--color-whatsapp); }

@media (min-width: 900px) { .mobile-bar { display: none; } }

/* ---- Desktop floating enquiry button ------------------------------------- */

.float-cta {
  display: none;
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: var(--z-float);
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.35rem;
  background: var(--color-ink);
  color: var(--color-inverse);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-lg);
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease),
              background var(--dur) var(--ease);
}

.float-cta.is-visible { opacity: 1; transform: translateY(0); }

.float-cta:hover { background: var(--color-accent-strong); }

@media (min-width: 900px) { .float-cta { display: inline-flex; } }

/* ---- CTA band ------------------------------------------------------------ */

.cta-band {
  background: var(--color-dark);
  color: rgba(246, 243, 237, 0.75);
  padding-block: clamp(2.5rem, 1.5rem + 4vw, 4.5rem);
  position: relative;
  overflow: hidden;
}

.cta-band::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(70% 120% at 100% 0%, rgba(156, 122, 53, 0.25), transparent 62%);
}

.cta-band > .container { position: relative; z-index: 1; }

.cta-band h2 { color: var(--color-inverse); }

.cta-band__inner {
  display: grid;
  gap: var(--space-5);
  align-items: center;
}

@media (min-width: 880px) {
  .cta-band__inner { grid-template-columns: 1.2fr auto; }
}

/* ---- Pull quote / editorial note ----------------------------------------- */

.pullquote {
  border-left: 2px solid var(--color-accent);
  padding-left: var(--space-5);
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 1.05rem + 0.9vw, 1.6rem);
  line-height: 1.4;
  color: var(--color-ink);
}

/* ---- Cookie / consent notice --------------------------------------------- */

.consent-bar {
  position: fixed;
  left: var(--space-4);
  right: var(--space-4);
  bottom: calc(var(--mobile-bar-height) + var(--space-4) + env(safe-area-inset-bottom));
  z-index: var(--z-float);
  display: none;
  gap: var(--space-4);
  align-items: center;
  flex-wrap: wrap;
  max-width: 760px;
  margin-inline: auto;
  padding: var(--space-4) var(--space-5);
  background: var(--color-surface);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  font-size: var(--fs-sm);
}

.consent-bar.is-visible { display: flex; }

.consent-bar p { flex: 1 1 260px; margin: 0; }

/* On desktop the notice becomes a slim full-width strip pinned to the very
   bottom edge, so it never sits on top of the hero CTAs or the enquiry card. */
@media (min-width: 900px) {
  .consent-bar {
    left: 0;
    right: 0;
    bottom: 0;
    max-width: none;
    margin-inline: 0;
    padding: var(--space-3) var(--gutter);
    padding-right: 220px;
    border-radius: 0;
    border-width: 1px 0 0;
    box-shadow: 0 -4px 20px rgba(26, 25, 23, 0.1);
    justify-content: center;
  }

  .consent-bar p { flex: 0 1 auto; }
}

/* ---- Hero placeholder variants -------------------------------------------
   Distinct tonal treatments per slide until real project photography is
   supplied. Swap each rule for a real <img> inside .hero__bg.
   -------------------------------------------------------------------------- */

.hero__bg--v2 {
  background:
    radial-gradient(85% 75% at 78% 25%, #332d1e 0%, transparent 62%),
    radial-gradient(70% 70% at 15% 85%, #262318 0%, transparent 60%),
    linear-gradient(150deg, #1d1b14 0%, #292518 100%);
}

.hero__bg--v3 {
  background:
    radial-gradient(95% 80% at 30% 85%, #2a2a20 0%, transparent 60%),
    radial-gradient(70% 70% at 85% 15%, #3b3120 0%, transparent 62%),
    linear-gradient(200deg, #191811 0%, #23211a 100%);
}

.hero__bg--v4 {
  background:
    radial-gradient(90% 90% at 50% 10%, #3a3122 0%, transparent 58%),
    linear-gradient(180deg, #1c1a13 0%, #242118 100%);
}

/* Placeholder frames used inside cards keep a consistent aspect ratio. */
.placeholder--4x3 { aspect-ratio: 4 / 3; }
.placeholder--3x2 { aspect-ratio: 3 / 2; }
.placeholder--16x10 { aspect-ratio: 16 / 10; }

/* ---- Sticky mobile bar column counts -------------------------------------
   The bar rebalances itself when the phone / WhatsApp channels are switched
   off during pre-launch (see contactChannels in assets/js/config.js).
   -------------------------------------------------------------------------- */

.mobile-bar--1 { grid-template-columns: 1fr; }
.mobile-bar--2 { grid-template-columns: repeat(2, 1fr); }
.mobile-bar--3 { grid-template-columns: repeat(3, 1fr); }

/* When only the enquiry action remains, give it the full-width accent style. */
.mobile-bar--1 .mobile-bar__item {
  flex-direction: row;
  gap: 0.5rem;
  background: var(--color-ink);
  color: var(--color-inverse);
  border-right: 0;
  font-size: var(--fs-sm);
}

/* ---- Figures with real project imagery ----------------------------------- */

.figure {
  margin: 0;
  display: grid;
  gap: var(--space-3);
}

.figure figcaption {
  font-size: var(--fs-sm);
  color: var(--color-muted);
  line-height: 1.5;
}

/* A render is an artist's impression, never a photograph — the caption says so
   and this style keeps that note visible rather than decorative. */
.figure__note {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: var(--fs-xs);
  letter-spacing: 0.02em;
  color: var(--color-muted);
}

.figure__note::before {
  content: "";
  width: 5px;
  height: 5px;
  background: var(--color-accent);
  transform: rotate(45deg);
  flex-shrink: 0;
}

/* Plan drawings must never be cropped — contain them on a light ground. */
.media--plan { background: #fff; }
.media--plan img { object-fit: contain; padding: var(--space-3); }

/* ---- Brand self-link -----------------------------------------------------
   The first mention of the project name in the body copy of each main page
   links to the homepage. Bold is applied here rather than with a nested
   <strong>, so the anchor stays valid inside headings and existing <strong>.
   -------------------------------------------------------------------------- */

.brand-link {
  font-weight: 700;
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--color-accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color var(--dur-fast) var(--ease);
}

.brand-link:hover,
.brand-link:focus-visible {
  color: var(--color-accent-strong);
  text-decoration-color: currentColor;
}

/* On dark panels the accent underline would disappear against the background. */
.section--dark .brand-link,
.page-hero .brand-link,
.cta-band .brand-link { color: var(--color-inverse); }

/* ---- Outbound reference links --------------------------------------------
   The first mention of a few key terms links out to an authoritative source
   (Wikipedia, TN RERA, Chennai Metro Rail, the developer). Bold comes from
   CSS rather than a nested <strong>, so the anchor stays valid wherever it
   lands. One link per term per page.
   -------------------------------------------------------------------------- */

.ext-link {
  font-weight: 700;
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--color-accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color var(--dur-fast) var(--ease);
}

.ext-link:hover,
.ext-link:focus-visible {
  color: var(--color-accent-strong);
  text-decoration-color: currentColor;
}

/* Keep it legible on the dark panels. */
.section--dark .ext-link,
.cta-band .ext-link,
.site-footer .ext-link { color: var(--color-inverse); }

/* Currency glyph in the sticky bar. Uses the real ₹ character rather than a
   drawn path, so it is correct whatever font the device falls back to, and
   is sized to sit on the same optical line as the neighbouring SVG icons. */
.mobile-bar__glyph {
  display: block;
  font-size: 19px;
  line-height: 19px;
  height: 19px;
  font-weight: 600;
  font-variant-numeric: normal;
}
