/* High Desert Homes - inner pages (services, gallery, about, contact). Loaded after styles.css. */

/* ---------- title band with a photo behind it ---------- */
.page-head-photo { position: relative; overflow: hidden; }
.page-head-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.34; }
.page-head-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(20deg, rgba(20, 21, 14, 0.75) 10%, rgba(20, 21, 14, 0.15) 75%); }
.page-head-photo .container { position: relative; z-index: 1; }
.page-head .actions { margin-top: 28px; }

/* ---------- in-page link chips ---------- */
.chip-nav { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; margin: 0; padding: 0; }
.chip-nav a {
  display: inline-block; padding: 8px 18px; border: 1px solid var(--stone); border-radius: 999px;
  font-family: var(--font-head); font-size: 0.95rem; color: var(--navy); text-decoration: none; background: var(--cream);
  transition: background-color .2s, border-color .2s, color .2s;
}
.chip-nav a:hover { background: var(--copper-deep); border-color: var(--copper-deep); color: #fff; }
.chip-bar { padding: 22px 0; border-bottom: 1px solid rgba(28, 32, 58, 0.08); background: var(--sand); }

/* ---------- services ---------- */
.service-rows { display: grid; gap: clamp(64px, 9vw, 112px); }
.service-row { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(32px, 5vw, 80px); align-items: center; scroll-margin-top: calc(var(--header-h) + 32px); }
.service-row:nth-child(even) .service-row-media { order: 2; }
.service-row-media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow); }
.service-row h3 { font-size: clamp(1.7rem, 2.8vw, 2.2rem); font-weight: 400; }
.tag-list { list-style: none; margin: 0 0 1.4em; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tag-list li { background: var(--sand); color: var(--navy); padding: 5px 14px; border-radius: 999px; font-family: var(--font-head); font-size: 0.88rem; }

.why-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.why-card { background: var(--cream); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.why-card img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.why-body { padding: 28px 30px 32px; }
.why-body h3 { margin-bottom: 0.45em; }
.why-body p { font-size: 0.98rem; line-height: 1.65; margin-bottom: 0; }

/* ---------- call-to-action band ---------- */
.cta-band { background: var(--olive-dark); color: rgba(255, 255, 255, 0.8); padding: clamp(56px, 8vw, 96px) 0; }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.cta-inner h2 { color: #fff; margin-bottom: 0.3em; }
.cta-inner p { margin: 0; max-width: 560px; }
.cta-inner .actions { margin-top: 0; }

/* ---------- gallery ---------- */
.gallery-intro { max-width: 760px; }
.gallery-intro p { font-size: 1.1rem; }
.gallery-intro .chip-nav { margin-top: 28px; }
.gallery-project { scroll-margin-top: calc(var(--header-h) + 24px); }
.gallery-project + .gallery-project { margin-top: clamp(72px, 10vw, 120px); }
.gallery-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }
.gallery-head h2 { margin-bottom: 0; }
.photo-count { font-family: var(--font-head); color: var(--body); font-size: 0.95rem; }
/* masonry columns: every photo keeps its own shape, so tall and wide shots never leave gaps */
.gallery-grid { list-style: none; margin: 0; padding: 0; columns: 3; column-gap: 12px; }
.gallery-grid li { break-inside: avoid; margin: 0 0 12px; overflow: hidden; border-radius: var(--radius); background: var(--stone); }
.gallery-grid a { display: block; }
.gallery-grid img { width: 100%; height: auto; transition: transform .8s var(--ease); }
.gallery-grid a:hover img { transform: scale(1.04); }
.gallery-grid a:focus-visible { outline-offset: -4px; }
.gallery-single { columns: 1; max-width: 860px; }

/* lightbox (built by gallery.js) */
.lightbox {
  position: fixed; inset: 0; z-index: 90; background: rgba(15, 16, 11, 0.95); color: rgba(255, 255, 255, 0.85);
  display: grid; grid-template-rows: auto minmax(0, 1fr) auto;
}
.lightbox[hidden] { display: none; }
.lightbox-bar { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px 8px 24px; font-family: var(--font-head); font-size: 0.95rem; }
.lightbox-stage { position: relative; display: flex; align-items: center; justify-content: center; min-height: 0; padding: 0 84px; }
.lightbox-stage img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 2px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5); }
.lightbox-caption { margin: 0; padding: 14px 24px 22px; text-align: center; font-size: 0.98rem; min-height: 1.6em; }
.lightbox-btn {
  width: 48px; height: 48px; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.12); color: #fff; transition: background-color .2s;
}
.lightbox-btn:hover { background: var(--copper-deep); }
.lightbox-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lightbox-prev, .lightbox-next { position: absolute; top: 50%; transform: translateY(-50%); }
.lightbox-prev { left: 18px; }
.lightbox-next { right: 18px; }
body.lightbox-open { overflow: hidden; }

/* ---------- about ---------- */
.values-five { display: grid; grid-template-columns: repeat(5, 1fr); gap: clamp(24px, 3vw, 40px); }
.values-five .value h3 { font-size: 1.25rem; }
.owner-role { font-family: var(--font-head); font-size: 0.82rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--copper-deep); margin: -0.2em 0 1.2em; }
.owner-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.owner-links .btn { padding: 10px 18px; font-size: 0.9rem; }
.quote-sand { background: var(--sand); }
.team-figure { margin: 0; }
.team-figure img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow); }

/* ---------- contact ---------- */
.contact-page { display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(40px, 6vw, 88px); align-items: start; }
.contact-page .contact-list { margin-bottom: 36px; }
.next-steps { list-style: none; counter-reset: step; margin: 0 0 1.4em; padding: 0; display: grid; gap: 18px; }
.next-steps li { counter-increment: step; display: grid; grid-template-columns: 40px 1fr; gap: 14px; align-items: start; }
.next-steps li::before {
  content: counter(step); width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: var(--copper-deep); color: #fff; font-family: var(--font-head); font-weight: 500;
}
.next-steps strong { display: block; color: var(--navy); font-family: var(--font-head); font-weight: 500; font-size: 1.08rem; }
.discount-note { font-size: 0.95rem; padding: 16px 20px; background: var(--cream); border-left: 3px solid var(--copper-deep); border-radius: var(--radius); }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .values-five { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
  .service-row { grid-template-columns: 1fr; gap: 28px; }
  .service-row:nth-child(even) .service-row-media { order: 0; }
  .why-grid { grid-template-columns: 1fr; }
  .gallery-grid { columns: 2; }
  .contact-page { grid-template-columns: 1fr; }
  .lightbox-stage { padding: 0 12px; }
  .lightbox-prev, .lightbox-next { top: auto; bottom: -62px; transform: none; }
  .lightbox-prev { left: calc(50% - 60px); }
  .lightbox-next { right: calc(50% - 60px); }
  .lightbox-caption { padding-top: 76px; }
}
@media (max-width: 640px) {
  .gallery-grid { column-gap: 8px; }
  .gallery-grid li { margin-bottom: 8px; }
  .values-five { grid-template-columns: 1fr; }
  .cta-inner .actions .btn { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .gallery-grid img { transition: none; }
}
