/* Ranaloka page CSS: only what the kit (assets/system.css, layout.css) does not cover:
   the portfolio filter and gallery wall, the lightbox, the long inquiry form, the stand-in note
   and the text pages. Every size comes from the kit's tokens. */

/* ------------------------------------------------------------ breadcrumb above an h1 */
.crumbs { display: flex; flex-wrap: wrap; gap: var(--s-2); font-size: var(--t-small); color: var(--muted); margin-bottom: var(--s-4); }
.crumbs a { text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.crumbs a:hover { color: var(--ink); text-decoration-color: currentColor; }
.crumbs li + li::before { content: "/"; margin-right: var(--s-2); color: var(--muted); }
.crumbs { list-style: none; padding: 0; }
.crumbs li { display: inline-flex; align-items: center; min-height: 24px; }

/* ------------------------------------------------------------ the first section of an inner page */
.page-head { display: grid; gap: var(--s-4); max-width: 760px; margin-bottom: var(--head-gap); }
.page-head p { font-size: var(--t-lead); line-height: 1.5; max-width: 60ch; }

/* ------------------------------------------------------------ portfolio filter: links to the category pages */
.filter { display: flex; flex-wrap: wrap; gap: var(--s-2); margin: 0; padding: 0; list-style: none; }
.filter a { display: inline-flex; align-items: center; gap: var(--s-2); min-height: 44px; padding: 0 var(--s-4);
  border: 1px solid var(--line-strong); border-radius: var(--r-btn); font-weight: 500; font-size: var(--t-small);
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease); }
.filter a:hover { border-color: var(--ink); }
.filter a[aria-current="page"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.filter .count { font-variant-numeric: tabular-nums; color: inherit; opacity: .72; }

.standin-note { font-size: var(--t-small); color: var(--muted); max-width: 70ch; }
.standin-note a { text-decoration: underline; text-underline-offset: 3px; }

/* ------------------------------------------------------------ project tiles: one ratio per row */
.tiles--wide { --tile-ratio: 4 / 3; }
.tiles--square { --tile-ratio: 1 / 1; }
.tile__meta { color: var(--muted); font-size: var(--t-small); margin-top: calc(-1 * var(--s-3)); }
a.tile:hover .tile__media > img { transform: scale(1.03); }

/* ------------------------------------------------------------ gallery wall on a project page */
.gallery { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gutter); }
.gallery__item { grid-column: span 6; position: relative; display: block; overflow: hidden; border-radius: var(--r-lg);
  aspect-ratio: 3 / 2; background: var(--surface); }
.gallery--three > .gallery__item { grid-column: span 4; aspect-ratio: 4 / 5; }
.gallery__item > img { width: 100%; height: 100%; object-fit: cover; transition: transform 600ms var(--ease); }
.gallery__item:hover > img { transform: scale(1.03); }
.gallery__item:focus-visible { outline: 2px solid var(--action); outline-offset: 3px; }
@media (max-width: 639px) {
  .gallery { grid-template-columns: minmax(0, 1fr); }
  .gallery > .gallery__item, .gallery--three > .gallery__item { grid-column: 1 / -1; aspect-ratio: 4 / 3; }
}

/* ------------------------------------------------------------ lightbox (site.js) */
.lightbox { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: #1d1c17; color: #ecebe7; }
.lightbox::backdrop { background: rgb(20 20 16 / .9); }
.lightbox[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.lightbox__bar { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); padding: var(--s-4) var(--gut); }
.lightbox__count { font-size: var(--t-small); font-variant-numeric: tabular-nums; color: #b9b8b2; }
.lightbox__stage { display: grid; place-items: center; min-height: 0; padding: 0 var(--gut); }
.lightbox__stage img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; border-radius: var(--r-md); }
.lightbox__nav { display: flex; justify-content: center; gap: var(--s-3); padding: var(--s-4) var(--gut) var(--s-5); }
.lightbox button { display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2); min-width: 44px; height: 44px;
  padding: 0 var(--s-4); border: 1px solid rgb(236 235 231 / .35); border-radius: var(--r-btn); background: transparent; color: inherit; cursor: pointer;
  font-weight: 500; transition: border-color var(--dur) var(--ease), background-color var(--dur) var(--ease); }
.lightbox button:hover { border-color: #ecebe7; background: rgb(236 235 231 / .08); }
.lightbox button:focus-visible { outline: 2px solid #ecebe7; outline-offset: 2px; }
.lightbox__alt { padding: 0 var(--gut); text-align: center; font-size: var(--t-small); color: #b9b8b2; }

/* ------------------------------------------------------------ long text pages (privacy, terms, credits, 404) */
main > section.doc { height: auto; min-height: 100svh; }
.doc .prose { max-width: 68ch; display: grid; gap: var(--s-4); }
.doc .prose h2 { font-size: var(--t-h3); margin-top: var(--s-6); }
.doc .prose ul { list-style: disc; padding-left: 1.2em; display: grid; gap: var(--s-2); }
.doc .prose a { text-decoration: underline; text-underline-offset: 3px; }
.credit-list { display: grid; gap: 0; max-width: 980px; }
.credit-list > li { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: var(--s-4); padding-block: var(--s-4); border-bottom: 1px solid var(--line); align-items: center; }
.credit-list img { width: 96px; height: 72px; object-fit: cover; border-radius: var(--r-sm); }
.credit-list a { text-decoration: underline; text-underline-offset: 3px; }

/* ------------------------------------------------------------ inquiry pages: text left, the form on its own panel */
main > section.inquiry { height: auto; min-height: 100svh; }
.form-panel { background: var(--surface); border-radius: var(--r-lg); padding: var(--s-7); }
.form fieldset { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-4); margin: 0; padding: 0; border: 0; min-width: 0; }
.form fieldset[hidden] { display: none; }
.form legend { grid-column: 1 / -1; padding: 0; margin-bottom: var(--s-1); font-weight: 500; font-size: var(--t-body); }
.form .field--full { grid-column: 1 / -1; }
.field .hint { font-weight: 400; color: var(--muted); }
.field--check { display: flex; align-items: flex-start; gap: var(--s-3); font-weight: 400; font-size: var(--t-small); line-height: 1.5; }
.field--check input { width: 20px; height: 20px; margin: 2px 0 0; flex: none; accent-color: var(--action); }
.field--check .field__error { flex-basis: 100%; }
.field--check { flex-wrap: wrap; }
.field--check a { text-decoration: underline; text-underline-offset: 3px; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.steps-plain { display: grid; gap: var(--s-4); margin-top: var(--s-6); counter-reset: step; }
.steps-plain > li { display: grid; gap: var(--s-1); padding-bottom: var(--s-4); border-bottom: 1px solid var(--line); }
.steps-plain > li > strong { font-weight: 500; }
.facts { display: grid; gap: 0; margin-top: var(--s-6); }
.facts > div { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: var(--s-4); padding-block: var(--s-3); border-bottom: 1px solid var(--line); }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
@media (max-width: 639px) {
  .form-panel { padding: var(--s-5) var(--s-4); }
  .form fieldset { grid-template-columns: minmax(0, 1fr); }
  .inquiry .grid > .form-panel { margin-top: var(--s-6); }
}

/* ------------------------------------------------------------ two-column list of what a quote needs */
.quote-cols { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gutter); }
.quote-cols > div { grid-column: span 6; }
.quote-cols h3 { font: 500 var(--t-card)/1.3 var(--font-text); letter-spacing: -0.01em; margin-bottom: var(--s-4); }
.quote-cols .rows > li { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 1023px) { .quote-cols > div { grid-column: 1 / -1; } .quote-cols { row-gap: var(--s-7); } }

/* a service row's name links to its page */
.rows a.rows__name { text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 4px; }
.rows a.rows__name:hover { text-decoration-color: currentColor; }

/* a phone: a service name that links is a 44px target */
@media (max-width: 639px) {
  .rows a.rows__name { display: inline-flex; align-items: center; min-height: 44px; }
}

/* a phone: the split's photograph block never shrinks below what it holds, so it cannot run out of
   its section on a short or narrow screen (the section grows instead) */
@media (max-width: 639px) {
  main > section > .wrap > .grid.fill { flex: 1 0 auto; }
}

/* a phone: the hero keeps to one screen; the breadcrumb (also in the page's structured data) and the
   project facts (repeated in the gallery heading) step aside there */
@media (max-width: 639px) {
  .hero .crumbs, .hero .facts { display: none; }
  .hero .facts + .btn-row { margin-top: var(--s-5) !important; }
}

/* a project's cover opens the lightbox: the link fills the hero frame and the photograph covers it */
.hero__media > a[data-lightbox] { position: absolute; inset: 0; display: block; }
.hero__media > a[data-lightbox] > img, .hero__media > a[data-lightbox] > picture > img {
  position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: var(--ly-pos, 50% 50%);
  transition: transform 600ms var(--ease); }
.hero__media > a[data-lightbox]:hover > img { transform: scale(1.02); }
.hero__media > a[data-lightbox]:focus-visible { outline: 2px solid var(--action); outline-offset: -4px; }

/* project tiles on the listing carry an h2 (the page's h1 is above): card size, like an h3 tile title */
.tile__head > h2 { font: 500 var(--t-card)/1.3 var(--font-text); letter-spacing: -0.01em; }

/* related series under a project's creative notes: a lower 3:2 tile so notes and tiles share one screen */
.tiles--related { --tile-ratio: 3 / 2; }
