/* Hallmark v2.0.0 | theme: MissaciWeb Dusk (approved) | shape: project gallery | signature: perspective rail of real website captures */
/* Critique: the active screenshot has the visual weight; a complete static grid carries the same content without motion. */
:root {
  --work-shadow: rgba(0, 0, 0, .38);
  --work-glass: rgba(20, 27, 46, .84);
  --work-overlay-end: rgba(10, 14, 26, .97);
  --work-transparent: transparent;
  --work-paper: #eaf1f3;
  --work-paper-ink: #24344a;
  --work-focus: var(--mint);
  --work-card-width: clamp(228px, 26vw, 312px);
}

html, body { overflow-x: clip; }
.work-intro h1, .work-active-title, .work-card-title, .case-intro h1, .case-next, .work-invitation h2 {
  min-width: 0;
  overflow-wrap: break-word;
}
.work-intro { padding-bottom: 28px; }
.work-intro h1 { max-width: 15ch; }
.work-intro .lead { max-width: 38rem; }
.work-gallery { padding-block: var(--space-xs) var(--space-2xl); overflow-x: clip; }
.work-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; margin: 0; padding: 0; list-style: none; }
.work-card { min-width: 0; }
.work-card-link { display: block; height: 100%; color: var(--text); text-decoration: none; border: 1px solid var(--line); border-radius: var(--radius-card); background: var(--surface); overflow: clip; }
.work-card-image { aspect-ratio: 4 / 4.3; overflow: clip; background: var(--surface-2); }
.work-card-image img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.work-card-copy { padding: var(--space-lg); }
.work-card-category, .work-active-category { margin: 0 0 var(--space-sm); color: var(--muted); font-size: .875rem; }
.work-card-title { margin: 0; font-family: var(--font-display); font-size: 1.25rem; font-weight: 500; line-height: 1.3; }
.work-card-summary { margin: var(--space-sm) 0 20px; color: var(--muted); font-size: .9375rem; line-height: 1.6; }
.work-card-open { color: var(--cyan); font-size: .9375rem; text-decoration: underline; text-underline-offset: .3em; }
.work-gallery [hidden] { display: none; }
.work-card-link:focus-visible, .work-control:focus-visible, .work-read:focus-visible, .work-viewport:focus-visible,
.case-back:focus-visible, .case-next:focus-visible, .case-actions a:focus-visible, .work-invitation a:focus-visible {
  outline: 2px solid var(--work-focus);
  outline-offset: 5px;
}
.work-card-link:hover .work-card-open { color: var(--mint); }
.work-invitation { display: flex; align-items: center; justify-content: space-between; gap: 32px; border-top: 1px solid var(--line); }
.work-invitation h2 { margin: 0 0 var(--space-md); max-width: 20ch; }
.work-invitation p { margin: 0; max-width: 33rem; color: var(--muted); }
.work-invitation .button { flex-shrink: 0; }
.work-sr-only { position: absolute; width: 1px; height: 1px; margin: 0px; padding: 0; overflow: clip; clip-path: inset(50%); white-space: nowrap; border: 0; }

/* Motion is progressive enhancement. Without this class the complete grid remains. */
.work-gallery.is-enhanced { padding-top: 0; }
.is-enhanced .work-stage { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); align-items: center; gap: 32px; }
.is-enhanced .work-detail { position: relative; z-index: 10; padding: 32px 0; }
.is-enhanced .work-active-category { color: var(--cyan); }
.work-active-title { max-width: 14ch; margin: 0 0 20px; font-family: var(--font-display); font-size: clamp(1.75rem, 2.8vw, 2.5rem); font-weight: 500; line-height: 1.2; }
.work-active-summary { max-width: 30ch; min-height: 4.9em; margin: 0 0 20px; color: var(--muted); font-size: 1rem; line-height: 1.65; }
.work-read { display: inline-block; }
.work-navigation { display: flex; align-items: center; gap: var(--space-lg); margin-top: var(--space-xl); }
.work-controls { display: flex; gap: var(--space-sm); }
.work-control { display: grid; place-items: center; width: 48px; height: 48px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); color: var(--text); cursor: pointer; transition: transform 160ms ease, background-color 160ms ease; }
.work-control:hover:not(:disabled) { background: var(--surface-2); transform: translateY(-2px); }
.work-control:active:not(:disabled) { transform: translateY(0); }
.work-control:disabled { background:var(--bg); color:var(--muted); border-color:var(--line); opacity:1; cursor:not-allowed; }
.work-counter { margin: 0; color: var(--muted); font-size: .9375rem; font-variant-numeric: tabular-nums; }
.work-counter [data-work-index] { color: var(--text); }
.work-hint { max-width: 29ch; margin: 20px 0 0; color: var(--muted); font-size: .8125rem; line-height: 1.6; }
.is-enhanced .work-viewport { position: relative; height: 540px; min-width: 0; perspective: 1100px; perspective-origin: center 46%; touch-action: pan-y; cursor: grab; user-select: none; -webkit-user-select: none; }
.is-enhanced .work-viewport.is-dragging { cursor: grabbing; }
.is-enhanced .work-cards { position: relative; display: block; height: 100%; transform-style: preserve-3d; }
.is-enhanced .work-card { position: absolute; top: 50%; left: 50%; width: var(--work-card-width); height: 420px; transform-style: preserve-3d; will-change: transform; }
.is-enhanced .work-card-link { position: relative; isolation: isolate; box-shadow: 0 24px 64px var(--work-shadow); background: var(--surface-2); }
.is-enhanced .work-card-image { height: 100%; aspect-ratio: auto; }
.is-enhanced .work-card-image img { pointer-events: none; }
.is-enhanced .work-card-copy { position: absolute; inset: auto 0 0; padding: 56px 20px 20px; background: linear-gradient(to bottom, var(--work-transparent), var(--work-overlay-end)); }
.is-enhanced .work-card-title { max-width: 20ch; font-size: 1rem; line-height: 1.35; }
.is-enhanced .work-card-category, .is-enhanced .work-card-summary, .is-enhanced .work-card-open { display: none; }
.is-enhanced .work-card.is-active .work-card-link { border-color: var(--cyan); }

.case-intro { max-width: 1180px; }
.case-back { display: inline-block; margin-bottom: 32px; font-size: .9375rem; }
.case-intro h1 { max-width: 19ch; }
.case-intro .lead { max-width: 42rem; }
.case-facts { display: flex; flex-wrap: wrap; gap: var(--space-lg) var(--space-2xl); margin: 32px 0; }
.case-facts div { min-width: 0; }
.case-facts dt { margin-bottom: var(--space-xs); color: var(--muted); font-size: .8125rem; }
.case-facts dd { margin: 0; font-size: .9375rem; }
.case-actions { display: flex; flex-wrap: wrap; gap: var(--space-md); }
.case-layout { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); align-items: start; gap: var(--space-2xl); padding-top: var(--space-md); }
.case-story { display: grid; gap: var(--space-xl); padding-top: var(--space-xs); }
.case-story h2 { margin: 0 0 var(--space-md); max-width: 18ch; font-size: clamp(1.5rem, 2vw, 1.875rem); line-height: 1.25; }
.case-story p { max-width: 36rem; margin: 0; color: var(--muted); font-size: 1rem; line-height: 1.8; }
.case-visual { min-width: 0; margin: 0; padding: clamp(var(--space-sm), 2vw, var(--space-lg)); border-radius: var(--radius-card); background: var(--work-paper); }
.case-visual img { display: block; width: 100%; height: auto; }
.case-visual figcaption { margin-top: var(--space-md); color: var(--work-paper-ink); font-size: .8125rem; line-height: 1.6; }
.case-continue { border-top: 1px solid var(--line); }
.case-continue > p { margin: 0 0 var(--space-md); color: var(--muted); font-size: .875rem; }
.case-next { display: flex; align-items: center; justify-content: space-between; gap: 32px; width: 100%; color: var(--text); font-family: var(--font-display); font-size: clamp(1.75rem, 3.4vw, 3rem); line-height: 1.25; text-decoration: none; }
.case-next span { max-width: 23ch; }
.case-next svg { width: 32px; height: 32px; flex-shrink: 0; color: var(--cyan); transition: transform 180ms ease; }
.case-next:hover svg { transform: translateX(5px); }

@media (min-width: 1500px) {
  .is-enhanced .work-viewport { height: 580px; }
  .is-enhanced .work-card { height: 450px; }
}
@media (max-width: 900px) {
  .work-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .is-enhanced .work-stage { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 20px; }
  .is-enhanced .work-viewport { height: 480px; }
  .is-enhanced .work-card { height: 380px; }
  .case-layout { gap: var(--space-xl); }
  .work-invitation { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 650px) {
  :root { --work-card-width: 230px; }
  .work-intro { padding-bottom: var(--space-md); }
  .work-intro h1 { max-width: 15ch; }
  .work-gallery { padding-bottom: var(--space-xl); }
  .work-cards { grid-template-columns: minmax(0, 1fr); gap: var(--space-lg); }
  .work-card-image { aspect-ratio: 1 / 1; }
  .is-enhanced .work-stage { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; }
  .is-enhanced .work-viewport { grid-row: 1; height: 390px; perspective: 850px; }
  .is-enhanced .work-card { height: 332px; }
  .is-enhanced .work-detail { grid-row: 2; padding-top: var(--space-xs); }
  .work-active-title { max-width: 24ch; font-size: 1.75rem; }
  .work-active-summary { max-width: 34ch; min-height: 0; }
  .work-navigation { justify-content: space-between; margin-top: 28px; }
  .work-hint { max-width: none; }
  .case-layout { grid-template-columns: minmax(0, 1fr); gap: var(--space-xl); }
  .case-story { gap: 32px; }
  .case-visual { max-width: 560px; width: 100%; }
  .case-facts { gap: var(--space-lg) 32px; }
  .case-back { margin-bottom: var(--space-lg); }
  .case-next { gap: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .work-control, .case-next svg { transition: none; }
  .work-control:hover:not(:disabled), .case-next:hover svg { transform: none; }
}
.case-intro{max-width:1280px}.case-layout{column-gap:var(--gap-columns)}.work-card-image,.is-enhanced .work-card-link{color:var(--text)}
