/* =========================================================================
   PORTFOLIO — page-specific styles
   ========================================================================= */

/* ---------- FILTERS ---------- */
.filters-section {
  padding: 28px 0;
}

.filters {
  display: flex;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
}

.filters-label {
  font-family: var(--italic);
  font-style: italic;
  text-transform: none;
  letter-spacing: 0.02em;
  font-size: 14px;
  font-weight: 400;
  color: var(--ink-2);
}

.filter-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--ink-2);
  transition: background 0.3s, color 0.3s, border-color 0.3s;
  background: transparent;
}

.filter-btn:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.filter-btn.is-active {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

.filter-count {
  font-family: var(--serif);
  text-transform: none;
  letter-spacing: 0.02em;
  font-size: 12px;
  color: var(--gold);
  margin-left: 4px;
}

.filter-btn.is-active .filter-count {
  color: var(--gold-2);
}

/* ---------- FEATURED CASE ---------- */
.section-featured-case {
  padding: clamp(60px, 8vh, 100px) 0 clamp(80px, 11vh, 140px);
}

.featured-case {
  display: grid;
  gap: 32px;
}

.fc-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.fc-body {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: clamp(32px, 5vw, 80px);
  align-items: start;
}

.fc-thumb {
  aspect-ratio: 4 / 5;
  background: linear-gradient(155deg, #d4b896 0%, #b08862 60%, #6b4926 100%);
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
}

.fc-thumb::before {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  pointer-events: none;
}

.fc-thumb .thumb-arch.arch-1 {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 60%;
  height: 75%;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-bottom: 0;
  border-radius: 50% 50% 0 0 / 70% 70% 0 0;
  transform: translateX(-50%);
}

.fc-thumb .thumb-arch.arch-2 {
  width: 30%;
  height: 45%;
  border-color: rgba(255, 255, 255, 0.6);
}

.fc-thumb .thumb-tag {
  position: absolute;
  bottom: 36px;
  left: 36px;
  color: var(--paper);
  font-size: clamp(28px, 3vw, 42px);
  z-index: 2;
}

.fc-text {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-top: 12px;
}

.fc-text h2 {
  font-size: clamp(48px, 6vw, 88px);
  line-height: 1;
  margin-bottom: 8px;
}

.fc-text p {
  font-size: 16px;
  line-height: 1.65;
}

.fc-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding: 28px 0;
  margin-top: 16px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.fc-stats > div {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.fc-stats .serif {
  font-size: clamp(28px, 2.4vw, 40px);
  color: var(--ink);
  line-height: 1;
}

.fc-stats .ital {
  font-size: 0.5em;
  color: var(--gold-deep);
  margin-left: 2px;
}

.fc-stats .label {
  font-size: 9px;
}

.fc-text .btn {
  align-self: flex-start;
  margin-top: 8px;
}

@media (max-width: 880px) {
  .fc-body {
    grid-template-columns: 1fr;
  }
}

/* ---------- WORKS GRID ---------- */
.section-grid {
  padding-bottom: clamp(60px, 10vh, 120px);
}

.grid-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 48px;
}

.sort-info {
  font-family: var(--italic);
  font-style: italic;
  text-transform: none;
  font-size: 14px;
  letter-spacing: 0.02em;
  color: var(--ink-3);
}

.works-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(32px, 4vw, 56px) clamp(20px, 3vw, 40px);
  grid-auto-flow: dense;
}

.work {
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: opacity 0.4s, transform 0.4s;
}

.work.is-hidden {
  display: none;
}

.work-thumb {
  aspect-ratio: 4 / 5;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line-2);
  display: block;
  transition: transform 0.5s;
}

.work.work-tall .work-thumb {
  aspect-ratio: 4 / 6;
}

.work-thumb::before {
  content: "";
  position: absolute;
  inset: 16px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  pointer-events: none;
  transition: inset 0.5s;
  z-index: 2;
}

.work-thumb:hover::before {
  inset: 8px;
}

.thumb-inner {
  position: absolute;
  inset: 0;
}

.work-overlay {
  position: absolute;
  inset: 0;
  background: rgba(28, 20, 14, 0.65);
  display: grid;
  place-items: center;
  opacity: 0;
  transition: opacity 0.4s;
  z-index: 3;
}

.work-thumb:hover .work-overlay {
  opacity: 1;
}

.work-overlay-tag {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--paper);
  border-bottom: 1px solid var(--gold);
  padding-bottom: 4px;
}

/* Thumb backgrounds — varied editorial palettes */
.thumb-bg-1 { background: linear-gradient(165deg, #2c2620 0%, #3d2f24 100%); }
.thumb-bg-2 { background: linear-gradient(150deg, #e8dec4 0%, #c4a880 100%); }
.thumb-bg-3 { background: linear-gradient(155deg, #5b2a26 0%, #3a1c1a 100%); }
.thumb-bg-4 { background: linear-gradient(140deg, #d4b896 0%, #a8825a 100%); }
.thumb-bg-5 { background: linear-gradient(160deg, #1c140e 0%, #2c2118 100%); }
.thumb-bg-6 { background: linear-gradient(155deg, #6b4926 0%, #432a16 100%); }
.thumb-bg-7 { background: linear-gradient(150deg, #f1e9d7 0%, #d4c5a0 100%); }
.thumb-bg-8 { background: linear-gradient(165deg, #3d2f24 0%, #1c140e 100%); }
.thumb-bg-9 { background: linear-gradient(140deg, #c9a267 0%, #8b6635 100%); }

.thumb-inner .thumb-circle {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 60%;
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.thumb-inner .thumb-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 45%;
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.thumb-inner .thumb-ring.ring-2 {
  width: 70%;
  border-color: rgba(255, 255, 255, 0.25);
}

.thumb-inner .thumb-line {
  position: absolute;
  left: 14%;
  top: 30%;
  width: 72%;
  height: 1px;
  background: rgba(255, 255, 255, 0.35);
}

.thumb-inner .thumb-line.line-2 {
  top: 50%;
  background: rgba(255, 255, 255, 0.25);
  left: 28%;
  width: 58%;
}

.thumb-inner .thumb-line.line-3 {
  top: 70%;
  background: rgba(255, 255, 255, 0.18);
  left: 14%;
  width: 50%;
}

.thumb-inner .thumb-grid {
  position: absolute;
  inset: 22%;
  border: 1px solid rgba(201, 162, 103, 0.5);
  background-image:
    linear-gradient(rgba(201, 162, 103, 0.16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(201, 162, 103, 0.16) 1px, transparent 1px);
  background-size: 18px 18px;
}

.thumb-inner .thumb-arch {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 65%;
  height: 75%;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-bottom: 0;
  border-radius: 50% 50% 0 0 / 80% 80% 0 0;
  transform: translateX(-50%);
}

/* Light thumbs need dark accents */
.thumb-bg-2 .thumb-inner .thumb-ring,
.thumb-bg-2 .thumb-inner .thumb-line,
.thumb-bg-2 .thumb-inner .thumb-arch,
.thumb-bg-7 .thumb-inner .thumb-ring,
.thumb-bg-7 .thumb-inner .thumb-line,
.thumb-bg-7 .thumb-inner .thumb-arch {
  border-color: rgba(28, 20, 14, 0.45);
}

.thumb-bg-2 .thumb-inner .thumb-grid,
.thumb-bg-7 .thumb-inner .thumb-grid {
  border-color: rgba(28, 20, 14, 0.35);
  background-image:
    linear-gradient(rgba(28, 20, 14, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(28, 20, 14, 0.12) 1px, transparent 1px);
}

.work-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.work-meta-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.work-meta-top .work-year {
  font-size: 14px;
  color: var(--gold-deep);
}

.work-meta h3 {
  font-size: clamp(22px, 1.8vw, 28px);
  line-height: 1.1;
}

@media (max-width: 880px) {
  .works-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 560px) {
  .works-grid {
    grid-template-columns: 1fr;
  }
}

.load-more-row {
  margin-top: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 36px;
  border-top: 1px solid var(--line);
}

.more-info {
  font-family: var(--italic);
  font-style: italic;
  text-transform: none;
  font-size: 14px;
  letter-spacing: 0.02em;
  color: var(--ink-3);
}

/* ---------- CLIENTS WALL ---------- */
.section-clients {
  background: var(--paper-2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.clients-wall {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin-top: 20px;
  border-top: 1px solid var(--line);
}

.client {
  flex: 1 1 33.33%;
  padding: 36px 24px;
  font-size: clamp(22px, 2.2vw, 32px);
  letter-spacing: 0.01em;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  text-align: center;
  transition: background 0.3s, color 0.3s;
}

.client:nth-child(3n) {
  border-right: 0;
}

.client:hover {
  background: var(--ink);
  color: var(--gold-2);
}

@media (max-width: 760px) {
  .client {
    flex: 1 1 50%;
    font-size: 22px;
    padding: 24px 16px;
  }
  .client:nth-child(3n) {
    border-right: 1px solid var(--line);
  }
  .client:nth-child(2n) {
    border-right: 0;
  }
}

/* ---------- Featured tag color overrides for fc thumb ---------- */
.section-featured-case .thumb-tag {
  color: var(--paper);
}
