/* ============================================================================
   GEC — Inner pages: page hero, includes box, tabbed gallery, request block
   ========================================================================= */

/* -------------------------------------------------------------- PAGE HERO */
.phero {
  position: relative;
  min-height: clamp(460px, 74svh, 760px);
  display: flex;
  align-items: flex-end;
  padding-top: calc(var(--header-h) + 2rem);
  padding-bottom: clamp(2.5rem, 5vw, 4.5rem);
  overflow: hidden;
  isolation: isolate;
}

.phero__bg { position: absolute; inset: 0; z-index: -2; }

.phero__bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: brightness(.74) saturate(.95);
  animation: pheroIn 1.8s var(--ease) both;
}

@keyframes pheroIn { from { transform: scale(1.08); } to { transform: scale(1); } }

.phero__scrim {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(to top, rgba(0,0,0,.95) 0%, rgba(0,0,0,.6) 38%, rgba(0,0,0,.2) 72%, rgba(0,0,0,.5) 100%),
    linear-gradient(to right, rgba(0,0,0,.72) 0%, rgba(0,0,0,.3) 52%, transparent 100%);
}

/* Light theme: same pale wash as the home hero, so an inner page opens in the
   chosen theme rather than reverting to a dark band across the top. */
:root[data-theme="light"] .phero__bg img {
  filter: brightness(1.1) saturate(.8) contrast(.95);
}

:root[data-theme="light"] .phero__scrim {
  background:
    linear-gradient(to right,
      rgba(247,245,240,.96) 0%,  rgba(247,245,240,.92) 30%,
      rgba(247,245,240,.68) 54%, rgba(247,245,240,.28) 78%,
      rgba(247,245,240,.1)  100%),
    linear-gradient(to top,
      rgba(247,245,240,.52) 0%, rgba(247,245,240,.12) 32%,
      rgba(247,245,240,0)   64%, rgba(247,245,240,.26) 100%);
}

.phero .zellige { z-index: -1; opacity: .2; }
:root[data-theme="light"] .phero .zellige { opacity: .3; }

/* Same reasoning as the home hero: a side-to-side wash covers a phone entirely. */
@media (max-width: 860px) {
  :root[data-theme="light"] .phero__scrim {
    background: linear-gradient(to bottom,
      rgba(247,245,240,.52) 0%,
      rgba(247,245,240,.8)  14%,
      rgba(247,245,240,.94) 30%,
      rgba(247,245,240,.92) 70%,
      rgba(247,245,240,.62) 88%,
      rgba(247,245,240,.3)  100%);
  }
}

.phero__body { max-width: 940px; display: flex; flex-direction: column; gap: 1.1rem; }

.phero--short { min-height: clamp(360px, 54svh, 540px); }

/* Breadcrumb */
.crumb {
  display: flex;
  align-items: center;
  gap: .65rem;
  font-size: .66rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--text-dim);
  flex-wrap: wrap;
}

.crumb a { color: var(--text-muted); transition: color var(--t-fast) var(--ease); }
.crumb a:hover { color: var(--gold-on-bg); }
.crumb span[aria-current] { color: var(--gold-on-bg); }
.crumb i { font-style: normal; opacity: .5; }

/* ------------------------------------------------------------ INTRO BLOCK */
.intro__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr);
  gap: clamp(2.2rem, 5vw, 4.5rem);
  align-items: start;
}

/* A grid item defaults to min-width:auto, so it refuses to shrink below its
   content's minimum and pushes the page wider. Measured at 375px: the includes
   panel ran 14px past the viewport. */
.intro__grid > * { min-width: 0; }

.intro__body p { color: var(--text-muted); line-height: 1.85; font-size: var(--fs-lead); }

/* "Includes" box — tapping a row opens that item's gallery tab */
.includes {
  border: 1px solid var(--line-gold);
  background: linear-gradient(160deg, rgba(200,165,91,.06), transparent 60%);
  padding: clamp(1.4rem, 2.6vw, 2rem);
}

.includes h3 {
  font-family: var(--font-body);
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--gold-on-bg);
  margin-bottom: 1.2rem;
}

.includes ul { list-style: none; display: flex; flex-direction: column; }

.includes li + li { border-top: 1px solid var(--line); }

.includes button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: .85rem;
  padding: .82rem 0;
  text-align: left;
  font-size: .92rem;
  color: var(--text);
  transition: color var(--t-fast) var(--ease), padding-left var(--t-fast) var(--ease);
}

.includes button:hover { color: var(--gold-on-bg); padding-left: 6px; }
.includes .khatam { width: 11px; height: 11px; color: var(--gold-on-bg); flex: none; opacity: .8; }
.includes button svg.go { width: 14px; height: 14px; margin-left: auto; opacity: 0; transition: opacity var(--t-fast) var(--ease); }
.includes button:hover svg.go { opacity: .8; }

@media (max-width: 900px) { .intro__grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------------------------------------------------------------- GALLERY */
.gallery { position: relative; }

.tabs {
  position: sticky;
  top: var(--header-h);
  z-index: 40;
  transition: top .45s var(--ease);
  display: flex;
  gap: .4rem;
  overflow-x: auto;
  scrollbar-width: none;
  padding-block: .9rem;
  margin-bottom: clamp(1.6rem, 3vw, 2.6rem);
  /* Was a hard-coded rgba(8,8,10,.9). In the light theme that left the tab
     labels — which correctly flip to dark — sitting on a near-black bar at
     1.08:1, i.e. invisible. `--header-bg` is the theme-aware token for exactly
     this kind of translucent sticky bar and leaves the dark theme unchanged. */
  background: var(--header-bg);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.tabs::-webkit-scrollbar { display: none; }

/* The header slides away on downward scroll; the tab bar follows it up rather
   than leaving a strip of gallery showing through the gap it left behind. */
.header.is-hidden ~ main .tabs { top: 0; }

.tab {
  flex: none;
  padding: .62rem 1.1rem;
  font-size: .68rem;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--text-dim);
  border: 1px solid transparent;
  white-space: nowrap;
  transition: color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease);
}

.tab:hover { color: var(--text); }

.tab[aria-selected="true"] {
  color: var(--gold-on-bg);
  border-color: var(--line-gold);
  background: rgba(200,165,91,.07);
}

/* Panes */
.pane { display: none; animation: paneIn .7s var(--ease) both; }
.pane.is-active { display: block; }

@keyframes paneIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* "All" mosaic.
   Uniform tiles on purpose: GEC can add or remove included items in the
   dashboard, and any row-spanning pattern leaves holes at some item counts. */
.mosaic {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(.7rem, 1.4vw, 1.2rem);
}

.shot {
  position: relative;
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg-sunk);
  aspect-ratio: 4 / 3;
  transition: border-color var(--t-med) var(--ease);
}

.shot:hover { border-color: var(--line-gold); }

.shot img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: brightness(.82);
  transition: transform 1.5s var(--ease), filter 1.5s var(--ease);
}

.shot:hover img { transform: scale(1.06); filter: brightness(.95); }

.shot__cap {
  position: absolute;
  inset: auto 0 0 0;
  padding: 1rem 1.1rem;
  background: linear-gradient(to top, rgba(0,0,0,.9), transparent);
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text);
}

@media (max-width: 860px) { .mosaic { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .mosaic { grid-template-columns: 1fr; } }

/* Item pane */
.item__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 1rem;
}

.item__pos {
  font-size: .68rem;
  letter-spacing: .22em;
  color: var(--gold-on-bg);
}

.item__name {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3vw, 2.6rem);
  font-weight: 300;
  color: var(--text);
  line-height: 1.1;
}

.item__desc { color: var(--text-muted); max-width: 66ch; line-height: 1.8; margin-bottom: 2rem; }

.item__shots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: clamp(.7rem, 1.4vw, 1.2rem);
  margin-bottom: 2.2rem;
}

.item__next {
  display: flex;
  justify-content: flex-end;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

/* --------------------------------------------------------- REQUEST BLOCK */
.request {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line-gold);
  background: linear-gradient(150deg, rgba(200,165,91,.09), transparent 62%);
  padding: clamp(2.2rem, 5vw, 4rem);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.3rem;
}

.request .zellige { opacity: .35; }
.request > * { position: relative; z-index: 1; }

.request h2 {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3.2vw, 2.7rem);
  font-weight: 300;
  color: var(--text);
  max-width: 22ch;
}

.request p { color: var(--text-muted); max-width: 52ch; }
.request__cta { display: flex; flex-wrap: wrap; gap: .8rem; justify-content: center; }

/* -------------------------------------------------------- OTHER SERVICES */
.others {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.other {
  position: relative;
  background: var(--bg);
  padding: clamp(1.5rem, 2.6vw, 2.1rem);
  display: flex;
  flex-direction: column;
  gap: .6rem;
  min-height: 168px;
  transition: background-color var(--t-med) var(--ease);
}

.other::before {
  content: "";
  position: absolute; left: 0; top: 0;
  width: 100%; height: 1px;
  background: var(--gold-grad);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .7s var(--ease);
}

.other:hover { background: var(--bg-raise); }
.other:hover::before { transform: scaleX(1); }

.other h3 {
  font-family: var(--font-display);
  font-size: 1.28rem;
  font-weight: 400;
  color: var(--text);
  line-height: 1.2;
}

.other p { font-size: .84rem; color: var(--text-dim); line-height: 1.6; }

.other__go {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: .5em;
  font-size: .64rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--gold-on-bg);
}

.other__go svg { width: 14px; height: 14px; transition: transform .45s var(--ease); }
.other:hover .other__go svg { transform: translateX(6px); }

/* ---------------------------------------------------------------- JOURNAL */
.posts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: clamp(1.2rem, 2.4vw, 2rem);
}

.post {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  background: var(--bg-raise);
  overflow: hidden;
  transition: border-color var(--t-med) var(--ease), transform var(--t-med) var(--ease);
}

.post:hover { border-color: var(--line-gold); transform: translateY(-4px); }

.post__media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; }

.post__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: brightness(.78);
  transition: transform 1.5s var(--ease), filter 1.5s var(--ease);
}

.post:hover .post__media img { transform: scale(1.06); filter: brightness(.92); }

.post__cat {
  position: absolute;
  inset-inline-start: 1rem;
  top: 1rem;
  padding: .45rem .8rem;
  background: rgba(8,8,10,.82);
  border: 1px solid var(--line-gold);
  font-size: .7rem;      /* was .6rem — 9.6px is below a legible minimum */
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--gold-on-bg);
}

.post__body {
  display: flex;
  flex-direction: column;
  gap: .75rem;
  padding: clamp(1.3rem, 2.4vw, 1.8rem);
  flex: 1;
}

.post__title {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2vw, 1.62rem);
  font-weight: 400;
  color: var(--text);
  line-height: 1.25;
}

.post__excerpt { font-size: .89rem; color: var(--text-muted); line-height: 1.7; }

.post__meta {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: .68rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.post__meta .go { color: var(--gold-on-bg); display: inline-flex; align-items: center; gap: .5em; }
.post__meta .go svg { width: 14px; height: 14px; transition: transform .45s var(--ease); }
.post:hover .post__meta .go svg { transform: translateX(6px); }

/* Article header */
.article__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  font-size: .68rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.article__meta .khatam { width: 9px; height: 9px; color: var(--gold-on-bg); }

/* ------------------------------------------------------------ PROSE PAGES */
.prose { max-width: 74ch; }
.prose > * + * { margin-top: 1.35rem; }

.prose h2 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 2.8vw, 2.2rem);
  font-weight: 400;
  color: var(--text);
  margin-top: 2.8rem;
}

.prose h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--gold-on-bg);
  margin-top: 2rem;
}

.prose p, .prose li { color: var(--text-muted); line-height: 1.85; }
.prose ul { padding-left: 1.2rem; display: flex; flex-direction: column; gap: .6rem; }
.prose li::marker { color: var(--gold-on-bg); }
.prose a { color: var(--gold-on-bg); border-bottom: 1px solid var(--line-gold); }
.prose strong { color: var(--text); font-weight: 500; }
