:root {
  --bg: #f7f7f7;
  --surface: #ffffff;
  --text: #000000;
  --muted: #888888;
  --line: #f1f1f1;
  --line-strong: rgba(15, 16, 17, 0.08);
  --shadow: 0 2px 2px rgba(0, 0, 0, 0.1);
  --radius: 20px;
}

* {
  box-sizing: border-box;
}

html {
  height: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  min-height: 100svh;
  font-family: "Inter", sans-serif;
  color: var(--text);
  overflow-x: hidden;
  background: var(--bg);
}

body.is-ready .reveal {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

body::before {
  content: none;
}

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

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

.page-shell {
  width: min(100%, 1440px);
  min-height: 100vh;
  min-height: 100svh;
  margin: 0 auto;
  padding: 17px 0 28px;
  display: flex;
  flex-direction: column;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
  width: 1080px;
  margin: 0 auto;
  opacity: 0;
  transform: translate3d(0, -4px, 0);
  transition:
    opacity 0.4s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  line-height: 1.45;
  font-weight: 600;
  letter-spacing: -0.08px;
  color: #000000;
}

.site-brand img {
  width: 24px;
  height: 24px;
  object-fit: cover;
  flex: 0 0 auto;
}

.site-nav {
  margin-left: 0;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 0.875rem;
  font-weight: 500;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  backdrop-filter: none;
}

.site-nav a {
  padding: 0;
  border-radius: 0;
  color: #333333;
  letter-spacing: -0.08px;
  transition:
    transform 0.18s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 160ms ease,
    color 160ms ease;
}

.site-nav a:hover {
  background: transparent;
  opacity: 0.68;
  transform: translate3d(0, -0.25px, 0);
}

main {
  flex: 1;
  min-height: 0;
  display: flex;
  justify-content: center;
  align-items: stretch;
}

.content-shell {
  width: 1080px;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.hero {
  display: flex;
  flex-direction: column;
  height: 346px;
  justify-content: center;
  align-items: flex-start;
  padding: 120px 0;
  text-align: left;
  opacity: 0;
  transform: translate3d(0, 4px, 0);
  transition:
    opacity 0.42s cubic-bezier(0.22, 1, 0.36, 1) 0.02s,
    transform 0.42s cubic-bezier(0.22, 1, 0.36, 1) 0.02s;
}

.hero h1 {
  margin: 0;
  width: 832px;
  font-family: "Inter", sans-serif;
  font-size: 48px;
  line-height: 1.1;
  letter-spacing: -0.96px;
  font-weight: 600;
  align-self: flex-start;
}

.tone-muted {
  color: var(--muted);
}

.metal-text {
  position: relative;
  display: inline-block;
  color: #000000;
  isolation: isolate;
}

.metal-text::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  color: transparent;
  background-image: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0) 18%,
    rgba(174, 180, 190, 0.08) 30%,
    rgba(223, 226, 231, 0.46) 42%,
    rgba(250, 251, 252, 0.82) 50%,
    rgba(224, 227, 232, 0.42) 58%,
    rgba(166, 172, 182, 0.08) 70%,
    rgba(255, 255, 255, 0) 82%,
    rgba(255, 255, 255, 0) 100%
  );
  background-size: 100% 320%;
  background-position: 50% -42%;
  -webkit-background-clip: text;
  background-clip: text;
  filter: blur(0.3px);
  pointer-events: none;
  animation: metal-vertical 0.8s cubic-bezier(0.22, 0.61, 0.36, 1) 1 forwards;
}

@keyframes metal-vertical {
  0% {
    background-position: 50% -48%;
    opacity: 0;
  }

  14% {
    opacity: 0.32;
  }

  32% {
    opacity: 0.72;
  }

  68% {
    background-position: 50% 104%;
    opacity: 0.66;
  }

  88% {
    opacity: 0.18;
  }

  100% {
    background-position: 50% 132%;
    opacity: 0;
  }
}

.works-section {
  margin-top: auto;
  padding: 0;
  opacity: 0;
  transform: translate3d(0, 5px, 0);
  transition:
    opacity 0.45s cubic-bezier(0.22, 1, 0.36, 1) 0.04s,
    transform 0.45s cubic-bezier(0.22, 1, 0.36, 1) 0.04s;
}

.works-section::before {
  content: "Craft Works";
  display: block;
  margin: 0 0 20px 0;
  font-family: "Inter", sans-serif;
  color: #333333;
  font-size: 16px;
  line-height: 1.1;
  font-style: normal;
  font-weight: 400;
  letter-spacing: -0.32px;
}

.works-grid {
  display: flex;
  gap: 16px;
  align-items: stretch;
  --card-gap: 16px;
}

.work-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  width: 100%;
  min-width: 0;
  flex: 1 1 0;
  height: 315px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px;
  box-shadow: none;
  opacity: 0;
  transform: translate3d(0, 4px, 0) scale(0.998);
  transition:
    opacity 0.38s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.38s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.18s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.18s ease,
    color 0.24s ease,
    flex-grow 0.56s cubic-bezier(0.19, 1, 0.22, 1),
    flex-basis 0.56s cubic-bezier(0.19, 1, 0.22, 1);
}

.work-card::before,
.work-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.work-card::before {
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  background-blend-mode: screen, normal;
}

.work-card::after {
  inset: 20px 20px auto auto;
  width: 52px;
  height: 52px;
  background: url("../svg/Arrow.svg") center / contain no-repeat;
  transform: translate3d(-6px, 6px, 0) scale(0.88);
  transform-origin: 100% 0%;
  filter: blur(1.2px);
  transition:
    opacity 0.2s ease,
    transform 0.42s cubic-bezier(0.19, 1, 0.22, 1),
    filter 0.42s cubic-bezier(0.19, 1, 0.22, 1);
}

.work-card-poptranslate::before {
  background-image: url("../background/PopTranslate.png");
}

.work-card-markmark::before {
  background-image: url("../background/Markmark.png");
}

.work-card-pastenow::before {
  background-image: url("../background/PasteNow.png");
}

.work-card-manico::before {
  background-image: url("../background/Manico.png");
}

.work-art {
  display: flex;
  width: 100%;
  align-items: flex-start;
}

.work-icon-frame {
  width: 64px;
  height: 64px;
  border: 1px solid #dadada;
  border-radius: 15px;
  box-shadow: var(--shadow);
  overflow: hidden;
  flex: 0 0 auto;
}

.work-meta {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  justify-content: flex-start;
  min-height: 86px;
}

.work-meta h2 {
  margin: 0;
  width: 100%;
  font-family: "Inter", sans-serif;
  font-size: 1rem;
  line-height: 1.5rem;
  letter-spacing: -0.48px;
  font-weight: 600;
  color: #333333;
  min-height: 1.5rem;
  display: flex;
  align-items: flex-start;
  transform: translate3d(0, 0, 0);
  transition:
    color 0.24s ease,
    transform 0.34s cubic-bezier(0.22, 1, 0.36, 1),
    font-size 0.34s cubic-bezier(0.22, 1, 0.36, 1),
    line-height 0.34s cubic-bezier(0.22, 1, 0.36, 1);
}

.work-meta p {
  margin: 6px 0 0;
  width: 100%;
  font-family: "Inter", sans-serif;
  font-size: 0.875rem;
  line-height: 1.5;
  font-weight: 400;
  color: #333333;
  letter-spacing: -0.09px;
  min-height: 3rem;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  opacity: 1;
  transform: translate3d(0, 0, 0);
  transition:
    opacity 0.22s ease,
    color 0.24s ease,
    transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

body.is-ready .reveal-card {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
}

.works-grid .reveal-card:nth-child(1) {
  transition-delay: 0.18s;
}

.works-grid .reveal-card:nth-child(2) {
  transition-delay: 0.14s;
}

.works-grid .reveal-card:nth-child(3) {
  transition-delay: 0.18s;
}

.works-grid .reveal-card:nth-child(4) {
  transition-delay: 0.22s;
}

.work-art img {
  width: 100%;
  height: 100%;
  border-radius: 15px;
  object-fit: cover;
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.work-card:hover,
.work-card.is-active {
  transform: translate3d(0, -1px, 0) scale(1.001);
  border-color: var(--line-strong);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.035);
}

.work-card:hover .work-art img,
.work-card.is-active .work-art img {
  transform: scale(1.006);
}

.work-card:hover::before,
.work-card.is-active::before {
  opacity: 1;
}

.work-card:hover::after,
.work-card.is-active::after {
  opacity: 1;
  filter: blur(0);
  transform: translate3d(0, 0, 0);
}

@media (min-width: 1081px) {
  .works-grid.is-hovering .work-card {
    flex-grow: 0.833333;
  }

  .works-grid.is-hovering .work-card.is-active {
    flex-grow: 1.5;
  }

  .works-grid.is-hovering .work-card:not(.is-active)::before,
  .works-grid.is-hovering .work-card:not(.is-active)::after {
    opacity: 0;
  }

  .works-grid.is-hovering .work-card:not(.is-active) .work-meta {
    min-height: 1.875rem;
  }

  .works-grid.is-hovering .work-card:not(.is-active) .work-meta h2 {
    font-size: 1.125rem;
    line-height: 1.875rem;
    transform: translate3d(0, 24px, 0);
  }

  .works-grid.is-hovering .work-card:not(.is-active) .work-meta p {
    opacity: 0;
    transform: translate3d(0, 10px, 0);
    pointer-events: none;
  }

  .works-grid.is-hovering .work-card.is-active::before,
  .works-grid.is-hovering .work-card.is-active::after {
    opacity: 1;
  }

  .works-grid.is-hovering .work-card.is-active::after {
    transition-delay: 0.1s;
    transform: translate3d(0, 0, 0);
    filter: blur(0);
  }

  .works-grid.is-hovering .work-card.is-active .work-meta {
    min-height: 86px;
  }

  .works-grid.is-hovering .work-card.is-active .work-meta h2 {
    transform: translate3d(0, -4px, 0);
  }

  .works-grid.is-hovering .work-card.is-active .work-meta p {
    opacity: 1;
    transform: translate3d(0, -2px, 0);
    transition-delay: 0.08s;
  }

  .works-grid.is-hovering .work-card.is-active .work-meta h2,
  .works-grid.is-hovering .work-card.is-active .work-meta p {
    color: #ffffff;
  }
}

.site-footer {
  width: 1080px;
  margin: 24px auto 0;
  padding: 22px 0 0;
  border-top: 1px solid rgba(51, 51, 51, 0.12);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  opacity: 0;
  transform: translate3d(0, 4px, 0);
  transition:
    opacity 0.4s cubic-bezier(0.22, 1, 0.36, 1) 0.08s,
    transform 0.4s cubic-bezier(0.22, 1, 0.36, 1) 0.08s;
}

.site-footer p {
  margin: 0;
  font-family: "Inter", sans-serif;
  font-size: 0.875rem;
  line-height: 1.45;
  font-weight: 400;
  letter-spacing: -0.08px;
  color: #7d7d7d;
}

.footer-copy,
.footer-tagline {
  white-space: nowrap;
}

@media (max-width: 1080px) {
  .page-shell {
    padding: 18px 20px 24px;
  }

  .content-shell {
    width: 100%;
    height: 100%;
  }

  .site-header {
    width: 100%;
  }

  .hero h1 {
    width: min(100%, 760px);
    font-size: clamp(2.25rem, 4.8vw, 3.45rem);
    align-self: flex-start;
  }

  .works-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .work-card {
    width: 100%;
  }

  .site-footer {
    width: 100%;
    padding: 18px 0 0;
  }
}

@media (max-width: 720px) {
  .page-shell {
    padding: 12px 12px 14px;
    min-height: 100vh;
    min-height: 100svh;
  }

  .content-shell {
    width: 100%;
    height: auto;
  }

  .site-header {
    justify-content: space-between;
    min-height: 44px;
    width: 100%;
  }

  .site-nav {
    gap: 12px;
    padding: 12px 12px;
    font-size: 0.86rem;
  }

  .hero {
    height: auto;
    padding: 44px 0 24px;
    align-items: flex-start;
  }

  .hero h1 {
    width: 100%;
    font-size: clamp(1.82rem, 7.2vw, 2.3rem);
    line-height: 1.08;
  }

  .works-section::before {
    margin-bottom: 12px;
    font-size: 16px;
  }

  .works-section {
    margin-top: 0;
  }

  .works-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .work-card {
    height: 190px;
    min-height: 190px;
    padding: 14px;
  }

  .work-icon-frame {
    width: 54px;
    height: 54px;
  }

  .work-meta {
    min-height: auto;
    padding: 0;
  }

  .work-meta h2 {
    font-size: 1rem;
    line-height: 1.5rem;
  }

  .work-meta p {
    font-size: 0.875rem;
    line-height: 1.45;
  }

  .site-footer {
    width: 100%;
    margin-top: 18px;
    padding-top: 16px;
  }

  .site-footer p {
    font-size: 0.875rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .site-header,
  .hero,
  .works-section,
  .work-card,
  .site-footer,
  .site-nav a {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .metal-text {
    animation: none !important;
  }

  .metal-text::after {
    animation: none !important;
    opacity: 0 !important;
  }
}
