/*
 * ---------------------------------------------------------------------------
 * Version:        0.1.0
 * Last edited by: Manara Studio
 * Date:           2026-09-14
 * Status:         Testing
 * Purpose:        Page layout for the locations hub (templates/locations.php) and the single
 *                 branch page (templates/location.php). loc-* classes only.
 * Changelog:
 *   0.1.0  2026-09-14  Manara Studio  First build (md/BUILD - V2 waxpoint-core spec.md section 5.4).
 * Maintainer notes:
 *   - Requires base.css (tokens, .band, .wrap, .frame, .btn-line, .link-arrow, .ordinal,
 *     .breadcrumb, .branch record). The branch record is styled in base.css, never here.
 *   - Nothing here may set overflow on an ancestor of .record: its sticky position dies silently.
 *   - Type stays on the 12/14/16/20/28/40/64/104 ladder, stepped at 600 and 1024. No clamp().
 *   - 0px corners, 1px hairlines in var(--rule), no shadows, no gradients. Lime only as the
 *     focus ring on dark (emerald on cream), never a surface.
 * ---------------------------------------------------------------------------
 */

/* ---------- hero (hub and single) ---------- */
.loc-hero { padding-block: var(--s-6) var(--s-8); }
.loc-hero__inner > * { min-width: 0; }
.loc-hero .breadcrumb { margin-bottom: var(--s-6); }
.loc-hero .sub { margin-top: var(--s-5); }
.loc-hero__footprint { margin-top: var(--s-4); max-width: 62ch; }
@media (min-width: 600px) {
  .loc-hero { padding-block: var(--s-7) var(--s-9); }
}
@media (min-width: 1024px) {
  .loc-hero { padding-block: var(--s-8) var(--s-9); }
  .loc-hero .breadcrumb { margin-bottom: var(--s-7); }
  .loc-hero .sub { margin-top: var(--s-6); }
}

/* ---------- hub: catalogue call to action ---------- */
.loc-catalog__grid { display: grid; gap: var(--s-6); }
.loc-catalog__grid > * { min-width: 0; }
.loc-catalog .body { margin-top: var(--s-5); }
@media (min-width: 1024px) {
  .loc-catalog__grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); column-gap: var(--s-8); align-items: end; }
}

/* ---------- single: how to get here ---------- */
.loc-map__grid { display: grid; gap: var(--s-6); }
.loc-map__grid > * { min-width: 0; }
.loc-map__text { margin-top: var(--s-5); }
.loc-map__text p + p { margin-top: 1em; }
.loc-map__frame iframe { position: absolute; inset: 0; display: block; width: 100%; height: 100%; border: 0; }
/* .frame clips its child, so the iframe's own focus ring would be cut off: draw it on the frame */
.loc-map__frame:focus-within { outline: 2px solid var(--lime); outline-offset: 3px; }
.band--cream .loc-map__frame:focus-within { outline-color: var(--emerald); }
.loc-map__link { margin-top: var(--s-3); }
@media (min-width: 600px) {
  .loc-map__grid { gap: var(--s-7); }
}
@media (min-width: 1024px) {
  .loc-map__grid { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); column-gap: var(--s-8); align-items: start; }
}

/* ---------- single: services at this branch ---------- */
.loc-services__grid { display: grid; gap: var(--s-6); }
.loc-services__grid > * { min-width: 0; }
.loc-services__action { margin-top: var(--s-5); }
.loc-services__list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.loc-services__item { border-bottom: 1px solid var(--rule); }
.loc-service {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 20px;
  column-gap: 12px;
  align-items: center;
  min-height: 64px;
  padding: 12px 0;
  color: inherit;
  text-decoration: none;
}
.loc-service__name {
  font-size: 20px;
  font-weight: 300;
  line-height: 1.2;
  letter-spacing: -.005em;
  text-transform: uppercase;
  text-decoration-thickness: 1px;
  text-underline-offset: .2em;
}
.loc-service .i { width: 16px; height: 16px; justify-self: end; transition: transform .35s var(--ease); }
.loc-service:hover .loc-service__name,
.loc-service:focus-visible .loc-service__name { text-decoration-line: underline; }
.loc-service:hover .i,
.loc-service:focus-visible .i { transform: translateX(4px); }
@media (min-width: 600px) {
  .loc-services__grid { gap: var(--s-7); }
}
@media (min-width: 768px) {
  .loc-service { grid-template-columns: 56px minmax(0, 1fr) 20px; column-gap: 24px; min-height: 76px; }
}
@media (min-width: 1024px) {
  .loc-services__grid { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); column-gap: var(--s-8); align-items: start; }
  .loc-service__name { font-size: 28px; }
}

/* ---------- motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .loc-service .i { transition: none; }
  .loc-service:hover .i,
  .loc-service:focus-visible .i { transform: none; }
}

/* Four-column leads are ~277px wide at 1024px: 40px head so LAYANAN DI CABANG INI never splits mid-word. */
@media (min-width: 1024px) {
  .loc-map__lead .head, .loc-services__lead .head { font-size: 40px; }
}
