/* Portfolio and project pages. Relies on the tokens and shared roles in warm.css. */

.eyebrow {
  display: block;
  margin-bottom: var(--s-3);
  color: #17457c;
  font-family: var(--sans);
  font-size: var(--fs-small);
  font-weight: 800;
  letter-spacing: 0.13em;
  line-height: 1.25;
  text-transform: uppercase;
}
.on-dark .eyebrow,
.feature .eyebrow,
.cta-band .eyebrow { color: var(--accent-light); }

/* Image panels share the hero's gradient so text always sits on dark ground */
.shade { position: relative; overflow: hidden; background: var(--night); color: var(--cream); isolation: isolate; }
.shade > img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s var(--ease);
}
.shade::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(12, 20, 30, 0.86) 0%, rgba(12, 20, 30, 0.55) 40%, rgba(12, 20, 30, 0.05) 80%),
    linear-gradient(0deg, rgba(12, 20, 30, 0.5) 0%, transparent 50%);
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-1) var(--s-3);
  font-size: var(--fs-small);
  font-weight: 600;
  color: rgba(248, 250, 252, 0.78);
}
.meta li + li::before { content: "·"; margin-right: var(--s-3); color: var(--accent-light); }

.arrow-link {
  display: inline-flex;
  align-items: center;
  gap: var(--s-3);
  font-size: var(--fs-ui);
  font-weight: 700;
  text-decoration: none;
}
.arrow-link i {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid rgba(248, 250, 252, 0.45);
  border-radius: 50%;
  font-style: normal;
  transition: background 0.3s ease, border-color 0.3s ease, transform 0.35s var(--ease);
}

/* Selected work */
.selected { padding: var(--section) 0 0; }
.selected__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--s-4) var(--s-6);
  margin-bottom: var(--s-6);
}
.selected__head .section-head { margin-bottom: 0; }
.selected__list { display: grid; gap: var(--s-5); padding: 0; }
.feature {
  display: flex;
  align-items: flex-end;
  min-height: clamp(360px, 42vw, 520px);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-decoration: none;
}
.feature__body { max-width: 30rem; padding: var(--pad-panel); }
.feature__count { display: block; margin-bottom: var(--s-4); font-size: var(--fs-small); font-weight: 700; letter-spacing: 0.14em; color: rgba(248, 250, 252, 0.7); }
.feature h3 { font-size: clamp(2.25rem, 1.6rem + 2vw, 3.25rem); line-height: 1; letter-spacing: -0.03em; }
.feature .eyebrow { margin: var(--s-3) 0 var(--s-4); }
.feature .arrow-link { margin-top: var(--s-5); }
.feature:hover > img { transform: scale(1.04); }
.feature:hover .arrow-link i,
.feature:focus-visible .arrow-link i { background: var(--accent); border-color: var(--accent); transform: translateX(4px); }

/* All projects */
.showcase { padding: var(--section) 0; }
.showcase__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--s-4) var(--s-6);
  margin-bottom: var(--s-6);
}
.showcase__head .section-head { margin-bottom: 0; }
.filter { display: flex; align-items: center; gap: var(--s-3); }
.filter label { font-size: var(--fs-ui); font-weight: 700; }
.filter select {
  width: 13.5rem;
  height: var(--control);
  padding: 0 2.6rem 0 var(--s-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-field);
  appearance: none;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%2317457c' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right var(--s-4) center / 0.75rem;
  font-size: var(--fs-body);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.filter select:hover { border-color: #c5d0dc; }
.filter select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(31, 90, 158, 0.15); }
.showcase__count { margin-bottom: var(--s-4); color: var(--muted); font-size: var(--fs-ui); }

.project-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-5); padding: 0; }
.tile {
  display: flex;
  align-items: flex-end;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-decoration: none;
}
.tile::after {
  background: linear-gradient(0deg, rgba(12, 20, 30, 0.85) 0%, rgba(12, 20, 30, 0.35) 42%, rgba(12, 20, 30, 0) 70%);
}
.tile__body { display: grid; gap: var(--s-2); width: 100%; padding: var(--pad-card); }
.tile .card-title { color: var(--cream); }
.tile:hover > img { transform: scale(1.05); }
.tile.is-new { animation: rise 0.7s var(--ease) both; }

.showcase__more { display: flex; justify-content: center; margin-top: var(--s-6); }
.ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: var(--btn);
  padding: 0 1.6rem;
  border: 1.5px solid var(--accent);
  border-radius: 999px;
  background: transparent;
  color: var(--accent-deep);
  font-size: var(--fs-ui);
  font-weight: 700;
  transition: background 0.3s ease, color 0.3s ease;
}
.ghost:hover { background: var(--accent); color: #fff; }
.empty {
  padding: var(--pad-panel);
  border: var(--edge);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--muted);
  text-align: center;
}

/* Call to action before the footer */
.cta-band {
  display: grid;
  justify-items: center;
  gap: var(--s-3);
  margin-bottom: var(--section);
  padding: clamp(3rem, 7vw, 5rem) var(--pad-panel);
  border-radius: var(--radius);
  text-align: center;
}
.cta-band::after { background: rgba(12, 20, 30, 0.7); }
.cta-band .eyebrow { margin: 0; }
.cta-band p { max-width: 32rem; color: rgba(248, 250, 252, 0.8); }
.cta-band .pill { margin-top: var(--s-3); }

/* Project page */
.facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--s-5);
  padding: var(--s-6) 0;
  border-bottom: 1px solid var(--line);
}
.facts dt { font-size: var(--fs-small); font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.facts dd { margin: var(--s-1) 0 0; font-family: var(--display); font-size: 1.25rem; line-height: 1.3; }

.gallery { padding: var(--section) 0 0; }
.gallery__viewport { overflow: hidden; border-radius: var(--radius); }
.gallery__track { display: flex; gap: var(--s-5); padding: 0; transition: transform 0.9s var(--ease); }
.gallery__slide { flex: 0 0 calc((100% - var(--s-5)) / 1.6); aspect-ratio: 16 / 10; overflow: hidden; border-radius: var(--radius); background: var(--night); }
.gallery__slide img { width: 100%; height: 100%; object-fit: cover; }
.gallery__bar { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); margin-top: var(--s-5); }
.gallery__dots { display: flex; gap: 0.35rem; }
.gallery__dots button {
  width: 1.9rem;
  height: 3px;
  padding: 0;
  border: 0;
  border-radius: 3px;
  background: var(--line);
  transition: background 0.3s ease;
}
.gallery__dots button[aria-current="true"] { background: var(--accent); }

.nav-pair { display: flex; gap: var(--s-2); }
.nav-pair button {
  display: grid;
  place-items: center;
  width: var(--btn);
  height: var(--btn);
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--card);
  color: var(--ink);
  font-size: 1.1rem;
  transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
.nav-pair button:hover:not(:disabled) { background: var(--ink); border-color: var(--ink); color: var(--cream); }
.nav-pair button:disabled { opacity: 0.4; cursor: default; }

.related { padding: var(--section) 0; }
.related__viewport { overflow: hidden; }
.related__track { display: flex; gap: var(--s-5); padding: 0; transition: transform 0.7s var(--ease); }
.related__track > li { flex: 0 0 calc((100% - 2 * var(--s-5)) / 3); }
.related .tile { aspect-ratio: 4 / 3; }

@media (max-width: 900px) {
  .related__track > li { flex-basis: calc((100% - var(--s-5)) / 2); }
  .gallery__slide { flex-basis: 86%; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .project-grid { grid-template-columns: minmax(0, 1fr); gap: var(--s-4); }
  .filter { width: 100%; }
  .filter select { flex: 1; width: auto; }
  .feature { min-height: 400px; }
  .feature::after { background: linear-gradient(0deg, rgba(12, 20, 30, 0.9) 0%, rgba(12, 20, 30, 0.5) 55%, rgba(12, 20, 30, 0.1) 100%); }
  .related__track > li { flex-basis: 86%; }
  .gallery__slide { flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .shade > img, .gallery__track, .related__track, .tile.is-new { transition: none; animation: none; }
}
