/* Melency shared case shell.
   Used by wild374.html, every imported/<slug>/index.html and the TEMPLATE in tools/behance_import.py.
   Only content differs between cases: never add per-case rules here.
   Tokens (--g gutter, --muted, --line) mirror assets/style/site.css so cases match Home/Works. */
@font-face { font-family: "MelRegular"; src: url("../fonts/HelveticaNowDisplay-Regular.woff2") format("woff2"), url("../fonts/HelveticaNowDisplay-Regular.woff") format("woff"); font-display: swap; }
@font-face { font-family: "MelLight"; src: url("../fonts/HelveticaNowDisplay-Light.woff2") format("woff2"), url("../fonts/HelveticaNowDisplay-Light.woff") format("woff"); font-display: swap; }

:root { --g: 32px; --muted: #5c5c5c; --line: #e6e6e6; }
@media (max-width: 767px) { :root { --g: 16px; } }

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: #fff; color: #000; }
body { font-family: "MelRegular", Arial, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
a:focus-visible { outline: 2px solid #000; outline-offset: 3px; }

/* Header: same logo size, link size and Contact pill as the Home header */
.w-top { display: flex; align-items: center; justify-content: space-between; gap: 24px; width: 100%; max-width: calc(1920px + 2 * var(--g)); margin: 0 auto; padding: 24px var(--g); }
.w-top > a { display: block; flex: 0 0 auto; }
.w-top img { display: block; width: 100px; height: auto; }
.w-top nav { display: flex; align-items: center; gap: 32px; }
.w-top nav a { padding: 10px 0; font-size: 18px; line-height: 24px; text-decoration: none; text-underline-offset: 4px; text-decoration-thickness: 1px; white-space: nowrap; }
.w-top nav a:hover { text-decoration-line: underline; }
.w-top nav .w-pill { display: inline-flex; align-items: center; height: 40px; padding: 0 24px; border: 1px solid #000; border-radius: 100px; font-size: 16px; transition: background-color .3s, color .3s; }
.w-top nav .w-pill:hover { background: #000; color: #fff; text-decoration: none; }

/* Intro: left edge aligned with the gallery, restrained regular-weight display type */
.w-intro { width: calc(100% - 2 * var(--g)); max-width: 1920px; margin: 0 auto; padding: clamp(48px, 8vw, 128px) 0 clamp(40px, 5vw, 80px); }
.w-intro h1 { max-width: 15em; margin: 0; font-family: "MelRegular", Arial, sans-serif; font-weight: normal; font-size: clamp(36px, 5.6vw, 96px); line-height: 1.02; letter-spacing: -0.03em; overflow-wrap: break-word; }
.w-intro h2 { max-width: 34em; margin: 20px 0 0; font-family: "MelRegular", Arial, sans-serif; font-weight: normal; font-size: clamp(18px, 1.6vw, 26px); line-height: 1.3; color: var(--muted); }
.w-meta { display: flex; flex-wrap: wrap; gap: 4px 32px; margin: 32px 0 0; font-size: 16px; line-height: 24px; }

/* Gallery: constrained, black, intentional 4px gutters at every adjacency */
.w-case { display: block; width: calc(100% - 2 * var(--g)); max-width: 1920px; margin: 0 auto; padding: 0; background: #000; font-size: 0; line-height: 0; }
.w-case > * { margin: 0; }
.w-case > :not(:first-child) { margin-top: 4px; }
.w-case img, .w-case picture { display: block; width: 100%; max-width: 100%; height: auto; margin: 0; padding: 0; border: 0; }
.w-mod { display: block; padding: 0; line-height: 0; }
.w-grid { display: grid; gap: 4px; grid-template-columns: var(--cols, 1fr); align-items: start; width: 100%; padding: 0; background: #000; line-height: 0; }
.w-grid > * { min-width: 0; }
.w-grid.is-stack { grid-template-columns: 1fr; }
/* column classes used by wild374.html; ratios equal the image width/height ratios */
.w-grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.w-grid.cols-4-5 { grid-template-columns: minmax(0, 4fr) minmax(0, 5fr); }
.w-grid.auto { grid-template-columns: repeat(5, minmax(0, 1fr)); }

.w-text { padding: clamp(48px, 6vw, 96px) var(--g); background: #fff; color: #000; font-size: 16px; line-height: normal; }
.w-text p { max-width: 40em; margin: 0 auto 1.5em; font-family: "MelLight", Arial, sans-serif; font-size: clamp(18px, 1.5vw, 22px); line-height: 1.55; }
.w-text p:last-child { margin-bottom: 0; }

/* Closing + shared footer */
.w-end { width: calc(100% - 2 * var(--g)); max-width: 1920px; margin: 0 auto; padding: clamp(72px, 9vw, 144px) 0 clamp(56px, 6vw, 96px); text-align: center; }
.w-end p { margin: 0 0 24px; font-size: clamp(28px, 3.6vw, 56px); line-height: 1.1; letter-spacing: -0.02em; }
.w-end a { font-size: 18px; line-height: 24px; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.w-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 32px; width: calc(100% - 2 * var(--g)); max-width: 1920px; margin: 0 auto; padding: 24px 0 32px; border-top: 1px solid var(--line); font-size: 16px; line-height: 24px; }
.w-foot a { text-decoration: none; text-underline-offset: 4px; overflow-wrap: anywhere; }
.w-foot a:hover { text-decoration-line: underline; }

@media (max-width: 767px) {
  .w-top { padding-top: 16px; padding-bottom: 16px; }
  .w-top img { width: 72px; }
  .w-top nav { gap: 20px; }
  .w-top nav a { font-size: 16px; }
  .w-top nav .w-pill { padding: 0 16px; }
  /* narrow screens: stack every grouped row, keeping 4px gutters */
  .w-grid, .w-grid.cols-2, .w-grid.cols-4-5, .w-grid.auto { grid-template-columns: 1fr; }
  .w-foot { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  .w-top nav .w-pill { transition: none; }
}

@media (max-width: 599px) {
  .w-top { flex-wrap: wrap; gap: 16px; }
  .w-top nav { width: 100%; justify-content: space-between; gap: 12px; }
}
