/* ============================================================
   Ricky's Gutters: inner pages
   The masthead every inner page opens with, plus the few blocks that only
   these pages need (service grid, county list, gallery, prose, letter).
   ============================================================ */

/* ---------- masthead ---------- */

.rg-mast {
  position: relative;
  overflow: hidden;
  background: var(--rg-navy-ink);
  color: var(--rg-on-dark);
  padding-block: clamp(48px, 7vw, 92px);
}
.rg-mast::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: url("/assets/water-droplets-light.webp") center / cover no-repeat;
  opacity: .14;
  -webkit-mask-image: linear-gradient(transparent 0, #000 20%, #000 80%, transparent 100%);
  mask-image: linear-gradient(transparent 0, #000 20%, #000 80%, transparent 100%);
}
.rg-mast::after {
  content: "";
  position: absolute;
  right: -8vw;
  top: -30%;
  width: min(58vw, 700px);
  aspect-ratio: 1;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, rgba(0,200,255,.22) 0%, rgba(0,200,255,.06) 45%, transparent 70%);
}
.rg-mast .rg-in { position: relative; z-index: 1; display: grid; gap: 14px; }
.rg-mast .rg-eyebrow { color: var(--rg-cyan-light); margin: 0; }
.rg-mast__title {
  font-family: var(--rg-font-head);
  font-size: clamp(2.125rem, 1.3rem + 3.4vw, 3.75rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -.01em;
  color: #fff;
  margin: 0;
  max-width: 20ch;
  text-wrap: balance;
}
.rg-mast__lede { font-size: var(--rg-body); line-height: 1.6; color: var(--rg-on-dark-dim); max-width: 58ch; margin: 0; text-wrap: pretty; }
.rg-mast__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.rg-mast__btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: var(--rg-tap); padding: 0 22px; border-radius: var(--rg-r-sm);
  font-family: var(--rg-font-head); font-weight: 800; font-size: 1rem; text-decoration: none;
}
.rg-mast__btn--primary { background: #fff; color: var(--rg-navy); }
.rg-mast__btn--primary:hover { background: var(--rg-cyan-light); }
.rg-mast__btn--ghost { color: #fff; box-shadow: inset 0 0 0 2px rgba(255,255,255,.55); }
.rg-mast__btn--ghost:hover { box-shadow: inset 0 0 0 2px #fff; }
.rg-mast .rg-crumbs { color: rgba(255,255,255,.6); }
.rg-mast .rg-crumbs a { color: rgba(255,255,255,.75); }
.rg-mast .rg-crumbs li + li::before { color: rgba(255,255,255,.35); }

/* breadcrumbs (shared with the blog's) */
.rg-crumbs { display: flex; flex-wrap: wrap; gap: 6px 10px; margin: 0; padding: 0; list-style: none; font-size: .9rem; color: var(--rg-text-muted); }
.rg-crumbs a { color: inherit; text-decoration: none; }
.rg-crumbs a:hover { text-decoration: underline; }
.rg-crumbs li + li::before { content: "/"; margin-right: 10px; color: var(--rg-border-cool); }

/* ---------- services overview grid ---------- */

.rg-svcgrid { background: var(--rg-surface); }
.rg-svcgrid .rg-in { display: grid; gap: 28px; }
.rg-svcgrid__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }

/* ---------- county list ---------- */

.rg-counties { background: var(--rg-surface); }
.rg-counties .rg-in { display: grid; gap: 28px; }
.rg-counties__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 18px; }
.rg-county { padding: 22px 24px; border-radius: var(--rg-r-md); background: var(--rg-surface-alt); box-shadow: inset 0 0 0 1px var(--rg-border); display: grid; gap: 12px; align-content: start; }
.rg-county h3 { font-family: var(--rg-font-head); font-size: 1.05rem; font-weight: 800; color: var(--rg-navy); margin: 0; }
.rg-county ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.rg-county li { font-size: 1rem; color: var(--rg-text-body); display: flex; align-items: center; gap: 10px; }
.rg-county li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--rg-cyan); flex: 0 0 auto; }

/* ---------- gallery ---------- */

.rg-gallery { background: var(--rg-surface); }
.rg-gallery .rg-in { display: grid; gap: 28px; }
.rg-gallery__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.rg-gallery__item {
  position: relative; margin: 0; border-radius: var(--rg-r-md); overflow: hidden; background: var(--rg-surface-alt);
  box-shadow: inset 0 0 0 1px var(--rg-border); cursor: zoom-in; aspect-ratio: 4 / 3;
}
.rg-gallery__item:nth-child(6n+1) { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; }
.rg-gallery__item img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 500ms ease; }
.rg-gallery__item:hover img { transform: scale(1.04); }
.rg-gallery__item figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 14px 12px;
  background: linear-gradient(transparent, rgba(0,27,74,.75)); color: #fff;
  font-family: var(--rg-font-head); font-size: .82rem; font-weight: 700; letter-spacing: .3px;
  opacity: 0; transition: opacity 200ms ease;
}
.rg-gallery__item:hover figcaption, .rg-gallery__item:focus-within figcaption { opacity: 1; }
.rg-gallery__item button { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: transparent; cursor: zoom-in; }
.rg-gallery__item button:focus-visible { outline: 3px solid var(--rg-cyan); outline-offset: -3px; }
.rg-lightbox { border: 0; padding: 0; background: transparent; max-width: min(96vw, 1200px); max-height: 92vh; }
.rg-lightbox::backdrop { background: rgba(0,10,36,.86); }
.rg-lightbox img { display: block; max-width: min(96vw, 1200px); max-height: 86vh; width: auto; height: auto; border-radius: var(--rg-r-md); box-shadow: var(--rg-shadow-card); }
.rg-lightbox__bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 10px; color: #fff; font-family: var(--rg-font-head); font-size: .9rem; }
.rg-lightbox__bar button { min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid rgba(255,255,255,.5); background: transparent; color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
.rg-lightbox__bar button:hover { background: rgba(255,255,255,.12); }

/* ---------- prose (privacy) and the letter (about) ---------- */

.rg-page-prose { background: var(--rg-surface); }
.rg-page-prose .rg-in { max-width: 860px; }
.rg-page-prose .rg-prose { max-width: 68ch; }

.rg-letter { background: var(--rg-surface-alt); }
.rg-letter .rg-in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 380px); gap: clamp(28px, 5vw, 72px); align-items: start; }
.rg-letter__body { display: grid; gap: 18px; }
.rg-letter__body .rg-h2 { max-width: 20ch; }
.rg-letter__body p { margin: 0; font-size: 1.0625rem; line-height: 1.7; color: var(--rg-text-body); max-width: 62ch; }
.rg-letter__sign { display: grid; gap: 2px; margin-top: 6px; }
.rg-letter__sign img { width: 180px; height: auto; margin-bottom: 4px; }
.rg-letter__sign b { font-family: var(--rg-font-head); color: var(--rg-text); }
.rg-letter__sign span { font-size: .92rem; color: var(--rg-text-muted); }
.rg-letter__aside { display: grid; gap: 14px; }
.rg-letter__fact { padding: 20px 22px; border-radius: var(--rg-r-md); background: var(--rg-navy-ink); color: #fff; display: grid; gap: 4px; }
.rg-letter__fact b { font-family: var(--rg-font-head); font-size: 1.6rem; font-weight: 800; line-height: 1; }
.rg-letter__fact span { font-size: .9rem; color: var(--rg-on-dark-dim); }

/* ---------- simple three-up steps (quote page) ---------- */

.rg-next { background: var(--rg-surface); }
.rg-next .rg-in { display: grid; gap: 26px; }
.rg-next__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; counter-reset: next; }
.rg-next__grid > div { padding: 22px; border-radius: var(--rg-r-md); background: var(--rg-surface-alt); box-shadow: inset 0 0 0 1px var(--rg-border); display: grid; gap: 8px; align-content: start; }
.rg-next__grid > div::before { counter-increment: next; content: "0" counter(next); font-family: var(--rg-font-head); font-size: .8rem; font-weight: 800; letter-spacing: 2px; color: var(--rg-blue); }
.rg-next__grid b { font-family: var(--rg-font-head); font-size: 1.1rem; font-weight: 800; color: var(--rg-text); line-height: 1.25; }
.rg-next__grid p { margin: 0; font-size: .97rem; line-height: 1.55; color: var(--rg-text-body); }

@media (max-width: 980px) {
  .rg-svcgrid__grid { grid-template-columns: 1fr 1fr; }
  .rg-gallery__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .rg-letter .rg-in { grid-template-columns: 1fr; }
  .rg-letter__aside { grid-template-columns: 1fr 1fr; }
  .rg-next__grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .rg-svcgrid__grid { grid-template-columns: 1fr; }
  .rg-gallery__grid { grid-template-columns: 1fr 1fr; }
  .rg-gallery__item:nth-child(6n+1) { grid-column: span 2; grid-row: auto; aspect-ratio: 4 / 3; }
  .rg-letter__aside { grid-template-columns: 1fr; }
  .rg-mast__btn { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .rg-gallery__item img, .rg-gallery__item figcaption { transition: none; }
}

/* ---------- the quote form on navy, used by several inner pages ---------- */

.rg-article-ask { background: var(--rg-navy-ink); padding-block: clamp(48px, 6vw, 80px); }
.rg-article-ask .rg-in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 480px); gap: clamp(28px, 5vw, 72px); align-items: center; max-width: 1120px; }
.rg-article-ask .rg-eyebrow { color: var(--rg-cyan-light); }
.rg-article-ask .rg-h2 { color: #fff; }
.rg-article-ask .rg-lede { color: var(--rg-on-dark-dim); }
@media (max-width: 980px) { .rg-article-ask .rg-in { grid-template-columns: 1fr; } }
