/* Our work — dense mosaic gallery */

.page-hero--work-compact {
  padding: 36px 16px 28px;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(80% 60% at 50% 0%, rgba(237, 236, 231, 0.07) 0%, transparent 55%),
    var(--bg);
}

.page-hero--work-compact .hero-badge--solo {
  padding: 0 11px;
}

.page-hero--work-compact .container {
  text-align: center;
}

.work-hero__badge {
  opacity: 0;
  transform: translateY(8px);
  animation: work-hero-rise 0.55s ease forwards;
}

.work-hero__title {
  margin: 18px auto 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  max-width: none;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
  letter-spacing: inherit;
  color: inherit;
}

.work-hero__title-line {
  display: block;
  font-size: clamp(36px, 6.8vw, 72px);
  line-height: 1.04;
  font-weight: 600;
  letter-spacing: -0.045em;
  color: var(--fg);
  opacity: 0;
  transform: translateY(18px);
  animation: work-hero-rise 0.75s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.work-hero__title-line:nth-child(1) {
  animation-delay: 0.08s;
}

.work-hero__title-line:nth-child(2) {
  animation-delay: 0.2s;
}

.work-hero__title-accent {
  position: relative;
  display: inline-block;
  font-family: "Fraunces", "Times New Roman", serif;
  font-weight: 600;
  font-style: normal;
  font-variation-settings: "SOFT" 100, "WONK" 1;
  letter-spacing: -0.02em;
  color: var(--accent);
}

.work-hero__title-accent::after {
  content: "";
  position: absolute;
  left: 0.05em;
  right: 0.05em;
  bottom: 0.04em;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    rgba(237, 236, 231, 0.15) 0%,
    var(--accent) 35%,
    var(--accent) 65%,
    rgba(237, 236, 231, 0.15) 100%
  );
  transform: scaleX(0);
  transform-origin: center;
  animation: work-hero-accent-line 0.65s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.work-hero__title-line:nth-child(1) .work-hero__title-accent::after {
  animation-delay: 0.5s;
}

.work-hero__title-line--question .work-hero__title-accent::after {
  animation-delay: 0.58s;
}

@keyframes work-hero-accent-line {
  to {
    transform: scaleX(1);
  }
}

.work-hero__title-line .work-hero__title-accent {
  font-size: 1.12em;
  vertical-align: -0.02em;
}

.work-hero__title-punct {
  display: inline;
}

.work-hero__title-line--question {
  animation-delay: 0.2s;
  font-size: clamp(30px, 5.8vw, 62px);
  font-weight: 500;
  color: var(--fg-80);
}

.work-hero__title-line--question .work-hero__title-accent {
  animation: work-hero-accent-glow 5s ease-in-out infinite;
  animation-delay: 1.2s;
}

@keyframes work-hero-accent-glow {
  0%,
  100% {
    color: var(--accent);
    text-shadow: 0 0 0 transparent;
  }
  50% {
    color: #fff8f0;
    text-shadow: 0 0 28px rgba(237, 236, 231, 0.35);
  }
}

.work-hero__sub {
  margin: 16px auto 0 !important;
  max-width: min(42rem, calc(100vw - 32px)) !important;
  font-size: clamp(14px, 2vw, 16px) !important;
  line-height: 24px !important;
  opacity: 0;
  animation: work-hero-rise 0.65s ease forwards;
  animation-delay: 0.38s;
}

.work-hero__brand-pill {
  display: inline;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  vertical-align: baseline;
  margin: 0 0.1em;
  padding: 0.08em 0.42em;
  border-radius: 0.28em;
  font-size: 0.875em;
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--bg);
  background-color: var(--accent);
}

@keyframes work-hero-rise {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}


.work-section--compact {
  padding-top: 24px;
  padding-bottom: 40px;
}

/* Override global .container (~1236px) so the mosaic can use wide screens */
.work-section .work-container.container {
  width: 100%;
  max-width: min(1680px, calc(100vw - 32px));
  margin-left: auto;
  margin-right: auto;
}

.work-showcase {
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface-subtle);
  padding: 10px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
}

.work-showcase-intro {
  text-align: center;
  padding: 8px 6px 16px;
}

.work-showcase-divider {
  position: relative;
  margin: 0 12px 22px;
  height: 1px;
  border: none;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--border) 12%,
    rgba(237, 236, 231, 0.28) 50%,
    var(--border) 88%,
    transparent 100%
  );
}

.work-showcase-divider::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow:
    0 0 0 3px var(--surface-subtle),
    0 0 12px rgba(237, 236, 231, 0.2);
}

.work-showcase-title {
  margin: 0;
  display: flex;
  justify-content: center;
}

.work-showcase-badge {
  height: auto;
  min-height: 40px;
  padding: 6px 10px 6px 14px;
  gap: 10px;
  border-radius: 11px;
  font-size: clamp(17px, 2.8vw, 22px);
  font-weight: 500;
  letter-spacing: -0.02em;
}

.work-showcase-badge .hero-badge__pill {
  padding: 4px 12px;
  border-radius: 7px;
  font-size: clamp(16px, 2.6vw, 21px);
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.work-showcase-sub {
  margin: 12px 0 0;
  max-width: none;
  width: 100%;
  padding: 0 2px;
  font-size: 15px;
  line-height: 24px;
  color: var(--muted-fg);
  text-wrap: pretty;
}

.work-mosaic {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

@media (min-width: 1280px) {
  .work-section .work-container.container {
    max-width: min(1760px, calc(100vw - 48px));
  }

  .work-showcase {
    padding: 12px;
  }

  .work-mosaic {
    gap: 12px;
  }
}

@media (min-width: 1600px) {
  .work-section .work-container.container {
    max-width: min(1880px, calc(100vw - 56px));
  }

  .work-mosaic {
    gap: 14px;
  }
}

.work-tile-wrap {
  position: relative;
  min-width: 0;
}

.work-tile {
  position: relative;
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(44, 44, 44, 0.9);
  border-radius: 10px;
  overflow: hidden;
  cursor: zoom-in;
  background: #0a0a0a;
  aspect-ratio: 16 / 10;
  text-align: left;
  transition: border-color 0.15s ease;
}

.work-tile:hover,
.work-tile:focus-visible {
  border-color: rgba(237, 236, 231, 0.35);
  outline: none;
}

.work-tile__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transform: translateZ(0);
  backface-visibility: hidden;
}

.work-tile__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(0, 0, 0, 0.82) 100%);
  pointer-events: none;
}

.work-tile__meta {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 7px;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  pointer-events: none;
}

.work-tile__kind {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(168, 167, 159, 0.95);
}

.work-tile__name {
  font-size: 12px;
  line-height: 1.2;
  font-weight: 600;
  color: var(--fg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.work-tile__badge {
  position: absolute;
  top: 7px;
  right: 7px;
  z-index: 2;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid rgba(111, 208, 143, 0.4);
  background: rgba(22, 48, 31, 0.92);
  font-size: 9px;
  font-weight: 600;
  color: var(--status-green-fg);
  pointer-events: none;
}

.work-showcase--visions {
  margin-top: 28px;
}

.work-visions-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.work-vision-card {
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  overflow: hidden;
}

.work-vision-video {
  aspect-ratio: 16 / 9;
  background: #0a0a0a;
}

.work-vision-video__el {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.work-vision-info {
  padding: 12px 14px 14px;
}

.work-vision-title {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  line-height: 1.25;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--fg);
}

.work-vision-logo {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--border);
  background: #111;
}

.work-vision-desc {
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 20px;
  color: var(--muted-fg);
}

.work-footnote {
  margin: 18px 6px 0;
  font-size: 13px;
  line-height: 21px;
  text-align: center;
  color: var(--muted-fg);
}

.work-footnote a {
  color: var(--fg);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.work-empty__text {
  margin-top: 12px;
  font-size: 15px;
  line-height: 24px;
  color: var(--muted-fg);
}

/* Lightbox — full-viewport center (global reset removes dialog margin:auto) */
.work-lightbox {
  padding: 16px;
  border: none;
  margin: 0;
  max-width: none;
  width: 100%;
  height: 100%;
  background: transparent;
  color: var(--fg);
}

.work-lightbox:not([open]) {
  display: none;
}

.work-lightbox[open] {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: auto;
}

.work-lightbox::backdrop {
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(6px);
}

.work-lightbox__panel {
  position: relative;
  width: min(960px, calc(100vw - 32px));
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface);
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
}

.work-lightbox__close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(15, 15, 15, 0.75);
  color: var(--fg);
  cursor: pointer;
}

.work-lightbox__figure {
  position: relative;
  margin: 0;
  max-height: min(72vh, 640px);
  background: #0a0a0a;
}

.work-lightbox__img {
  display: block;
  width: 100%;
  max-height: min(72vh, 640px);
  object-fit: contain;
  object-position: top center;
  image-rendering: auto;
}

.work-lightbox__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px 16px;
  border-top: 1px solid var(--border);
}

.work-lightbox__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: flex-end;
  gap: 10px;
}

.work-lightbox__actions .btn-primary,
.work-lightbox__actions .btn-secondary {
  min-height: 40px;
  padding: 0 18px;
  white-space: nowrap;
}

.work-lightbox__visit {
  min-height: 40px;
}

.work-lightbox__kind {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted-fg);
}

.work-lightbox__title {
  margin: 4px 0 0;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.work-lightbox__highlight {
  margin: 6px 0 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--status-green-fg);
}

.work-lightbox__cta {
  min-height: 38px;
  padding: 0 16px;
  font-size: 14px;
}

@media (max-width: 820px) {
  .work-mosaic {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .work-showcase {
    padding: 10px;
  }
}

@media (max-width: 640px) {
  .work-mosaic {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .work-showcase {
    padding: 10px;
  }

  .work-section .work-container.container {
    max-width: 100%;
    padding-left: 10px;
    padding-right: 10px;
  }

  .work-section {
    padding-left: 0;
    padding-right: 0;
  }

  .work-tile {
    border-radius: 12px;
    aspect-ratio: 16 / 10;
  }

  .work-tile__name {
    font-size: 14px;
  }

  .work-tile__kind {
    font-size: 10px;
  }

  .work-tile__meta {
    left: 12px;
    right: 12px;
    bottom: 10px;
  }

  .page-hero--work-compact {
    padding: 22px 12px 16px;
  }

  .work-hero__title {
    gap: 8px;
    max-width: min(26rem, calc(100vw - 24px));
  }

  .work-hero__title-line {
    font-size: clamp(22px, 6.2vw, 32px);
    line-height: 1.12;
    letter-spacing: -0.038em;
    text-wrap: balance;
  }

  .work-hero__title-line--question {
    font-size: clamp(20px, 5.6vw, 28px);
    line-height: 1.16;
  }

  .work-hero__title-line--question .work-hero__title-accent,
  .work-hero__title-punct {
    white-space: nowrap;
  }

  .work-hero__sub {
    margin-top: 14px !important;
    font-size: 14px !important;
    line-height: 22px !important;
  }

  .work-hero__sub .work-hero__brand-pill {
    font-size: 1em;
    line-height: 1;
    font-weight: 500;
    letter-spacing: 0;
    padding: 0.06em 0.34em;
    border-radius: 0.22em;
  }

  .work-lightbox__foot {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }

  .work-lightbox__actions {
    width: 100%;
    flex-direction: column;
    justify-content: stretch;
  }

  .work-lightbox__actions .btn-primary,
  .work-lightbox__actions .btn-secondary {
    width: 100%;
    justify-content: center;
    min-height: 44px;
  }

  .work-visions-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

}

@media (max-width: 480px) {
  .work-lightbox__foot {
    padding: 12px 14px 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .work-tile {
    transition: none;
  }

  .work-hero__badge,
  .work-hero__title-line,
  .work-hero__sub {
    opacity: 1;
    transform: none;
    animation: none;
  }

  .work-hero__title-line--question .work-hero__title-accent {
    animation: none;
    color: var(--accent);
    text-shadow: none;
  }

  .work-hero__title-accent::after {
    transform: scaleX(1);
    animation: none;
  }
}
