/* ==========================================================
   BIGCIVIL GROUP — Inner Pages & Component Design System
   Designs Catalog · House Detail · Portfolio Showcase · Project Gallery
   ========================================================== */

/* ---------- Global icon sizing & reset ---------- */
svg {
  display: inline-block;
  vertical-align: middle;
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
}
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.menu a.on { background: rgba(127, 127, 127, .16); opacity: 1; }
.nav.solid .nav-in { background: rgba(246, 243, 238, .88); border-color: var(--line); color: var(--text); box-shadow: var(--shadow-m); }

/* ---------- Dismissible Top Announcement Bar ---------- */
.announce {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 9px 46px 9px 16px;
}
.announce[hidden] {
  display: none !important;
}
.announce-in {
  line-height: 1.45;
}
.announce-close {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .16);
  color: rgba(255, 255, 255, .85);
  font-size: .78rem;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background .25s var(--ease), color .25s var(--ease), transform .25s var(--ease);
}
.announce-close:hover {
  background: var(--brass);
  border-color: var(--brass);
  color: var(--ink);
  transform: translateY(-50%) scale(1.08);
}
.nav {
  top: calc(var(--ann-h, 38px) + 10px);
}
body.announce-hidden .nav,
.nav.stuck {
  top: 12px;
}

/* ---------- Mobile-First Service Card CTA & Header Actions ---------- */
.tile-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  font-family: var(--font);
  font-size: .86rem;
  font-weight: 700;
  color: var(--brass-2);
  letter-spacing: .01em;
}
.tile-cta svg {
  width: 16px;
  height: 16px;
  transition: transform .3s var(--ease);
}
.tile:hover .tile-cta svg {
  transform: translateX(5px);
}
.sec-head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

/* ---------- Sticky Mobile Bottom Navigation Bar (5 Main Pages) ---------- */
.m-bottom-nav {
  display: none;
}

/* ---------- Mobile Drawer Enhancements ---------- */
.drawer-actions {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.drawer-actions .btn {
  margin-top: 0;
}
.drawer a.big.on {
  color: var(--brass-2);
}

/* ---------- Detail top padding (house & project) ---------- */
.house-detail-top {
  padding: 130px 0 60px;
}

/* ---------- Page hero (catalog / portfolio) ---------- */
.page-hero {
  padding: 190px 0 70px;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(900px 450px at 85% 0%, rgba(201, 163, 106, .24), transparent 60%),
    radial-gradient(600px 350px at 0% 100%, rgba(201, 163, 106, .12), transparent 60%);
}
.page-hero h1 {
  font-family: var(--font);
  font-size: clamp(2.4rem, 5.8vw, 4.8rem);
  font-weight: 800;
  letter-spacing: -.035em;
  line-height: 1.1;
  margin-top: 16px;
}
.page-hero h1 em {
  font-style: normal;
  background: linear-gradient(120deg, var(--brass-2), var(--brass));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}
.page-hero .lead { color: var(--muted-d); max-width: 620px; margin-top: 14px; }

/* ---------- Filter toolbar ---------- */
.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.chips { display: flex; gap: 10px; flex-wrap: wrap; }
.fchip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 20px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: var(--paper);
  font-weight: 600;
  font-size: .92rem;
  transition: .3s var(--ease);
}
.fchip i {
  font-style: normal;
  font-family: var(--font);
  font-size: .75rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--bone-2);
  color: var(--muted);
  transition: .3s;
}
.fchip:hover { border-color: var(--ink); transform: translateY(-2px); }
.fchip[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.fchip[aria-pressed="true"] i { background: var(--brass); color: var(--ink); }
.search input {
  width: min(340px, 100%);
  padding: 13px 20px 13px 46px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='%236b6d75' stroke-width='2' stroke-linecap='round' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M21 21l-4.3-4.3'/%3E%3C/svg%3E") 18px center no-repeat;
  font: inherit;
  font-size: .92rem;
  outline: none;
  transition: .3s;
}
.search input:focus { border-color: var(--ink); box-shadow: 0 0 0 4px rgba(201, 163, 106, .25); }
.result { color: var(--muted); font-size: .92rem; margin: 4px 0 26px; }
.result b { color: var(--text); font-family: var(--font); }
.nf { text-align: center; padding: 70px 0; }
.nf .lead { margin-inline: auto; }

/* ---------- House catalog cards (.dgrid & .dcard) ---------- */
.dgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 28px; width: 100%; max-width: 100%; }
.dcard {
  display: flex;
  flex-direction: column;
  min-width: 0;
  max-width: 100%;
  background: var(--paper);
  border-radius: var(--r-l);
  overflow: hidden;
  border: 1px solid var(--line);
  transition: transform .5s var(--ease), box-shadow .5s var(--ease), border-color .3s;
  box-shadow: var(--shadow-s);
}
.dcard:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-m);
  border-color: rgba(201, 163, 106, .4);
}
.dcard .ph {
  position: relative;
  aspect-ratio: 16/11;
  overflow: hidden;
  background: var(--bone-2);
}
.dcard .ph img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s var(--ease);
}
.dcard:hover .ph img { transform: scale(1.07); }
.dcard .badge {
  position: absolute;
  left: 16px;
  top: 16px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(11, 12, 14, .82);
  color: #fff;
  backdrop-filter: blur(10px);
  font-family: var(--font);
  font-weight: 800;
  font-size: .78rem;
  letter-spacing: .06em;
}
.dcard .pill-cat {
  position: absolute;
  right: 16px;
  top: 16px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .9);
  color: var(--ink);
  backdrop-filter: blur(8px);
  font-size: .72rem;
  font-weight: 700;
}
.dcard .bd {
  padding: 22px 24px 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.card-specs {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: .84rem;
}
.card-specs span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.card-specs svg { width: 15px; height: 15px; color: var(--brass-d); }
.dcard h3 {
  font-family: var(--font);
  font-size: 1.22rem;
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.3;
  margin-bottom: 16px;
}
.card-bot {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.est-box small {
  display: block;
  font-size: .74rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.est-box b {
  font-family: var(--font);
  font-size: 1.05rem;
  color: var(--text);
  display: block;
}
.more-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .88rem;
  font-weight: 700;
  color: var(--brass-d);
  transition: transform .3s var(--ease);
}
.more-link svg { width: 16px; height: 16px; transition: transform .3s; }
.dcard:hover .more-link svg, .pcard:hover .more-link svg { transform: translateX(5px); }

/* ---------- Portfolio cards (.pgrid & .pcard) ---------- */
.pgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; width: 100%; max-width: 100%; }
.pcard {
  display: flex;
  flex-direction: column;
  min-width: 0;
  max-width: 100%;
  background: var(--paper);
  border-radius: var(--r-l);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-s);
  transition: transform .5s var(--ease), box-shadow .5s var(--ease), border-color .3s;
}
.pcard:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-m);
  border-color: rgba(201, 163, 106, .4);
}
.pcard .ph {
  position: relative;
  aspect-ratio: 16/11;
  overflow: hidden;
  background: var(--bone-2);
}
.pcard .ph img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s var(--ease);
}
.pcard:hover .ph img { transform: scale(1.08); }
.pcard .cnt {
  position: absolute;
  right: 14px;
  bottom: 14px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(11, 12, 14, .78);
  color: #fff;
  backdrop-filter: blur(10px);
  font-size: .76rem;
  font-weight: 700;
}
.pcard .pill-kind {
  position: absolute;
  left: 14px;
  top: 14px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .9);
  color: var(--ink);
  backdrop-filter: blur(8px);
  font-size: .72rem;
  font-weight: 700;
}
.pcard .bd {
  padding: 22px 24px 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.pcard h3 {
  font-family: var(--font);
  font-size: 1.18rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -.02em;
  margin-bottom: 12px;
  min-height: 2.7em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pcard-bot {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.p-sub {
  font-size: .82rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex: 1 1 0%;
  max-width: 60%;
}

/* ==========================================================
   HOUSE DETAIL PAGE — Luxury Architectural Showcase
   ========================================================== */
.house-detail-top {
  padding: 140px 0 50px;
}
.crumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  font-size: .88rem;
  color: var(--muted);
  margin-bottom: 28px;
}
.crumb a { transition: color .2s; }
.crumb a:hover { color: var(--text); }
.crumb b { color: var(--text); font-weight: 700; }
.crumb span { opacity: .4; }

/* Header & Meta */
.house-head-block {
  margin-bottom: 32px;
}
.house-meta-badges {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 14px;
}
.h-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  font-family: var(--font);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .06em;
}
.h-pill.dark { background: var(--ink); color: #fff; }
.h-pill.brass { background: linear-gradient(135deg, var(--brass-2), var(--brass)); color: var(--ink); }
.h-pill.outline { border: 1.5px solid var(--line); background: var(--paper); color: var(--muted); }

.house-title {
  font-family: var(--font);
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: 800;
  letter-spacing: -.035em;
  line-height: 1.1;
  color: var(--text);
  margin-bottom: 14px;
}
.house-lead {
  font-size: clamp(1rem, 1.4vw, 1.18rem);
  color: var(--muted);
  max-width: 820px;
  line-height: 1.8;
}

/* Quick Metrics Bar (Bento Stats) */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin: 28px 0 40px;
}
.metric-card {
  padding: 18px 22px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-m);
  box-shadow: var(--shadow-s);
  display: flex;
  align-items: center;
  gap: 16px;
  transition: transform .3s var(--ease), border-color .3s;
}
.metric-card:hover {
  transform: translateY(-3px);
  border-color: rgba(201, 163, 106, .5);
}
.metric-ic {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: rgba(201, 163, 106, .14);
  color: var(--brass-d);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.metric-ic svg { width: 22px; height: 22px; }
.metric-txt small {
  display: block;
  font-size: .76rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.metric-txt b {
  font-family: var(--font);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
}

/* Cinematic Visual Showcase */
.cinematic-frame {
  position: relative;
  border-radius: var(--r-xl);
  overflow: hidden;
  background: var(--ink);
  box-shadow: var(--shadow-l);
  aspect-ratio: 16/9.5;
  cursor: zoom-in;
  border: 1px solid var(--line);
}
.cinematic-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.4s var(--ease);
}
.cinematic-frame:hover img { transform: scale(1.04); }
.frame-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(11, 12, 14, .65) 0%, transparent 45%, rgba(11, 12, 14, .3) 100%);
  pointer-events: none;
}
.frame-badges {
  position: absolute;
  left: 24px;
  top: 24px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  z-index: 2;
}
.frame-badge {
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(11, 12, 14, .8);
  color: #fff;
  backdrop-filter: blur(12px);
  font-family: var(--font);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .08em;
  border: 1px solid rgba(255, 255, 255, .15);
}
.zoom-hint {
  position: absolute;
  right: 24px;
  bottom: 24px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .92);
  color: var(--ink);
  backdrop-filter: blur(14px);
  font-family: var(--font);
  font-size: .88rem;
  font-weight: 700;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .2);
  transition: transform .3s var(--ease);
}
.cinematic-frame:hover .zoom-hint { transform: scale(1.04); }
.zoom-hint svg { width: 18px; height: 18px; }

/* Quick Action Banner below Visual */
.action-banner {
  margin-top: 24px;
  padding: 24px 32px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-l);
  box-shadow: var(--shadow-s);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.action-txt h3 {
  font-family: var(--font);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -.02em;
}
.action-txt p { font-size: .92rem; color: var(--muted); margin-top: 2px; }
.action-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.action-buttons .btn svg { width: 18px; height: 18px; }

/* ---------- Interactive Package & Cost Selector ---------- */
.pkg-section {
  margin: 60px 0 40px;
}
.pkg-head {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 36px;
}
.pkg-head .eyebrow { justify-content: center; }
.pkg-head h2 { font-size: clamp(1.8rem, 3.6vw, 2.8rem); }
.pkg-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.pkg-card {
  background: var(--paper);
  border: 2px solid var(--line);
  border-radius: var(--r-l);
  padding: 32px;
  display: flex;
  flex-direction: column;
  transition: transform .4s var(--ease), border-color .3s, box-shadow .4s;
  cursor: pointer;
  position: relative;
}
.pkg-card:hover {
  transform: translateY(-6px);
  border-color: rgba(201, 163, 106, .6);
  box-shadow: var(--shadow-m);
}
.pkg-card.active {
  border-color: var(--ink);
  background: var(--paper);
  box-shadow: 0 20px 50px -15px rgba(201, 163, 106, .35);
}
.pkg-card.active::before {
  content: "✓ แพ็กเกจที่เลือก";
  position: absolute;
  top: -14px;
  right: 24px;
  padding: 4px 14px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--brass-2);
  font-size: .75rem;
  font-weight: 700;
  font-family: var(--font);
}
.pkg-name {
  font-family: var(--font);
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -.02em;
}
.pkg-rate {
  color: var(--brass-d);
  font-weight: 700;
  font-size: .92rem;
  margin: 4px 0 16px;
}
.pkg-price {
  font-family: var(--font);
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -.03em;
  color: var(--text);
  line-height: 1.1;
  margin-bottom: 8px;
}
.pkg-price small { font-size: .88rem; font-weight: 500; color: var(--muted); }
.pkg-desc {
  font-size: .92rem;
  color: var(--muted);
  line-height: 1.6;
  margin-top: 8px;
}
.pkg-btn {
  margin-top: 24px;
  width: 100%;
}

/* ---------- Architectural & Engineering Highlights (Bento Grid) ---------- */
.highlights-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin: 50px 0;
}
.hl-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-l);
  padding: 34px;
  box-shadow: var(--shadow-s);
  transition: transform .4s var(--ease), border-color .3s;
}
.hl-card:hover {
  transform: translateY(-4px);
  border-color: rgba(201, 163, 106, .5);
}
.hl-card-top {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}
.hl-ic {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--ink);
  color: var(--brass-2);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.hl-ic svg { width: 22px; height: 22px; }
.hl-card h3 {
  font-family: var(--font);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -.02em;
}
.hl-list {
  display: grid;
  gap: 12px;
}
.hl-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: .95rem;
  line-height: 1.6;
}
.hl-list svg {
  width: 20px;
  height: 20px;
  color: var(--brass-d);
  flex-shrink: 0;
  margin-top: 3px;
}

/* ---------- Dedicated Model Quotation Form ---------- */
.model-form-box {
  background: var(--ink);
  color: #fff;
  border-radius: var(--r-xl);
  overflow: hidden;
  padding: clamp(36px, 5.5vw, 68px);
  position: relative;
  isolation: isolate;
  margin: 60px 0;
}
.model-form-box::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(800px 450px at 90% 0%, rgba(201, 163, 106, .28), transparent 60%),
    radial-gradient(500px 300px at 0% 100%, rgba(201, 163, 106, .12), transparent 60%);
}
.model-form-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: clamp(36px, 6vw, 70px);
  align-items: start;
}
.model-form-info h2 {
  font-family: var(--font);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1.15;
  margin-top: 14px;
}
.model-form-info h2 em {
  font-style: normal;
  color: var(--brass-2);
}
.model-form-info p {
  color: var(--muted-d);
  font-size: 1rem;
  margin-top: 14px;
  line-height: 1.8;
}
.call-badge-list {
  margin-top: 30px;
  display: grid;
  gap: 12px;
}
.call-badge-list a {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border-radius: var(--r-m);
  background: rgba(255, 255, 255, .06);
  border: 1px solid var(--line-d);
  transition: .3s var(--ease);
}
.call-badge-list a:hover {
  background: rgba(255, 255, 255, .12);
  transform: translateX(6px);
  border-color: rgba(201, 163, 106, .5);
}
.call-badge-list svg { width: 22px; height: 22px; color: var(--brass-2); }
.call-badge-list b { display: block; font-family: var(--font); font-size: 1.05rem; }
.call-badge-list small { color: var(--muted-d); font-size: .8rem; }

/* ---------- Pager (Previous / Next House) ---------- */
.pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 50px 0 20px;
}
.pager a {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px 28px;
  border-radius: var(--r-m);
  border: 1.5px solid var(--line);
  background: var(--paper);
  transition: .4s var(--ease);
  font-family: var(--font);
  font-weight: 700;
  line-height: 1.35;
  box-shadow: var(--shadow-s);
}
.pager a.r {
  justify-content: flex-end;
  text-align: right;
}
.pager a:hover {
  border-color: var(--ink);
  transform: translateY(-4px);
  box-shadow: var(--shadow-m);
}
.pager small {
  display: block;
  font-weight: 500;
  font-size: .78rem;
  color: var(--muted);
  margin-bottom: 2px;
}
.pager svg { flex-shrink: 0; width: 22px; height: 22px; }

/* ---------- Project Gallery (.masonry & .m-item) ---------- */
.p-head { max-width: 820px; margin-bottom: 40px; }
.p-head h1 {
  font-family: var(--font);
  font-size: clamp(2rem, 4.8vw, 3.8rem);
  font-weight: 800;
  letter-spacing: -.035em;
  line-height: 1.15;
  margin-top: 14px;
}
.masonry {
  columns: 3;
  column-gap: 20px;
}
.m-item {
  display: block;
  width: 100%;
  margin: 0 0 20px;
  border-radius: var(--r-m);
  overflow: hidden;
  break-inside: avoid;
  cursor: zoom-in;
  background: var(--bone-2);
  position: relative;
  box-shadow: var(--shadow-s);
  border: 1px solid var(--line);
  transition: transform .4s var(--ease), box-shadow .4s;
}
.m-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-m);
}
.m-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 1.2s var(--ease);
}
.m-item:hover img { transform: scale(1.05); }
.m-item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(11, 12, 14, 0);
  transition: .4s;
}
.m-item:hover::after { background: rgba(11, 12, 14, .18); }
.p-cta {
  margin-top: 56px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 30px;
  flex-wrap: wrap;
  padding: clamp(28px, 4vw, 48px);
  border-radius: var(--r-xl);
  background: var(--ink);
  color: #fff;
}
.p-cta h2 { font-family: var(--font); font-size: clamp(1.6rem, 3.2vw, 2.4rem); letter-spacing: -.03em; }
.p-cta p { color: var(--muted-d); margin-top: 4px; }
.p-cta .d-cta { margin: 0; }

/* ---------- Home works grid ---------- */
.works { display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px; }
.works .pcard:nth-child(1) { grid-column: span 6; grid-row: span 2; }
.works .pcard:nth-child(1) .ph { aspect-ratio: auto; height: calc(100% - 118px); min-height: 360px; }
.works .pcard:nth-child(n+2) { grid-column: span 3; }
.works .pcard:nth-child(n+2) .ph { aspect-ratio: 4/3.2; }
.works .pcard:nth-child(n+2) h3 { font-size: 1.05rem; }

.hstat b.txt { font-size: clamp(1.6rem, 3vw, 2.4rem); }
.card a.ph { display: block; }

/* ---------- Lightbox Modal ---------- */
.lb {
  position: fixed;
  inset: 0;
  z-index: 250;
  background: rgba(8, 8, 10, .96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: grid;
  grid-template-columns: 90px 1fr 90px;
  align-items: center;
  animation: fade .35s var(--ease);
}
.lb[hidden] { display: none; }
.lb figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  height: 100%;
  padding: 60px 0 30px;
  min-width: 0;
}
.lb img {
  max-width: 90%;
  max-height: calc(100vh - 150px);
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .7);
  user-select: none;
}
.lb figcaption {
  color: rgba(255, 255, 255, .75);
  font-size: .9rem;
  text-align: center;
  padding: 0 20px;
  font-family: var(--font);
}
.lb button {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .1);
  color: #fff;
  display: grid;
  place-items: center;
  justify-self: center;
  transition: .3s;
}
.lb button:hover { background: #fff; color: var(--ink); }
.lb button svg { width: 22px; height: 22px; }
.lb .lb-x {
  position: absolute;
  top: 24px;
  right: 28px;
  z-index: 2;
}
.lb.single .lb-p, .lb.single .lb-n { visibility: hidden; }

/* ---------- Responsive Breakpoints (Mobile-First Polish) ---------- */
@media (max-width: 1024px) {
  .pkg-cards { grid-template-columns: minmax(0, 1fr); }
  .highlights-grid { grid-template-columns: minmax(0, 1fr); }
  .model-form-grid { grid-template-columns: minmax(0, 1fr); }
  .pgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .masonry { columns: 2; }
  .works { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .works .pcard:nth-child(n) { grid-column: span 1; grid-row: auto; }
  .works .pcard:nth-child(1) { grid-column: span 2; }
  .works .pcard:nth-child(1) .ph { height: auto; aspect-ratio: 16/10; min-height: 0; }
  .works .pcard:nth-child(n+2) .ph { aspect-ratio: 4/3.2; }
  .tile .go {
    opacity: 1;
    transform: none;
    width: 40px;
    height: 40px;
  }
  /* On Mobile & Tablet (<= 1024px), top navbar stays at top of page (does not follow scroll) since bottom nav is active */
  .nav,
  .nav.stuck {
    position: absolute;
    top: calc(var(--ann-h, 38px) + 10px);
  }
  body.announce-hidden .nav,
  body.announce-hidden .nav.stuck {
    top: 12px;
  }
  .nav:not(.solid).stuck .nav-in {
    background: rgba(255, 255, 255, .08);
    color: #fff;
    border-color: rgba(255, 255, 255, .16);
    box-shadow: none;
  }
  /* Show Sticky Bottom Navigation Bar on Mobile & Tablet (<= 1024px) */
  .m-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
    z-index: 65;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    background: rgba(11, 12, 14, .94);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    border-top: 1px solid rgba(255, 255, 255, .12);
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -10px 30px rgba(0, 0, 0, .45);
  }
  .m-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 6px 2px;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    border-radius: 12px;
    color: rgba(255, 255, 255, .62);
    font-size: .68rem;
    font-weight: 600;
    line-height: 1.1;
    text-align: center;
    transition: color .25s var(--ease), background .25s var(--ease);
  }
  .m-tab span {
    display: block;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .m-tab svg {
    width: 19px;
    height: 19px;
    transition: transform .25s var(--ease), color .25s var(--ease);
  }
  .m-tab.on {
    color: var(--brass-2);
    background: rgba(201, 163, 106, .14);
  }
  .m-tab.on svg {
    color: var(--brass-2);
    transform: translateY(-1px);
  }
  footer {
    padding-bottom: calc(92px + env(safe-area-inset-bottom, 0px));
  }
  .fab {
    bottom: calc(76px + env(safe-area-inset-bottom, 0px));
  }
}

@media (max-width: 640px) {
  /* Top Announce & Navbar on Mobile */
  .announce {
    font-size: .74rem;
    padding: 8px 42px 8px 12px;
    text-align: left;
    justify-content: flex-start;
  }
  .announce a {
    display: inline-block;
    margin-left: 4px;
    white-space: nowrap;
  }
  .announce-close {
    right: 8px;
    width: 28px;
    height: 28px;
  }
  .nav,
  .nav.stuck {
    position: absolute;
    top: calc(var(--ann-h, 46px) + 8px);
  }
  body.announce-hidden .nav,
  body.announce-hidden .nav.stuck {
    top: 8px;
  }
  .nav-in {
    width: calc(100% - 20px);
    padding: 8px 10px 8px 16px;
  }
  .brand-symbol {
    width: 34px;
    height: 34px;
  }
  .brand-title {
    font-size: .95rem;
  }
  .brand-sub {
    font-size: .46rem;
  }

  /* Mobile Drawer */
  .drawer {
    padding: 24px 22px 32px;
    justify-content: flex-start;
    overflow-y: auto;
    gap: 6px;
  }
  .drawer-head {
    margin-bottom: 14px;
    padding-bottom: 14px;
  }
  .drawer-logo-img {
    width: 130px;
  }
  .drawer a.big {
    font-size: clamp(1.35rem, 6vw, 1.85rem);
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, .07);
  }
  .drawer-actions {
    margin-top: auto;
    padding-top: 18px;
    flex-direction: column;
    flex-wrap: nowrap;
    width: 100%;
  }
  .drawer-actions .btn {
    width: 100%;
    justify-content: center;
    padding: 15px 20px;
  }

  /* Hero Section on Mobile */
  .hero {
    min-height: 92svh;
  }
  .hero-in {
    padding: 130px 0 42px;
    width: calc(100% - 32px);
  }
  .chip {
    font-size: .75rem;
    padding: 6px 13px 6px 8px;
    max-width: 100%;
  }
  .hero h1 {
    font-size: clamp(2.15rem, 9.2vw, 3.1rem);
    line-height: 1.08;
    margin: 18px 0 14px;
  }
  .hero p.sub {
    font-size: .95rem;
    line-height: 1.65;
  }
  .hero-act {
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 10px;
    margin-top: 24px;
    width: 100%;
  }
  .hero-act .btn {
    width: 100%;
    justify-content: center;
    padding: 15px 22px;
  }
  .hero-bottom {
    margin-top: 34px;
  }
  .hstat {
    padding: 18px 12px 0 0;
  }
  .hstat + .hstat {
    padding-left: 14px;
  }
  .hstat b,
  .hstat b.txt {
    font-size: 1.55rem;
  }
  .hstat span {
    font-size: .78rem;
  }

  /* Sections & Bento Grid on Mobile */
  .sec {
    padding: 64px 0;
  }
  .sec-head {
    margin-bottom: 32px;
    gap: 16px;
  }
  .sec-head .btn {
    width: 100%;
    justify-content: center;
  }
  .sec-head-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    width: 100%;
  }
  .sec-head-actions .btn {
    width: 100%;
    justify-content: center;
    padding: 13px 14px;
    font-size: .86rem;
  }
  .sec-head-actions .btn:nth-child(3) {
    grid-column: 1 / -1;
  }
  .bento {
    grid-template-columns: 1fr;
    grid-auto-rows: minmax(250px, auto);
    gap: 16px;
  }
  .t1 {
    grid-column: span 1;
    min-height: 290px;
  }
  .tile {
    padding: 22px;
  }
  .tile .tag {
    top: 16px;
    left: 16px;
    font-size: .68rem;
    padding: 5px 12px;
  }
  .tile .go {
    top: 16px;
    right: 16px;
    width: 38px;
    height: 38px;
  }
  .tile h3 {
    font-size: 1.35rem;
    margin-top: 48px;
  }
  .tile p {
    font-size: .88rem;
    line-height: 1.55;
  }

  /* Why Us Floating Badges on Mobile */
  .why-img .float {
    padding: 12px 16px;
    gap: 10px;
    left: 10px;
    right: auto;
    bottom: 14px;
    top: auto;
    max-width: calc(100% - 20px);
  }
  .why-img .float.b2 {
    left: auto;
    right: 10px;
    top: 14px;
    bottom: auto;
  }
  .float .ic {
    width: 40px;
    height: 40px;
    border-radius: 12px;
  }
  .float .ic svg {
    width: 19px;
    height: 19px;
  }
  .float b {
    font-size: 1.2rem;
  }
  .float span {
    font-size: .72rem;
  }
  .feat {
    grid-template-columns: 38px 1fr;
    gap: 12px;
    padding: 18px 0;
  }

  /* Filter Toolbar & Category Chips on Mobile */
  .toolbar {
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 14px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }
  .chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin-inline: 0;
    padding-inline: 0;
    padding-bottom: 0;
    overflow-x: visible;
  }
  .fchip {
    flex-shrink: 1;
    max-width: 100%;
    padding: 9px 14px;
    font-size: .85rem;
  }
  .search,
  .search input {
    width: 100%;
    max-width: 100%;
    font-size: 16px;
  }

  /* Cards, Calculator & Forms on Mobile */
  .card {
    flex: 0 0 85vw;
  }
  .card .bd,
  .pcard .bd,
  .dcard .bd {
    padding: 18px 20px 20px;
  }
  .calc-form,
  .calc-out {
    padding: 24px 20px;
  }
  .cta {
    padding: 28px 20px;
    gap: 28px;
    border-radius: var(--r-l);
  }
  .form {
    padding: 22px 18px;
  }
  .fld input,
  .fld select,
  .fld textarea {
    font-size: 16px;
  }
  .hl-card {
    padding: 24px 20px;
  }
  .p-cta {
    padding: 26px 20px;
  }
  .p-cta .d-cta {
    width: 100%;
  }
  .p-cta .d-cta .btn {
    flex: 1;
    justify-content: center;
  }
  .fab {
    right: 14px;
    bottom: calc(74px + env(safe-area-inset-bottom, 0px));
    gap: 10px;
  }
  .fab a {
    width: 48px;
    height: 48px;
  }
  .toast {
    bottom: calc(78px + env(safe-area-inset-bottom, 0px));
    width: calc(100% - 32px);
    justify-content: center;
    text-align: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translate(-50%, calc(100% + 140px));
  }
  .toast.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate(-50%, 0);
  }

  /* Inner Page Detail Hero & Lightbox */
  .page-hero { padding: 138px 0 42px; }
  .page-hero h1 { font-size: clamp(1.85rem, 7.2vw, 2.5rem); line-height: 1.2; }
  .page-hero h1 em { white-space: normal; }
  .house-detail-top { padding-top: 116px; }
  .metrics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .metric-card { padding: 14px; gap: 12px; min-width: 0; }
  .metric-ic { width: 38px; height: 38px; }
  .metric-ic svg { width: 18px; height: 18px; }
  .metric-txt { min-width: 0; }
  .metric-txt b { font-size: 1.05rem; word-break: break-word; }
  .cinematic-frame { aspect-ratio: 4/3; border-radius: var(--r-l); }
  .frame-badges { left: 14px; top: 14px; right: 14px; }
  .frame-badge { font-size: .72rem; padding: 6px 12px; max-width: 100%; white-space: normal; }
  .zoom-hint { right: 14px; bottom: 14px; padding: 8px 16px; font-size: .8rem; }
  .action-banner { padding: 20px; flex-direction: column; flex-wrap: nowrap; align-items: stretch; text-align: center; }
  .action-buttons { flex-direction: column; flex-wrap: nowrap; width: 100%; }
  .action-buttons .btn { width: 100%; }
  .dgrid { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .pgrid, .works { grid-template-columns: minmax(0, 1fr); }
  .works .pcard:nth-child(1) { grid-column: span 1; }
  .masonry { columns: 1; }
  .pager { grid-template-columns: minmax(0, 1fr); }
  .lb { grid-template-columns: minmax(0, 1fr); }
  .lb .lb-p, .lb .lb-n { position: absolute; bottom: 24px; z-index: 2; }
  .lb .lb-p { left: calc(50% - 66px); }
  .lb .lb-n { left: calc(50% + 12px); }
  .lb figure { padding-bottom: 96px; }
  .lb img { max-height: calc(100vh - 220px); max-width: 95%; }
}
