/* =========================================================
   SpaceGlam shared theme: font, service-style loader, hero,
   parallax grid and page consistency helpers.
========================================================= */
:root {
  --bg: #fbfaf8;
  --paper: #f8f5ef;
  --sand: #ece6dc;
  --ink: #111111;
  --gold: #b98d53;
  --blue: #34465f;
  --teal: #658d89;
  --navy: #2f3f5c;
  --line: #e6ded2;
  --ease: cubic-bezier(.19, 1, .22, 1);
}

html {
  scroll-behavior: smooth;
  max-width: 100%;
  overflow-x: clip;
}

body {
  max-width: 100%;
  overflow-x: clip;
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", Arial, sans-serif !important;
}

body.nav-stable-page,
body.nav-stable-page main,
main {
  max-width: 100%;
  overflow-x: clip;
}

body.menu-open {
  overflow: hidden !important;
}

.sg-parallax-grid {
  position: fixed;
  inset: -25vh -12vw;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(185, 141, 83, 0.10) 1px, transparent 1px),
    linear-gradient(90deg, rgba(185, 141, 83, 0.10) 1px, transparent 1px),
    radial-gradient(circle at 18% 18%, rgba(185, 141, 83, 0.14), transparent 24%),
    radial-gradient(circle at 82% 74%, rgba(101, 141, 137, 0.12), transparent 28%);
  background-size: 72px 72px, 72px 72px, 100% 100%, 100% 100%;
  opacity: 0.42;
  transform: translate3d(0, var(--sg-grid-y, 0px), 0);
  will-change: transform;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(251, 250, 248, 0.88), rgba(248, 245, 239, 0.94));
}

.loader,
.about-loader {
  position: fixed !important;
  inset: 0 !important;
  z-index: 9999 !important;
  display: grid !important;
  place-items: center !important;
  gap: 22px !important;
  background:
    radial-gradient(circle at 16% 18%, rgba(185, 141, 83, 0.16), transparent 22%),
    radial-gradient(circle at 84% 82%, rgba(101, 141, 137, 0.14), transparent 28%),
    linear-gradient(180deg, #fffdf9 0%, #f3eee6 100%) !important;
  color: var(--ink) !important;
  transition: opacity .75s ease, transform 1s var(--ease) !important;
}

.loader.hide,
.about-loader.hide {
  opacity: 0 !important;
  transform: translateY(-100%) !important;
  pointer-events: none !important;
}

.loader span,
.about-loader span {
  font-family: "Inter", Arial, sans-serif !important;
  font-size: clamp(22px, 4vw, 42px) !important;
  font-weight: 700 !important;
  letter-spacing: .16em !important;
  text-transform: none !important;
  text-shadow: 0 8px 20px rgba(0, 0, 0, 0.08) !important;
}

.loader div,
.about-loader div {
  width: min(330px, 70vw) !important;
  height: 2px !important;
  background: var(--line) !important;
  border-radius: 999px !important;
  overflow: hidden !important;
}

.loader i,
.about-loader i {
  display: block !important;
  width: 45% !important;
  height: 100% !important;
  background: linear-gradient(90deg, var(--gold), var(--blue)) !important;
  animation: sgCommonLoading 1.2s var(--ease) infinite !important;
}

@keyframes sgCommonLoading {
  from { transform: translateX(-120%); }
  to { transform: translateX(260%); }
}

.scroll-progress {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  z-index: 5001 !important;
  height: 2px !important;
  width: 0;
  background: var(--gold) !important;
}

.sg-unified-hero,
.hero-section.sg-unified-hero {
  position: relative;
  isolation: isolate;
  min-height: 760px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  border-bottom: 1px solid var(--line);
  padding-top: 76px;
  background:
    linear-gradient(180deg, rgba(251, 250, 248, 0.96), rgba(248, 245, 239, 0.96));
  overflow: hidden;
}

.sg-unified-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(rgba(185, 141, 83, 0.075) 1px, transparent 1px),
    linear-gradient(90deg, rgba(185, 141, 83, 0.075) 1px, transparent 1px),
    radial-gradient(circle at 22% 22%, rgba(185, 141, 83, 0.18), transparent 26%),
    radial-gradient(circle at 82% 68%, rgba(101, 141, 137, 0.13), transparent 30%);
  background-size: 74px 74px, 74px 74px, 100% 100%, 100% 100%;
  transform: translate3d(0, calc(var(--sg-grid-y, 0px) * .24), 0);
}

.sg-unified-hero .hero-copy {
  align-self: center;
  max-width: 570px;
  width: auto;
  margin-left: clamp(52px, 7vw, 130px);
  padding: 70px 0;
  text-align: left;
  justify-self: auto;
  color: var(--ink);
}

.sg-unified-hero .split-title,
.sg-unified-hero .hero-copy h1 {
  margin: 0 0 28px;
  font-family: "Cormorant Garamond", Georgia, serif !important;
  font-weight: 400 !important;
  font-size: clamp(58px, 7.8vw, 118px) !important;
  line-height: 0.9 !important;
  letter-spacing: -0.055em !important;
  color: var(--ink) !important;
}

.sg-unified-hero .gold-label {
  margin: 0 0 28px;
  color: var(--gold) !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  letter-spacing: 0.18em !important;
  line-height: 1.45 !important;
  text-transform: uppercase;
}

.sg-unified-hero .hero-copy p:not(.gold-label) {
  margin: 0 0 20px;
  color: rgba(17, 17, 17, 0.76) !important;
  font-family: "Inter", Arial, sans-serif !important;
  font-size: 15px !important;
  line-height: 1.78 !important;
  letter-spacing: 0 !important;
}

.sg-unified-hero .hero-image {
  margin: 0;
  min-height: 690px;
  width: 100%;
  height: auto;
  align-self: stretch;
  justify-self: stretch;
  overflow: hidden;
  background: var(--line);
}

.sg-unified-hero .hero-image img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 690px;
  object-fit: cover;
  transform: scale(1.02);
}

.sg-client-note-block,
.testimonial.sg-client-note-block {
  min-height: auto !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
  gap: clamp(28px, 6vw, 90px) !important;
  align-items: start !important;
  padding: clamp(80px, 10vw, 148px) clamp(22px, 7vw, 110px) !important;
  background: var(--paper) !important;
  color: var(--ink) !important;
}

.sg-client-note-block .quote p {
  margin: 0 0 18px !important;
  font-family: "Cormorant Garamond", Georgia, serif !important;
  font-size: clamp(27px, 3.2vw, 52px) !important;
  font-weight: 400 !important;
  line-height: 1.08 !important;
  letter-spacing: -0.035em !important;
}

.sg-client-note-block .quote span {
  display: inline-block;
  margin-top: 14px;
  color: var(--gold) !important;
  border: 0 !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  letter-spacing: .18em !important;
  text-transform: uppercase;
}

body.case-study-unified .overlay-content {
  margin-top: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body.case-study-unified .fixed-hero,
body.case-study-unified .intro-section,
body.case-study-unified .split-images {
  display: none !important;
}

body.contact-unified .contact-page {
  display: block;
  min-height: auto;
  padding: clamp(70px, 9vw, 120px) 32px 120px;
  background: transparent;
}

body.contact-unified .contact-wrap {
  margin: 0 auto;
}

@media (max-width: 980px) {
  .sg-unified-hero,
  .hero-section.sg-unified-hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .sg-unified-hero .hero-copy {
    margin: 0;
    max-width: none;
    padding: 110px 28px 56px;
  }

  .sg-unified-hero .hero-image,
  .sg-unified-hero .hero-image img {
    min-height: 520px;
  }

  .sg-client-note-block,
  .testimonial.sg-client-note-block {
    grid-template-columns: 1fr !important;
    padding-inline: 28px !important;
  }
}

@media (max-width: 640px) {
  .sg-parallax-grid {
    background-size: 48px 48px, 48px 48px, 100% 100%, 100% 100%;
    opacity: 0.30;
  }

  .sg-unified-hero .hero-copy {
    padding: 96px 20px 42px;
  }

  .sg-unified-hero .split-title,
  .sg-unified-hero .hero-copy h1 {
    font-size: clamp(48px, 18vw, 76px) !important;
  }

  .sg-unified-hero .hero-copy p:not(.gold-label) {
    font-size: 14px !important;
  }

  .sg-unified-hero .hero-image,
  .sg-unified-hero .hero-image img {
    min-height: 430px;
  }

  body.contact-unified .contact-page {
    padding-inline: 18px;
  }
}

/* Contact page places the shared hero above the enquiry card. */
body.contact-unified .contact-page {
  padding: 0 0 120px !important;
}

body.contact-unified .contact-wrap {
  padding-top: clamp(70px, 8vw, 110px) !important;
}

/* Shared reveal animation used by the unified hero/contact sections. */
.reveal-up,
.reveal-img {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity .9s ease, transform .9s var(--ease), clip-path 1s var(--ease);
}

.reveal-img {
  clip-path: inset(10% 0 10% 0);
}

.reveal-up.visible,
.reveal-img.visible {
  opacity: 1;
  transform: translateY(0);
  clip-path: inset(0 0 0 0);
}

/* Keep the parallax grid above the page canvas but below actual content. */
.sg-parallax-grid {
  z-index: 0;
}

body > :not(.sg-parallax-grid):not(.loader):not(.about-loader):not(.scroll-progress) {
  position: relative;
  z-index: 1;
}


/* Shared Our Projects grid copied from Home */
/* === Section 3: Commercial / Residential service project tabs === */
.sg-services-showcase {
  position: relative;
  padding: clamp(86px, 8vw, 138px) 24px clamp(110px, 10vw, 170px);
  background: #fbfaf7;
  overflow: hidden;
}

.sg-services-hero {
  width: min(1320px, 100%);
  min-height: 290px;
  margin: 0 auto 46px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 22px;
  background: #f1f3f7;
  text-align: center;
}

.sg-services-hero h2 {
  margin: 0;
  color: #1f2d44;
  font-family: Inter, Arial, sans-serif;
  font-size: clamp(34px, 3vw, 52px);
  font-weight: 300;
  letter-spacing: 0.04em;
}

.sg-services-hero p {
  margin: 0;
  color: #99a2b2;
  font-size: 17px;
}

.sg-services-wrap {
  width: min(1280px, 100%);
  margin: 0 auto;
}

.sg-service-tabs {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 38px;
  color: #1a1a1a;
}

.sg-service-tabs span {
  color: #1a1a1a;
  opacity: 0.55;
  font-size: 22px;
}

.sg-tab {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  color: #1a1a1a;
  cursor: pointer;
  font-family: Inter, Arial, sans-serif;
  font-size: 18px;
  font-weight: 400;
  letter-spacing: 0.22em;
  transition:
    color 0.25s ease,
    opacity 0.25s ease;
}

.sg-tab.is-active {
  font-weight: 700;
}

.sg-tab:not(.is-active) {
  opacity: 0.72;
}

.sg-tab:hover {
  opacity: 1;
  color: var(--gold);
}

.sg-tab-line {
  width: 64px;
  height: 2px;
  margin-bottom: 42px;
  background: #171717;
  transform-origin: left;
  animation: sgLineIn 0.75s var(--ease) both;
}

@keyframes sgLineIn {
  from {
    transform: scaleX(0);
    opacity: 0;
  }
  to {
    transform: scaleX(1);
    opacity: 1;
  }
}

.sg-tab-panel {
  display: none;
}

.sg-tab-panel.is-active {
  display: block;
  animation: sgPanelIn 0.55s var(--ease) both;
}

@keyframes sgPanelIn {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Commercial: 6 compact portfolio cards */
.sg-commercial-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  padding-bottom: 0;
  border-bottom: 1px solid rgba(20, 20, 20, 0.75);
}

.sg-commercial-card {
  position: relative;
  display: block;
  height: 265px;
  overflow: hidden;
  background: #e7e2da;
}

.sg-commercial-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
  transition:
    transform 0.75s var(--ease),
    filter 0.35s ease,
    opacity 0.35s ease;
}

.sg-commercial-card span {
  position: absolute;
  left: 22px;
  bottom: 20px;
  z-index: 2;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity 0.35s ease,
    transform 0.35s var(--ease);
  text-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.sg-commercial-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.42));
  opacity: 0;
  transition: opacity 0.35s ease;
}

.sg-commercial-card:hover img {
  transform: scale(1.08);
  filter: saturate(1.08) contrast(1.03);
}

.sg-commercial-card:hover::after,
.sg-commercial-card:hover span {
  opacity: 1;
}

.sg-commercial-card:hover span {
  transform: translateY(0);
}

/* Residential: big image + title + desc + button cards */
.sg-residential-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: 92px 86px;
  background: #eee9df;
  margin: 0 -24px;
  padding: 48px;
}

.sg-residential-card {
  min-width: 0;
}

.sg-residential-image {
  display: block;
  width: 100%;
  aspect-ratio: 1.18 / 1;
  overflow: hidden;
  background: #ddd5c8;
}

.sg-residential-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.01);
  transition:
    transform 0.85s var(--ease),
    filter 0.35s ease;
}

.sg-residential-card:hover .sg-residential-image img {
  transform: scale(1.055);
  filter: saturate(1.08) contrast(1.02);
}

.sg-residential-copy {
  border-top: 1px solid rgba(20, 20, 20, 0.78);
  margin-top: 34px;
  padding-top: 34px;
}

.sg-residential-copy h3 {
  margin: 0 0 28px;
  color: #191919;
  font-family: Inter, Arial, sans-serif;
  font-size: clamp(32px, 3vw, 48px);
  font-weight: 400;
  letter-spacing: -0.04em;
}

.sg-residential-copy p {
  margin: 0 0 44px;
  color: #202020;
  font-size: 20px;
  line-height: 1.45;
}

.sg-know-more {
  width: 176px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid #151515;
  border-radius: 999px;
  color: #1b1b1b;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.04em;
  transition:
    background 0.28s ease,
    color 0.28s ease,
    transform 0.28s var(--ease);
}

.sg-know-more:hover {
  background: #151515;
  color: #fff;
  transform: translateY(-4px);
}

@media (max-width: 980px) {
  .sg-services-hero {
    min-height: 240px;
    margin-bottom: 42px;
  }

  .sg-commercial-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .sg-commercial-card {
    height: 250px;
  }

  .sg-residential-grid {
    grid-template-columns: 1fr;
    gap: 70px;
    margin: 0;
    padding: 34px;
  }
}

@media (max-width: 560px) {
  .sg-services-showcase {
    padding: 72px 18px 90px;
  }

  .sg-services-hero {
    min-height: 190px;
    padding: 38px 18px;
    margin-bottom: 36px;
  }

  .sg-services-hero h2 {
    font-size: 28px;
    line-height: 1.2;
  }

  .sg-services-hero p {
    font-size: 14px;
  }

  .sg-service-tabs {
    justify-content: center;
    gap: 10px;
    margin-bottom: 28px;
  }

  .sg-tab {
    font-size: 13px;
    letter-spacing: 0.18em;
  }

  .sg-service-tabs span {
    font-size: 16px;
  }

  .sg-tab-line {
    width: 54px;
    margin: 0 auto 34px;
  }

  .sg-commercial-grid {
    grid-template-columns: 1fr;
    gap: 16px;
    border-bottom: 1px solid rgba(20, 20, 20, 0.55);
  }

  .sg-commercial-card {
    height: auto;
    aspect-ratio: 1.28 / 1;
  }

  .sg-commercial-card span,
  .sg-commercial-card::after {
    opacity: 1;
  }

  .sg-commercial-card span {
    transform: none;
    font-size: 12px;
  }

  .sg-residential-grid {
    gap: 58px;
    padding: 26px 0;
    background: #eee9df;
    margin: 0 -18px;
  }

  .sg-residential-card {
    padding: 0 18px;
  }

  .sg-residential-image {
    aspect-ratio: 1.08 / 1;
  }

  .sg-residential-copy {
    margin-top: 26px;
    padding-top: 26px;
  }

  .sg-residential-copy h3 {
    font-size: 34px;
    margin-bottom: 20px;
  }

  .sg-residential-copy p {
    font-size: 16px;
    margin-bottom: 28px;
  }

  .sg-know-more {
    width: 150px;
    height: 44px;
    font-size: 13px;
  }
}

/* Simple separate pages for Section 3 project cards */
.sg-project-detail {
  min-height: 100vh;
  padding: clamp(28px, 5vw, 70px);
  background: #fbfaf7;
  color: #111;
}

.sg-project-back {
  display: inline-block;
  margin-bottom: 70px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.sg-project-detail > p {
  margin: 0 0 18px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.sg-project-detail h1 {
  margin: 0 0 42px;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(62px, 10vw, 148px);
  font-weight: 400;
  line-height: 0.9;
  letter-spacing: -0.055em;
}

.sg-project-detail img {
  width: 100%;
  max-height: 760px;
  object-fit: cover;
  margin-bottom: 52px;
}

.sg-project-detail-copy {
  width: min(760px, 100%);
  margin-left: auto;
}

.sg-project-detail-copy h2 {
  margin: 0 0 18px;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 44px;
  font-weight: 400;
}

.sg-project-detail-copy p {
  font-size: 19px;
  line-height: 1.75;
}

@media (max-width: 560px) {
  .sg-project-back {
    margin-bottom: 44px;
  }

  .sg-project-detail h1 {
    font-size: 58px;
  }

  .sg-project-detail-copy p {
    font-size: 16px;
  }
}

/* === V17 FIX: full animation polish + separated residential cards === */

/* Smooth premium motion on the whole page */
html {
  scroll-behavior: smooth;
}

body {
  background: #fbfaf7;
}

.sg-services-showcase {
  isolation: isolate;
}

.sg-services-showcase::before,
.sg-services-showcase::after {
  content: "";
  position: absolute;
  z-index: 0;
  width: 360px;
  height: 360px;
  border-radius: 999px;
  filter: blur(70px);
  opacity: 0.18;
  pointer-events: none;
  animation: sgAmbientFloat 9s ease-in-out infinite alternate;
}

.sg-services-showcase::before {
  left: -150px;
  top: 180px;
  background: #b98b51;
}

.sg-services-showcase::after {
  right: -160px;
  bottom: 220px;
  background: #809891;
  animation-delay: -2.8s;
}

@keyframes sgAmbientFloat {
  from {
    transform: translate3d(0, 0, 0) scale(0.92);
  }
  to {
    transform: translate3d(38px, -28px, 0) scale(1.08);
  }
}

.sg-services-wrap,
.sg-services-hero {
  position: relative;
  z-index: 2;
}

/* Hero title gets a soft breathing gradient */
.sg-services-hero {
  overflow: hidden;
  background:
    radial-gradient(
      circle at 20% 20%,
      rgba(255, 255, 255, 0.94),
      transparent 26%
    ),
    linear-gradient(135deg, #eef0f4, #f8f6f0, #edf1f4) !important;
  background-size: 180% 180% !important;
  animation: sgSoftPanel 7s ease-in-out infinite alternate;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.045);
}

@keyframes sgSoftPanel {
  from {
    background-position: 0% 50%;
  }
  to {
    background-position: 100% 50%;
  }
}

/* Tabs feel more alive */
.sg-tab {
  position: relative;
}

.sg-tab::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -10px;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease);
}

.sg-tab.is-active::after,
.sg-tab:hover::after {
  transform: scaleX(1);
}

/* Better panel entrance */
.sg-tab-panel.is-active {
  animation: sgPanelReveal 0.72s var(--ease) both !important;
}

@keyframes sgPanelReveal {
  from {
    opacity: 0;
    transform: translateY(28px) scale(0.985);
    filter: blur(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

/* Commercial cards: more motion, cleaner depth */
.sg-commercial-card {
  border-radius: 18px;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.08);
  transition:
    transform 0.45s var(--ease),
    box-shadow 0.45s ease,
    border-radius 0.45s var(--ease);
}

.sg-commercial-card:hover {
  transform: translateY(-10px) scale(1.015);
  border-radius: 28px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.16);
}

/* RESIDENTIAL: now each item is a separate card */
.sg-residential-grid {
  gap: 70px 56px !important;
  padding: 54px !important;
  align-items: stretch !important;
}

.sg-residential-card {
  position: relative;
  display: flex !important;
  flex-direction: column !important;
  min-height: 100% !important;
  padding: 26px !important;
  border: 1px solid rgba(20, 20, 20, 0.1) !important;
  border-radius: 28px !important;
  background: rgba(251, 250, 247, 0.78) !important;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.07) !important;
  overflow: hidden !important;
  transform: translateY(0);
  transition:
    transform 0.5s var(--ease),
    box-shadow 0.5s ease,
    background 0.35s ease,
    border-color 0.35s ease !important;
}

.sg-residential-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: 0;
  border-radius: inherit;
  background:
    radial-gradient(
      circle at 22% 0%,
      rgba(185, 139, 81, 0.14),
      transparent 35%
    ),
    radial-gradient(circle at 100% 92%, rgba(56, 70, 94, 0.1), transparent 36%);
  opacity: 0;
  transition: opacity 0.45s ease;
}

.sg-residential-card:hover {
  transform: translateY(-14px);
  background: #fffaf3 !important;
  border-color: rgba(185, 139, 81, 0.3) !important;
  box-shadow: 0 34px 88px rgba(0, 0, 0, 0.13) !important;
}

.sg-residential-card:hover::before {
  opacity: 1;
}

.sg-residential-image,
.sg-residential-copy {
  position: relative;
  z-index: 1;
}

.sg-residential-image {
  border-radius: 20px !important;
  overflow: hidden !important;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.09);
}

.sg-residential-copy {
  display: flex !important;
  flex-direction: column !important;
  flex: 1 !important;
  border-top: 1px solid rgba(20, 20, 20, 0.72) !important;
}

.sg-residential-copy p {
  flex: 1 !important;
}

.sg-know-more {
  position: relative;
  overflow: hidden;
}

.sg-know-more::before {
  content: "";
  position: absolute;
  top: 0;
  left: -120%;
  width: 80%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.38),
    transparent
  );
  transform: skewX(-18deg);
  transition: left 0.58s ease;
}

.sg-know-more:hover::before {
  left: 140%;
}

/* Scroll reveal feels stronger */
.reveal-up {
  opacity: 0;
  transform: translateY(42px);
  filter: blur(8px);
  transition:
    opacity 0.8s ease,
    transform 0.9s var(--ease),
    filter 0.9s ease;
}

.reveal-up.visible {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

/* Stagger residential cards */
.sg-residential-card:nth-child(2n) {
  transition-delay: 0.08s;
}

.sg-residential-card:nth-child(3n) {
  transition-delay: 0.14s;
}

/* Stagger commercial cards */
.sg-commercial-card:nth-child(2) {
  transition-delay: 0.05s;
}
.sg-commercial-card:nth-child(3) {
  transition-delay: 0.1s;
}
.sg-commercial-card:nth-child(4) {
  transition-delay: 0.15s;
}
.sg-commercial-card:nth-child(5) {
  transition-delay: 0.2s;
}
.sg-commercial-card:nth-child(6) {
  transition-delay: 0.25s;
}

/* On mobile: cards get a clean gap and never merge */
@media (max-width: 980px) {
  .sg-residential-grid {
    gap: 42px !important;
    padding: 34px !important;
  }

  .sg-residential-card {
    padding: 22px !important;
    border-radius: 24px !important;
  }
}

@media (max-width: 560px) {
  .sg-services-showcase::before,
  .sg-services-showcase::after {
    width: 220px;
    height: 220px;
    filter: blur(54px);
  }

  .sg-residential-grid {
    gap: 34px !important;
    padding: 22px 18px !important;
    margin: 0 -18px !important;
  }

  .sg-residential-card {
    padding: 18px !important;
    border-radius: 22px !important;
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.09) !important;
  }

  .sg-residential-image {
    border-radius: 16px !important;
  }

  .sg-residential-copy {
    margin-top: 24px !important;
    padding-top: 24px !important;
  }

  .sg-commercial-card {
    border-radius: 16px;
  }

  .sg-commercial-card:hover {
    transform: translateY(-6px) scale(1.01);
    border-radius: 22px;
  }

  .reveal-up {
    transform: translateY(28px);
    filter: blur(5px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .sg-services-showcase::before,
  .sg-services-showcase::after,
  .sg-services-hero,
  .sg-tab-panel.is-active {
    animation: none !important;
  }

  .reveal-up {
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }
}


/* =========================================================
   Project detail hero — same visual language as Services page
========================================================= */
.split-title .word {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
}

.split-title .word span {
  display: inline-block;
  transform: translateY(108%);
  animation: titleIn .95s var(--ease) forwards;
}

@keyframes titleIn {
  to { transform: translateY(0); }
}

body.sg-project-detail-page .sg-project-top-hero {
  margin-top: 0;
  border-bottom: 1px solid var(--line);
}

body.sg-project-detail-page .sg-project-top-hero .hero-copy {
  max-width: 650px;
}

body.sg-project-detail-page .sg-project-top-hero .hero-copy strong {
  color: var(--ink);
  font-weight: 800;
}

body.sg-project-detail-page .sg-project-top-hero .hero-image {
  position: relative;
}

body.sg-project-detail-page .sg-project-top-hero .hero-image::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(47, 63, 92, 0.14), transparent 42%);
}

body.sg-project-detail-page .sg-detail-hero {
  border-top: 1px solid rgba(185, 141, 83, 0.18);
}

@media (max-width: 980px) {
  body.sg-project-detail-page .sg-project-top-hero .hero-copy {
    padding-top: 120px;
  }
}

@media (max-width: 640px) {
  body.sg-project-detail-page .sg-project-top-hero .hero-copy {
    padding-top: 105px;
  }
}

/* =========================================================
   FIX: Keep shared hero in left-text / right-image layout
   on tablet and mobile screens (980px, 768px, 425px, 320px)
========================================================= */
@media (max-width: 980px) {
  .sg-unified-hero,
  .hero-section.sg-unified-hero {
    grid-template-columns: minmax(0, 1fr) minmax(260px, 0.86fr) !important;
    min-height: clamp(560px, 72vw, 720px) !important;
    align-items: stretch !important;
    padding-top: 70px !important;
  }

  .sg-unified-hero .hero-copy {
    align-self: center !important;
    max-width: 520px !important;
    margin: 0 !important;
    padding: clamp(52px, 8vw, 86px) clamp(22px, 5vw, 52px) !important;
  }

  .sg-unified-hero .split-title,
  .sg-unified-hero .hero-copy h1 {
    font-size: clamp(46px, 6.2vw, 72px) !important;
    line-height: .92 !important;
    margin-bottom: 22px !important;
  }

  .sg-unified-hero .gold-label {
    margin-bottom: 20px !important;
    font-size: 11px !important;
    letter-spacing: .16em !important;
  }

  .sg-unified-hero .hero-copy p:not(.gold-label) {
    font-size: 14px !important;
    line-height: 1.68 !important;
    margin-bottom: 16px !important;
  }

  .sg-unified-hero .hero-image,
  .sg-unified-hero .hero-image img {
    min-height: clamp(500px, 66vw, 650px) !important;
    height: 100% !important;
  }
}

@media (max-width: 768px) {
  .sg-unified-hero,
  .hero-section.sg-unified-hero {
    grid-template-columns: minmax(0, 1fr) minmax(230px, 0.76fr) !important;
    min-height: clamp(540px, 84vw, 660px) !important;
  }

  .sg-unified-hero .hero-copy {
    padding: 56px 22px 48px 28px !important;
  }

  .sg-unified-hero .split-title,
  .sg-unified-hero .hero-copy h1 {
    font-size: clamp(42px, 8vw, 62px) !important;
  }

  .sg-unified-hero .hero-image,
  .sg-unified-hero .hero-image img {
    min-height: clamp(520px, 86vw, 640px) !important;
  }
}

@media (max-width: 540px) {
  .sg-unified-hero,
  .hero-section.sg-unified-hero {
    grid-template-columns: minmax(0, 1.02fr) minmax(120px, .58fr) !important;
    min-height: 520px !important;
  }

  .sg-unified-hero .hero-copy {
    padding: 42px 14px 36px 18px !important;
  }

  .sg-unified-hero .split-title,
  .sg-unified-hero .hero-copy h1 {
    font-size: clamp(34px, 11vw, 48px) !important;
    margin-bottom: 16px !important;
  }

  .sg-unified-hero .gold-label {
    font-size: 9px !important;
    line-height: 1.5 !important;
    letter-spacing: .12em !important;
    margin-bottom: 14px !important;
  }

  .sg-unified-hero .hero-copy p:not(.gold-label) {
    font-size: 12px !important;
    line-height: 1.58 !important;
    margin-bottom: 12px !important;
  }

  .sg-unified-hero .hero-image,
  .sg-unified-hero .hero-image img {
    min-height: 520px !important;
  }
}

@media (max-width: 380px) {
  .sg-unified-hero,
  .hero-section.sg-unified-hero {
    grid-template-columns: minmax(0, 1fr) minmax(105px, .52fr) !important;
  }

  .sg-unified-hero .hero-copy {
    padding-left: 14px !important;
    padding-right: 10px !important;
  }

  .sg-unified-hero .split-title,
  .sg-unified-hero .hero-copy h1 {
    font-size: 32px !important;
  }
}


/* =========================================================
   MOBILE HERO REFINEMENT: real mobile gets a full-width image
   above the copy so the image does not become tiny.
========================================================= */
@media (max-width: 540px) {
  .sg-unified-hero,
  .hero-section.sg-unified-hero {
    display: flex !important;
    flex-direction: column !important;
    grid-template-columns: none !important;
    min-height: auto !important;
    padding-top: 76px !important;
    overflow: hidden !important;
  }

  .sg-unified-hero .hero-image {
    order: 1 !important;
    width: 100% !important;
    height: clamp(330px, 88vw, 460px) !important;
    min-height: 0 !important;
    align-self: stretch !important;
  }

  .sg-unified-hero .hero-image img {
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    object-fit: cover !important;
    object-position: center 18% !important;
    transform: none !important;
  }

  .sg-unified-hero .hero-copy {
    order: 2 !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 34px 20px 46px !important;
  }

  .sg-unified-hero .split-title,
  .sg-unified-hero .hero-copy h1 {
    font-size: clamp(42px, 13vw, 58px) !important;
    line-height: .9 !important;
    margin-bottom: 16px !important;
  }

  .sg-unified-hero .gold-label {
    max-width: 320px !important;
    font-size: 9.5px !important;
    line-height: 1.6 !important;
    letter-spacing: .13em !important;
    margin-bottom: 16px !important;
  }

  .sg-unified-hero .hero-copy p:not(.gold-label) {
    max-width: 360px !important;
    font-size: 13px !important;
    line-height: 1.62 !important;
    margin-bottom: 13px !important;
  }
}

@media (max-width: 380px) {
  .sg-unified-hero .hero-image {
    height: 320px !important;
  }

  .sg-unified-hero .hero-copy {
    padding-inline: 16px !important;
  }

  .sg-unified-hero .split-title,
  .sg-unified-hero .hero-copy h1 {
    font-size: 40px !important;
  }
}
