:root {
  --bg: #f1f0eb;
  --text: #101010;
  --muted: #73726c;
  --line: rgba(16, 16, 16, 0.16);
  --gutter: clamp(18px, 2.15vw, 36px);
  --header-h: 74px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", "Noto Sans JP", sans-serif;
  -webkit-font-smoothing: antialiased;
}
body.is-loading,
body.is-menu-open {
  overflow: hidden;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  font: inherit;
}
img {
  display: block;
  width: 100%;
}
::selection {
  background: #111;
  color: #fff;
}
.page-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  background: #111;
  color: #fff;
  transition: transform 0.95s var(--ease);
}
.page-loader.is-hidden {
  transform: translateY(-100%);
}
.page-loader span {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.03em;
}
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  height: var(--header-h);
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  border-bottom: 1px solid transparent;
  transition:
    background 0.35s,
    border-color 0.35s;
}
.site-header.is-scrolled {
  background: rgba(241, 240, 235, 0.88);
  backdrop-filter: blur(18px);
  border-color: var(--line);
}
.site-logo {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.05em;
}
.site-header__note {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}
.site-nav {
  justify-self: end;
  display: flex;
  gap: 27px;
  font-size: 12px;
}
.site-nav a,
.site-footer a,
.text-link {
  position: relative;
}
.site-nav a:after,
.site-footer a:after,
.text-link:after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -4px;
  height: 1px;
  background: currentColor;
  transition: right 0.38s var(--ease);
}
.site-nav a:hover:after,
.site-footer a:hover:after,
.text-link:hover:after {
  right: 0;
}
.menu-button {
  display: none;
  border: 0;
  background: none;
  padding: 8px 0;
  color: inherit;
}
.hero {
  min-height: 100svh;
  padding: calc(var(--header-h) + 6.5vh) var(--gutter) var(--gutter);
  display: grid;
  grid-template-rows: auto 1fr auto;
  border-bottom: 1px solid var(--line);
}
.hero__meta {
  display: flex;
  gap: 22px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  color: var(--muted);
}
.hero__title {
  align-self: center;
  max-width: 1500px;
  margin: 0;
  font-size: clamp(54px, 8.65vw, 150px);
  line-height: 1;
  letter-spacing: -0.065em;
  font-weight: 500;
  font-family: "Noto Sans JP", "Inter", sans-serif;
}
.hero__title span {
  color: #77766f;
}
.hero__bottom {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gutter);
  align-items: end;
}
.hero__bottom p {
  max-width: 480px;
  margin: 0;
  font-size: 12px;
  line-height: 1.65;
  color: var(--muted);
}
.hero__bottom .text-link {
  justify-self: end;
  font-size: 12px;
}
.work-section,
.about {
  padding: 120px var(--gutter);
}
.section-heading {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-bottom: 48px;
  padding-bottom: 13px;
  border-bottom: 1px solid var(--line);
}
.section-heading h2,
.section-heading p {
  margin: 0;
  font-size: 12px;
  font-weight: 400;
}
.section-heading p {
  justify-self: end;
  color: var(--muted);
}
.filter {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 34px;
}
.filter__button {
  position: relative;
  border: 0;
  background: none;
  padding: 0 0 6px;
  color: #97958e;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: color 0.3s;
}
.filter__button:after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 0;
  height: 1px;
  background: #111;
  transition: right 0.35s var(--ease);
}
.filter__button:hover,
.filter__button.is-active {
  color: #111;
}
.filter__button:hover:after,
.filter__button.is-active:after {
  right: 0;
}
.masonry {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: 14px;
}
.masonry__column {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.project-card {
  width: 100%;
  transition:
    opacity 0.45s,
    transform 0.45s var(--ease);
}
.project-card.is-hidden {
  display: none;
}
.project-card__link {
  position: relative;
  display: block;
  overflow: hidden;
  background: #d9d8d3;
  transform: translateZ(0);
}
.project-card__media {
  position: relative;
  overflow: hidden;
}
.project-card__media:after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    120deg,
    transparent 35%,
    rgba(255, 255, 255, 0.13),
    transparent 65%
  );
  transform: translateX(-120%);
  transition: transform 1.15s var(--ease);
  pointer-events: none;
}
.project-card__link:hover .project-card__media:after {
  transform: translateX(120%);
}
.project-card__media img {
  position: absolute;
  inset: 0;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: translateX(4%) scale(1.035);
  transition:
    opacity 0.55s ease,
    transform 0.85s var(--ease);
  will-change: opacity, transform;
}
.project-card__media img:first-child {
  position: relative;
}
.project-card__media img.is-active {
  opacity: 1;
  transform: translateX(0) scale(1);
}
.project-card__link:hover .project-card__media img.is-active {
  transform: translateX(0) scale(1.018);
}
.project-card[data-ratio="4-5"] .project-card__media {
  aspect-ratio: 4/5;
}
.project-card[data-ratio="5-7"] .project-card__media {
  aspect-ratio: 5/7;
}
.project-card[data-ratio="4-3"] .project-card__media {
  aspect-ratio: 4/3;
}
.project-card[data-ratio="3-4"] .project-card__media {
  aspect-ratio: 3/4;
}
.project-card[data-ratio="5-6"] .project-card__media {
  aspect-ratio: 5/6;
}
.project-card__overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  padding: 18px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.62), transparent 58%);
  color: #fff;
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 0.42s,
    transform 0.52s var(--ease);
}
.project-card__overlay h3,
.project-card__overlay p {
  margin: 0;
}
.project-card__overlay h3 {
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.035em;
}
.project-card__overlay p,
.project-card__overlay > span {
  margin-top: 5px;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.72);
  letter-spacing: 0.025em;
}
.project-card__link:hover .project-card__overlay,
.project-card__link:focus-visible .project-card__overlay {
  opacity: 1;
  transform: none;
}
.about {
  border-top: 1px solid var(--line);
}
.about__grid {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 10vw;
}
.about__lead {
  margin: 0;
  max-width: 900px;
  font-size: clamp(28px, 4vw, 58px);
  line-height: 1.12;
  letter-spacing: -0.055em;
  font-family: "Noto Sans JP", "Inter", sans-serif;
}
.about__right {
  max-width: 570px;
}
.about__copy p {
  margin: 0 0 1.5em;
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
}
.about__services {
  margin: 55px 0 0;
}
.about__services div {
  display: grid;
  grid-template-columns: 46px 1fr;
  padding: 13px 0;
  border-top: 1px solid var(--line);
}
.about__services div:last-child {
  border-bottom: 1px solid var(--line);
}
.about__services dt,
.about__services dd {
  margin: 0;
  font-size: 12px;
}
.about__services dt {
  color: var(--muted);
}
.contact {
  padding: 145px var(--gutter);
  background: #101010;
  color: #fff;
}
.contact p {
  margin: 0 0 24px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.52);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.contact a {
  display: inline;
  font-size: clamp(32px, 5.4vw, 78px);
  line-height: 1.08;
  letter-spacing: -0.06em;
  background-image: linear-gradient(currentColor, currentColor);
  background-position: 0 100%;
  background-repeat: no-repeat;
  background-size: 100% 0.045em;
  transition: background-size 0.45s var(--ease);
  font-family: "Noto Sans JP", "Inter", sans-serif;
}
.contact a:hover {
  background-size: 0 0.045em;
}
.site-footer {
  padding: 25px var(--gutter);
  display: flex;
  justify-content: space-between;
  font-size: 11px;
}
.site-footer p {
  margin: 0;
}
.site-footer div {
  display: flex;
  gap: 22px;
}
.cursor {
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 68px;
  height: 68px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  color: #111;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.68);
  transition:
    opacity 0.2s,
    transform 0.3s var(--ease);
  mix-blend-mode: difference;
}
.cursor.is-visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
[data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition:
    opacity 0.8s,
    transform 0.95s var(--ease);
}
[data-reveal].is-revealed {
  opacity: 1;
  transform: none;
}
@media (max-width: 1050px) {
  .masonry {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .about__grid {
    grid-template-columns: 1fr;
    gap: 55px;
  }
  .about__right {
    margin-left: auto;
    width: min(100%, 620px);
  }
}
@media (max-width: 720px) {
  :root {
    --header-h: 60px;
  }
  .site-header {
    grid-template-columns: 1fr auto;
  }
  .site-header__note {
    display: none;
  }
  .menu-button {
    display: block;
    justify-self: end;
    font-size: 12px;
  }
  .site-nav {
    position: fixed;
    inset: var(--header-h) 0 auto;
    height: calc(100svh - var(--header-h));
    padding: 38px var(--gutter);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
    background: var(--bg);
    font-size: clamp(34px, 11vw, 58px);
    line-height: 1;
    transform: translateY(-115%);
    transition: transform 0.7s var(--ease);
  }
  .site-nav.is-open {
    transform: none;
  }
  .hero {
    min-height: 92svh;
    padding-top: calc(var(--header-h) + 32px);
  }
  .hero__title {
    font-size: clamp(34px, 10.5vw, 48px);
    line-height: 1.15;
    letter-spacing: -0.055em;
  }
  .hero__meta {
    gap: 12px;
    font-size: 8px;
  }
  .hero__title {
    font-size: clamp(50px, 16.2vw, 84px);
    line-height: 0.9;
  }
  .hero__bottom {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .hero__bottom .text-link {
    justify-self: start;
  }
  .work-section,
  .about {
    padding: 82px var(--gutter);
  }
  .section-heading {
    margin-bottom: 34px;
  }
  .filter {
    gap: 16px;
    margin-bottom: 24px;
  }
  .filter__button {
    font-size: 10px;
  }
  .masonry {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .masonry__column {
    gap: 12px;
  }
  .project-card__overlay {
    opacity: 1;
    transform: none;
    padding: 14px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.58), transparent 55%);
  }
  .about__grid {
    gap: 42px;
  }
  .about__lead {
    font-size: clamp(42px, 13vw, 66px);
  }
  .contact {
    padding: 100px var(--gutter);
  }
  .contact a {
    font-size: clamp(44px, 14vw, 72px);
  }
  .site-footer {
    gap: 25px;
    align-items: flex-end;
  }
  .site-footer div {
    flex-direction: column;
    gap: 10px;
    text-align: right;
  }
  .cursor {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *:before,
  *:after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .page-loader {
    display: none;
  }
  [data-reveal] {
    opacity: 1;
    transform: none;
  }
}

/* Project details */
.project-modal {
  width: min(720px, calc(100% - 32px));
  padding: 0;
  border: 0;
  background: var(--bg);
  color: var(--text);
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.28);
}
.project-modal::backdrop {
  background: rgba(0, 0, 0, 0.56);
  backdrop-filter: blur(5px);
}
.project-modal__close {
  position: absolute;
  top: 20px;
  right: 20px;
  border: 0;
  background: none;
  padding: 4px 0;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
}
.project-modal__content {
  padding: clamp(70px, 10vw, 120px) clamp(24px, 7vw, 72px)
    clamp(42px, 7vw, 72px);
}
.project-modal__category {
  margin: 0 0 25px;
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.project-modal h2 {
  margin: 0;
  font-size: clamp(46px, 8vw, 88px);
  line-height: 0.92;
  letter-spacing: -0.065em;
  font-weight: 500;
}
.project-modal__description {
  max-width: 560px;
  margin: 42px 0 0;
  font-size: 14px;
  line-height: 1.75;
  color: var(--muted);
}
.project-modal__note {
  margin: 52px 0 0;
  padding-top: 15px;
  border-top: 1px solid var(--line);
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}
@media (pointer: fine) {
  .project-card__link {
    cursor: none;
  }
}
@media (max-width: 720px) {
  .project-modal {
    width: calc(100% - 20px);
  }
  .project-modal__content {
    padding: 78px 22px 38px;
  }
  .project-modal h2 {
    font-size: clamp(42px, 14vw, 68px);
  }
}

/* WordPress integration */
body.ize-portfolio {
  width: 100%;
  max-width: none;
  overflow-x: clip;
}
.admin-bar .site-header {
  top: 32px;
}
#wpadminbar img {
  display: inline;
  width: auto;
}
@media screen and (max-width: 782px) {
  .admin-bar .site-header {
    top: 46px;
  }
}
