/* ==========================================================================
   Homepage-only surfaces: hero call button, the Dominio family of
   companies, and the filterable project gallery with its lightbox.
   ========================================================================== */

/* Wider copy column so all three hero buttons sit on one row on desktop. */
.hero .hero-content { max-width: 54rem; }
.hero .hero-lede { text-wrap: pretty; }

/* Third hero button joins the existing entrance sequence. */
.motion .hero-actions .btn:nth-child(3) { animation-delay: 380ms; }
.btn-call svg { flex-shrink: 0; }

.eyebrow--gold { color: var(--color-gold-400); }
.eyebrow--gold::before { background: var(--color-gold-400); }

/* --------------------------------------------------------------------------
   Our Companies
   -------------------------------------------------------------------------- */
.company-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-md);
}
@media (max-width: 900px) {
  .company-grid { grid-template-columns: 1fr; max-width: 34rem; }
}

.company-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  overflow: hidden;
  padding: var(--space-md);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.035);
  color: var(--color-mist);
  text-decoration: none;
  transition: transform var(--motion-hover, 350ms) var(--ease-out-expo),
              border-color var(--motion-hover, 350ms) var(--ease-out-expo),
              background-color var(--motion-hover, 350ms) var(--ease-out-expo);
}
/* Gold rule draws across the top of the live division on hover. */
.company-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: linear-gradient(90deg, var(--color-gold-400), var(--color-accent));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 450ms var(--ease-out-expo);
}
a.company-card:hover,
a.company-card:focus-visible {
  transform: translateY(-6px);
  border-color: rgba(217, 164, 65, 0.5);
  background: rgba(255, 255, 255, 0.06);
}
a.company-card:hover::before,
a.company-card:focus-visible::before { transform: scaleX(1); }
.company-card h3 {
  margin: 0;
  font-size: var(--text-lg);
  color: var(--color-white);
}
.company-card p {
  margin: 0;
  font-size: var(--text-sm);
  color: rgba(231, 233, 240, 0.75);
}

.company-status {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  padding: 0.3em 0.8em;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(231, 233, 240, 0.72);
}
.company-status--live {
  border-color: rgba(239, 108, 26, 0.55);
  color: var(--color-orange-400);
}
/* Dominio Lawn keeps its own green brand (from the Dominio Lawn site:
   --g1 #1a5c35, --g2 #2d8a54, --g3 #86efac). Not recolored to this site. */
.company-status--lawn {
  border-color: rgba(45, 138, 84, 0.7);
  color: #86efac;
}
.company-card--lawn { border-color: rgba(45, 138, 84, 0.35); }
.company-status--live::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* Logo plates share one height so the cards line up. */
.company-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 88px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.company-logo img { display: block; }
/* Plate color matches the logo artwork's own background (#000112), so the
   full logo fits — nothing cropped — with no visible seam. */
.company-logo--dark { background: #000112; }
.company-logo--dark img { width: 100%; height: 100%; object-fit: contain; padding: 0 var(--space-2xs); }
.company-logo--light { background: var(--color-white); }
.company-logo--light img { height: 100%; width: auto; }
.company-logo--word {
  gap: 0.65rem;
  background: var(--color-navy-950);
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--color-white);
}
.company-logo--word img { width: 36px; height: 36px; }
.company-logo--word strong { color: var(--color-gold-300); font-weight: 700; }

.company-link {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  padding-top: var(--space-2xs);
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-orange-400);
}
.company-link svg { transition: transform var(--duration-normal) var(--ease-out-expo); }
a.company-card:hover .company-link svg { transform: translate(2px, -2px); }
.company-link--muted { color: rgba(231, 233, 240, 0.55); font-weight: 600; }

/* --------------------------------------------------------------------------
   Project gallery
   -------------------------------------------------------------------------- */
.gallery-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}
.gallery-head h2 { margin: 0; }
.gallery-filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2xs);
}
.filter-btn {
  min-height: 44px;
  padding: 0 1.1em;
  border-radius: 999px;
  border: 1px solid var(--color-mist);
  background: var(--color-white);
  color: var(--color-navy-800);
  font: inherit;
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  transition: background-color 200ms var(--ease-out-quart),
              border-color 200ms var(--ease-out-quart),
              color 200ms var(--ease-out-quart);
}
.filter-btn:hover { border-color: var(--color-navy-700); }
.filter-btn[aria-pressed="true"] {
  background: var(--color-navy-900);
  border-color: var(--color-navy-900);
  color: var(--color-white);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: 220px;
  grid-auto-flow: dense;
  gap: var(--space-sm);
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (max-width: 960px) {
  .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 200px; }
}
@media (max-width: 560px) {
  .gallery-grid { grid-auto-rows: 150px; gap: var(--space-2xs); }
}
.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
}
.gallery-item--wide { grid-column: span 2; }
.gallery-item[hidden] { display: none; }
.gallery-item.is-entering {
  animation: gallery-in 420ms var(--ease-out-expo) backwards;
  animation-delay: calc(var(--g, 0) * 35ms);
}
@keyframes gallery-in {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
}

.gallery-open {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: var(--color-navy-800);
  cursor: zoom-in;
}
.gallery-open img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 900ms var(--ease-out-expo);
}
.gallery-open:hover img,
.gallery-open:focus-visible img { transform: scale(1.06); }
.gallery-open::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(7, 13, 31, 0.78));
  pointer-events: none;
}
.gallery-open:focus-visible { outline-offset: -4px; }
.gallery-caption {
  position: absolute;
  left: var(--space-sm);
  right: var(--space-sm);
  bottom: var(--space-xs);
  z-index: 1;
  text-align: left;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-white);
  transform: translateY(4px);
  transition: transform var(--duration-normal) var(--ease-out-expo);
}
.gallery-open:hover .gallery-caption { transform: none; }
.gallery-empty { margin-top: var(--space-md); }

/* Lightbox */
html:has(.lightbox[open]) { overflow: hidden; }
.lightbox {
  max-width: none;
  max-height: none;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--color-white);
  overflow: visible;
}
.lightbox::backdrop { background: rgba(7, 13, 31, 0.9); }
.lightbox[open] { animation: lightbox-in 240ms var(--ease-out-expo); }
@keyframes lightbox-in {
  from { opacity: 0; transform: scale(0.97); }
}
.lightbox-figure { margin: 0; }
.lightbox-img {
  display: block;
  width: auto;
  height: auto;
  max-width: min(1100px, 88vw);
  max-height: 78vh;
  margin-inline: auto;
  border-radius: var(--radius-md);
}
.lightbox-caption {
  margin-top: var(--space-sm);
  text-align: center;
  font-weight: 600;
}
.lightbox-btn {
  position: fixed;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(7, 13, 31, 0.6);
  color: var(--color-white);
  cursor: pointer;
  transition: background-color 200ms var(--ease-out-quart), border-color 200ms var(--ease-out-quart);
}
.lightbox-btn:hover { background: var(--color-accent-strong); border-color: var(--color-accent-strong); }
.lightbox-close { top: 16px; right: 16px; }
.lightbox-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 16px; top: 50%; transform: translateY(-50%); }
