:root {
  --pink: #ff2684;
  --navy: #000b30;
  --soft-gray: #eeeeee;
  --tab-gray-a: #666666;
  --tab-gray-b: #777777;
  --page-pad: clamp(32px, 5.208vw, 100px);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: #ffffff;
  color: var(--navy);
  font-family: "Inter", sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

.work-page {
  width: 100%;
  min-height: 100vh;
  overflow: hidden;
  background: #ffffff;
}

.nav .is-active {
  color: var(--pink);
}

.work-hero {
  padding: 120px var(--page-pad);
  background: var(--navy);
  color: #ffffff;
}

.work-hero h1 {
  width: 100%;
  margin: 0;
  font-size: clamp(34px, 2.3vw, 44px);
  font-weight: 700;
  line-height: 1.1;
}

.work-tabs {
  padding: 80px var(--page-pad) 0;
  display: flex;
  align-items: stretch;
  gap: 6px;
  overflow-x: auto;
  background: var(--navy);
  scrollbar-width: none;
}

.work-tabs::-webkit-scrollbar {
  display: none;
}

.work-tabs a {
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 0;
  align-self: stretch;
  background: linear-gradient(46deg, var(--tab-gray-a) 0%, var(--tab-gray-b) 100%);
  box-shadow: 0 -3px 4px rgba(54, 54, 54, 0.25) inset;
  color: var(--navy);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.45;
  text-transform: capitalize;
}

.work-tabs .is-active {
  background: var(--soft-gray);
  box-shadow: none;
  color: var(--pink);
}

.work-gallery {
  padding: 60px 0 120px;
  background: var(--soft-gray);
}

.tab-panel {
  display: none;
  gap: 12px;
  padding: 0;
}

.tab-panel.is-active {
  display: grid;
}

.tab-panel[data-panel="web"] {
  grid-template-columns: repeat(4, 1fr);
}

.tab-panel:not([data-panel="web"]) {
  grid-template-columns: repeat(5, 1fr);
  justify-content: flex-start;
}

.tab-panel[data-panel="video"] {
  grid-template-columns: repeat(4, 1fr);
}

.work-card {
  min-width: 0;
  background: #ffffff;
  overflow: hidden;
}

.work-card__media {
  position: relative;
  width: 100%;
  background: #cccccc;
  overflow: hidden;
}

.work-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  cursor: pointer;
}

.work-card__media img[src=""] {
  display: none;
}

.work-card__media--video {
  display: block;
  cursor: pointer;
}

.work-card__video-label {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--navy);
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
  pointer-events: none;
}

.work-card__media--video.has-thumbnail .work-card__video-label {
  display: none;
}

.is-modal-open {
  overflow: hidden;
}

.work-image-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  padding: 0 24px;
  background: rgba(0, 11, 48, 0.86);
}

.work-image-modal.is-open {
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.work-image-modal__scroll {
  width: min(960px, 100%);
  max-height: 100vh;
  overflow-y: auto;
  background: #ffffff;
  scrollbar-width: none;
}

.work-image-modal.is-detail .work-image-modal__scroll {
  width: min(600px, 100%);
}

.work-image-modal.is-video .work-image-modal__scroll {
  width: min(960px, 100%);
  aspect-ratio: 16 / 9;
  max-height: none;
  overflow: hidden;
  background: #000000;
}

.work-image-modal.is-open.is-video {
  align-items: center;
}

.work-image-modal__scroll::-webkit-scrollbar {
  display: none;
}

.work-image-modal__image {
  width: 100%;
  height: auto;
  max-width: none;
  display: block;
}

.work-image-modal__video {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.work-image-modal__image[hidden],
.work-image-modal__video[hidden] {
  display: none;
}

.work-image-modal__close {
  position: fixed;
  top: 24px;
  right: 24px;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: var(--pink);
  color: #ffffff;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  display: none;
}

.work-card--web .work-card__media {
  aspect-ratio: 632 / 356;
}

.work-card--detail .work-card__media {
  height: auto;
  aspect-ratio: 466 / 465;
}

.tab-panel[data-panel="video"] .work-card__media {
  aspect-ratio: 16 / 9;
}

.work-card__body {
  min-height: 96px;
  padding: 24px 30px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  background: #ffffff;
}

.work-card__body h2 {
  margin: 0;
  color: var(--navy);
  font-size: 18px;
  font-weight: 500;
  line-height: 1.25;
}

.work-card__body p {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: #999999;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.35;
}

.site-footer {
  padding: 120px 150px 10px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: var(--navy);
}

.site-footer p {
  margin: 0;
  color: #ffffff;
  font-family: "Inter", serif;
  font-size: 13px;
  line-height: 1.45;
}

.site-footer strong {
  font-family: "Inter", sans-serif;
  font-weight: 800;
}

@media (max-width: 1024px) {
  :root {
    --page-pad: 32px;
  }

  .work-hero {
    padding: 60px 32px;
  }

  .work-hero h1 {
    font-size: 36px;
  }

  .work-tabs {
    padding: 60px 32px 0;
    justify-content: center;
  }

  .work-tabs a {
    min-height: 33px;
    padding: 5px 12px;
    font-size: 14px;
    line-height: 1.45;
    flex: 0 0 auto;
  }

  .tab-panel[data-panel="web"],
  .tab-panel:not([data-panel="web"]) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .site-footer {
    padding: 60px 150px 0;
  }
}

@media (max-width: 640px) {
  :root {
    --page-pad: 24px;
  }

  .work-hero {
    padding: 30px 24px;
  }

  .work-hero h1 {
    font-size: 30px;
  }

  .work-tabs {
    padding: 30px 0 0;
    justify-content: flex-start;
    gap: 4px;
  }

  .work-tabs a {
    min-height: 27px;
    padding: 4px 8px;
    font-size: 13px;
    line-height: 1.45;
    white-space: nowrap;
    flex: 0 0 auto;
  }

  .work-tabs a:nth-child(2) {
    font-size: 0;
  }

  .work-tabs a:nth-child(2)::before {
    content: "DETAIL PAGE";
    font-size: 13px;
  }

  .work-gallery {
    padding: 30px 0 60px;
  }

  .tab-panel[data-panel="web"] {
    grid-template-columns: 1fr;
  }

  .tab-panel:not([data-panel="web"]) {
    grid-template-columns: 1fr;
  }

  .work-card--detail .work-card__media {
    height: auto;
    aspect-ratio: 466 / 465;
  }

  .work-card__body {
    min-height: 115px;
    padding: 28px 40px;
  }

  .work-card__body {
    min-height: 76px;
    padding: 16px 18px;
    gap: 8px;
  }

  .work-card__body h2 {
    font-size: 15px;
    line-height: 1.25;
  }

  .work-card__body p {
    gap: 8px;
    font-size: 12px;
    line-height: 1.3;
  }

  .site-footer {
    padding: 30px 24px 10px;
  }

  .site-footer p {
    font-size: 10px;
    line-height: 1.45;
  }

  .work-image-modal {
    padding: 0 16px;
  }

  .work-image-modal__scroll {
    width: min(300px, calc(100vw - 32px));
    max-height: 100vh;
    scrollbar-width: none;
  }

  .work-image-modal.is-video .work-image-modal__scroll {
    width: calc(100vw - 32px);
  }

  .work-image-modal__scroll::-webkit-scrollbar {
    display: none;
  }

  .work-image-modal__close {
    top: 16px;
    right: 16px;
    width: auto;
    height: auto;
    padding: 0;
    border-radius: 0;
    background: transparent;
    color: #ffffff;
    font-size: 28px;
    display: block;
  }
}
